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