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