ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtTPCGammaDummyGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- AtTPCGammaDummyGenerator header file -----
3 // ----- Based on R3BCALIFAtestGenerator -----
4 // ----- Created 11/01/21 by H. Alvarez -----
5 // -------------------------------------------------------------------------
6 
7 #ifndef AtTPCGAMMADUMMYGENERAtOR_H
8 #define AtTPCGAMMADUMMYGENERAtOR_H
9 
10 #include <FairGenerator.h>
11 
12 #include <Rtypes.h>
13 
14 class FairPrimaryGenerator;
15 class TBuffer;
16 class TClass;
17 class TMemberInspector;
18 
19 class AtTPCGammaDummyGenerator : public FairGenerator {
20 
21 public:
24 
29  AtTPCGammaDummyGenerator(Int_t pdgid, Int_t mult = 1);
30 
33 
36  void SetPDGType(Int_t pdg) { fPDGType = pdg; };
37 
38  void SetMultiplicity(Int_t mult) { fMult = mult; };
39 
40  void SetPRange(Double32_t pmin = 0, Double32_t pmax = 10)
41  {
42  fPMin = pmin;
43  fPMax = pmax;
44  fPRangeIsSet = kTRUE;
45  }
46 
47  void SetPtRange(Double32_t ptmin = 0, Double32_t ptmax = 10)
48  {
49  fPtMin = ptmin;
50  fPtMax = ptmax;
51  fPtRangeIsSet = kTRUE;
52  };
53 
54  void SetPhiRange(Double32_t phimin = 0, Double32_t phimax = 360)
55  {
56  fPhiMin = phimin;
57  fPhiMax = phimax;
58  };
59 
60  void SetEtaRange(Double32_t etamin = -5, Double32_t etamax = 7)
61  {
62  fEtaMin = etamin;
63  fEtaMax = etamax;
64  fEtaRangeIsSet = kTRUE;
65  };
66 
67  void SetYRange(Double32_t ymin = -5, Double32_t ymax = 7)
68  {
69  fYMin = ymin;
70  fYMax = ymax;
71  fYRangeIsSet = kTRUE;
72  };
73 
74  void SetThetaRange(Double32_t thetamin = 0, Double32_t thetamax = 90)
75  {
76  fThetaMin = thetamin;
77  fThetaMax = thetamax;
78  fThetaRangeIsSet = kTRUE;
79  };
80 
81  void SetCosTheta() { fCosThetaIsSet = kTRUE; };
82 
83  void SetXYZ(Double32_t x = 0, Double32_t y = 0, Double32_t z = 0)
84  {
85  fX = x;
86  fY = y;
87  fZ = z;
88  fPointVtxIsSet = kTRUE;
89  }
90 
91  void SetBoxXYZ(Double32_t x1 = 0, Double32_t y1 = 0, Double32_t z1 = 0, Double32_t x2 = 0, Double32_t y2 = 0,
92  Double32_t z2 = 0)
93  {
94  fX1 = x1;
95  fY1 = y1;
96  fZ1 = z1;
97  fX2 = x2;
98  fY2 = y2;
99  fZ2 = z2;
100  fBoxVtxIsSet = kTRUE;
101  }
102 
103  void SetDebug(Bool_t debug = 0) { fDebug = debug; }
104 
105  void SetNuclearDecayChain(Bool_t nuc = 1) { fNuclearDecayChainIsSet = nuc; }
106 
107  void SetLorentzBoost(Double32_t beta = 0)
108  {
109  SetFragmentVelocity(beta);
110  fLorentzBoostIsSet = kTRUE;
111  };
112 
113  void SetFragmentVelocity(Double32_t beta = 0);
114 
115  // void SetNuclearDecayChain() { fNuclearDecayChainIsSet = kTRUE; };
116 
117  void SetDecayChainPoint(Double32_t gammaEnergy = 0, Double32_t branchingRatio = 0);
118 
120  virtual Bool_t Init();
121 
125  virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen);
126 
127 private:
128  Int_t fPDGType; // Particle type (PDG encoding)
129  Int_t fMult; // Multiplicity
130 
131  Double32_t fPDGMass; // Particle mass [GeV]
132  Double32_t fPtMin, fPtMax; // Transverse momentum range [GeV]
133  Double32_t fPhiMin, fPhiMax; // Azimuth angle range [degree]
134  Double32_t fEtaMin, fEtaMax; // Pseudorapidity range in lab system
135  Double32_t fYMin, fYMax; // Rapidity range in lab system
136  Double32_t fPMin, fPMax; // Momentum range in lab system
137  Double32_t fThetaMin, fThetaMax; // Polar angle range in lab system [degree]
138  Double32_t fX, fY, fZ; // Point vertex coordinates [cm]
139  Double32_t fX1, fY1, fZ1, fX2, fY2, fZ2; // Box vertex coords (x1,y1,z1)->(x2,y2,z2)
140 
141  Bool_t fEtaRangeIsSet; // True if eta range is set
142  Bool_t fYRangeIsSet; // True if rapidity range is set
143  Bool_t fThetaRangeIsSet; // True if theta range is set
144  Bool_t fCosThetaIsSet; // True if uniform distribution in
145  // cos(theta) is set (default -> not set)
146  Bool_t fPtRangeIsSet; // True if transverse momentum range is set
147  Bool_t fPRangeIsSet; // True if abs.momentum range is set
148  Bool_t fPointVtxIsSet; // True if point vertex is set
149  Bool_t fBoxVtxIsSet; // True if box vertex is set
150  Bool_t fDebug; // Debug switch
151 
152  // SPECIFIC FOR GAMMA DECAY
153  Double32_t fGammaEnergies[8]{}; // Gamma energies for the nuclear decay chain [GeV] TEST UNITS!
154  Double32_t fGammaBranchingRatios[8]{}; // Gamma branching ratios for the nuclear decay chain
155  Int_t fGammasDefinedInNuclearDecay; // Number of gammas defined (max 8)
156  Double32_t fBetaOfEmittingFragment; // Velocity of the fragment emitting the gammas
157  Double32_t fGammaFactor; // Velocity of the fragment emitting the gammas
158 
159  Bool_t fLorentzBoostIsSet; // True if Lorentz Boost is set
160  Bool_t fNuclearDecayChainIsSet; // True if a nuclear decay chain is set
161 
162  ClassDef(AtTPCGammaDummyGenerator, 1)
163 };
164 
165 #endif
AtTPCGammaDummyGenerator::SetPRange
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
Definition: AtTPCGammaDummyGenerator.h:40
AtTPCGammaDummyGenerator::SetPtRange
void SetPtRange(Double32_t ptmin=0, Double32_t ptmax=10)
Definition: AtTPCGammaDummyGenerator.h:47
AtTPCGammaDummyGenerator::SetNuclearDecayChain
void SetNuclearDecayChain(Bool_t nuc=1)
Definition: AtTPCGammaDummyGenerator.h:105
AtTPCGammaDummyGenerator::AtTPCGammaDummyGenerator
AtTPCGammaDummyGenerator()
Definition: AtTPCGammaDummyGenerator.cxx:20
AtTPCGammaDummyGenerator::SetPhiRange
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
Definition: AtTPCGammaDummyGenerator.h:54
AtTPCGammaDummyGenerator::SetMultiplicity
void SetMultiplicity(Int_t mult)
Definition: AtTPCGammaDummyGenerator.h:38
AtTPCGammaDummyGenerator::SetYRange
void SetYRange(Double32_t ymin=-5, Double32_t ymax=7)
Definition: AtTPCGammaDummyGenerator.h:67
AtTPCGammaDummyGenerator::ReadEvent
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)
Definition: AtTPCGammaDummyGenerator.cxx:82
y
const double * y
Definition: lmcurve.cxx:20
AtTPCGammaDummyGenerator::SetDebug
void SetDebug(Bool_t debug=0)
Definition: AtTPCGammaDummyGenerator.h:103
AtTPCGammaDummyGenerator::SetCosTheta
void SetCosTheta()
Definition: AtTPCGammaDummyGenerator.h:81
AtTPCGammaDummyGenerator::SetThetaRange
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
Definition: AtTPCGammaDummyGenerator.h:74
AtTPCGammaDummyGenerator::SetEtaRange
void SetEtaRange(Double32_t etamin=-5, Double32_t etamax=7)
Definition: AtTPCGammaDummyGenerator.h:60
AtTPCGammaDummyGenerator::SetLorentzBoost
void SetLorentzBoost(Double32_t beta=0)
Definition: AtTPCGammaDummyGenerator.h:107
AtTPCGammaDummyGenerator::SetFragmentVelocity
void SetFragmentVelocity(Double32_t beta=0)
Definition: AtTPCGammaDummyGenerator.cxx:184
AtTPCGammaDummyGenerator::~AtTPCGammaDummyGenerator
virtual ~AtTPCGammaDummyGenerator()
AtTPCGammaDummyGenerator::SetPDGType
void SetPDGType(Int_t pdg)
Definition: AtTPCGammaDummyGenerator.h:36
AtTPCGammaDummyGenerator::Init
virtual Bool_t Init()
Definition: AtTPCGammaDummyGenerator.cxx:45
AtTPCGammaDummyGenerator::SetXYZ
void SetXYZ(Double32_t x=0, Double32_t y=0, Double32_t z=0)
Definition: AtTPCGammaDummyGenerator.h:83
AtTPCGammaDummyGenerator::SetBoxXYZ
void SetBoxXYZ(Double32_t x1=0, Double32_t y1=0, Double32_t z1=0, Double32_t x2=0, Double32_t y2=0, Double32_t z2=0)
Definition: AtTPCGammaDummyGenerator.h:91
AtTPCGammaDummyGenerator
Definition: AtTPCGammaDummyGenerator.h:19
AtTPCGammaDummyGenerator::SetDecayChainPoint
void SetDecayChainPoint(Double32_t gammaEnergy=0, Double32_t branchingRatio=0)
Definition: AtTPCGammaDummyGenerator.cxx:191