PandaRoot
Photos.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //****************************************************************************
14 //* This file is part of PandaRoot. *
15 //* *
16 //* PandaRoot is distributed under the terms of the *
17 //* GNU General Public License (GPL) version 3, *
18 //* copied verbatim in the file "LICENSE". *
19 //* *
20 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
21 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
22 //* The authors are listed in the file "AUTHORS". *
23 //****************************************************************************
24 
25 #ifndef _Photos_h_included_
26 #define _Photos_h_included_
27 
39 #include <stdarg.h>
40 #include <vector>
41 #include "PhotosParticle.h"
42 #include "PhotosRandom.h"
43 #include "f_Init.h"
44 using std::pair;
45 using std::vector;
46 
47 namespace Photospp {
48 
49 class PhotosParticle;
50 
51 class Photos {
52  public:
53  static const int VER_MAJOR = 3, VER_MINOR = 52;
54  static const int DAT_DAY = 4, DAT_MONTH = 11, DAT_YEAR = 12;
55 
56  public:
59  static void initialize();
60 
63  static void iniInfo();
64 
66  static void processParticle(PhotosParticle *p);
68  static void processBranch(PhotosParticle *p);
69 
71  static void suppressBremForDecay(int count, int motherID, ...);
73  static void suppressBremForBranch(int count, int motherID, ...);
74 
76  static void suppressAll() { isSuppressed = true; }
77 
79  static void forceBremForDecay(int count, int motherID, ...);
80 
82  static void forceBremForBranch(int count, int motherID, ...);
83 
86  static void createHistoryEntries(bool flag, int status);
87 
89  static void ignoreParticlesOfStatus(int status);
90 
92  static void deIgnoreParticlesOfStatus(int status);
93 
95  static bool isStatusCodeIgnored(int status);
96 
97  public:
99  static void setRandomGenerator(double (*gen)());
100 
102  static void setSeed(int iseed1, int iseed2) { PhotosRandom::setSeed(iseed1, iseed2); }
103 
105  static void maxWtInterference(double interference) { phokey_.fint = interference; }
106 
108  static void setInfraredCutOff(double cut_off) { phocop_.xphcut = cut_off; }
109 
111  static void setAlphaQED(double alpha) { phocop_.alpha = alpha; }
112 
114  static void setInterference(bool interference) { phokey_.interf = (int)interference; }
115 
117  static void setDoubleBrem(bool doub) { phokey_.isec = (int)doub; }
118 
120  static void setQuatroBrem(bool quatroBrem) { phokey_.itre = (int)quatroBrem; }
121 
122  /* Key for partial effects of matrix element (in leptonic W decays) */
123  static void setCorrectionWtForW(bool corr) { phokey_.ifw = (int)corr; }
124 
126  static void setExponentiation(bool expo);
127 
129  static void setMeCorrectionWtForScalar(bool corr);
130 
132  static void setMeCorrectionWtForW(bool corr);
133 
135  static void setMeCorrectionWtForZ(bool corr);
136 
138  static void setTopProcessRadiation(bool top) { phokey_.iftop = (int)top; }
139 
140  /* Set if PHOTOS should stop at critical error. True by default.
141  WARNING: These stops are an essential source of debugging information flow
142  from event record to PHOTOS algorithm. Never switch it off! The only exception:
143  you have checked your set-up including particular physics initialization
144  with the substantially large sample and you submit large production. */
145  static void setStopAtCriticalError(bool stop);
146 
148  static void initializeKinematicCorrections(int flag) { phcork_(&flag); }
149 
154  static void forceMassFrom4Vector(bool flag) { massFrom4Vector = flag; }
155 
162  static void forceMassFromEventRecord(int pdgid);
163 
170  static void forceMass(int pdgid, double mass);
171 
173  static void setMomentumConservationThreshold(double threshold) { momentum_conservation_threshold = threshold; }
174 
175  public:
177  static bool isSuppressed;
178 
180  static bool massFrom4Vector;
181 
183  static vector<vector<int> *> *supBremList;
184 
186  static vector<vector<int> *> *forceBremList;
187 
189  static vector<pair<int, double> *> *forceMassList;
190 
192  static vector<int> *ignoreStatusCodeList;
193 
196 
199 
201  static bool meCorrectionWtForZ;
202 
204  static bool meCorrectionWtForW;
205 
208 
211 
213  static double (*randomDouble)();
214 
215  public:
217  Photos &getInstance() { return _instance; }
218 
219  private:
220  /* Singleton: only one instance allowed.
221  Constructor sets default values of PHOTOS parameters */
222  Photos();
223  ~Photos() {}
224  Photos(const Photos &);
225  Photos &operator=(const Photos &);
226  static Photos _instance;
227 };
228 
229 } // namespace Photospp
230 #endif
static vector< int > * ignoreStatusCodeList
Definition: Photos.h:192
static void suppressBremForDecay(int count, int motherID,...)
static void ignoreParticlesOfStatus(int status)
static const int DAT_MONTH
Definition: Photos.h:54
static bool meCorrectionWtForZ
Definition: Photos.h:201
static const int VER_MINOR
Definition: Photos.h:53
static void maxWtInterference(double interference)
Definition: Photos.h:105
static void processBranch(PhotosParticle *p)
Photos & getInstance()
Definition: Photos.h:217
static bool isStatusCodeIgnored(int status)
static void setStopAtCriticalError(bool stop)
static vector< vector< int > * > * forceBremList
Definition: Photos.h:186
static void setInfraredCutOff(double cut_off)
Definition: Photos.h:108
static vector< vector< int > * > * supBremList
Definition: Photos.h:183
struct @18 phocop_
static bool meCorrectionWtForScalar
Definition: Photos.h:198
static bool massFrom4Vector
Definition: Photos.h:180
static void initialize()
static vector< pair< int, double > * > * forceMassList
Definition: Photos.h:189
Definition: Log.h:54
static void initializeKinematicCorrections(int flag)
Definition: Photos.h:148
static const int DAT_YEAR
Definition: Photos.h:54
static double(* randomDouble)()
Definition: Photos.h:213
static bool isSuppressed
Definition: Photos.h:177
static void setInterference(bool interference)
Definition: Photos.h:114
static void setCorrectionWtForW(bool corr)
Definition: Photos.h:123
static void setMomentumConservationThreshold(double threshold)
Definition: Photos.h:173
static void forceBremForDecay(int count, int motherID,...)
static void setMeCorrectionWtForScalar(bool corr)
static void processParticle(PhotosParticle *p)
void phcork_(int *modcor)
static void forceMassFrom4Vector(bool flag)
Definition: Photos.h:154
Abstract base class for particle in the event. This class also handles boosting.
static void setRandomGenerator(double(*gen)())
static double momentum_conservation_threshold
Definition: Photos.h:195
static void createHistoryEntries(bool flag, int status)
static void forceMassFromEventRecord(int pdgid)
static void setSeed(int s1, int s2)
static void setDoubleBrem(bool doub)
Definition: Photos.h:117
struct @19 phokey_
static void forceBremForBranch(int count, int motherID,...)
static void setMeCorrectionWtForZ(bool corr)
static void deIgnoreParticlesOfStatus(int status)
static void setTopProcessRadiation(bool top)
Definition: Photos.h:138
static void setQuatroBrem(bool quatroBrem)
Definition: Photos.h:120
static void suppressAll()
Definition: Photos.h:76
static bool meCorrectionWtForW
Definition: Photos.h:204
double alpha
Definition: f_Init.h:31
static void suppressBremForBranch(int count, int motherID,...)
static void setSeed(int iseed1, int iseed2)
Definition: Photos.h:102
static int historyEntriesStatus
Definition: Photos.h:210
static void iniInfo()
static const int DAT_DAY
Definition: Photos.h:54
static const int VER_MAJOR
Definition: Photos.h:53
static void forceMass(int pdgid, double mass)
static void setAlphaQED(double alpha)
Definition: Photos.h:111
static void setExponentiation(bool expo)
int status[10]
Definition: f_Init.h:48
static void setMeCorrectionWtForW(bool corr)
static bool isCreateHistoryEntries
Definition: Photos.h:207