CbmRoot
CbmInverseSlope.h
Go to the documentation of this file.
1 /*
2  *====================================================================
3  *
4  * CBM Inverse Slope extraction
5  *
6  * Authors: V.Vovchenko
7  *
8  * e-mail :
9  *
10  *====================================================================
11  *
12  * Inverse Slope extraction
13  *
14  *====================================================================
15  */
16 
17 #ifndef _CbmInverseSlope_h_
18 #define _CbmInverseSlope_h_
19 
20 #include "CbmModelBase.h"
22 #include "TMath.h"
23 #include <algorithm>
24 #include <map>
25 #include <vector>
26 
27 class TClonesArray;
28 class CbmVertex;
29 class TDirectory;
30 class TH1F;
31 class TH2F;
32 class TGraphErrors;
33 class TSpline3;
34 class FairRootManager;
35 
36 class InverseSlope;
37 
38 class CbmInverseSlope : public CbmModelBase {
39 public:
40  //static const int p_sz = 8;
41  TString name;
43  Int_t recoLevel =
44  -1, // -1 - MC Tracks, 0 - Reconstructible MC Tracks, 1 - Reco Tracks with MC Data, 2 - Reco Tracks with Reco Momentum and MC Primary, 3 - Reco Tracks with Reco Momentum and Reco Primary
45  //Int_t usePID = 1, // 1 - MC, 2 - TOF
46  //Int_t trackNumber = 1,
47  Int_t iVerbose = 1,
48  TString Mode = "MC",
49  Int_t PDG = -211, // ID of particle to analyze
50  TString pname = "pi-",
51  Int_t EventStats = 1,
52  KFParticleTopoReconstructor* tr = 0,
53  Float_t ekin_ = 25.);
55 
56  virtual void ReInit(FairRootManager* fManger);
57  virtual void Init();
58  virtual void Exec();
59  virtual void Finish();
60 
61  void AddRapidityInterval(double ymin, double ymax);
62  void AddHistos();
63 
65 
66 private:
67  void CalculateAveragesInEvent(int RecoLevel, bool UpdateGlobal = 0);
68 
69  // Float_t fCuts[2][3];
70  Float_t ekin;
71  Float_t p0cm;
72  Float_t ycm;
73  Bool_t fUpdate;
74  Int_t fusePID;
75  Int_t fRecoLevel;
76  Int_t fTrackNumber; // 0 - test calculation, only Pions, 1 - UrQMD Au+Au
77  Int_t fEventStats;
78  Int_t events;
79 
80 
81  TString fModeName;
82  TString outfileName;
83 
84  TDirectory* histodir;
85 
86  TClonesArray* flistMCTracks;
87 
88  //Int_t events;
89 
90  static const int nHisto1D = 6; //T
92 
93  TH1F* histo1D[nHisto1D];
96 
97  TGraphErrors* grTy;
98  TGraphErrors* grdndyReco;
99 
100  TH1F* pullT;
101  std::vector<double> Ts;
102 
103  double kProtonMass;
104 
105  int fPDGID;
106  double fMass;
107  std::vector<double> fYminv, fYmaxv;
108  double paramGlobal;
110  double paramLocal;
111  std::vector<double> paramLocalInterval;
115 
116 
119 
121  std::vector<InverseSlope*> modelsY;
122 };
123 
124 #endif
CbmInverseSlope::IndexMt
int IndexMt
Definition: CbmInverseSlope.h:91
CbmInverseSlope::ClassDef
ClassDef(CbmInverseSlope, 1)
CbmInverseSlope::Init
virtual void Init()
Definition: CbmInverseSlope.cxx:470
CbmInverseSlope::histodndymodel
TH1F * histodndymodel
Definition: CbmInverseSlope.h:94
CbmInverseSlope::param2GlobalInterval
std::vector< double > param2GlobalInterval
Definition: CbmInverseSlope.h:109
CbmInverseSlope::modelmc
InverseSlope * modelmc
Definition: CbmInverseSlope.h:120
CbmInverseSlope::fEventStats
Int_t fEventStats
Definition: CbmInverseSlope.h:77
CbmInverseSlope::outfileName
TString outfileName
Definition: CbmInverseSlope.h:82
CbmInverseSlope::histo1DIntervals
TH1F *** histo1DIntervals
Definition: CbmInverseSlope.h:95
CbmInverseSlope::fPDGID
int fPDGID
Definition: CbmInverseSlope.h:105
CbmInverseSlope::IndexModelMt4Pi
int IndexModelMt4Pi
Definition: CbmInverseSlope.h:91
CbmInverseSlope::pullT
TH1F * pullT
Definition: CbmInverseSlope.h:100
CbmInverseSlope::fTrackNumber
Int_t fTrackNumber
Definition: CbmInverseSlope.h:76
CbmInverseSlope::events
Int_t events
Definition: CbmInverseSlope.h:78
CbmInverseSlope::Ts
std::vector< double > Ts
Definition: CbmInverseSlope.h:101
CbmInverseSlope::totalLocalInterval
std::vector< int > totalLocalInterval
Definition: CbmInverseSlope.h:113
CbmInverseSlope::paramLocal
double paramLocal
Definition: CbmInverseSlope.h:110
CbmInverseSlope::ekin
Float_t ekin
Definition: CbmInverseSlope.h:70
CbmInverseSlope::fMass
double fMass
Definition: CbmInverseSlope.h:106
CbmInverseSlope::fRecoLevel
Int_t fRecoLevel
Definition: CbmInverseSlope.h:75
CbmInverseSlope::fModeName
TString fModeName
Definition: CbmInverseSlope.h:81
CbmKFTrErrMCPoints.h
CbmInverseSlope::grdndyReco
TGraphErrors * grdndyReco
Definition: CbmInverseSlope.h:98
CbmInverseSlope::kProtonMass
double kProtonMass
Definition: CbmInverseSlope.h:103
CbmInverseSlope
Definition: CbmInverseSlope.h:38
CbmInverseSlope::p0cm
Float_t p0cm
Definition: CbmInverseSlope.h:71
CbmInverseSlope::histo1D
TH1F * histo1D[nHisto1D]
Definition: CbmInverseSlope.h:93
CbmInverseSlope::paramGlobal
double paramGlobal
Definition: CbmInverseSlope.h:108
CbmInverseSlope::paramGlobalInterval
std::vector< double > paramGlobalInterval
Definition: CbmInverseSlope.h:109
CbmInverseSlope::fYminv
std::vector< double > fYminv
Definition: CbmInverseSlope.h:107
CbmInverseSlope::model
InverseSlope * model
Definition: CbmInverseSlope.h:120
CbmInverseSlope::name
TString name
Definition: CbmInverseSlope.h:41
CbmModelBase.h
CbmInverseSlope::IndexMt2
int IndexMt2
Definition: CbmInverseSlope.h:91
CbmInverseSlope::totalEvents
int totalEvents
Definition: CbmInverseSlope.h:114
CbmInverseSlope::modelsY
std::vector< InverseSlope * > modelsY
Definition: CbmInverseSlope.h:121
CbmInverseSlope::fusePID
Int_t fusePID
Definition: CbmInverseSlope.h:74
CbmVertex
Definition: CbmVertex.h:26
CbmInverseSlope::operator=
CbmInverseSlope & operator=(const CbmInverseSlope &)
CbmInverseSlope::~CbmInverseSlope
~CbmInverseSlope()
Definition: CbmInverseSlope.cxx:341
CbmInverseSlope::flistMCTracks
TClonesArray * flistMCTracks
Definition: CbmInverseSlope.h:86
CbmInverseSlope::histodir
TDirectory * histodir
Definition: CbmInverseSlope.h:84
CbmInverseSlope::Finish
virtual void Finish()
Definition: CbmInverseSlope.cxx:507
CbmInverseSlope::CalculateAveragesInEvent
void CalculateAveragesInEvent(int RecoLevel, bool UpdateGlobal=0)
Definition: CbmInverseSlope.cxx:681
CbmInverseSlope::totalLocal
int totalLocal
Definition: CbmInverseSlope.h:112
CbmModelBase
Definition: CbmModelBase.h:25
CbmInverseSlope::AddRapidityInterval
void AddRapidityInterval(double ymin, double ymax)
Definition: CbmInverseSlope.cxx:348
CbmInverseSlope::IndexModelMt2
int IndexModelMt2
Definition: CbmInverseSlope.h:91
CbmInverseSlope::nHisto1D
static const int nHisto1D
Definition: CbmInverseSlope.h:90
CbmInverseSlope::CbmInverseSlope
CbmInverseSlope(const CbmInverseSlope &)
CbmInverseSlope::totalGlobalInterval
std::vector< int > totalGlobalInterval
Definition: CbmInverseSlope.h:113
CbmInverseSlope::Exec
virtual void Exec()
Definition: CbmInverseSlope.cxx:474
CbmInverseSlope::histodndy
TH1F * histodndy
Definition: CbmInverseSlope.h:94
CbmInverseSlope::totalGlobal
int totalGlobal
Definition: CbmInverseSlope.h:112
CbmInverseSlope::ReInit
virtual void ReInit(FairRootManager *fManger)
Definition: CbmInverseSlope.cxx:466
CbmInverseSlope::fUpdate
Bool_t fUpdate
Definition: CbmInverseSlope.h:73
CbmInverseSlope::paramLocalInterval
std::vector< double > paramLocalInterval
Definition: CbmInverseSlope.h:111
CbmInverseSlope::ycm
Float_t ycm
Definition: CbmInverseSlope.h:72
InverseSlope
Definition: InverseSlope.h:12
CbmInverseSlope::AddHistos
void AddHistos()
Definition: CbmInverseSlope.cxx:364
CbmInverseSlope::fYmaxv
std::vector< double > fYmaxv
Definition: CbmInverseSlope.h:107
CbmInverseSlope::grTy
TGraphErrors * grTy
Definition: CbmInverseSlope.h:97
CbmInverseSlope::IndexModelMt
int IndexModelMt
Definition: CbmInverseSlope.h:91
CbmInverseSlope::CbmInverseSlope
CbmInverseSlope(Int_t recoLevel=-1, Int_t iVerbose=1, TString Mode="MC", Int_t PDG=-211, TString pname="pi-", Int_t EventStats=1, KFParticleTopoReconstructor *tr=0, Float_t ekin_=25.)
CbmInverseSlope::IndexT
int IndexT
Definition: CbmInverseSlope.h:91