]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/src/AliL3Evaluate.h
Removed ASV version in AliL3FileHandler by another effective i/o method using index...
[u/mrichter/AliRoot.git] / HLT / src / AliL3Evaluate.h
1 // @(#) $Id$
2
3 #ifndef ALIL3_Evaluate
4 #define ALIL3_Evaluate
5
6
7 class TClonesArray;
8
9 #include <TObject.h>
10 #include <TH1.h>
11 #include <TTree.h>
12 #include <TNtuple.h>
13 #include "AliSimDigits.h"
14
15
16 struct GoodTrack 
17 {
18   Int_t label;
19   Double_t eta;
20   Int_t code;
21   Double_t px,py,pz;
22   Double_t x,y,z;
23   Int_t nhits;
24   Int_t sector;
25 };
26 typedef struct GoodTrack GoodTrack;
27
28
29 class AliL3Track;
30 class TClonesArray;
31 class TFile;
32 class AliL3TrackArray;
33 class AliL3SpacePointData;
34 class TH1F;
35 class AliTPCParam;
36 class TTree;
37 class AliSimDigits;
38 class TObjArray;
39 class TParticle;
40 class TNtupleD;
41
42 class AliL3Evaluate {
43
44  private:
45
46   AliL3TrackArray *fTracks; //!
47   AliTPCParam *fParam;
48   AliL3SpacePointData *fClusters[36][6]; //!
49   TTree *fDigitsTree;
50   AliSimDigits *fDigits;
51   Char_t fPath[1024];
52   Int_t fMinSlice;
53   Int_t fMaxSlice;
54   UInt_t fNcl[36][6];
55   Int_t fRowid[36][176];
56   Int_t fMinPointsOnTrack;  //Minimum points on track to be considered.
57   Int_t fMinHitsFromParticle;
58   GoodTrack *fGoodTracks; //!
59   Float_t fMaxFalseClusters;
60   
61   Int_t fNFastPoints;
62   UInt_t *fMcIndex;//!
63   Int_t *fMcId;//!
64   Int_t fGoodFound;
65   Int_t fGoodGen;
66   Double_t fMinGoodPt;
67
68   //Histograms
69   TNtuple *fNtuppel;
70   TH1F *fPtRes;
71   TH1F *fNGoodTracksPt;
72   TH1F *fNFoundTracksPt;
73   TH1F *fNFakeTracksPt;
74   TH1F *fTrackEffPt;
75   TH1F *fFakeTrackEffPt;
76   TH1F *fNGoodTracksEta;
77   TH1F *fNFoundTracksEta;
78   TH1F *fNFakeTracksEta;
79   TH1F *fTrackEffEta;
80   TH1F *fFakeTrackEffEta;
81   
82   
83  public:
84   AliL3Evaluate();
85   AliL3Evaluate(Char_t *path,Int_t min_clusters,Int_t minhits,Double_t minpt=0.1,Int_t *slice=0);
86   virtual ~AliL3Evaluate();
87   
88   void LoadData(Int_t event=-1,Bool_t sp=kFALSE);
89   void CreateHistos(Int_t nbin=20,Float_t xlow=0,Float_t xup=4);
90   void Write2File(Char_t *outputfile);
91   void FillEffHistos();
92   void FillEffHistosNAIVE();
93   void CalcEffHistos();
94   void AssignIDs();
95   void GetGoodParticles(Char_t *particle_file,Int_t event=-1,Int_t *padrowrange=0);
96   void GetFastClusterIDs(Char_t *path);
97   void GetCFeff(Char_t *path,Char_t *outfile,Int_t nevent=0,Bool_t sp=kFALSE);
98   Int_t GetMCTrackLabel(AliL3Track *track);
99   TNtupleD *CalculateResiduals(Char_t *datapath);
100   void EvaluatePoints(Char_t *rootfile,Char_t *exactfile,Char_t *tofile,Int_t nevent=1,Bool_t offline=kFALSE,Bool_t sp=kFALSE);
101   Float_t GetCrossingAngle(TParticle *part,Int_t slice,Int_t padrow,Float_t *xyz);
102   Int_t FindPrimaries(Int_t nparticles);
103   void SetMinPoints(Int_t f) {fMinPointsOnTrack = f;}
104   void SetMinGoodPt(Double_t f) {fMinGoodPt = f;}
105   void SetMaxFalseClusters(Float_t f) {fMaxFalseClusters = f;}
106
107   Int_t GetNGoodTracks() {return fGoodGen;}
108   Int_t GetNFoundTracks() {return fGoodFound;}
109   TH1F *GetTrackEffPt() {return fTrackEffPt;}
110   TH1F *GetTrackEffEta() {return fTrackEffEta;}
111   TH1F *GetFakeEffEta() {return fFakeTrackEffEta;}
112   TH1F *GetFakeEffPt() {return fFakeTrackEffPt;}
113   TH1F *GetPtRes() {return fPtRes;}
114   AliL3TrackArray *GetTracks() {return fTracks;}
115   
116   ClassDef(AliL3Evaluate,1) //Tracking evaluation class
117 };
118
119 #endif