Photos.h
00001 #ifndef _Photos_h_included_
00002 #define _Photos_h_included_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include <stdarg.h>
00016 #include <vector>
00017 #include "PhotosParticle.h"
00018 #include "PhotosRandom.h"
00019 #include "f_Init.h"
00020 using std::vector;
00021 using std::pair;
00022
00023 namespace Photospp
00024 {
00025
00026 class PhotosParticle;
00027
00028 class Photos
00029 {
00030 public:
00031 static const int VER_MAJOR=3, VER_MINOR=52;
00032 static const int DAT_DAY =4,DAT_MONTH=11,DAT_YEAR=12;
00033 public:
00034
00035
00036
00037 static void initialize();
00038
00039
00040
00041 static void iniInfo();
00042
00043
00044 static void processParticle(PhotosParticle *p);
00045
00046 static void processBranch(PhotosParticle *p);
00047
00048
00049 static void suppressBremForDecay (int count, int motherID, ... );
00050
00051 static void suppressBremForBranch(int count, int motherID, ... );
00052
00053
00054 static void suppressAll() { isSuppressed=true; }
00055
00056
00057 static void forceBremForDecay (int count, int motherID, ... );
00058
00059
00060 static void forceBremForBranch(int count, int motherID, ... );
00061
00062
00063
00064 static void createHistoryEntries(bool flag, int status);
00065
00066
00067 static void ignoreParticlesOfStatus(int status);
00068
00069
00070 static void deIgnoreParticlesOfStatus(int status);
00071
00072
00073 static bool isStatusCodeIgnored(int status);
00074 public:
00075
00076 static void setRandomGenerator( double (*gen)() );
00077
00078
00079 static void setSeed(int iseed1, int iseed2) { PhotosRandom::setSeed(iseed1,iseed2); }
00080
00081
00082 static void maxWtInterference(double interference) { phokey_.fint=interference; }
00083
00084
00085 static void setInfraredCutOff(double cut_off) { phocop_.xphcut=cut_off; }
00086
00087
00088 static void setAlphaQED(double alpha) { phocop_.alpha=alpha; }
00089
00090
00091 static void setInterference(bool interference) { phokey_.interf=(int)interference; }
00092
00093
00094 static void setDoubleBrem(bool doub) { phokey_.isec=(int)doub; }
00095
00096
00097 static void setQuatroBrem(bool quatroBrem) { phokey_.itre=(int)quatroBrem; }
00098
00099
00100 static void setCorrectionWtForW(bool corr) { phokey_.ifw=(int)corr; }
00101
00102
00103 static void setExponentiation(bool expo);
00104
00105
00106 static void setMeCorrectionWtForScalar(bool corr);
00107
00108
00109 static void setMeCorrectionWtForW(bool corr);
00110
00111
00112 static void setMeCorrectionWtForZ(bool corr);
00113
00114
00115 static void setTopProcessRadiation(bool top) { phokey_.iftop=(int)top; }
00116
00117
00118
00119
00120
00121
00122 static void setStopAtCriticalError(bool stop);
00123
00124
00125 static void initializeKinematicCorrections(int flag) { phcork_(&flag); }
00126
00127
00128
00129
00130
00131 static void forceMassFrom4Vector(bool flag) { massFrom4Vector=flag; }
00132
00133
00134
00135
00136
00137
00138
00139 static void forceMassFromEventRecord(int pdgid);
00140
00141
00142
00143
00144
00145
00146
00147 static void forceMass(int pdgid, double mass);
00148
00149
00150 static void setMomentumConservationThreshold(double threshold){momentum_conservation_threshold=threshold; }
00151
00152 public:
00153
00154 static bool isSuppressed;
00155
00156
00157 static bool massFrom4Vector;
00158
00159
00160 static vector<vector<int>* > *supBremList;
00161
00162
00163 static vector<vector<int>* > *forceBremList;
00164
00165
00166 static vector<pair<int,double>* > *forceMassList;
00167
00168
00169 static vector<int > *ignoreStatusCodeList;
00170
00171
00172 static double momentum_conservation_threshold;
00173
00174
00175 static bool meCorrectionWtForScalar;
00176
00177
00178 static bool meCorrectionWtForZ;
00179
00180
00181 static bool meCorrectionWtForW;
00182
00183
00184 static bool isCreateHistoryEntries;
00185
00186
00187 static int historyEntriesStatus;
00188
00189
00190 static double (*randomDouble)();
00191 public:
00192
00193 Photos& getInstance() { return _instance; }
00194 private:
00195
00196
00197 Photos();
00198 ~Photos() {}
00199 Photos(const Photos&);
00200 Photos& operator=(const Photos&);
00201 static Photos _instance;
00202 };
00203
00204 }
00205 #endif
00206