StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Photos.h
1 #ifndef _Photos_h_included_
2 #define _Photos_h_included_
3 
15 #include <stdarg.h>
16 #include <vector>
17 #include "PhotosParticle.h"
18 #include "PhotosRandom.h"
19 #include "photosC.h"
20 // WARNING: VARIANT B of phase space generation was not tested in C++ for all
21 // options of the program initialization..
22 //#define VARIANTB true
23 using std::vector;
24 using std::pair;
25 
26 namespace Photospp
27 {
28 
29 class PhotosParticle;
30 
31 class Photos
32 {
33 public:
34  static const int VER_MAJOR=3, VER_MINOR=61;
35  static const int DAT_DAY =29, DAT_MONTH=9, DAT_YEAR=15;
36 
38  static enum MomentumUnits { DEFAULT_MOMENTUM=-1, MEV, GEV } momentumUnit;
39 
40 
41 public:
42 
45  static void initialize();
46 
49  static void iniInfo();
50 
52  static void processParticle(PhotosParticle *p);
54  static void processBranch(PhotosParticle *p);
55 
57  static void suppressBremForDecay (int count, int motherID, ... );
59  static void suppressBremForBranch(int count, int motherID, ... );
60 
62  static void suppressAll() { isSuppressed=true; }
63 
65  static void forceBremForDecay (int count, int motherID, ... );
66 
68  static void forceBremForBranch(int count, int motherID, ... );
69 
73  static void IPHEKL_setPi0KLnoEmission(int m);
74 
75  static bool IPHQRK_setQarknoEmission(int MODCOR, int PDGID);
76 
79  static void createHistoryEntries(bool flag, int status);
80 
82  static void ignoreParticlesOfStatus(int status);
83 
85  static void deIgnoreParticlesOfStatus(int status);
86 
88  static bool isStatusCodeIgnored(int status);
89 public:
91  static void setRandomGenerator( double (*gen)() );
92 
94  static void setSeed(int iseed1, int iseed2) { PhotosRandom::setSeed(iseed1,iseed2); }
95 
97  static void maxWtInterference(double interference) { phokey.fint=interference; }
98 
100  static void setInfraredCutOff(double cut_off) { phocop.xphcut=cut_off; }
101 
103  static void setAlphaQED(double alpha) { phocop.alpha=alpha; }
104 
106  static void setInterference(bool interference) { phokey.interf=(int)interference; }
107 
109  static void setDoubleBrem(bool doub) { phokey.isec=(int)doub; }
110 
112  static void setQuatroBrem(bool quatroBrem) { phokey.itre=(int)quatroBrem; }
113 
114  /* Key for partial effects of matrix element (in leptonic W decays) */
115  static void setCorrectionWtForW(bool corr) { phokey.ifw=(int)corr; }
116 
118  static void setExponentiation(bool expo);
119 
121  static void setPairEmission(bool ifpair);
122 
124  static void setPhotonEmission(bool ifphot);
125 
127  static void setMeCorrectionWtForScalar(bool corr);
128 
130  static void setMeCorrectionWtForW(bool corr);
131 
133  static void setMeCorrectionWtForZ(bool corr);
134 
136  static void setTopProcessRadiation(bool top) { phokey.iftop=(int)top; }
137 
139  static void setMomentumUnit(MomentumUnits unit) { momentumUnit = unit; }
140 
141  /* Set if PHOTOS should stop at critical error. True by default.
142  WARNING: These stops are an essential source of debugging information flow
143  from event record to PHOTOS algorithm. Never switch it off! The only exception:
144  you have checked your set-up including particular physics initialization
145  with the substantially large sample and you submit large production. */
146  static void setStopAtCriticalError(bool stop);
147 
149  static void initializeKinematicCorrections(int flag) { PHCORK(flag); }
150 
155  static void forceMassFrom4Vector(bool flag) { massFrom4Vector=flag; }
156 
163  static void forceMassFromEventRecord(int pdgid);
164 
171  static void forceMass(int pdgid, double mass);
172 
174  static void setMomentumConservationThreshold(double threshold){momentum_conservation_threshold=threshold; }
175 
177  static void setEventNo(int iEvt){EventNo=iEvt; }
178 public:
179 
180 
182  static int EventNo;
183 
185  static bool isSuppressed;
186 
188  static bool massFrom4Vector;
189 
191  static vector<vector<int>* > *supBremList;
192 
194  static vector<vector<int>* > *forceBremList;
195 
197  static vector<pair<int,double>* > *forceMassList;
198 
200  static vector<int > *ignoreStatusCodeList;
201 
203  static double momentum_conservation_threshold;
204 
206  static bool meCorrectionWtForScalar;
207 
209  static bool meCorrectionWtForZ;
210 
212  static bool meCorrectionWtForW;
213 
215  static bool isCreateHistoryEntries;
216 
218  static bool IfPair;
219 
221  static bool IfPhot;
222 
223 
225  static int historyEntriesStatus;
226 
228  static double (*randomDouble)();
229 public:
231  Photos& getInstance() { return _instance; }
232 private:
233  /* Singleton: only one instance allowed.
234  Constructor sets default values of PHOTOS parameters */
235  Photos();
236  ~Photos() {}
237  Photos(const Photos&);
238  Photos& operator=(const Photos&);
239  static Photos _instance;
240 };
241 
242 } // namespace Photospp
243 #endif
244 
static vector< int > * ignoreStatusCodeList
Definition: Photos.h:200
static void setPhotonEmission(bool ifphot)
Definition: Photos.cxx:421
static void setPairEmission(bool ifpair)
Definition: Photos.cxx:416
static void IPHEKL_setPi0KLnoEmission(int m)
Definition: Photos.cxx:304
static bool meCorrectionWtForZ
Definition: Photos.h:209
static void maxWtInterference(double interference)
Definition: Photos.h:97
static void setMomentumUnit(MomentumUnits unit)
Definition: Photos.h:139
Photos & getInstance()
Definition: Photos.h:231
static void initialize()
Definition: Photos.cxx:53
static bool isStatusCodeIgnored(int status)
Definition: Photos.cxx:387
static void forceMassFromEventRecord(int pdgid)
Definition: Photos.cxx:452
static vector< vector< int > * > * forceBremList
Definition: Photos.h:194
static void setInfraredCutOff(double cut_off)
Definition: Photos.h:100
static vector< vector< int > * > * supBremList
Definition: Photos.h:191
static void forceMass(int pdgid, double mass)
Definition: Photos.cxx:458
static void ignoreParticlesOfStatus(int status)
Definition: Photos.cxx:356
static bool meCorrectionWtForScalar
Definition: Photos.h:206
static void suppressBremForDecay(int count, int motherID,...)
Definition: Photos.cxx:238
static bool massFrom4Vector
Definition: Photos.h:188
static vector< pair< int, double > * > * forceMassList
Definition: Photos.h:197
static bool IfPhot
Definition: Photos.h:221
static void forceBremForDecay(int count, int motherID,...)
Definition: Photos.cxx:270
static void initializeKinematicCorrections(int flag)
Definition: Photos.h:149
static double(* randomDouble)()
Definition: Photos.h:228
static void createHistoryEntries(bool flag, int status)
Definition: Photos.cxx:343
static bool isSuppressed
Definition: Photos.h:185
static void setInterference(bool interference)
Definition: Photos.h:106
static void setExponentiation(bool expo)
Definition: Photos.cxx:403
static int EventNo
Definition: Photos.h:182
static void setMomentumConservationThreshold(double threshold)
Definition: Photos.h:174
static void setEventNo(int iEvt)
Definition: Photos.h:177
static void processParticle(PhotosParticle *p)
Definition: Photos.cxx:225
static void forceMassFrom4Vector(bool flag)
Definition: Photos.h:155
Controls the configuration and initialization of Photos.
static void setMeCorrectionWtForW(bool corr)
Definition: Photos.cxx:426
Abstract base class for particle in the event. This class also handles boosting.
static void forceBremForBranch(int count, int motherID,...)
Definition: Photos.cxx:286
static double momentum_conservation_threshold
Definition: Photos.h:203
static void processBranch(PhotosParticle *p)
Definition: Photos.cxx:231
static void suppressBremForBranch(int count, int motherID,...)
Definition: Photos.cxx:254
static void setMeCorrectionWtForScalar(bool corr)
Definition: Photos.cxx:435
static void setDoubleBrem(bool doub)
Definition: Photos.h:109
static void setMeCorrectionWtForZ(bool corr)
Definition: Photos.cxx:431
static void iniInfo()
Definition: Photos.cxx:181
static void setTopProcessRadiation(bool top)
Definition: Photos.h:136
static void setQuatroBrem(bool quatroBrem)
Definition: Photos.h:112
static void suppressAll()
Definition: Photos.h:62
static bool meCorrectionWtForW
Definition: Photos.h:212
static void setRandomGenerator(double(*gen)())
Definition: Photos.cxx:397
static void setSeed(int iseed1, int iseed2)
Definition: Photos.h:94
static int historyEntriesStatus
Definition: Photos.h:225
static bool IfPair
Definition: Photos.h:218
static void deIgnoreParticlesOfStatus(int status)
Definition: Photos.cxx:373
static void setAlphaQED(double alpha)
Definition: Photos.h:103
static bool isCreateHistoryEntries
Definition: Photos.h:215