]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODTrack.h
i)Restructuring of the GRP preprocessor ii)Adding the storage of raw data tag files...
[u/mrichter/AliRoot.git] / STEER / AliAODTrack.h
index d93f80310934f7132c9ecc47a48f7cc4d80ae1fb..61e98ca008dfed8a496f6a84c126758cb8527078 100644 (file)
 #include <TRef.h>
 #include <TParticle.h>
 
-#include "AliVirtualParticle.h"
+#include "AliVParticle.h"
 #include "AliAODVertex.h"
 #include "AliAODRedCov.h"
 
-class AliAODTrack : public AliVirtualParticle {
+class AliAODTrack : public AliVParticle {
 
  public:
   
@@ -47,7 +47,7 @@ class AliAODTrack : public AliVirtualParticle {
   };
 
   AliAODTrack();
-  AliAODTrack(Int_t id,
+  AliAODTrack(Short_t id,
              Int_t label,
              Double_t p[3],
              Bool_t cartesian,
@@ -60,9 +60,10 @@ class AliAODTrack : public AliVirtualParticle {
              AliAODVertex *prodVertex,
              Bool_t usedForVtxFit,
              Bool_t usedForPrimVtxFit,
-             AODTrk_t ttype=kUndef);
+             AODTrk_t ttype=kUndef,
+             UInt_t selectInfo=0);
 
-  AliAODTrack(Int_t id,
+  AliAODTrack(Short_t id,
              Int_t label,
              Float_t p[3],
              Bool_t cartesian,
@@ -75,7 +76,8 @@ class AliAODTrack : public AliVirtualParticle {
              AliAODVertex *prodVertex,
              Bool_t usedForVtxFit,
              Bool_t usedForPrimVtxFit,
-             AODTrk_t ttype=kUndef);
+             AODTrk_t ttype=kUndef,
+             UInt_t selectInfo=0);
 
   virtual ~AliAODTrack();
   AliAODTrack(const AliAODTrack& trk); 
@@ -117,13 +119,13 @@ class AliAODTrack : public AliVirtualParticle {
  
   template <class T> void SetPID(const T *pid) {
     if(pid) for(Int_t i=0; i<10; ++i) fPID[i]=pid[i];
-    else {for(Int_t i=0; i<10; fPID[i++]=0.);} fPID[AliAODTrack::kUnknown]=1.;}
+    else {for(Int_t i=0; i<10; fPID[i++]=0.); fPID[AliAODTrack::kUnknown]=1.;}}
 
-  Int_t GetID() const { return fID; }
-  Int_t GetLabel() const { return fLabel; } 
-  Char_t GetType() const { return fType;}
-  Bool_t GetUsedForVtxFit() const { return TestBit(kUsedForVtxFit); }
-  Bool_t GetUsedForPrimVtxFit() const { return TestBit(kUsedForPrimVtxFit); }
+  Short_t GetID() const { return fID; }
+  Int_t   GetLabel() const { return fLabel; } 
+  Char_t  GetType() const { return fType;}
+  Bool_t  GetUsedForVtxFit() const { return TestBit(kUsedForVtxFit); }
+  Bool_t  GetUsedForPrimVtxFit() const { return TestBit(kUsedForPrimVtxFit); }
 
   template <class T> void GetP(T *p) const {
     p[0]=fMomentum[0]; p[1]=fMomentum[1]; p[2]=fMomentum[2];}
@@ -148,6 +150,7 @@ class AliAODTrack : public AliVirtualParticle {
   UChar_t GetITSClusterMap() const     { return (UChar_t)fITSMuonClusterMap; }
   UInt_t  GetMUONClusterMap() const    { return fITSMuonClusterMap/65536; }
   UInt_t  GetITSMUONClusterMap() const { return fITSMuonClusterMap; }
+  Bool_t  TestFilterBit(UInt_t filterBit) const {return (Bool_t) ((filterBit & fFilterMap) != 0);}
 
   AliAODVertex *GetProdVertex() const { return (AliAODVertex*)fProdVertex.GetObject(); }
   
@@ -155,7 +158,7 @@ class AliAODTrack : public AliVirtualParticle {
   void  Print(const Option_t *opt = "") const;
 
   // setters
-  void SetID(Int_t id) { fID = id; }
+  void SetID(Short_t id) { fID = id; }
   void SetLabel(Int_t label) {fLabel = label; }
 
   template <class T> void SetPosition(const T *x, Bool_t isDCA = kFALSE);
@@ -177,6 +180,24 @@ class AliAODTrack : public AliVirtualParticle {
   void SetMuonClusterMap(UInt_t muonClusMap)       { fITSMuonClusterMap = muonClusMap*65536; }
   void SetITSMuonClusterMap(UInt_t itsMuonClusMap) { fITSMuonClusterMap = itsMuonClusMap; }
 
+  Int_t GetMatchTrigger() const {return fITSMuonClusterMap>>30;}
+                                       //  0 Muon track does not match trigger
+                                       //  1 Muon track match but does not pass pt cut
+                                       //  2 Muon track match Low pt cut
+                                       //  3 Muon track match High pt cut
+  void     SetMatchTrigger(Int_t MatchTrigger);
+  Int_t    MatchTrigger() const { return (GetMatchTrigger()>0)?1:0; }  //  Muon track matches trigger track
+  Int_t    MatchTriggerAnyPt()   const  { return (GetMatchTrigger()>0)?1:0; }  //  Muon track matches trigger track
+  Int_t    MatchTriggerLowPt()   const  { return (GetMatchTrigger()>1)?1:0; }  //  Muon track matches trigger track and passes Low pt cut
+  Int_t    MatchTriggerHighPt()  const  { return (GetMatchTrigger()>2)?1:0; }  //  Muon track matches trigger track and passes High pt cut
+  Double_t GetChi2MatchTrigger() const  { return fChi2MatchTrigger;}
+  void     SetChi2MatchTrigger(Double_t Chi2MatchTrigger) {fChi2MatchTrigger = Chi2MatchTrigger;}
+  UShort_t GetHitsPatternInTrigCh() const { return (fITSMuonClusterMap&0xff00)>>8; }
+  void     SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh);
+  Int_t    HitsMT(Int_t istation, Int_t iplane, Char_t *cathode=0);  // Check if track hits Muon chambers
+  Int_t    HitsMuonChamber(Int_t MuonChamber);  // Check if track hits Muon chambers
+  Bool_t   IsMuonTrack() const { return fITSMuonClusterMap>>16;}  // This scheme has to be checked, still!
+
   void SetProdVertex(TObject *vertex) { fProdVertex = vertex; }
 
   // name and title
@@ -188,21 +209,24 @@ class AliAODTrack : public AliVirtualParticle {
   Double32_t    fMomentum[3];       // momemtum stored in pt, phi, theta
   Double32_t    fPosition[3];       // position of first point on track or dca
 
-  Double32_t    fPID[10];           // [0.,1.,8] pointer to PID object
   Double32_t    fChi2perNDF;        // chi2/NDF of mometum fit
+  Double32_t    fChi2MatchTrigger;  // chi2 of trigger/track matching
+  Double32_t    fPID[10];           // [0.,1.,8] pointer to PID object
 
-  Int_t         fID;                // unique track ID, points back to the ESD track
   Int_t         fLabel;             // track label, points back to MC track
   
-  AliAODRedCov<6> *fCovMatrix;      // covariance matrix (x, y, z, px, py, pz)
-  TRef          fProdVertex;        // vertex of origin
+  UInt_t        fITSMuonClusterMap; // map of ITS and muon clusters, one bit per layer (ITS: bit 1-8, muon: bit 17-32) 
+  UInt_t        fFilterMap;         // filter information, one bit per set of cuts
+
+  Short_t       fID;                // unique track ID, points back to the ESD track
 
   Char_t        fCharge;            // particle charge
-  UInt_t        fITSMuonClusterMap; // map of ITS and muon clusters, one bit per layer (ITS: bit 1-8, muon: bit 17-32) 
   Char_t        fType;              // Track Type
 
+  AliAODRedCov<6> *fCovMatrix;      // covariance matrix (x, y, z, px, py, pz)
+  TRef          fProdVertex;        // vertex of origin
 
-  ClassDef(AliAODTrack,2);
+  ClassDef(AliAODTrack,5);
 };
 
 #endif