]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliL3Evaluate.h
Little changes to make g++ version 3.2 compile the src library. Problems remaining...
[u/mrichter/AliRoot.git] / HLT / src / AliL3Evaluate.h
index 1533b8d250527ecb4081faa9e83f6e9c71a1318a..98e4702e57124c422785234b5a82f116abcc320d 100644 (file)
@@ -4,44 +4,63 @@
 #include <TObject.h>
 #include <TH1.h>
 #include <TTree.h>
+#include <TNtuple.h>
 #include "AliSimDigits.h"
 
+
+struct GoodTrack 
+{
+  Int_t label;
+  Double_t eta;
+  Int_t code;
+  Double_t px,py,pz;
+  Double_t pt;
+};
+typedef struct GoodTrack GoodTrack;
+
+
 class AliL3Track;
 class TClonesArray;
 class TFile;
 class AliL3TrackArray;
 class AliL3SpacePointData;
 class TH1F;
-class AliL3Transform;
 class AliTPCParam;
 class TTree;
 class AliSimDigits;
 class TObjArray;
+class TParticle;
 
 class AliL3Evaluate : public TObject {
 
  private:
 
-  TFile *fMCFile;
+  TFile *fDigitsFile;
   TFile *fMCclusterfile;  //If you run the fast simulator.
-  TClonesArray *fParticles;
+  TFile *fEventFile;
+  GoodTrack fGoodTracks[15000]; //!
+  TObjArray *fParticles;
   AliL3TrackArray *fTracks; //!
   AliTPCParam *fParam;
-  AliL3SpacePointData *fClusters[36][5]; //!
-  AliL3Transform *fTransform; //!
+  AliL3SpacePointData *fClusters[36][6]; //!
   AliSimDigits *fDigits;
   TTree *fDigitsTree;
   Int_t fMinSlice;
   Int_t fMaxSlice;
-  UInt_t fNcl[36][5];
-  Int_t fRowid[36][174];
+  UInt_t fNcl[36][6];
+  Int_t fRowid[36][176];
   Int_t fMinPointsOnTrack;  //Minimum points on track to be considered.
   Bool_t fIsSlow;
+  Bool_t fNoOverlap;
   Int_t fNFastPoints;
-  UInt_t fMcIndex;
-  Int_t fMcId;
-  
+  UInt_t *fMcIndex;//!
+  Int_t *fMcId;//!
+  Int_t fGoodFound;
+  Int_t fGoodGen;
+  Double_t fMinGoodPt;
+
   //Histograms
+  TNtuple *fNtuppel;
   TH1F *fPtRes;
   TH1F *fNGoodTracksPt;
   TH1F *fNFoundTracksPt;
@@ -54,29 +73,29 @@ class AliL3Evaluate : public TObject {
   TH1F *fTrackEffEta;
   TH1F *fFakeTrackEffEta;
   
-  void FillEffHistos(TObjArray *good_particles,Int_t *particle_id);
+  void FillEffHistos();
   void CalcEffHistos();
   void AssignIDs();
-  Bool_t SetDigitsTree();
-  Bool_t SetMCParticleArray();
-  TObjArray *DefineGoodTracks(Int_t slice,Int_t *padrow,Int_t good_number,Int_t *particle_id);
-  Int_t GetMCTrackLabel(AliL3Track *track,UInt_t *index=0,Int_t *pID=0,Int_t npoints=0);
-  Int_t **GetClusterIDs(AliL3Track *track,UInt_t *index=0,Int_t *pID=0,Int_t npoints=0);
-  Int_t *GetFastIDs(UInt_t &tmp_ind,Int_t &npoints);
-  void Setup(Char_t *trackfile,Char_t *path);
-
+  Bool_t InitMC();
+  void DefineGoodTracks(Int_t *slice,Int_t *padrow,Int_t good_number,Char_t *fname="good_tracks_tpc");
+  Int_t GetMCTrackLabel(AliL3Track *track);
+  Int_t **GetClusterIDs(AliL3Track *track);
+  void GetFastClusterIDs(Char_t *path);
+  
  public:
   AliL3Evaluate();
   AliL3Evaluate(Char_t *mcfile,Int_t *slice);
+  AliL3Evaluate(Int_t *slice);
 
   virtual ~AliL3Evaluate();
 
-  void SetupFast(Char_t *trackfile,Char_t *mcClusterfile,Char_t *path="./");
-  void SetupSlow(Char_t *trackfile,Char_t *path="./");
+  void SetupFast(Char_t *trackfile,Char_t *mcClusterfile,Char_t *path=".");
+  void SetupSlow(Char_t *trackfile,Char_t *digitsfile,Char_t *path=".");
+  void Setup(Char_t *trackfile,Char_t *path);
   void CreateHistos(Int_t nbin=20,Int_t xlow=0,Int_t xup=4);
   void EvaluatePatch(Int_t slice,Int_t patch,Int_t min_points,Int_t good_number);
   void EvaluateSlice(Int_t slice,Int_t min_points,Int_t good_number);
-  void EvaluateGlobal(Int_t min_points,Int_t good_number);
+  void EvaluateGlobal(Int_t min_points,Int_t good_number,Char_t *fname);
   void Write2File(Char_t *outputfile);
     
   TH1F *GetTrackEffPt() {return fTrackEffPt;}
@@ -84,8 +103,17 @@ class AliL3Evaluate : public TObject {
   TH1F *GetPtRes() {return fPtRes;}
 
   void SetMinPoints(Int_t f) {fMinPointsOnTrack = f;}
+  void SetMinGoodPt(Double_t f) {fMinGoodPt = f;}
+  void DoSingleTracks() {fNoOverlap = kTRUE;}
+  Int_t GetNGoodTracks() {return fGoodGen;}
+  Int_t GetNFoundTracks() {return fGoodFound;}
+  
+  TNtuple *CalculateResiduals();
+  TNtuple *EvaluatePoints(Char_t *rootfile);
+  Bool_t GetParticleCrossingPoint(TParticle *part,Int_t slice,Int_t padrow,Float_t *xyz);
+  void GetCFeff(Char_t *outfile);
 
-  ClassDef(AliL3Evaluate,1) 
+  ClassDef(AliL3Evaluate,1) //Tracking evaluation class
 };
 
 #endif