File indexing completed on 2026-08-06 09:20:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef EVTPDL_HH
0022 #define EVTPDL_HH
0023
0024 #include "EvtGenBase/EvtId.hh"
0025 #include "EvtGenBase/EvtPartProp.hh"
0026 #include "EvtGenBase/EvtSpinType.hh"
0027 #include "EvtGenBase/EvtStringHash.hh"
0028
0029 #include <map>
0030 #include <vector>
0031 #include <string>
0032 #include <iostream>
0033
0034 const int SPIN_NAME_LENGTH = 100;
0035
0036 class EvtPDL final {
0037 public:
0038 EvtPDL();
0039
0040 void read( const std::string& fname );
0041 void readPDT( std::istream& data );
0042
0043 static double getMeanMass( EvtId i );
0044 static double getMass( EvtId i );
0045 static double getRandMass( EvtId i, EvtId* parId, int nDaug, EvtId* dauId,
0046 EvtId* othDaugId, double maxMass,
0047 double* dauMasses );
0048 static double getMassProb( EvtId i, double mass, double massPar, int nDaug,
0049 double* massDau );
0050
0051 static double getMaxMass( EvtId i );
0052 static double getMinMass( EvtId i );
0053
0054 static double getMaxRange( EvtId i );
0055 static double getWidth( EvtId i );
0056 static double getctau( EvtId i );
0057 static int getStdHep( EvtId id );
0058 static int getLundKC( EvtId id );
0059
0060
0061 static EvtId evtIdFromLundKC( int pythiaId );
0062 static EvtId evtIdFromStdHep( int stdhep );
0063 static EvtId chargeConj( EvtId id );
0064 static int chg3( EvtId i );
0065 static EvtSpinType::spintype getSpinType( EvtId i );
0066 static EvtId getId( const std::string& name );
0067 static std::string name( EvtId i );
0068 static void alias( EvtId num, const std::string& newname );
0069 static void aliasChgConj( EvtId a, EvtId abar );
0070 static size_t entries();
0071 static EvtId getEntry( int i );
0072 static void reSetMass( EvtId i, double mass );
0073 static void reSetWidth( EvtId i, double width );
0074 static void reSetMassMin( EvtId i, double mass );
0075 static void reSetMassMax( EvtId i, double mass );
0076 static void reSetBlatt( EvtId i, double blatt );
0077 static void reSetBlattBirth( EvtId i, double blatt );
0078 static void includeBirthFactor( EvtId i, bool yesno );
0079 static void includeDecayFactor( EvtId i, bool yesno );
0080 static void changeLS( EvtId i, std::string& newLS );
0081 static void setPWForDecay( EvtId i, int spin, EvtId d1, EvtId d2 );
0082 static void setPWForBirthL( EvtId i, int spin, EvtId par, EvtId othD );
0083
0084 private:
0085 void setUpConstsPdt();
0086
0087 static unsigned int _firstAlias;
0088 static int _nentries;
0089
0090 static std::vector<EvtPartProp>& partlist()
0091 {
0092 static std::vector<EvtPartProp> s_partlist;
0093 return s_partlist;
0094 }
0095
0096 static std::map<std::string, int> _particleNameLookup;
0097
0098 };
0099
0100 #endif