Latest version corresponding to new trees
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Oct 2010 05:00:23 +0000 (05:00 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Oct 2010 05:00:23 +0000 (05:00 +0000)
PWG4/TwoPartCorr/TreeClasses.h

index 4c133dc..ba81d49 100644 (file)
@@ -34,45 +34,45 @@ public:
                fTrClassMask(0), fTrCluster(0), fEvNumberInFile(-1), fFileId(-1),
                fVxSPD(0), fVySPD(0), fVzSPD(0), fVcSPD(-1) {;}
   virtual ~MyHeader() {;}
-  ULong64_t    GetEventId() const {
-                 return (((ULong64_t)fPeriod << 36) |
-                         ((ULong64_t)fOrbit  << 12) |
-                         (ULong64_t)fBx); 
-               }
-
+  ULong64_t     GetEventId() const {
+                  return (((ULong64_t)fPeriod << 36) |
+                          ((ULong64_t)fOrbit  << 12) |
+                          (ULong64_t)fBx); }
+  Bool_t        IsL0Fired(Int_t bit)      const { return fL0 & (1<<bit);          }
+  Bool_t        IsTrClassFired(Int_t bit) const { return fTrClassMask & (1<<bit); }
 public:
-  Int_t         fRun;
-  UInt_t        fOrbit; 
-  UInt_t        fTime;   
-  UInt_t        fPeriod;
-  UShort_t      fBx;
-  UInt_t        fL0;
-  UInt_t        fL1;
-  UShort_t      fL2;
-  Short_t       fNChips1;
-  Short_t       fNChips2;
-  Short_t       fNTracks;
-  Short_t       fNSelTracks;
-  Short_t       fNTracklets;
-  Double_t      fVx;             //[0,0,16]
-  Double_t      fVy;             //[0,0,16]
-  Double_t      fVz;             //[0,0,16]
-  Double_t      fVc;             //[0,0,16]
-  Bool_t        fIsPileupSPD; 
-  Char_t        fNPileupSPD;
-  Char_t        fNPileup;
-  ULong64_t     fTrClassMask;
-  UChar_t       fTrCluster;
-  Int_t         fEvNumberInFile;
-  Short_t       fFileId;
-  Double_t      fVxSPD;          //[0,0,16]
-  Double_t      fVySPD;          //[0,0,16]
-  Double_t      fVzSPD;          //[0,0,16]
-  Double_t      fVcSPD;          //[0,0,16]
-  Double_t      fVxTPC;          //[0,0,16]
-  Double_t      fVyTPC;          //[0,0,16]
-  Double_t      fVzTPC;          //[0,0,16]
-  Double_t      fVcTPC;          //[0,0,16]
+  Int_t         fRun;            //         run number
+  UInt_t        fOrbit;          //         orbit number
+  UInt_t        fTime;           //         timestamp from DAQ
+  UInt_t        fPeriod;         //         period number
+  UShort_t      fBx;             //         bunch crossing id
+  UInt_t        fL0;             //         l0 trigger bits
+  UInt_t        fL1;             //         l1 trigger bits
+  UShort_t      fL2;             //         l2 trigger bits
+  Short_t       fNChips1;        //         number of chips layer 1
+  Short_t       fNChips2;        //         number of chips layer 2
+  Short_t       fNTracks;        //         number of tracks before cuts
+  Short_t       fNSelTracks;     //         number of stored tracks
+  Short_t       fNTracklets;     //         number of tracklets
+  Double_t      fVx;             //[0,0,16] global vertex x
+  Double_t      fVy;             //[0,0,16] global vertex y
+  Double_t      fVz;             //[0,0,16] global vertex z
+  Double_t      fVc;             //[0,0,16] number of contributors to global vertex
+  Bool_t        fIsPileupSPD;    //         is pileup according to standard definition
+  Char_t        fNPileupSPD;     //         number of additional vertices in SPD
+  Char_t        fNPileup;        //         number of additional vertices in TPC
+  ULong64_t     fTrClassMask;    //         trigger class mask
+  UChar_t       fTrCluster;      //         trigger cluster mask
+  Int_t         fEvNumberInFile; //         event number in ESD file
+  Short_t       fFileId;         //         file id to access path name
+  Double_t      fVxSPD;          //[0,0,16] SPD vertex x
+  Double_t      fVySPD;          //[0,0,16] SPD vertex y
+  Double_t      fVzSPD;          //[0,0,16] SPD vertex z
+  Double_t      fVcSPD;          //[0,0,16] number of contributors to SPD vertex
+  Double_t      fVxTPC;          //[0,0,16] TPC vertex x
+  Double_t      fVyTPC;          //[0,0,16] TPC vertex y
+  Double_t      fVzTPC;          //[0,0,16] TPC vertex z
+  Double_t      fVcTPC;          //[0,0,16] number of contributors to TPC vertex
 
   ClassDef(MyHeader,4) // My header class
 };
@@ -94,16 +94,17 @@ public:
     kTIME=0x80000000,
     kGlobalMerge=0x08000000,
     kITSpureSA=0x10000000,
-    kMultInV0=0x2000000,    //BIT(25): assumed to be belong to V0 in multiplicity estimates
-    kMultSec=0x4000000     //BIT(26): assumed to be secondary (due to the DCA) in multiplicity estimates
+    kMultInV0=0x2000000,
+    kMultSec=0x4000000
   }; 
 
   MyPart(ULong_t st=0, Char_t c=0, Double_t pt=0, Double_t eta=0, Double_t phi=0,
          Short_t ncltpc=0, Short_t ncltpc1=0, Short_t ncltpcs=0,Char_t nclits=0, Double_t chi2tpc=0,
-         Double_t chi2tpc1=0, Double_t chi2its=0, Double_t d=0, Double_t z=0, Double_t dtpc=0, Double_t ztpc=0) :
+         Double_t chi2tpc1=0, Double_t chi2its=0, Double_t d=0, Double_t z=0, Double_t dtpc=0, 
+         Double_t ztpc=0, Double_t sigma=0.) :
     TObject(), fSt(st), fC(c), fPt(pt), fEta(eta), fPhi(phi), fNClTPC(ncltpc), fNClTPC1(ncltpc1), 
     fNClTPCShared(ncltpcs),fNClITS(nclits), fChi2TPC(chi2tpc), fChi2TPC1(chi2tpc1), fChi2ITS(chi2its), 
-    fD(d), fZ(z), fDTPC(dtpc), fZTPC(ztpc) {;}
+    fD(d), fZ(z), fDTPC(dtpc), fZTPC(ztpc), fSigma(sigma) {;}
 
 
   Double_t    Px()         const { return fPt*TMath::Cos(fPhi);  }
@@ -114,24 +115,25 @@ public:
   Bool_t      IsTPCRefit() const { return (fSt&(ULong64_t)kITSrefit);    }
 
 public:
-  ULong64_t   fSt;
-  Char_t      fC;
-  Double32_t  fPt;           //[0,0,16]
-  Double32_t  fEta;          //[0,0,10]
-  Double32_t  fPhi;          //[0,0,10]
-  Short_t     fNClTPC;
-  Short_t     fNClTPC1;
-  Short_t     fNClTPCShared;
-  Char_t      fNClITS;
-  Double32_t  fChi2TPC;      //[0,0,10]
-  Double32_t  fChi2TPC1;     //[0,0,10]
-  Double32_t  fChi2ITS;      //[0,0,10]
-  Double32_t  fD;            //[0,0,16]
-  Double32_t  fZ;            //[0,0,16]
-  Double32_t  fDTPC;         //[0,0,16]
-  Double32_t  fZTPC;         //[0,0,16]
-
-  ClassDef(MyPart,3) // My particle class in cylindrical coordinates
+  ULong64_t   fSt;           //         status flag
+  Double32_t  fC;            //[-1,1,2] charge
+  Double32_t  fPt;           //[0,0,16] pt  from constrained fit
+  Double32_t  fEta;          //[0,0,10] eta from constrained fit
+  Double32_t  fPhi;          //[0,0,10] phi from constrained fit
+  Short_t     fNClTPC;       //         number of clusters in TPC
+  Short_t     fNClTPC1;      //         number of clusters in TPC if standalone
+  Short_t     fNClTPCShared; //         number of shared clusters in TPC
+  Char_t      fNClITS;       //         number of clusters in ITS
+  Double32_t  fChi2TPC;      //[0,0,10] chi2 of TPC
+  Double32_t  fChi2TPC1;     //[0,0,10] chi2 of TPC if standalone
+  Double32_t  fChi2ITS;      //[0,0,10] chi2 of ITC
+  Double32_t  fD;            //[0,0,16] transverse   DCA
+  Double32_t  fZ;            //[0,0,16] longitudinal DCA
+  Double32_t  fDTPC;         //[0,0,16] transverse   DCA TPC
+  Double32_t  fZTPC;         //[0,0,16] longitudinal DCA TPC
+  Double32_t  fSigma;        //[0,0,16] sigma to vertex
+
+  ClassDef(MyPart,5) // My particle class in cylindrical coordinates
 };
 
 class MyTracklet : public TObject
@@ -141,11 +143,83 @@ public:
     TObject(), fDPhi(dphi), fDTh(dth), fEta(eta), fPhi(phi) {;}
 
 public:
-  Double32_t  fDPhi; //[0,0,10]
-  Double32_t  fDTh;  //[0,0,10]
-  Double32_t  fEta;  //[0,0,10]
-  Double32_t  fPhi;  //[0,0,10]
+  Double32_t  fDPhi; //[0,0,10] delta phi
+  Double32_t  fDTh;  //[0,0,10] delta theta
+  Double32_t  fEta;  //[0,0,10] eta
+  Double32_t  fPhi;  //[0,0,10] phi
 
   ClassDef(MyTracklet,1) // My tracklet class
 };
+
+ULong_t flagValue[32] = 
+  {
+    MyPart::kITSin,
+    MyPart::kITSout,
+    MyPart::kITSrefit,
+    MyPart::kITSpid,
+    MyPart::kTPCin,
+    MyPart::kTPCout,
+    MyPart::kTPCrefit,
+    MyPart::kTPCpid,
+    MyPart::kTRDin,
+    MyPart::kTRDout,
+    MyPart::kTRDrefit,
+    MyPart::kTRDpid,
+    MyPart::kTOFin,
+    MyPart::kTOFout,
+    MyPart::kTOFrefit,
+    MyPart::kTOFpid,
+    MyPart::kHMPIDout,
+    MyPart::kHMPIDpid,
+    MyPart::kEMCALmatch,
+    MyPart::kTRDbackup,
+    0x0,     // 20 missing
+    MyPart::kPHOSmatch,
+    0x0,     // 22-24 missing
+    0x0,
+    0x0,
+    MyPart::kMultInV0,
+    MyPart::kMultSec,
+    MyPart::kGlobalMerge,
+    MyPart::kITSpureSA,
+    MyPart::kTRDStop,
+    MyPart::kESDpid,
+    MyPart::kTIME
+  };
+
+TString flagLabel[32] =
+  {
+    "kITSin",
+    "kITSout",
+    "kITSrefit",
+    "kITSpid",
+    "kTPCin",
+    "kTPCout",
+    "kTPCrefit",
+    "kTPCpid",
+    "kTRDin",
+    "kTRDout",
+    "kTRDrefit",
+    "kTRDpid",
+    "kTOFin",
+    "kTOFout",
+    "kTOFrefit",
+    "kTOFpid",
+    "kHMPIDout",
+    "kHMPIDpid",
+    "kEMCALmatch",
+    "kTRDbackup",
+    "--",
+    "kPHOSmatch",
+    "--",
+    "--",
+    "--",
+    "kMultInV0",
+    "kMultSec",
+    "kGlobalMerge",
+    "kITSpureSA",
+    "kTRDStop",
+    "kESDpid",
+    "kTIME"
+  };
 #endif