er  dev
ERElasticScattering.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
19 #ifndef ERElasticScattering_H
20 #define ERElasticScattering_H
21 
22 #include <ERDecay.h> // mother class
23 
24 #include <TString.h>
25 #include <TLorentzVector.h>
26 
27 enum ERInteractionParticipant{ kPROJECTILE, kTARGET, kEJECTILE}; // TODO It has to be in the header of the future class "Interaction.h"
28 
29 class TF1;
30 class TParticlePDG;
31 
33 {
34 public:
38  ERElasticScattering(TString name);
39 
41  virtual ~ERElasticScattering();
42 
50  void SetTargetIon(Int_t A, Int_t Z, Int_t Q);
51 
55  void SetThetaCDF(TString fileName) { fThetaFileName = fileName; }
56 
63  void SetThetaRange(Double_t th1, Double_t th2, ERInteractionParticipant DetIonType = kPROJECTILE);
64 
76  void SetLabThetaRange(Double_t thetaCenter, Double_t dTheta, ERInteractionParticipant DetIonType = kPROJECTILE,
77  Bool_t relMod = kTRUE, Double_t BeamAvE = 0.);
78 
83  void SetPhiRange(Double_t phi1, Double_t phi2) { fPhiMin = phi1; fPhiMax = phi2; }
84 
88  void SetProjectileIonMass(Double_t mass) { fProjectileIonMass = mass; }
89 
93  void SetTargetIonMass(Double_t mass) { fTargetIonMass = mass; }
94 
95 
99  Double_t GetProjectileIonMass() const { return fProjectileIonMass; }
100 
102  Double_t GetTargetIonMass() const { return fTargetIonMass; }
103 
105  Double_t GetdPhi() const { return (fPhiMax - fPhiMin); }
106 
108  Double_t GetdThetaCDF() const { return fCDFmax - fCDFmin; }
109 
112 
114  Double_t GetThetaCMMean() const;
115 
116 public:
117  Bool_t Init();
118  Bool_t Stepping();
119 
120 private:
122  void ThetaRangesLab2CM();
123 
126 
128  Bool_t ThetaCDFRead();
129 
131  Double_t ThetaGen();
132 
133  Bool_t DefineOfIonsMasses();
134 
135 private:
136  ERInteractionParticipant fDetectionIonType=kPROJECTILE;
137 
138  TString fThetaFileName="";
139  TString fTargetIonName="";
140 
141  TParticlePDG* fTargetIonPDG=NULL;
142 
143  TF1* fThetaCDF=NULL;
144  TF1* fThetaInvCDF=NULL;
145 
146  Double_t fThetaMinCM=0.;
147  Double_t fThetaMaxCM=180.;
148  Double_t fThetaRangeCenter=0.;
149  Double_t fThetaRangedTheta=0.;
150  Double_t fPhiMin=0.;
151  Double_t fPhiMax=360.;
152  Double_t fCDFmin=0.;
153  Double_t fCDFmax=1.;
154  Double_t fProjectileIonMass=-1.;
155  Double_t fTargetIonMass=0.;
156  Double_t fBeamAverageEnergy=0.;
157  Bool_t fRelativisticMode=kTRUE;
158 
161  Double_t fThetaCMSum=0.;
163 
164  ClassDef(ERElasticScattering, 1);
165 };
166 
167 #endif // ERElasticScattering_H
Double_t fThetaMinCM
Theta minimum for primary ion in CM [Deg].
Double_t GetThetaCMMean() const
Returns mean of thetaCM by all events in run [Deg].
Double_t fTargetIonMass
Target ion mass.
Double_t fProjectileIonMass
Projectile ion mass.
Double_t GetdThetaCDF() const
Returns ThetaCDF range value: fCDFmax-fCDFmin.
Double_t fCDFmin
ThetaCDF(fThetaMinCM) minimum.
Bool_t fRelativisticMode
kTRUE of a relativistic case is simulated and kFALSE if It isn&#39;t. kTRUE by default ...
void SetTargetIon(Int_t A, Int_t Z, Int_t Q)
Defines target ion parameters.
void SetPhiRange(Double_t phi1, Double_t phi2)
Defines range of phi value.
Double_t fPhiMax
Phi maximum for primary ion in CM [Deg].
Int_t GetInteractNumInTarget() const
Returns number of interactions on target.
void ThetaRangesLab2CMRelativistic()
The private method is to convert Lab theta range to CM for relativistic case.
void SetTargetIonMass(Double_t mass)
Defines target ion mass.
TF1 * fThetaCDF
Pointer to theta CDF function.
TF1 * fThetaInvCDF
Pointer to inversety theta CDF function.
ERInteractionParticipant fDetectionIonType
Ion status TODO.
void SetThetaCDF(TString fileName)
Defines file name that contains the value of theta CDF.
ERElasticScattering(TString name)
Constructor with reaction name.
Double_t fCDFmax
ThetaCDF(fThetaMaxCM) maximum.
TString fTargetIonName
Target ion name.
void SetProjectileIonMass(Double_t mass)
Defines primary ion mass.
Double_t fPhiMin
Phi minimum for primary ion in CM [Deg].
Double_t GetProjectileIonMass() const
Returns projectile ion mass.
Double_t ThetaGen()
The private method is to generate theta value.
TParticlePDG * fTargetIonPDG
Target ion PDG.
void SetLabThetaRange(Double_t thetaCenter, Double_t dTheta, ERInteractionParticipant DetIonType=kPROJECTILE, Bool_t relMod=kTRUE, Double_t BeamAvE=0.)
Defines theta position for detector slot center in Lab.
Double_t fThetaRangedTheta
The half-width of the range of theta.
Double_t fThetaRangeCenter
Theta range&#39;s center.
Bool_t ThetaCDFRead()
The private method is to read ThetaCDF cumulative function file.
TString fThetaFileName
File name that contains theta CDF values.
Double_t fThetaCMSum
Sum of thetaCM by all events in run.
Double_t GetTargetIonMass() const
Returns target ion mass.
Double_t fBeamAverageEnergy
Avarage Energy of the beam.
void SetThetaRange(Double_t th1, Double_t th2, ERInteractionParticipant DetIonType=kPROJECTILE)
Defines range of theta value.
Double_t fThetaMaxCM
Theta maximum for primary ion in CM [Deg].
Int_t fInteractNumInTarget
Interactions counter in target (by all events in run)
void ThetaRangesLab2CM()
The private method is to convert Lab theta range to CM.
Class for the elastic scattering simulate.
virtual ~ERElasticScattering()
Destructor.
Double_t GetdPhi() const
Returns phi range value: fPh2-fPhiMin.