MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes | List of all members
ResonancePropertiesList Class Reference

#include <ResonancePropertiesList.h>

Public Member Functions

const ResonancePropertiesAddToListIfMissing (int pdg)
 
const std::string & prefix () const
 
const ResonancePropertiesget (int i) const
 
const MINT::FitParameterradius () const
 

Static Public Member Functions

static ResonancePropertiesListgetMe (const std::string &prefix="", MINT::MinuitParameterSet *mps=0)
 

Protected Member Functions

const ResonancePropertiesAddToList (ResonanceProperties *rp)
 
MINT::MinuitParameterSetgetMinuitParameterSet ()
 
const MINT::MinuitParameterSetgetMinuitParameterSet () const
 

Protected Attributes

MINT::MinuitParameterSet_mps
 
std::string _prefix
 
MINT::FitParameter _radius
 
std::vector< ResonanceProperties * > theList
 
std::map< int, ResonanceProperties * > byID
 

Private Member Functions

 ResonancePropertiesList (const std::string &namePrefix="", MINT::MinuitParameterSet *mps=0)
 

Static Private Attributes

static std::map< std::pair< std::string, const MINT::MinuitParameterSet * >, ResonancePropertiesList * > _mapOfLists
 

Detailed Description

Definition at line 17 of file ResonancePropertiesList.h.

Constructor & Destructor Documentation

◆ ResonancePropertiesList()

ResonancePropertiesList::ResonancePropertiesList ( const std::string &  namePrefix = "",
MINT::MinuitParameterSet mps = 0 
)
private

Definition at line 68 of file ResonancePropertiesList.cpp.

69  : _mps(mps)
70  , _prefix(namePrefix)
71  , _radius(namePrefix + "BW_radius", 1, 1.5/GeV, 0, 0, 0, mps, NamedParameterBase::QUIET) //, _rp(10323)
72 {
73 
74  /*
75  cout << "Hello from ResonancePropertiesList::ResonancePropertiesList" << endl;
76  cout << "I think I initialised _radius" << endl;
77  cout << "here we go" << endl;
78  cout << _radius << endl;
79  */
80 
81  //fix BW radius to default value if not explicitly initiallised
82  //if(_radius.iFixInit() && _radius== 0) _radius = 1.5/GeV;
83 
84  /*
85  const ParticlePropertiesList* PPL = ParticlePropertiesList::getMe();
86  const std::list<ParticleProperties> theParticleList = PPL->getList();
87  for(std::list<ParticleProperties>::const_iterator it= theParticleList.begin();it != theParticleList.end(); it++){
88  if(it->pdg_id>0)
89  ResonanceProperties* rp= new ResonanceProperties(it->pdg_id());
90  theList.push_back(rp);
91  }
92  */
93 }
static const double GeV
MINT::MinuitParameterSet * _mps

Member Function Documentation

◆ AddToList()

const ResonanceProperties * ResonancePropertiesList::AddToList ( ResonanceProperties rp)
protected

Definition at line 102 of file ResonancePropertiesList.cpp.

102  {
103  //theList.push_back(rp);
104  if(0 != rp) byID[rp->pid()] = rp;
105  return rp;
106 }
std::map< int, ResonanceProperties * > byID

◆ AddToListIfMissing()

const ResonanceProperties * ResonancePropertiesList::AddToListIfMissing ( int  pdg)

Definition at line 108 of file ResonancePropertiesList.cpp.

108  {
109  const ResonanceProperties* rp = this->get(pdg_id);
110  if(0 == rp){
112  this->AddToList(rpnew);
113  rp=rpnew;
114  }
115  return rp;
116 }
const std::string & prefix() const
const ResonanceProperties * get(int i) const
MINT::MinuitParameterSet * getMinuitParameterSet()
const ResonanceProperties * AddToList(ResonanceProperties *rp)

◆ get()

const ResonanceProperties * ResonancePropertiesList::get ( int  i) const

Definition at line 119 of file ResonancePropertiesList.cpp.

119  {
120  // assume CPT holds
121  int id = abs(id_in);
122  std::map<int, ResonanceProperties*>::const_iterator it = byID.find(id);
123  if(it == byID.end()) return 0;
124  return it->second;
125 }
std::map< int, ResonanceProperties * > byID

◆ getMe()

ResonancePropertiesList * ResonancePropertiesList::getMe ( const std::string &  prefix = "",
MINT::MinuitParameterSet mps = 0 
)
static

Definition at line 20 of file ResonancePropertiesList.cpp.

20  {
21  //cout << "Hello from ResonancePropertiesList::getMe()" << endl;
23  if(0 == mps) mps = MinuitParameterSet::getDefaultSet();
24  std::pair<std::string, const MINT::MinuitParameterSet*> nameAndSet(namePrefix, mps);
25 
26  // auto it=_mapOfLists.find(nameAndSet);
27  map<pair<string, const MinuitParameterSet*>, ResonancePropertiesList*>::iterator it=_mapOfLists.find(nameAndSet);
28 
29  if(_mapOfLists.end() != it) ptr=it->second;
30  if(0 == ptr){
31  //cout << "ResonancePropertiesList: making myself" << endl;
32  ptr = new ResonancePropertiesList(namePrefix, mps);
33  }
34  if(0 == ptr){
35  cout << "ERROR in ResonanceProperties::getMe( " << namePrefix << " )"
36  << " Couldn't get ResonancePropertiesList (i.e. myself)"
37  << "\n\t This is a serious problem. Will crash."
38  << endl;
39  throw "No ResonancePropertiesList";
40  }
41  _mapOfLists[nameAndSet] = ptr;
42 
43  return ptr;
44 }
ResonancePropertiesList(const std::string &namePrefix="", MINT::MinuitParameterSet *mps=0)
static std::map< std::pair< std::string, const MINT::MinuitParameterSet * >, ResonancePropertiesList * > _mapOfLists

◆ getMinuitParameterSet() [1/2]

MINT::MinuitParameterSet * ResonancePropertiesList::getMinuitParameterSet ( )
protected

Definition at line 97 of file ResonancePropertiesList.cpp.

97  {
98  if(0 == _mps) _mps = MinuitParameterSet::getDefaultSet();
99  return _mps;
100 }
MINT::MinuitParameterSet * _mps

◆ getMinuitParameterSet() [2/2]

const MINT::MinuitParameterSet * ResonancePropertiesList::getMinuitParameterSet ( ) const
protected

Definition at line 94 of file ResonancePropertiesList.cpp.

94  {
95  return _mps;
96 }
MINT::MinuitParameterSet * _mps

◆ prefix()

const std::string& ResonancePropertiesList::prefix ( ) const
inline

Definition at line 51 of file ResonancePropertiesList.h.

51 {return _prefix;}

◆ radius()

const MINT::FitParameter& ResonancePropertiesList::radius ( ) const
inline

Definition at line 54 of file ResonancePropertiesList.h.

54 {return _radius;}

Member Data Documentation

◆ _mapOfLists

std::map< std::pair< std::string, const MINT::MinuitParameterSet * >, ResonancePropertiesList * > ResonancePropertiesList::_mapOfLists
staticprivate

Definition at line 29 of file ResonancePropertiesList.h.

◆ _mps

MINT::MinuitParameterSet* ResonancePropertiesList::_mps
protected

Definition at line 34 of file ResonancePropertiesList.h.

◆ _prefix

std::string ResonancePropertiesList::_prefix
protected

Definition at line 35 of file ResonancePropertiesList.h.

◆ _radius

MINT::FitParameter ResonancePropertiesList::_radius
protected

Definition at line 37 of file ResonancePropertiesList.h.

◆ byID

std::map<int, ResonanceProperties* > ResonancePropertiesList::byID
protected

Definition at line 41 of file ResonancePropertiesList.h.

◆ theList

std::vector<ResonanceProperties*> ResonancePropertiesList::theList
protected

Definition at line 39 of file ResonancePropertiesList.h.


The documentation for this class was generated from the following files: