]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliTracker.h
Introducing event specie in QA (Yves)
[u/mrichter/AliRoot.git] / STEER / AliTracker.h
index 5156ebea6ab8eaf2359401f122e4f6064761520a..8ee933ce872bb6a15c3f77088eae062d2d5bb1ab 100644 (file)
 //       Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //-------------------------------------------------------------------------
 #include <TObject.h>
+#include <AliPlaneEff.h>
+#include "AliRecoParam.h"
 
-class AliKalmanTrack;
+
+class TTree;
+class AliMagF;
 class AliCluster;
-class TFile;
-class AliRunLoader;
+class AliKalmanTrack;
+class AliESDEvent;
+class AliESDtrack;
+class AliExternalTrackParam;
+class AliTrackPoint;
 
 class AliTracker : public TObject {
-
-
 public:
-
-  enum {kTrackInward, kTrackBack, kTrackRefit} Propagation_t;
-  
-  AliTracker() { fX=fY=fZ=0.; fSigmaX=fSigmaY=fSigmaZ=0.; fEventN=0; fStoreBarrel = 1;}
+  AliTracker();
   virtual ~AliTracker(){}
-  virtual Int_t Clusters2Tracks()=0;
-  virtual Int_t PropagateBack()=0;
+  virtual Int_t Clusters2Tracks(AliESDEvent *event)=0;
+  virtual Int_t PropagateBack(AliESDEvent *event)=0;
+  virtual Int_t RefitInward(AliESDEvent *event)=0;
+  virtual Int_t PostProcess(AliESDEvent */*event*/) {return 0;}
   void SetVertex(const Double_t *xyz, const Double_t *ers=0) { 
      fX=xyz[0]; fY=xyz[1]; fZ=xyz[2];
      if (ers) { fSigmaX=ers[0]; fSigmaY=ers[1]; fSigmaZ=ers[2]; } 
   }
-  void SetEventNumber(Int_t ev) { fEventN=ev; }
-
-  
 
 //protected:
-  virtual Int_t LoadClusters()=0;
+  virtual Int_t LoadClusters(TTree *)=0;
   virtual void UnloadClusters()=0;
+  virtual void FillClusterArray(TObjArray* array) const;
   virtual AliCluster *GetCluster(Int_t index) const=0;
+  virtual AliPlaneEff *GetPlaneEff() {return NULL;}
+  virtual Bool_t GetTrackPoint(Int_t /* index */ , AliTrackPoint& /* p */) const { return kFALSE;}
+  virtual Bool_t GetTrackPointTrackingError(Int_t /* index */, 
+          AliTrackPoint& /* p */, const AliESDtrack* /* t */) { return kFALSE;}
   virtual void  UseClusters(const AliKalmanTrack *t, Int_t from=0) const;
   virtual void  CookLabel(AliKalmanTrack *t,Float_t wrong) const; 
   Double_t GetX() const {return fX;}
@@ -48,29 +54,52 @@ public:
   Double_t GetSigmaX() const {return fSigmaX;}
   Double_t GetSigmaY() const {return fSigmaY;}
   Double_t GetSigmaZ() const {return fSigmaZ;}
-  Int_t GetEventNumber() const {return fEventN;}
 
-  static Int_t SetFieldFactor(const char* fileName, Bool_t closeFile = kTRUE);
-  static Int_t SetFieldFactor(TFile* file, Bool_t deletegAlice = kTRUE);
-  static Int_t SetFieldFactor();
-  
-  Int_t IsStoringBarrel() const {return fStoreBarrel;}
-  void  SetStoreBarrel(Int_t s) {fStoreBarrel = s;}
+  static 
+  Double_t MeanMaterialBudget(const Double_t *start, const Double_t *end, Double_t *mparam);
+  static
+  Bool_t PropagateTrackTo(AliExternalTrackParam *track, Double_t x, Double_t m,
+        Double_t maxStep, Bool_t rotateTo=kTRUE, Double_t maxSnp=0.8);  
+
+  static void SetFieldMap(const AliMagF* map, Bool_t uni);
+  static const AliMagF *GetFieldMap() {return fgkFieldMap;}
+  static Double_t GetBz(const Float_t *r); 
+  static Double_t GetBz(const Double_t *r) {
+    Float_t rr[]={r[0],r[1],r[2]};
+    return GetBz(rr);
+  }
+  static Double_t GetBz() {return fgBz;}
+  static Bool_t UniformField() {return fgUniformField;}
 
+  static void FillResiduals(const AliExternalTrackParam *t,
+                          Double_t *p, Double_t *cov, 
+                           UShort_t id, Bool_t updated=kTRUE);
+  static void SetFillResiduals(AliRecoParam::EventSpecie_t es, Bool_t flag=kTRUE) { fFillResiduals=flag; fEventSpecie = es ;}
+  static void SetResidualsArray(TObjArray **arr) { fResiduals=arr; }
+
+protected:
+  AliTracker(const AliTracker &atr);
 private:
-  Int_t fEventN;//event number
+  AliTracker & operator=(const AliTracker & atr);
+
+  static Bool_t fgUniformField;       // uniform field flag
+  static const AliMagF *fgkFieldMap;  //! field map
+  static Double_t fgBz;               // Nominal Bz (kG)
 
-  Int_t fStoreBarrel;
+  static Bool_t fFillResiduals;       // Fill residuals flag
+  static TObjArray **fResiduals;    //! Array of histograms with residuals
 
   Double_t fX;  //X-coordinate of the primary vertex
   Double_t fY;  //Y-coordinate of the primary vertex
   Double_t fZ;  //Z-coordinate of the primary vertex
-
   Double_t fSigmaX; // error of the primary vertex position in X
   Double_t fSigmaY; // error of the primary vertex position in Y
   Double_t fSigmaZ; // error of the primary vertex position in Z
-
-  ClassDef(AliTracker,1) //abstract tracker
+  
+  static AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
+  
+  ClassDef(AliTracker,4) //abstract tracker
 };
 
 #endif