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