#include <ParticlePropertiesList.h>
|
static std::vector< std::string > | _dirList |
|
Definition at line 14 of file ParticlePropertiesList.h.
◆ ParticlePropertiesList()
ParticlePropertiesList::ParticlePropertiesList |
( |
std::string |
fname_in = "mass_width.cvs" | ) |
|
|
private |
Definition at line 168 of file ParticlePropertiesList.cpp.
172 std::cout <<
"ERROR! in ParticleProperties constructor:" 173 <<
" Problem reading file "
◆ dirList()
const std::vector< std::string > & ParticlePropertiesList::dirList |
( |
| ) |
|
|
staticprotected |
◆ fillDirList()
void ParticlePropertiesList::fillDirList |
( |
| ) |
|
|
staticprotected |
Definition at line 89 of file ParticlePropertiesList.cpp.
92 (
char*)0, NamedParameterBase::QUIET);
93 for(
int i=0; i < userDir.size(); i++){
94 if(
"" != userDir.getVal(i)){
95 _dirList.push_back(userDir.getVal(i) +
"/");
103 std::string MintRoot(
".");
105 Mintevn = getenv (
"MINT2");
106 if (NULL != Mintevn){
110 std::string DecFilesRoot(
"UNKNOWN");
112 DecFiles = getenv (
"DECFILESROOT");
113 if (NULL != DecFiles){
114 DecFilesRoot = DecFiles;
119 _dirList.push_back(MintRoot+
"/share/");
120 _dirList.push_back(DecFilesRoot+
"/MintData/");
static std::vector< std::string > _dirList
◆ findFiles()
FILE * ParticlePropertiesList::findFiles |
( |
| ) |
|
|
protected |
Definition at line 124 of file ParticlePropertiesList.cpp.
static FILE * findThisFile(const std::string &fname)
static std::string _MintDalitzSpecialParticles
◆ findThisFile()
FILE * ParticlePropertiesList::findThisFile |
( |
const std::string & |
fname | ) |
|
|
staticprotected |
Definition at line 142 of file ParticlePropertiesList.cpp.
144 for(std::vector<std::string>::const_iterator it =
dirList().begin();
148 std::string tryThisDir = (*it);
149 std::string fullFname = tryThisDir + fname;
150 if(verbose)cout <<
"INFO in ParticlePropertiesList: trying: " << fullFname << endl;
151 FILE* f=fopen(fullFname.c_str(),
"r");
153 cout <<
"INFO in ParticlePropertiesList: Using this file: " 154 << fullFname << endl;
159 cout <<
"ERROR in ParticlePropertiesList::findFile()" 160 <<
"\n > having trouble finding file" 161 <<
"\n > with name " << fname
162 <<
"\n > in any directory I could guess." 163 <<
"\n > This is hardcoded in ParticleProperties.C." static const std::vector< std::string > & dirList()
◆ get() [1/2]
Definition at line 237 of file ParticlePropertiesList.cpp.
238 std::map<std::string, std::list<ParticleProperties>::iterator >::const_iterator it
240 if(it ==
byName.end())
return 0;
242 return &(*(it->second));
std::map< std::string, std::list< ParticleProperties >::iterator > byName
◆ get() [2/2]
Definition at line 244 of file ParticlePropertiesList.cpp.
245 std::map<int, std::list<ParticleProperties>::iterator >::const_iterator it
247 if(it ==
byID.end())
return 0;
249 return &(*(it->second));
std::map< int, std::list< ParticleProperties >::iterator > byID
◆ getMe()
Definition at line 21 of file ParticlePropertiesList.cpp.
26 cout <<
"ERROR in ParticlceProperties::getMe" 27 <<
" Couldn't get ParticlePropertiesList (i.e. myself)" 28 <<
"\n\t This is a serious problem. Will crash." 30 throw "No ParticlePropertiesList";
ParticlePropertiesList(std::string fname_in="mass_width.cvs")
static ParticlePropertiesList * ptr
◆ mass() [1/2]
double ParticlePropertiesList::mass |
( |
const std::string & |
name | ) |
|
|
static |
Definition at line 50 of file ParticlePropertiesList.cpp.
const ParticleProperties * get(const std::string &name) const
static void printCannotFindWarning(const std::string &where, const std::string &what)
static const ParticlePropertiesList * getMe()
◆ mass() [2/2]
double ParticlePropertiesList::mass |
( |
int |
PDG | ) |
|
|
static |
Definition at line 58 of file ParticlePropertiesList.cpp.
const ParticleProperties * get(const std::string &name) const
static void printCannotFindWarning(const std::string &where, const std::string &what)
static const ParticlePropertiesList * getMe()
◆ print()
void ParticlePropertiesList::print |
( |
std::ostream & |
out = std::cout | ) |
const |
◆ printCannotFindWarning() [1/2]
void ParticlePropertiesList::printCannotFindWarning |
( |
const std::string & |
where, |
|
|
const std::string & |
what |
|
) |
| |
|
staticprotected |
Definition at line 35 of file ParticlePropertiesList.cpp.
37 cout <<
"WARNING in ParticlceProperties::" << where
38 <<
" Got ParticlePropertiesList, but couldn't find "
◆ printCannotFindWarning() [2/2]
void ParticlePropertiesList::printCannotFindWarning |
( |
const std::string & |
where, |
|
|
int |
what |
|
) |
| |
|
staticprotected |
Definition at line 42 of file ParticlePropertiesList.cpp.
44 cout <<
"WARNING in ParticlceProperties::" << where
45 <<
" Got ParticlePropertiesList, but couldn't find "
◆ readFiles()
bool ParticlePropertiesList::readFiles |
( |
| ) |
|
|
protected |
Definition at line 179 of file ParticlePropertiesList.cpp.
180 bool shoutIfTwice=
true;
183 cout <<
"reading " << counter <<
"th file" << endl;
184 if(0==f)
return false;
186 static const int lineLength=800;
187 char line[lineLength]={
'\0'};
189 while(fgets(line, lineLength, f)){
191 if(! P.isValid())
continue;
194 if(P.hasDistinctAnti()){
203 for(std::list<ParticleProperties>::iterator it=
theList.begin();
206 if(shoutIfTwice && it->pdg_id() != 0){
207 map<int, list<ParticleProperties>::iterator >::iterator found =
byID.find(it->pdg_id());
208 if(found !=
byID.end()){
209 cout <<
"WARNING in ParticlePropertiesList::readFiles " 210 <<
"pdg_id " << it->pdg_id() <<
" used twice, here: " 211 << (found->second)->name()
212 <<
", and here:\n " << it->name()
214 cout <<
" Important: Note that this is probably not be a MintDalitz error - " 215 <<
"\n some particles (the 'non-established' ones) have the same PDG code." 216 <<
"\n To use those realiably, you'll need to put your own copy of the" 217 <<
"\n mass_width.cvs file, put it into your run-directory, and edit the file" 218 <<
"\n so that your particle has a unique PID code." 219 <<
"\n -----------------------" 223 byID[it->pdg_id()] = it;
std::map< int, std::list< ParticleProperties >::iterator > byID
std::list< ParticleProperties > theList
std::map< std::string, std::list< ParticleProperties >::iterator > byName
◆ width() [1/2]
double ParticlePropertiesList::width |
( |
const std::string & |
name | ) |
|
|
static |
Definition at line 66 of file ParticlePropertiesList.cpp.
72 return props->
width();
const ParticleProperties * get(const std::string &name) const
static void printCannotFindWarning(const std::string &where, const std::string &what)
static const ParticlePropertiesList * getMe()
◆ width() [2/2]
double ParticlePropertiesList::width |
( |
int |
PDG | ) |
|
|
static |
Definition at line 74 of file ParticlePropertiesList.cpp.
80 return props->
width();
const ParticleProperties * get(const std::string &name) const
static void printCannotFindWarning(const std::string &where, const std::string &what)
static const ParticlePropertiesList * getMe()
◆ _dirList
std::vector< std::string > ParticlePropertiesList::_dirList |
|
staticprotected |
◆ _fname
std::string ParticlePropertiesList::_fname |
|
protected |
◆ _MintDalitzSpecialParticles
std::string ParticlePropertiesList::_MintDalitzSpecialParticles ="MintDalitzSpecialParticles.cvs" |
|
staticprivate |
◆ byID
◆ byName
std::map<std::string, std::list<ParticleProperties>::iterator > ParticlePropertiesList::byName |
|
protected |
◆ ptr
◆ theList
The documentation for this class was generated from the following files: