]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFT0v1.h
Adding PiKP-only resolution histograms and switch to turn off many histograms which...
[u/mrichter/AliRoot.git] / TOF / AliTOFT0v1.h
index bc6fc101a7c7d901b7dc18f94c4e3e7d252a87a6..11cbb1e27643a390d786381b70e60ee409597307 100644 (file)
 
 #include "TObject.h"
 
+#include "TObjArray.h"
+
 class AliESDtrack;
 class AliESDEvent;
 class AliESDpid;
 
+class TObjArray;
+
 class AliTOFT0v1: public TObject {
 public:
   
@@ -23,8 +27,7 @@ public:
   AliTOFT0v1(AliESDEvent *event,AliESDpid *extPID=NULL); // overloaded constructor
   virtual ~AliTOFT0v1() ; // dtor
  
-  Double_t* DefineT0(Option_t *option); 
-  Double_t* DefineT0(Option_t *option,Float_t pMinCut,Float_t pMaxCut=1.5); 
+  Double_t* DefineT0(Option_t *option,Float_t pMinCut=3,Float_t pMaxCut=5); 
     
   void          SetMomBounds(Float_t pLow, Float_t pUp) { fLowerMomBound=pLow; fUpperMomBound=pUp;} // momenta are expressed in [GeV/c]
   void          SetTimeCorr(Float_t timecorr) {fTimeCorr=timecorr;} //in ns!!!
@@ -33,11 +36,14 @@ public:
 /*   void  Print(Option_t* option) const ; */
 
   void   SetTimeResolution(Float_t /* timeres */){}; // obsolete
-
+  void SetOptimization(Bool_t flag=kFALSE){fOptFlag=flag;};
   void Init(AliESDEvent *event); // init
 
  private:
 
+  Float_t ToCalculatePower(Float_t base, Int_t exponent) const ;
+  Int_t   ToCalculatePower(Int_t base, Int_t exponent) const ;
+
   AliTOFT0v1(const AliTOFT0v1 &);
   AliTOFT0v1 & operator=(const AliTOFT0v1 &) ;
 
@@ -50,10 +56,17 @@ public:
   Float_t fTimeCorr;  // global time resolution used to calculate T0
   AliESDEvent* fEvent;      //evento per il quale si vuole calcolare il T0
   Double_t fT0SigmaT0def[6]; // array with the event information ([0]=event time -- [1] = sigma -- [2] = tracks on the TOF -- [3] = tracks used for the event time)
+
+  Int_t fLookupPowerThree[15]; //! lookup table for power 3 to speed up the code
   
   AliESDpid *fPIDesd; // class with the detector response
 
-  ClassDef(AliTOFT0v1,3);  // Calculate the time zero using TOF detector */
+  TObjArray *fTracks;   //! array of tracks
+  TObjArray *fGTracks;  //! array of good tracks
+  TObjArray *fTracksT0; //! array of tracks usefull for T0 estimate
+  Bool_t fOptFlag;    // use optimized code
+
+  ClassDef(AliTOFT0v1,5);  // Calculate the time zero using TOF detector */
   
 };