]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Evaluate.h
Added residual calc. and ntuppels
[u/mrichter/AliRoot.git] / HLT / src / AliL3Evaluate.h
1 #ifndef ALIL3_Evaluate
2 #define ALIL3_Evaluate
3
4 #include <TObject.h>
5 #include <TH1.h>
6 #include <TTree.h>
7 #include <TNtuple.h>
8 #include "AliSimDigits.h"
9
10 class AliL3Track;
11 class TClonesArray;
12 class TFile;
13 class AliL3TrackArray;
14 class AliL3SpacePointData;
15 class TH1F;
16 class AliL3Transform;
17 class AliTPCParam;
18 class TTree;
19 class AliSimDigits;
20 class TObjArray;
21
22 class AliL3Evaluate : public TObject {
23
24  private:
25
26   TFile *fMCFile;
27   TFile *fMCclusterfile;  //If you run the fast simulator.
28   TClonesArray *fParticles;
29   AliL3TrackArray *fTracks; //!
30   AliTPCParam *fParam;
31   AliL3SpacePointData *fClusters[36][5]; //!
32   AliL3Transform *fTransform; //!
33   AliSimDigits *fDigits;
34   TTree *fDigitsTree;
35   Int_t fMinSlice;
36   Int_t fMaxSlice;
37   UInt_t fNcl[36][5];
38   Int_t fRowid[36][174];
39   Int_t fMinPointsOnTrack;  //Minimum points on track to be considered.
40   Bool_t fIsSlow;
41   Int_t fNFastPoints;
42   UInt_t *fMcIndex;//!
43   Int_t *fMcId;//!
44   
45   //Histograms
46   TNtuple *fNtuppel;
47   TH1F *fPtRes;
48   TH1F *fNGoodTracksPt;
49   TH1F *fNFoundTracksPt;
50   TH1F *fNFakeTracksPt;
51   TH1F *fTrackEffPt;
52   TH1F *fFakeTrackEffPt;
53   TH1F *fNGoodTracksEta;
54   TH1F *fNFoundTracksEta;
55   TH1F *fNFakeTracksEta;
56   TH1F *fTrackEffEta;
57   TH1F *fFakeTrackEffEta;
58   
59   void FillEffHistos(TObjArray *good_particles,Int_t *particle_id);
60   void CalcEffHistos();
61   void AssignIDs();
62   Bool_t SetDigitsTree();
63   Bool_t SetMCParticleArray();
64   TObjArray *DefineGoodTracks(Int_t slice,Int_t *padrow,Int_t good_number,Int_t *particle_id);
65   Int_t GetMCTrackLabel(AliL3Track *track);
66   Int_t **GetClusterIDs(AliL3Track *track);
67   void GetFastClusterIDs(Char_t *path);
68   //void Setup(Char_t *trackfile,Char_t *path);
69
70  public:
71   AliL3Evaluate();
72   AliL3Evaluate(Char_t *mcfile,Int_t *slice);
73   AliL3Evaluate(Int_t *slice);
74
75   virtual ~AliL3Evaluate();
76
77   void SetupFast(Char_t *trackfile,Char_t *mcClusterfile,Char_t *path=".");
78   void SetupSlow(Char_t *trackfile,Char_t *path=".");
79   void Setup(Char_t *trackfile,Char_t *path);
80   void CreateHistos(Int_t nbin=20,Int_t xlow=0,Int_t xup=4);
81   void EvaluatePatch(Int_t slice,Int_t patch,Int_t min_points,Int_t good_number);
82   void EvaluateSlice(Int_t slice,Int_t min_points,Int_t good_number);
83   void EvaluateGlobal(Int_t min_points,Int_t good_number);
84   void Write2File(Char_t *outputfile);
85     
86   TH1F *GetTrackEffPt() {return fTrackEffPt;}
87   TH1F *GetTrackEffEta() {return fTrackEffEta;}
88   TH1F *GetPtRes() {return fPtRes;}
89
90   void SetMinPoints(Int_t f) {fMinPointsOnTrack = f;}
91   
92   TNtuple *CalculateResiduals();
93   
94   
95   ClassDef(AliL3Evaluate,1) 
96 };
97
98 #endif