]>
Commit | Line | Data |
---|---|---|
108615fc | 1 | #ifndef ALIL3_Evaluate |
2 | #define ALIL3_Evaluate | |
3 | ||
4 | #include <TObject.h> | |
5 | #include <TH1.h> | |
6 | #include <TTree.h> | |
1f79afc0 | 7 | #include <TNtuple.h> |
108615fc | 8 | #include "AliSimDigits.h" |
9 | ||
e1a32fa5 | 10 | |
11 | struct GoodTrack | |
12 | { | |
e1a32fa5 | 13 | Int_t label; |
40896357 | 14 | Double_t eta; |
e1a32fa5 | 15 | Int_t code; |
16 | Double_t px,py,pz; | |
17 | Double_t pt; | |
18 | }; | |
19 | typedef struct GoodTrack GoodTrack; | |
20 | ||
21 | ||
108615fc | 22 | class AliL3Track; |
23 | class TClonesArray; | |
24 | class TFile; | |
25 | class AliL3TrackArray; | |
26 | class AliL3SpacePointData; | |
27 | class TH1F; | |
108615fc | 28 | class AliTPCParam; |
29 | class TTree; | |
30 | class AliSimDigits; | |
31 | class TObjArray; | |
78127e35 | 32 | class TParticle; |
108615fc | 33 | |
34 | class AliL3Evaluate : public TObject { | |
35 | ||
36 | private: | |
37 | ||
e1a32fa5 | 38 | TFile *fDigitsFile; |
108615fc | 39 | TFile *fMCclusterfile; //If you run the fast simulator. |
e1a32fa5 | 40 | TFile *fEventFile; |
41 | GoodTrack fGoodTracks[15000]; //! | |
23908b9b | 42 | TObjArray *fParticles; |
108615fc | 43 | AliL3TrackArray *fTracks; //! |
44 | AliTPCParam *fParam; | |
40896357 | 45 | AliL3SpacePointData *fClusters[36][6]; //! |
108615fc | 46 | AliSimDigits *fDigits; |
47 | TTree *fDigitsTree; | |
48 | Int_t fMinSlice; | |
49 | Int_t fMaxSlice; | |
40896357 | 50 | UInt_t fNcl[36][6]; |
ae97a0b9 | 51 | Int_t fRowid[36][176]; |
108615fc | 52 | Int_t fMinPointsOnTrack; //Minimum points on track to be considered. |
53 | Bool_t fIsSlow; | |
23908b9b | 54 | Bool_t fNoOverlap; |
108615fc | 55 | Int_t fNFastPoints; |
c0217812 | 56 | UInt_t *fMcIndex;//! |
57 | Int_t *fMcId;//! | |
23908b9b | 58 | Int_t fGoodFound; |
59 | Int_t fGoodGen; | |
e170e0f9 | 60 | Double_t fMinGoodPt; |
23908b9b | 61 | |
108615fc | 62 | //Histograms |
1f79afc0 | 63 | TNtuple *fNtuppel; |
108615fc | 64 | TH1F *fPtRes; |
65 | TH1F *fNGoodTracksPt; | |
66 | TH1F *fNFoundTracksPt; | |
67 | TH1F *fNFakeTracksPt; | |
68 | TH1F *fTrackEffPt; | |
69 | TH1F *fFakeTrackEffPt; | |
70 | TH1F *fNGoodTracksEta; | |
71 | TH1F *fNFoundTracksEta; | |
72 | TH1F *fNFakeTracksEta; | |
73 | TH1F *fTrackEffEta; | |
74 | TH1F *fFakeTrackEffEta; | |
75 | ||
e1a32fa5 | 76 | void FillEffHistos(); |
bc2f4f0e | 77 | void CalcEffHistos(); |
108615fc | 78 | void AssignIDs(); |
e1a32fa5 | 79 | Bool_t InitMC(); |
40896357 | 80 | void DefineGoodTracks(Int_t *slice,Int_t *padrow,Int_t good_number,Char_t *fname="good_tracks_tpc"); |
c0217812 | 81 | Int_t GetMCTrackLabel(AliL3Track *track); |
82 | Int_t **GetClusterIDs(AliL3Track *track); | |
83 | void GetFastClusterIDs(Char_t *path); | |
e1a32fa5 | 84 | |
108615fc | 85 | public: |
86 | AliL3Evaluate(); | |
40896357 | 87 | AliL3Evaluate(Char_t *mcfile,Int_t *slice); |
1f79afc0 | 88 | AliL3Evaluate(Int_t *slice); |
108615fc | 89 | |
90 | virtual ~AliL3Evaluate(); | |
91 | ||
c0217812 | 92 | void SetupFast(Char_t *trackfile,Char_t *mcClusterfile,Char_t *path="."); |
40896357 | 93 | void SetupSlow(Char_t *trackfile,Char_t *digitsfile,Char_t *path="."); |
1f79afc0 | 94 | void Setup(Char_t *trackfile,Char_t *path); |
108615fc | 95 | void CreateHistos(Int_t nbin=20,Int_t xlow=0,Int_t xup=4); |
96 | void EvaluatePatch(Int_t slice,Int_t patch,Int_t min_points,Int_t good_number); | |
97 | void EvaluateSlice(Int_t slice,Int_t min_points,Int_t good_number); | |
40896357 | 98 | void EvaluateGlobal(Int_t min_points,Int_t good_number,Char_t *fname); |
108615fc | 99 | void Write2File(Char_t *outputfile); |
100 | ||
101 | TH1F *GetTrackEffPt() {return fTrackEffPt;} | |
102 | TH1F *GetTrackEffEta() {return fTrackEffEta;} | |
103 | TH1F *GetPtRes() {return fPtRes;} | |
104 | ||
105 | void SetMinPoints(Int_t f) {fMinPointsOnTrack = f;} | |
e170e0f9 | 106 | void SetMinGoodPt(Double_t f) {fMinGoodPt = f;} |
23908b9b | 107 | void DoSingleTracks() {fNoOverlap = kTRUE;} |
108 | Int_t GetNGoodTracks() {return fGoodGen;} | |
109 | Int_t GetNFoundTracks() {return fGoodFound;} | |
1f79afc0 | 110 | |
111 | TNtuple *CalculateResiduals(); | |
e1a32fa5 | 112 | TNtuple *EvaluatePoints(Char_t *rootfile); |
78127e35 | 113 | Bool_t GetParticleCrossingPoint(TParticle *part,Int_t slice,Int_t padrow,Float_t *xyz); |
355debe1 | 114 | void GetCFeff(Char_t *outfile); |
78127e35 | 115 | |
b661165c | 116 | ClassDef(AliL3Evaluate,1) //Tracking evaluation class |
108615fc | 117 | }; |
118 | ||
119 | #endif |