 |
Belle II Software
release-05-02-19
|
5 #include "PhotosRandom.h"
6 #include "PhotosEvent.h"
45 setCorrectionWtForW(
true);
69 for (
int i = 0; i < 10; i++) phosta.status[i] = 0;
103 int coutPrec = cout.precision(6);
104 ios_base::fmtflags flags = cout.setf(ios_base::scientific, ios_base::floatfield);
106 cout <<
"********************************************************************************" << endl << endl;
108 cout <<
" =========================" << endl;
109 cout <<
" PHOTOS, Version: " << VER_MAJOR <<
"." << VER_MINOR << endl;
110 cout <<
" Released at: " << DAT_DAY <<
"/" << DAT_MONTH <<
"/" << DAT_YEAR << endl;
111 cout <<
" =========================" << endl << endl;
113 cout <<
" Photos QED corrections in Particle Decays" << endl << endl;
115 cout <<
" Monte Carlo Program - by E. Barberio, B. van Eijk and Z. Was" << endl;
116 cout <<
" From version 2.09 - by P. Golonka and Z. Was" << endl;
117 cout <<
" From version 3.00 - by N. Davidson, T. Przedzinski and Z. Was" << endl;
119 cout <<
"********************************************************************************" << endl << endl;
121 cout <<
" Internal (default) input parameters: " << endl << endl;
122 cout <<
" INTERF= " << phokey.interf <<
" ISEC= " << phokey.isec <<
" ITRE= " << phokey.itre
123 <<
" IEXP= " << phokey.iexp <<
" IFTOP= " << phokey.iftop <<
" IFW= " << phokey.ifw << endl;
124 cout <<
" ALPHA_QED= " << phocop.alpha <<
" XPHCUT= " << phocop.xphcut << endl << endl;
126 if (phokey.interf) cout <<
" Option with interference is active" << endl;
127 if (phokey.isec) cout <<
" Option with double photons is active" << endl;
128 if (phokey.itre) cout <<
" Option with triple/quatric photons is active" << endl;
129 if (phokey.iexp) cout <<
" Option with exponentiation is active EPSEXP=" << phokey.expeps << endl;
130 if (phokey.iftop) cout <<
" Emision in t tbar production is active" << endl;
131 if (phokey.ifw) cout <<
" Correction wt in decay of W is active" << endl;
134 if (
IfPair) cout <<
" emission of pairs is active" << endl;
135 if (!
IfPhot) cout <<
" emission of photons is inactive" << endl;
137 cout << endl <<
" WARNING: /HEPEVT/ is not anymore used." << endl << endl;
147 cout <<
"********************************************************************************" << endl;
149 cout.precision(coutPrec);
174 Photos::IPHQRK_setQarknoEmission(1, 0);
178 PhotosRandom::initialize();
193 int coutPrec = cout.precision(6);
194 ios_base::fmtflags flags = cout.setf(ios_base::scientific, ios_base::floatfield);
196 cout <<
"********************************************************************************" << endl << endl;
197 cout <<
" =========================================" << endl;
198 cout <<
" PHOTOS, information routine" << endl;
199 cout <<
" Input parameters after reinitialization: " << endl << endl;
200 cout <<
" =========================================" << endl << endl;
201 cout <<
"********************************************************************************" << endl << endl;
202 cout <<
" INTERF= " << phokey.interf <<
" ISEC= " << phokey.isec <<
" ITRE= " << phokey.itre
203 <<
" IEXP= " << phokey.iexp <<
" IFTOP= " << phokey.iftop <<
" IFW= " << phokey.ifw << endl;
204 cout <<
" ALPHA_QED= " << phocop.alpha <<
" XPHCUT= " << phocop.xphcut << endl << endl;
206 if (phokey.interf) cout <<
" Option with interference is active" << endl;
207 if (phokey.isec) cout <<
" Option with double photons is active" << endl;
208 if (phokey.itre) cout <<
" Option with triple/quatric photons is active" << endl;
209 if (phokey.iexp) cout <<
" Option with exponentiation is active EPSEXP=" << phokey.expeps << endl;
210 if (phokey.iftop) cout <<
" Emision in t tbar production is active" << endl;
211 if (phokey.ifw) cout <<
" Correction wt in decay of W is active" << endl;
215 if (
IfPair) cout <<
" emission of pairs is active" << endl;
216 if (!
IfPhot) cout <<
" emission of photons is inactive" << endl;
218 cout << endl <<
" WARNING: /HEPEVT/ is not anymore used." << endl << endl;
220 cout.precision(coutPrec);
227 if (!b.getSuppressionStatus()) b.process();
232 vector<PhotosParticle*> particles = p->getDecayTree();
234 for (
int i = 0; i < (int)branches.size(); i++) branches.at(i)->process();
240 va_start(arg, motherID);
241 vector<int>* v =
new vector<int>();
242 v->push_back(motherID);
243 for (
int i = 0; i < count; i++) {
244 v->push_back(va_arg(arg,
int));
255 va_start(arg, motherID);
256 vector<int>* v =
new vector<int>();
257 v->push_back(motherID);
258 for (
int i = 0; i < count; i++) {
259 v->push_back(va_arg(arg,
int));
270 va_start(arg, motherID);
271 vector<int>* v =
new vector<int>();
272 v->push_back(motherID);
273 for (
int i = 0; i < count; i++) {
274 v->push_back(va_arg(arg,
int));
285 va_start(arg, motherID);
286 vector<int>* v =
new vector<int>();
287 v->push_back(motherID);
288 for (
int i = 0; i < count; i++) {
289 v->push_back(va_arg(arg,
int));
302 cout <<
"MODOP=1 -- enables emission in pi0 to gamma e+e- : TEST " << endl ;
303 cout <<
"MODOP=1 -- enables emission in Kl to gamma e+e- : TEST " << endl ;
308 cout <<
"MODOP=2 -- blocks emission in Kl to gamma e+e-: DEFAULT" << endl ;
309 cout <<
"MODOP=2 -- blocks emission in pi0 to gamma e+e-: DEFAULT" << endl ;
318 bool Photos::IPHQRK_setQarknoEmission(
int MODCOR,
int PDGID)
320 static int IPHQRK_MODOP = -1;
321 if (IPHQRK_MODOP == -1 && MODCOR == 0) {
322 cout <<
"stop from IPHQRK_setQarknoEmission lack of initialization" << endl ;
324 }
else if (MODCOR != 0) {
325 IPHQRK_MODOP = MODCOR;
326 if (MODCOR == 1) cout <<
" IPHQRK_setQarknoEmission MODOP=1 -- blocks emission from light quarks: DEFAULT" << endl ;
327 if (MODCOR != 1) cout <<
" IPHQRK_setQarknoEmission MODOP=2 -- emission from light quarks allowed: TEST " << endl ;
329 if (IPHQRK_MODOP != 1)
return true;
337 Log::Warning() <<
"Photos::createHistoryEntries: status must be >=3" << endl;
349 Log::Warning() <<
"Photos::ignoreParticlesOfStatus: status must be >=3" << endl;
386 if (gen == NULL)
randomDouble = PhotosRandom::randomReal;
392 phokey.iexp = (int) expo;
398 phokey.expeps = 0.0001;
426 void Photos::setStopAtCriticalError(
bool stop)
428 phosta.ifstop = (int)stop;
430 Log::Info() <<
"PHOTOS production mode. Elementary test of data flow from event record disabled. " << endl
431 <<
"Prior checks of the complete configuration " << endl
432 <<
"(for the particular set of input parameters) must have been done! " << endl;
440 forceMassList->push_back(
new pair<int, double>(pdgid, -1.0));
446 Log::Warning() <<
"Photos::forceMass: Mass must be > 0.0" << endl;
451 forceMassList->push_back(
new pair<int, double>(pdgid, mass));
static vector< pair< int, double > * > * forceMassList
List of forced mass values.
static bool isCreateHistoryEntries
Flag for creating historic entries.
static void setMeCorrectionWtForScalar(bool corr)
Switch for complete effects of matrix element (in scalar to 2 scalars decays)
static void processBranch(PhotosParticle *p)
Process decay of whole decay branch starting from given particle.
static void forceBremForBranch(int count, int motherID,...)
Force processing of a whole decay branch.
static void forceMassFromEventRecord(int pdgid)
When particles with PDGID and -PDGID will be processed by Photos, their mass value will be taken from...
static bool meCorrectionWtForZ
Flag for complete effects of matrix element (in leptonic Z decays)
static int historyEntriesStatus
Status of history entries.
static void iniInfo()
Prints info on Photos initialization (reinitialization) status.
static void createHistoryEntries(bool flag, int status)
If event record allows it, create history entries of particles before Photos processing.
static vector< PhotosBranch * > createBranches(vector< PhotosParticle * > particles)
Create branches from particles list.
static void setMeCorrectionWtForZ(bool corr)
Switch for complete effects of matrix element (in leptonic Z decays)
static void initializeKinematicCorrections(int flag)
Initialize kinematic corrections.
static int EventNo
Is event No.
static void initialize()
Initalize Photos with the parameters previously set via the setter methods.
static bool isSuppressed
Is in suppressed mode.
static void setInfraredCutOff(double cut_off)
Minimal energy (in units of decaying particle mass) for photons to be explicitly generated.
static void processParticle(PhotosParticle *p)
Process decay of single particle.
static bool IfPhot
Flag for generating emission of photons.
static void setTopProcessRadiation(bool top)
Set photon emission in top pair production in quark (gluon) pair annihilation.
static double(* randomDouble)()
Pointer to random generator function.
static double momentum_conservation_threshold
Threshold for momentum conservation check.
static void setPhotonEmission(bool ifphot)
Set photon emission.
static void setRandomGenerator(double(*gen)())
Substitute build-in generator with external one.
static void setDoubleBrem(bool doub)
Set double bremsstrahlung generation.
static void setQuatroBrem(bool quatroBrem)
Set bremsstrahlung generation up to multiplicity of 4.
static bool meCorrectionWtForScalar
Flag for complete effects of matrix element (in scalars decays)
static void setPairEmission(bool ifpair)
Set pair emission.
static vector< vector< int > * > * forceBremList
List of forced decays.
static void suppressBremForBranch(int count, int motherID,...)
Suppress processing of whole decay branch.
static bool massFrom4Vector
Is mass from 4-vector or from event record.
static void setInterference(bool interference)
Key for interference, matrix element weight.
static void forceMass(int pdgid, double mass)
When particles with PDGID and -PDGID will be processed by Photos, their mass value will be given by u...
static bool meCorrectionWtForW
Flag for complete effects of matrix element (in leptonic W decays)
static void setExponentiation(bool expo)
Set exponentiation mode.
static vector< vector< int > * > * supBremList
List of suppressed decays.
Controls the configuration and initialization of Photos.
static bool IfPair
Flag for generating emission of pairs.
static void setAlphaQED(double alpha)
Coupling constant alpha QED.
static void deIgnoreParticlesOfStatus(int status)
Remove 'status' from the list of ignored status codes.
static void forceBremForDecay(int count, int motherID,...)
Force processing of a single decay.
static bool isStatusCodeIgnored(int status)
Returns 'true' if status code is ignored.
static void setMeCorrectionWtForW(bool corr)
Switch for complete effects of matrix element (in leptonic W decays)
static void maxWtInterference(double interference)
Maximum interference weight.
static void IPHEKL_setPi0KLnoEmission(int m)
Block emissions id decays pi0 and K_L -> gamma e+ e- 1 = no suppression 2 (default) = suppressed emis...
static void suppressBremForDecay(int count, int motherID,...)
Suppress processing of a single decay.
static vector< int > * ignoreStatusCodeList
List of ignored status codes.
static void ignoreParticlesOfStatus(int status)
Ignore particles with given status code.