Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CLHEP
CLHEP
Commits
c3495a44
Commit
c3495a44
authored
Jul 27, 2005
by
Lynn Garren
Browse files
merging changes from 1.9 HepPDT
parent
91b31387
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
c3495a44
2005-07-27 Lynn Garren <garren@fnal.gov>
* HepPDT/convertTemporaryMap.icc: Fill DecayData properly.
Also get proper particle names when parsing PDG table.
==============================
22.06.05 Release CLHEP-2.0.2.1
==============================
...
...
HepPDT/ChangeLog
View file @
c3495a44
2005-07-27 Lynn Garren <garren@fnal.gov>
* convertTemporaryMap.icc: Fill DecayData properly.
Also get proper particle names when parsing PDG table.
==============================
22.06.05 Release CLHEP-2.0.2.1
==============================
...
...
HepPDT/HepPDT/DecayChannelT.hh
View file @
c3495a44
...
...
@@ -27,7 +27,7 @@ class DecayChannelT {
public:
// --- useful typedef's
//
typedef
typename
Config
::
ParticleData
PD
;
// ParticleDataType
typedef
typename
Config
::
ParticleData
*
PD
;
// ParticleDataType
typedef
typename
Config
::
PT
PT
;
// ParticleType
typedef
std
::
vector
<
PD
>
ProductMap
;
...
...
@@ -80,7 +80,7 @@ private:
std
::
string
itsDecayName
;
Measurement
itsBranchingFraction
;
ProductMap
itsDecayChannelProducts
;
std
::
vector
<
double
>
itsDecayModelParameters
;
std
::
vector
<
double
>
itsDecayModelParameters
;
DecayModelBase
<
Config
>
*
itsDecayModel
;
};
// DecayChannelT
...
...
HepPDT/HepPDT/DecayChannelT.icc
View file @
c3495a44
...
...
@@ -58,10 +58,12 @@ void DecayChannelT<Config>::write( std::ostream & os ) const
{
typename ProductMap::const_iterator cit;
os << " " << itsDecayName << " " << itsBranchingFraction;
for( cit=itsDecayChannelProducts.begin();
cit != itsDecayChannelProducts.end(); ++cit ) {
PD pd = *cit;
os << " " << pd.name();
if( itsDecayChannelProducts.size() > 0 ) {
for( cit=itsDecayChannelProducts.begin();
cit != itsDecayChannelProducts.end(); ++cit ) {
PD pd = *cit;
os << " " << pd->name();
}
}
os << std::endl;
}
...
...
HepPDT/HepPDT/ParticleDataT.hh
View file @
c3495a44
...
...
@@ -105,6 +105,7 @@ public:
// --- DecayData mutators:
//
void
appendMode
(
DecayChannel
const
&
dcp
)
{
itsDDID
->
appendMode
(
dcp
);
}
void
setDecayData
(
DDID
dd
)
{
itsDDID
=
dd
;
}
// --- accessors:
//
...
...
@@ -120,10 +121,6 @@ public:
//
//bool operator < ( ParticleDataT<Config> const & other ) const;
//bool operator == ( ParticleDataT<Config> const & other ) const;
// --- mutator:
//
void
setDecayData
(
DDID
dd
)
{
itsDDID
=
dd
;
}
private:
...
...
HepPDT/HepPDT/ParticleDataTableT.hh
View file @
c3495a44
...
...
@@ -38,7 +38,7 @@ public:
typedef
std
::
map
<
ParticleID
,
TempParticleData
>
TempMap
;
typedef
std
::
map
<
ParticleID
,
ParticleData
>
PDTMap
;
typedef
std
::
map
<
std
::
string
,
Particle
Data
>
PDTNameMap
;
typedef
std
::
map
<
std
::
string
,
Particle
ID
>
PDTNameMap
;
typedef
typename
PDTMap
::
const_iterator
const_iterator
;
typedef
typename
PDTNameMap
::
const_iterator
const_iteratorByName
;
...
...
HepPDT/HepPDT/ParticleDataTableT.icc
View file @
c3495a44
...
...
@@ -28,7 +28,7 @@ typename ParticleDataTableT<Config>::ParticleData * ParticleDataTableT<Config>::
return & it->second;
} else {
//std::cerr << "cannot find particle " << id << " in map" << std::endl;
return
NULL
;
return
0
;
}
}
...
...
@@ -42,7 +42,7 @@ typename ParticleDataTableT<Config>::ParticleData const * ParticleDataTableT<Con
return & cit->second;
} else {
//std::cerr << "cannot find particle " << id << " in map" << std::endl;
return
NULL
;
return
0
;
}
}
...
...
@@ -61,26 +61,24 @@ typename ParticleDataTableT<Config>::ParticleData const * ParticleDataTableT<Con
template< class Config >
typename ParticleDataTableT<Config>::ParticleData * ParticleDataTableT<Config>::particle( std::string nkey)
{
nameIterator it;
it = itsNameMap.find( nkey );
nameIterator it = itsNameMap.find( nkey );
if( it != itsNameMap.end() ) {
return
&
it->second;
return
particle(
it->second
)
;
} else {
//std::cerr << "cannot find particle " << nkey << " in map" << std::endl;
return
NULL
;
return
0
;
}
}
template< class Config >
typename ParticleDataTableT<Config>::ParticleData const * ParticleDataTableT<Config>::particle( std::string nkey ) const
{
const_iteratorByName cit;
cit = itsNameMap.find( nkey );
const_iteratorByName cit = itsNameMap.find( nkey );
if( cit != itsNameMap.end() ) {
return
&
cit->second;
return
particle(
cit->second
)
;
} else {
//std::cerr << "cannot find particle " << nkey << " in map" << std::endl;
return
NULL
;
return
0
;
}
}
...
...
@@ -103,6 +101,7 @@ void ParticleDataTableT<Config>::writeParticleData( std::ostream & outstr )
outstr << std::endl;
outstr << "HepPDT-ParticleDataTable-begin" << std::endl;
outstr << " ***** ParticleDataTable *****" << std::endl;
writeVersion( outstr );
outstr << " Table Name : " << tableName() << std::endl;
outstr << " ( " << size() << " entries )" << std::endl;
outstr << "PARTICLE NAME ID CHARGE COLOR"
...
...
@@ -128,6 +127,7 @@ void ParticleDataTableT<Config>::writeParticleInfo( std::ostream & outstr )
outstr << std::endl;
outstr << "HepPDT-ParticleDataTable-Particle-Information-begin" << std::endl;
outstr << " ***** ParticleDataTable *****" << std::endl;
writeVersion( outstr );
outstr << " Table Name : " << tableName() << std::endl;
outstr << " ( " << size() << " entries )" << std::endl;
outstr << "PARTICLE NAME ID CHARGE COLOR"
...
...
@@ -170,7 +170,7 @@ void ParticleDataTableT<Config>::addParticle( ParticleData const & p )
ParticleID id=p.ID();
//std::string nid(p.name());
itsMap.insert( std::make_pair( id, p ));
itsNameMap.insert( std::make_pair( p.name(),
p
));
itsNameMap.insert( std::make_pair( p.name(),
id
));
}
} // HepPDT
HepPDT/HepPDT/Version.hh
View file @
c3495a44
...
...
@@ -10,10 +10,12 @@
#define HEPPDTVERSION_HH
#include
<string>
#include
<iostream>
namespace
HepPDT
{
void
version
(
);
// print version
void
version
(
);
// print version
void
writeVersion
(
std
::
ostream
&
os
);
// write version to os
std
::
string
versionName
(
);
// return version
}
// HepPDT
...
...
HepPDT/HepPDT/convertTemporaryMap.icc
View file @
c3495a44
...
...
@@ -8,21 +8,42 @@
namespace HepPDT {
template< class Config >
void ParticleDataTableT<Config>::convertTemporaryMap( TempMap & tempPDT, std::ostream &
os
)
void ParticleDataTableT<Config>::convertTemporaryMap( TempMap & tempPDT, std::ostream &
err
)
{
TempMap::iterator cit;
std::vector<TempDecayData>::const_iterator cit2;
// need an empty DecayData
DecayData nodecay;
DDID edid = addDecayData( nodecay );
// first loop and create a PD map with empty DecayData
for( cit=tempPDT.begin(); cit != tempPDT.end(); ++cit ) {
TempParticleData & tempd = cit->second;
// create CPD and add it to the list
CPD cpd( tempd );
CPDID cid = addParticleData( cpd );
// now create ParticleData and add it to the map
ParticleData pd( cid, edid );
addParticle( pd );
}
// now loop again and add the DecayData
std::vector<TempDecayData>::const_iterator cit2;
for( cit=tempPDT.begin(); cit != tempPDT.end(); ++cit ) {
// find the PD for this particle
TempParticleData & tempd = cit->second;
ParticleDataT<Config>* thisPD( particle( tempd.tempID ));
// convert TempDecayData to DecayChannel
std::vector<DecayChannelT<Config> > dv;
for( cit2=tempd.tempDecayList.begin(); cit2 != tempd.tempDecayList.end(); ++cit2 ) {
TempDecayData tdd = *cit2;
// every PD mentioned here must already be in the list........
std::vector<ParticleDataT<Config> > decaylist;
std::vector< ParticleDataT<Config>* > decaylist;
for( unsigned int i=0; i<tdd.tempDaughterList.size(); ++i ) {
ParticleDataT<Config>* dtr( particle( tdd.tempDaughterList[i] ));
if( dtr ) {
decaylist.push_back( dtr );
//} else {
// err << " cannot find match for decay product "
// << tdd.tempDaughterList[i] << std::endl;
}
}
DecayChannelT<Config> dc( tdd.tempDecayName,
Measurement( tdd.tempBranchingFraction, 0.),
decaylist,
...
...
@@ -32,10 +53,9 @@ void ParticleDataTableT<Config>::convertTemporaryMap( TempMap & tempPDT, std::os
// create DD and add it to the list
DecayData dd( dv );
DDID did = addDecayData( dd );
// now create ParticleData and add it to the map
ParticleData pd( cid, did );
// std::cout << "adding " << pd->ID().pid() << std::endl;
addParticle( pd );
// now add this DecayData to the ParticleData
thisPD->setDecayData( did );
}
}
...
...
HepPDT/examples/examListHerwig.cc
View file @
c3495a44
// $Id: examListHerwig.cc,v 1.1.2.4 2005/07/27 18:45:07 garren Exp $
// -------------------------------------------------------------------
//
// List the herwig translation
...
...
HepPDT/examples/examListIsajet.cc
View file @
c3495a44
// $Id: examListIsajet.cc,v 1.1.2.4 2005/07/27 18:45:07 garren Exp $
// -------------------------------------------------------------------
//
// List the isajet translation
...
...
HepPDT/examples/examMyPDT.cc
View file @
c3495a44
// $Id: examMyPDT.cc,v 1.2.4.3 2005/07/27 18:45:07 garren Exp $
// ----------------------------------------------------------------------
// examMyPDT.cc
//
...
...
HepPDT/examples/examMyPDT.out.save
View file @
c3495a44
HepPDT-ParticleDataTable-begin
***** ParticleDataTable *****
HepPDT Version: 1.02.00
Table Name :
( 5 entries )
PARTICLE NAME ID CHARGE COLOR SPIN: J S L MASS WIDTH LIFETIME
...
...
HepPDT/examples/examReadEvtGen.cc
View file @
c3495a44
// $Id: examReadEvtGen.cc,v 1.2.4.3 2005/07/27 18:45:07 garren Exp $
// ----------------------------------------------------------------------
// examReadEvtGen.cc
//
...
...
HepPDT/examples/examReadEvtGen.out.save
View file @
c3495a44
This diff is collapsed.
Click to expand it.
HepPDT/examples/examReadPDG.out.save
View file @
c3495a44
This diff is collapsed.
Click to expand it.
HepPDT/examples/examReadPythia.cc
View file @
c3495a44
// $Id: examReadPythia.cc,v 1.2.4.3 2005/07/27 18:45:07 garren Exp $
// ----------------------------------------------------------------------
// examReadPythia.cc
//
...
...
HepPDT/examples/examReadPythia.out.save
View file @
c3495a44
This diff is collapsed.
Click to expand it.
HepPDT/examples/examReadQQ.cc
View file @
c3495a44
// $Id: examReadQQ.cc,v 1.2.4.3 2005/07/27 18:45:08 garren Exp $
// ----------------------------------------------------------------------
// examReadQQ.cc
//
...
...
HepPDT/examples/examReadQQ.out.save
View file @
c3495a44
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment