CbmRoot
CbmThermalModelNoFlow.h
Go to the documentation of this file.
1 /*
2  *====================================================================
3  *
4  * CBM Thermal Model, No Flow. This module is obsolete, to be completely replaced by CbmBoltzmannDistribution
5  *
6  * Authors: V.Vovchenko
7  *
8  * e-mail :
9  *
10  *====================================================================
11  *
12  * Boltzmann distribution calculations
13  *
14  *====================================================================
15  */
16 
17 #ifndef _CbmThermalModelNoFlow_h_
18 #define _CbmThermalModelNoFlow_h_
19 
21 #include "CbmModelBase.h"
23 #include "TMath.h"
24 #include <vector>
25 
26 class TClonesArray;
27 class CbmVertex;
28 class TDirectory;
29 class TH1F;
30 class TH2F;
31 class TSpline3;
32 class FairRootManager;
33 
35 
37  Double_t dy, dpt;
38  std::vector<Double_t> ys, pts, probs;
40  void setSpline() { sfunc.setData(ys, pts, probs); }
41  Double_t getAcceptance(const Double_t& y, const Double_t& pt) const;
42  AcceptanceFunction() : dy(), dpt(), ys(), pts(), probs(), sfunc() {}
43  };
44 
46  Double_t p1, p2, p3;
48  double p2_ = 0.,
49  double p3_ = 1.)
50  : p1(p1_), p2(p2_), p3(p3_) {}
51  Double_t f(double p) { return p1 - p2 * TMath::Exp(-p * p / 2. / p3 / p3); }
52  };
53 } // namespace ThermalModelNoFlowNamespace
54 
55 using namespace ThermalModelNoFlowNamespace;
56 
58 public:
59  static const int p_sz = 2;
60  CbmThermalModelNoFlow(Float_t ekin_ = 24.08,
61  Int_t recoLevel = 3,
62  Int_t usePID = 1,
63  Int_t trackNumber = 1,
64  Int_t iVerbose = 1);
66 
67  virtual void ReInit(FairRootManager* fManger);
68  virtual void Init();
69  virtual void Exec();
70  virtual void Finish();
71 
73 
74 private:
75  void
77  TString filename);
78 
79  Double_t RecEfficiency(Double_t p);
80  Double_t ThermalMt(double T, double m);
81  Double_t ThermalMt2(double T, double m);
82  Double_t
83  ThermalMtAcc(double T,
84  double m,
86  Double_t
87  ThermalMt2Acc(double T,
88  double m,
90  Double_t
91  NFracAcc(double T,
92  double m,
94 
95  Double_t chi2func(double y, double pt, double m);
96  Double_t tempCrit(double y, double pt, double m);
97 
98  Double_t tempFunction(double T, double mt, double mo);
99  Double_t tempDerivFunction(double T, double dT, double mt, double mo);
100  Double_t getInverseSlope(double mt, double mo, int iters);
101 
102  void ComputeThermalDependence(Int_t part = 0);
103  // Double_t getInverseSlope(double mt, double mo, int iters);
104  Double_t getRadius(double T, double N, double mo);
105  Double_t getRadiusCor(double T, double N, double mo, TSpline3* Np);
106  Double_t getRadiusDerivT(double T, double N, double mo);
107  Double_t getRadiusDerivTCor(double T, double N, double mo, TSpline3* Np);
108  Double_t getRadiusDerivN(double T, double N, double mo);
109  Double_t getRadiusDerivNCor(double T, double N, double mo, TSpline3* Np);
110  Double_t getTemperature(double mt, double mo, int iters);
111  Double_t getTemperatureAll(double mt, int part, int iters);
112  Double_t getTemperatureDerivAll(double mt, int part, int iters);
113  Double_t getTemperatureAllCor(double mt, int part, int iters, TSpline3* Np);
114  Double_t
115  getTemperatureDerivAllCor(double mt, int part, int iters, TSpline3* Np);
116  Double_t
117  getTemperatureRapidity(double mt, double mo, int iters, double y = 0.);
118  Double_t getDerivTemperature(double mt, double mo, double T, int iters);
119  Double_t getMtErrorSquare(double qp,
120  double Tx,
121  double Ty,
122  double covMatrix[],
123  double mo);
124  bool checkIfReconstructable(CbmKFTrErrMCPoints* inTrack); // 0 - No, 1 - Yes
125 
126  // Float_t fCuts[2][3];
127  Float_t ekin;
128  Float_t ycm;
129  Bool_t fUpdate;
130  Int_t fusePID;
131  Int_t fRecoLevel;
132  Int_t fTrackNumber; // 0 - test calculation, only Pions, 1 - UrQMD Au+Au
133 
134  TClonesArray* flistStsPts;
135  TClonesArray* flistTofPts;
136  //TClonesArray *flistMvdPts;
137  TClonesArray* flistStsTracksMatch;
138  TClonesArray* flistStsTracks;
140 
141 
142  TString outfileName;
143 
144  // std::vector<KFParticle> fParticles;
145  std::vector<float> fChiToPrimVtx;
146 
147  //TSpline3 **mtTall, **mtTacc, **Npart, **mtTsts, **Npartsts, **mtTststof, **Npartststof;
148  TSpline3 *mtTall[p_sz], *mtTacc[p_sz], *Npart[p_sz], *mtTsts[p_sz],
149  *Npartsts[p_sz], *mtTststof[p_sz], *Npartststof[p_sz];
150 
151 
152  /*Double_t *globalmtavMC;
153  Double_t *globalmt2avMC;
154  Double_t *globalfavMC;
155  Double_t *globalf2avMC;
156  Double_t *globalmtmomerrMC;
157  Int_t *globalnTracksMC;
158  Double_t *globalmtavReco;
159  Double_t *globalmt2avReco;
160  Double_t *globalfavReco;
161  Double_t *globalf2avReco;
162  Double_t *globalmtmomerrReco;
163  Int_t *globalnTracksReco;*/
164  Double_t globalmtavMC[p_sz];
165  Double_t globalmt2avMC[p_sz];
166  Double_t globalfavMC[p_sz];
167  Double_t globalf2avMC[p_sz];
168  Double_t globalmtmomerrMC[p_sz];
169  Int_t globalnTracksMC[p_sz];
170  Double_t globalmtavReco[p_sz];
171  Double_t globalmt2avReco[p_sz];
172  Double_t globalfavReco[p_sz];
173  Double_t globalf2avReco[p_sz];
174  Double_t globalmtmomerrReco[p_sz];
175  Int_t globalnTracksReco[p_sz];
176  //Double_t *globalmtavRecoCor;
177  //Double_t *globalnTracksRecoCor;
178 
179 
180  Int_t NPrimGlobalMC, NPrimGlobalReco;
181  TClonesArray* flistMCTracks;
182  TClonesArray* flsitGlobalTracks;
183  TClonesArray* flistTofHits;
184  TClonesArray* flistTofPoints;
185  // TClonesArray* flistRichRings;
186  // TClonesArray* flistTrdTracks;
187 
188  TDirectory* histodir;
189 
190  Int_t events;
191 
192  TH1F* hTempFullMC[p_sz];
193  TH1F* hTempFullReco[p_sz];
194  TH1F* hTempFullRecoCor[p_sz];
195  TH1F* hTempErrStatFullMC[p_sz];
196  TH1F* hTempErrStatFullReco[p_sz];
197  TH1F* hTempErrStatFullRecoCor[p_sz];
198  TH1F* hTempErrMomFullMC[p_sz];
199  TH1F* hTempErrMomFullReco[p_sz];
200  TH1F* hTempErrMomFullRecoCor[p_sz];
201  TH1F* hRadFullMC[p_sz];
202  TH1F* hRadFullReco[p_sz];
203  TH1F* hRadFullRecoCor[p_sz];
204  TH1F* hRadErrStatFullMC[p_sz];
205  TH1F* hRadErrStatFullReco[p_sz];
206  TH1F* hRadErrStatFullRecoCor[p_sz];
207  TH1F* hRadErrMomFullMC[p_sz];
208  TH1F* hRadErrMomFullReco[p_sz];
209  TH1F* hRadErrMomFullRecoCor[p_sz];
210 
211  TH1F* hfyMC[p_sz];
212  TH1F* hfyMCmodel[p_sz];
213  TH2F* hfdndydptMC[p_sz];
214  TH2F* hfdndydptMCmodel[p_sz];
215 
216  TH1F* hfyReco[p_sz];
217  TH1F* hfyRecomodel[p_sz];
218  TH2F* hfdndydptReco[p_sz];
219  TH2F* hfdndydptRecomodel[p_sz];
220 
221  TH1F* hfyRecoCor[p_sz];
222  TH1F* hfyRecoCormodel[p_sz];
223  TH2F* hfdndydptRecoCor[p_sz];
224  TH2F* hfdndydptRecoCormodel[p_sz];
225 
228 
231 };
232 
233 #endif
CbmThermalModelNoFlow::fTrackNumber
Int_t fTrackNumber
Definition: CbmThermalModelNoFlow.h:132
CbmThermalModelNoFlow::CbmThermalModelNoFlow
CbmThermalModelNoFlow(const CbmThermalModelNoFlow &)
CbmThermalModelNoFlow::flistStsTracksMatch
TClonesArray * flistStsTracksMatch
Definition: CbmThermalModelNoFlow.h:137
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction::ReconstructionEfficiencyFunction
ReconstructionEfficiencyFunction(double p1_=1., double p2_=0., double p3_=1.)
Definition: CbmThermalModelNoFlow.h:47
CbmThermalModelNoFlow::ycm
Float_t ycm
Definition: CbmThermalModelNoFlow.h:128
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction::f
Double_t f(double p)
Definition: CbmThermalModelNoFlow.h:51
CbmThermalModelNoFlow::flistTofHits
TClonesArray * flistTofHits
Definition: CbmThermalModelNoFlow.h:183
ThermalModelNoFlowNamespace::AcceptanceFunction::probs
std::vector< Double_t > probs
Definition: CbmThermalModelNoFlow.h:38
ThermalModelNoFlowNamespace
Definition: CbmThermalModelNoFlow.cxx:62
ThermalModelNoFlowNamespace::AcceptanceFunction::dy
Double_t dy
Definition: CbmThermalModelNoFlow.h:37
ThermalModelNoFlowNamespace::AcceptanceFunction
Definition: CbmThermalModelNoFlow.h:36
CbmThermalModelNoFlow
Definition: CbmThermalModelNoFlow.h:57
CbmKFTrErrMCPoints.h
CbmThermalModelNoFlow::ClassDef
ClassDef(CbmThermalModelNoFlow, 1)
CbmThermalModelNoFlow::AcceptanceSTS
ThermalModelNoFlowNamespace::AcceptanceFunction AcceptanceSTS
Definition: CbmThermalModelNoFlow.h:226
CbmThermalModelNoFlow::fChiToPrimVtx
std::vector< float > fChiToPrimVtx
Definition: CbmThermalModelNoFlow.h:145
CbmThermalModelNoFlow::operator=
CbmThermalModelNoFlow & operator=(const CbmThermalModelNoFlow &)
BilinearSplineFunction::setData
void setData(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &vals)
Definition: CbmBilinearSplineFunction.h:36
CbmThermalModelNoFlow::events
Int_t events
Definition: CbmThermalModelNoFlow.h:190
CbmModelBase.h
CbmThermalModelNoFlow::fPrimVtx
CbmVertex * fPrimVtx
Definition: CbmThermalModelNoFlow.h:139
CbmVertex
Definition: CbmVertex.h:26
CbmKFTrErrMCPoints
Definition: CbmKFTrErrMCPoints.h:32
CbmThermalModelNoFlow::flsitGlobalTracks
TClonesArray * flsitGlobalTracks
Definition: CbmThermalModelNoFlow.h:182
CbmThermalModelNoFlow::NPrimGlobalReco
Int_t NPrimGlobalReco
Definition: CbmThermalModelNoFlow.h:180
CbmModelBase
Definition: CbmModelBase.h:25
CbmThermalModelNoFlow::histodir
TDirectory * histodir
Definition: CbmThermalModelNoFlow.h:188
BilinearSplineFunction
Definition: CbmBilinearSplineFunction.h:21
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction::p3
Double_t p3
Definition: CbmThermalModelNoFlow.h:46
CbmThermalModelNoFlow::flistTofPoints
TClonesArray * flistTofPoints
Definition: CbmThermalModelNoFlow.h:184
CbmThermalModelNoFlow::flistTofPts
TClonesArray * flistTofPts
Definition: CbmThermalModelNoFlow.h:135
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction::p1
Double_t p1
Definition: CbmThermalModelNoFlow.h:46
CbmThermalModelNoFlow::flistStsTracks
TClonesArray * flistStsTracks
Definition: CbmThermalModelNoFlow.h:138
CbmThermalModelNoFlow::ekin
Float_t ekin
Definition: CbmThermalModelNoFlow.h:127
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction::p2
Double_t p2
Definition: CbmThermalModelNoFlow.h:46
ThermalModelNoFlowNamespace::AcceptanceFunction::setSpline
void setSpline()
Definition: CbmThermalModelNoFlow.h:40
ThermalModelNoFlowNamespace::AcceptanceFunction::sfunc
BilinearSplineFunction sfunc
Definition: CbmThermalModelNoFlow.h:39
ThermalModelNoFlowNamespace::ReconstructionEfficiencyFunction
Definition: CbmThermalModelNoFlow.h:45
m
__m128 m
Definition: L1/vectors/P4_F32vec4.h:26
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmThermalModelNoFlow::fUpdate
Bool_t fUpdate
Definition: CbmThermalModelNoFlow.h:129
Acceptance::ReadAcceptanceFunction
int ReadAcceptanceFunction(AcceptanceFunction &func, TString filename)
Definition: Acceptance.cxx:7
ThermalModelNoFlowNamespace::AcceptanceFunction::ys
std::vector< Double_t > ys
Definition: CbmThermalModelNoFlow.h:38
ThermalModelNoFlowNamespace::AcceptanceFunction::dpt
Double_t dpt
Definition: CbmThermalModelNoFlow.h:37
CbmThermalModelNoFlow::fusePID
Int_t fusePID
Definition: CbmThermalModelNoFlow.h:130
CbmThermalModelNoFlow::fRecoLevel
Int_t fRecoLevel
Definition: CbmThermalModelNoFlow.h:131
CbmBilinearSplineFunction.h
CbmThermalModelNoFlow::outfileName
TString outfileName
Definition: CbmThermalModelNoFlow.h:142
ThermalModelNoFlowNamespace::AcceptanceFunction::getAcceptance
Double_t getAcceptance(const Double_t &y, const Double_t &pt) const
Definition: CbmThermalModelNoFlow.cxx:82
CbmThermalModelNoFlow::AcceptanceSTSTOF
ThermalModelNoFlowNamespace::AcceptanceFunction AcceptanceSTSTOF
Definition: CbmThermalModelNoFlow.h:227
ThermalModelNoFlowNamespace::AcceptanceFunction::pts
std::vector< Double_t > pts
Definition: CbmThermalModelNoFlow.h:38
CbmThermalModelNoFlow::flistStsPts
TClonesArray * flistStsPts
Definition: CbmThermalModelNoFlow.h:134
CbmThermalModelNoFlow::CbmThermalModelNoFlow
CbmThermalModelNoFlow(Float_t ekin_=24.08, Int_t recoLevel=3, Int_t usePID=1, Int_t trackNumber=1, Int_t iVerbose=1)
CbmThermalModelNoFlow::flistMCTracks
TClonesArray * flistMCTracks
Definition: CbmThermalModelNoFlow.h:181
ThermalModelNoFlowNamespace::AcceptanceFunction::AcceptanceFunction
AcceptanceFunction()
Definition: CbmThermalModelNoFlow.h:42