File indexing completed on 2025-01-30 10:11:34
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef PARTICLEDATA_HH
0009 #define PARTICLEDATA_HH
0010
0011 #include <algorithm> // swap()
0012 #include <list>
0013 #include <string>
0014
0015 #include "HepPDT/ParticleID.hh"
0016 #include "HepPDT/CommonParticleData.hh"
0017 #include "HepPDT/Measurement.hh"
0018 #include "HepPDT/SpinState.hh"
0019 #include "HepPDT/ResonanceStructure.hh"
0020 #include "HepPDT/Constituent.hh"
0021 #include "HepPDT/TempParticleData.hh"
0022 #include "HepPDT/DecayData.hh"
0023 #include "HepPDT/DecayChannel.hh"
0024
0025 namespace HepPDT {
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 class ParticleData {
0036
0037 public:
0038
0039
0040 typedef CommonParticleData CPD;
0041
0042 typedef std::list<CPD> CPDlist;
0043 typedef std::list<DecayData> DDlist;
0044
0045 typedef std::list<CPD>::const_iterator CPDID;
0046 typedef std::list<DecayData>::const_iterator DDID;
0047
0048
0049
0050
0051 inline ParticleData( const CPDID & cpdid, const DDID & ddid );
0052
0053 inline ~ParticleData();
0054
0055
0056
0057 inline void swap( ParticleData & other );
0058 inline ParticleData( const ParticleData & orig );
0059 inline ParticleData& operator = ( const ParticleData & rhs );
0060
0061
0062
0063
0064 const std::string & name() const { return itsCPDID->name(); }
0065
0066 ParticleID ID() const { return itsCPDID->ID(); }
0067
0068 int pid( ) const { return itsCPDID->ID().pid(); }
0069
0070 double charge() const { return itsCPDID->charge(); }
0071
0072 double color() const { return itsCPDID->color(); }
0073
0074 SpinState spin() const { return itsCPDID->spin(); }
0075
0076 Measurement mass() const { return itsCPDID->mass(); }
0077
0078 Measurement totalWidth() const { return itsCPDID->totalWidth(); }
0079
0080 Measurement lifetime() const { return itsCPDID->lifetime(); }
0081
0082 double lowerCutoff() const { return itsCPDID->lowerCutoff(); }
0083
0084 double upperCutoff() const { return itsCPDID->upperCutoff(); }
0085
0086 int numConstituents() const { return itsCPDID->numConstituents(); }
0087
0088 inline Constituent constituent( unsigned int i ) const
0089 { return itsCPDID->constituent(i); }
0090
0091 inline ParticleID constituentParticle( unsigned int i ) const
0092 { return itsCPDID->constituentParticle(i); }
0093
0094 ResonanceStructure const resonance() const { return itsCPDID->resonance(); }
0095
0096
0097
0098
0099 bool isMeson( ) const { return itsCPDID->isMeson(); }
0100
0101 bool isBaryon( ) const { return itsCPDID->isBaryon(); }
0102
0103 bool isDiQuark( ) const { return itsCPDID->isDiQuark(); }
0104
0105 bool isHadron( ) const { return itsCPDID->isHadron(); }
0106
0107 bool isLepton( ) const { return itsCPDID->isLepton(); }
0108
0109 bool isNucleus( ) const { return itsCPDID->isNucleus(); }
0110
0111 bool isPentaquark( ) const { return itsCPDID->isPentaquark(); }
0112
0113 bool isSUSY( ) const { return itsCPDID->isSUSY(); }
0114
0115 bool isRhadron( ) const { return itsCPDID->isRhadron(); }
0116
0117
0118 bool hasUp() const { return itsCPDID->hasUp(); }
0119
0120 bool hasDown() const { return itsCPDID->hasDown(); }
0121
0122 bool hasStrange() const { return itsCPDID->hasStrange(); }
0123
0124 bool hasCharm() const { return itsCPDID->hasCharm(); }
0125
0126 bool hasBottom() const { return itsCPDID->hasBottom(); }
0127
0128 bool hasTop() const { return itsCPDID->hasTop(); }
0129
0130 bool isStable() const;
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147 int numDecayChannels() const { return itsDDID->size(); }
0148
0149 bool hasDecayData() const { return itsDDID->isStable(); }
0150
0151 DecayChannel channel( int i ) const { return itsDDID->channel(i); }
0152
0153
0154
0155
0156
0157 void setDecayData( DDID dd ) { itsDDID = dd; }
0158
0159
0160
0161
0162 DDID getDecayData() const { return itsDDID; }
0163
0164 CPDID getCommonParticleData() const { return itsCPDID; }
0165
0166
0167 inline void write( std::ostream & os ) const;
0168
0169 inline void writeParticleInfo( std::ostream & os ) const;
0170
0171 inline void writeParticleTranslation( std::ostream & os ) const;
0172
0173
0174
0175
0176
0177
0178 private:
0179
0180
0181
0182 CPDID itsCPDID;
0183 DDID itsDDID;
0184
0185
0186 ParticleData( );
0187
0188 };
0189
0190 inline
0191 void swap( ParticleData & first, ParticleData & second ) {
0192 first.swap( second );
0193 }
0194
0195 }
0196
0197 #include "HepPDT/ParticleData.icc"
0198
0199 #endif