5 #include "PhotosRandom.h"
6 #include "PhotosEvent.h"
46 setCorrectionWtForW (
true);
70 for(
int i=0;i<10;i++) phosta.status[i]=0;
104 int coutPrec = cout.precision(6);
105 ios_base::fmtflags flags = cout.setf(ios_base::floatfield);
107 cout<<
"********************************************************************************"<<endl<<endl;
109 cout<<
" ========================="<<endl;
110 cout<<
" PHOTOS, Version: "<<VER_MAJOR<<
"."<<VER_MINOR<<endl;
111 cout<<
" Released at: "<<DAT_DAY<<
"/"<<DAT_MONTH<<
"/"<<DAT_YEAR<<endl;
112 cout<<
" ========================="<<endl<<endl;
114 cout<<
" Photos QED corrections in Particle Decays"<<endl<<endl;
116 cout<<
" Monte Carlo Program - by E. Barberio, B. van Eijk and Z. Was"<<endl;
117 cout<<
" From version 2.09 - by P. Golonka and Z. Was"<<endl;
118 cout<<
" From version 3.00 - by N. Davidson, T. Przedzinski and Z. Was"<<endl;
120 cout<<
"********************************************************************************"<<endl<<endl;
122 cout<<
" Internal (default) input parameters: "<<endl<<endl;
123 cout<<
" INTERF= "<<phokey.interf<<
" ISEC= " <<phokey.isec <<
" ITRE= "<<phokey.itre
124 <<
" IEXP= " <<phokey.iexp <<
" IFTOP= "<<phokey.iftop<<
" IFW= " <<phokey.ifw <<endl;
125 cout<<
" ALPHA_QED= "<<phocop.alpha<<
" XPHCUT= "<<phocop.xphcut<<endl<<endl;
127 if(phokey.interf) cout<<
" Option with interference is active"<<endl;
128 if(phokey.isec) cout<<
" Option with double photons is active"<<endl;
129 if(phokey.itre) cout<<
" Option with triple/quatric photons is active"<<endl;
130 if(phokey.iexp) cout<<
" Option with exponentiation is active EPSEXP="<<phokey.expeps<<endl;
131 if(phokey.iftop) cout<<
" Emision in t tbar production is active"<<endl;
132 if(phokey.ifw) cout<<
" Correction wt in decay of W is active"<<endl;
135 if(
IfPair) cout<<
" emission of pairs is active"<<endl;
136 if(!
IfPhot) cout<<
" emission of photons is inactive"<<endl;
138 cout<<endl<<
" WARNING: /HEPEVT/ is not anymore used."<<endl<<endl;
148 cout<<
"********************************************************************************"<<endl;
150 cout.precision(coutPrec);
175 Photos::IPHQRK_setQarknoEmission (1,0);
179 PhotosRandom::initialize();
194 int coutPrec = cout.precision(6);
195 ios_base::fmtflags flags = cout.setf(ios_base::floatfield);
197 cout<<
"********************************************************************************"<<endl<<endl;
198 cout<<
" ========================================="<<endl;
199 cout<<
" PHOTOS, information routine"<<endl;
200 cout<<
" Input parameters after reinitialization: "<<endl<<endl;
201 cout<<
" ========================================="<<endl<<endl;
202 cout<<
"********************************************************************************"<<endl<<endl;
203 cout<<
" INTERF= "<<phokey.interf<<
" ISEC= " <<phokey.isec <<
" ITRE= "<<phokey.itre
204 <<
" IEXP= " <<phokey.iexp <<
" IFTOP= "<<phokey.iftop<<
" IFW= " <<phokey.ifw <<endl;
205 cout<<
" ALPHA_QED= "<<phocop.alpha<<
" XPHCUT= "<<phocop.xphcut<<endl<<endl;
207 if(phokey.interf) cout<<
" Option with interference is active"<<endl;
208 if(phokey.isec) cout<<
" Option with double photons is active"<<endl;
209 if(phokey.itre) cout<<
" Option with triple/quatric photons is active"<<endl;
210 if(phokey.iexp) cout<<
" Option with exponentiation is active EPSEXP="<<phokey.expeps<<endl;
211 if(phokey.iftop) cout<<
" Emision in t tbar production is active"<<endl;
212 if(phokey.ifw) cout<<
" Correction wt in decay of W is active"<<endl;
216 if(
IfPair) cout<<
" emission of pairs is active"<<endl;
217 if(
IfPhot) cout<<
" emission of photons is inactive"<<endl;
219 cout<<endl<<
" WARNING: /HEPEVT/ is not anymore used."<<endl<<endl;
221 cout.precision(coutPrec);
235 for(
int i=0;i<(int)branches.size();i++) branches.at(i)->process();
241 va_start(arg, motherID);
242 vector<int> *v =
new vector<int>();
243 v->push_back(motherID);
244 for(
int i = 0;i<count;i++)
246 v->push_back(va_arg(arg,
int));
257 va_start(arg, motherID);
258 vector<int> *v =
new vector<int>();
259 v->push_back(motherID);
260 for(
int i = 0;i<count;i++)
262 v->push_back(va_arg(arg,
int));
273 va_start(arg, motherID);
274 vector<int> *v =
new vector<int>();
275 v->push_back(motherID);
276 for(
int i = 0;i<count;i++)
278 v->push_back(va_arg(arg,
int));
289 va_start(arg, motherID);
290 vector<int> *v =
new vector<int>();
291 v->push_back(motherID);
292 for(
int i = 0;i<count;i++)
294 v->push_back(va_arg(arg,
int));
308 cout <<
"MODOP=1 -- enables emission in pi0 to gamma e+e- : TEST " << endl ;
309 cout <<
"MODOP=1 -- enables emission in Kl to gamma e+e- : TEST " << endl ;
316 cout <<
"MODOP=2 -- blocks emission in Kl to gamma e+e-: DEFAULT" << endl ;
317 cout <<
"MODOP=2 -- blocks emission in pi0 to gamma e+e-: DEFAULT" << endl ;
326 bool Photos::IPHQRK_setQarknoEmission(
int MODCOR,
int PDGID)
328 static int IPHQRK_MODOP=-1;
329 if(IPHQRK_MODOP==-1 && MODCOR==0){
330 cout <<
"stop from IPHQRK_setQarknoEmission lack of initialization" << endl ;
333 else if (MODCOR != 0){
334 IPHQRK_MODOP = MODCOR;
335 if(MODCOR ==1) cout <<
" IPHQRK_setQarknoEmission MODOP=1 -- blocks emission from light quarks: DEFAULT" << endl ;
336 if(MODCOR !=1) cout <<
" IPHQRK_setQarknoEmission MODOP=2 -- emission from light quarks allowed: TEST " << endl ;
338 if(IPHQRK_MODOP!=1)
return true;
347 Log::Warning()<<
"Photos::createHistoryEntries: status must be >=3"<<endl;
360 Log::Warning()<<
"Photos::ignoreParticlesOfStatus: status must be >=3"<<endl;
405 phokey.iexp = (int) expo;
412 phokey.expeps=0.0001;
440 void Photos::setStopAtCriticalError(
bool stop)
442 phosta.ifstop=(int)stop;
445 Log::Info()<<
"PHOTOS production mode. Elementary test of data flow from event record disabled. "<<endl
446 <<
"Prior checks of the complete configuration "<<endl
447 <<
"(for the particular set of input parameters) must have been done! "<<endl;
455 forceMassList->push_back(
new pair<int,double>(pdgid, -1.0) );
462 Log::Warning()<<
"Photos::forceMass: Mass must be > 0.0"<<endl;
467 forceMassList->push_back(
new pair<int,double>(pdgid, mass) );
static vector< int > * ignoreStatusCodeList
static void setPhotonEmission(bool ifphot)
static vector< PhotosBranch * > createBranches(vector< PhotosParticle * > particles)
static void setPairEmission(bool ifpair)
static void IPHEKL_setPi0KLnoEmission(int m)
static bool meCorrectionWtForZ
static void maxWtInterference(double interference)
int getSuppressionStatus()
static bool isStatusCodeIgnored(int status)
static void forceMassFromEventRecord(int pdgid)
static vector< vector< int > * > * forceBremList
static void setInfraredCutOff(double cut_off)
static vector< vector< int > * > * supBremList
static void forceMass(int pdgid, double mass)
static void ignoreParticlesOfStatus(int status)
static bool meCorrectionWtForScalar
static void suppressBremForDecay(int count, int motherID,...)
static bool massFrom4Vector
static vector< pair< int, double > * > * forceMassList
static void forceBremForDecay(int count, int motherID,...)
static void initializeKinematicCorrections(int flag)
static double(* randomDouble)()
static void createHistoryEntries(bool flag, int status)
static void setInterference(bool interference)
static void setExponentiation(bool expo)
std::vector< PhotosParticle * > getDecayTree()
static void processParticle(PhotosParticle *p)
Controls the configuration and initialization of Photos.
static void setMeCorrectionWtForW(bool corr)
static void forceBremForBranch(int count, int motherID,...)
static double momentum_conservation_threshold
static void processBranch(PhotosParticle *p)
static void suppressBremForBranch(int count, int motherID,...)
static void setMeCorrectionWtForScalar(bool corr)
static void setDoubleBrem(bool doub)
static void setMeCorrectionWtForZ(bool corr)
static void setTopProcessRadiation(bool top)
static void setQuatroBrem(bool quatroBrem)
static bool meCorrectionWtForW
static void setRandomGenerator(double(*gen)())
static int historyEntriesStatus
static void deIgnoreParticlesOfStatus(int status)
static void setAlphaQED(double alpha)
static bool isCreateHistoryEntries