Add noti
[u/mrichter/AliRoot.git] / PWG4 / TwoPartCorr / TreeClasses.h
CommitLineData
d09bc98b 1// $Id$
6b4a0264 2
88a5a45e 3#ifndef TreeClasses_h
4#define TreeClasses_h
6b4a0264 5
6#include <Riostream.h>
7#include <TTree.h>
8#include <TChain.h>
9#include <TCanvas.h>
10#include <TClonesArray.h>
11#include <TH1F.h>
12#include <TH2F.h>
13#include <TMath.h>
14
140b8b35 15class Noti: public TObject
16{
17public:
18 Noti() : fc(0) {;}
19 virtual ~Noti() {;}
20 Bool_t Notify() { fc=1; return 1; }
21 Bool_t Notified() const { return fc; }
22 void Reset() { fc=0; }
23protected:
24 Bool_t fc; //=1 when file changed
25 ClassDef (Noti,0) // Use to be notified when file in chain changes
26};
27
6b4a0264 28class MyHeader
29{
30public:
75617407 31 MyHeader() : fRun(0), fOrbit(0), fTime(0), fPeriod(0), fBx(0), fL0(0), fL1(0), fL2(0),
6b4a0264 32 fNChips1(0), fNChips2(0), fNTracks(0), fNSelTracks(0), fNTracklets(0),
75617407 33 fVx(0), fVy(0), fVz(0), fVc(-1), fIsPileupSPD(0), fNPileupSPD(0), fNPileup(0),
2a205ee9 34 fTrClassMask(0), fTrCluster(0), fEvNumberInFile(-1), fFileId(-1),
75617407 35 fVxSPD(0), fVySPD(0), fVzSPD(0), fVcSPD(-1) {;}
6b4a0264 36 virtual ~MyHeader() {;}
5f010a9c 37 ULong64_t GetEventId() const {
38 return (((ULong64_t)fPeriod << 36) |
39 ((ULong64_t)fOrbit << 12) |
40 (ULong64_t)fBx);
41 }
6b4a0264 42
75617407 43public:
6b4a0264 44 Int_t fRun;
45 UInt_t fOrbit;
46 UInt_t fTime;
47 UInt_t fPeriod;
48 UShort_t fBx;
75617407 49 UInt_t fL0;
50 UInt_t fL1;
51 UShort_t fL2;
6b4a0264 52 Short_t fNChips1;
53 Short_t fNChips2;
54 Short_t fNTracks;
55 Short_t fNSelTracks;
56 Short_t fNTracklets;
75617407 57 Double_t fVx; //[0,0,16]
58 Double_t fVy; //[0,0,16]
59 Double_t fVz; //[0,0,16]
60 Double_t fVc; //[0,0,16]
6b4a0264 61 Bool_t fIsPileupSPD;
62 Char_t fNPileupSPD;
63 Char_t fNPileup;
2a205ee9 64 ULong64_t fTrClassMask;
65 UChar_t fTrCluster;
66 Int_t fEvNumberInFile;
67 Short_t fFileId;
75617407 68 Double_t fVxSPD; //[0,0,16]
69 Double_t fVySPD; //[0,0,16]
70 Double_t fVzSPD; //[0,0,16]
71 Double_t fVcSPD; //[0,0,16]
72 Double_t fVxTPC; //[0,0,16]
73 Double_t fVyTPC; //[0,0,16]
74 Double_t fVzTPC; //[0,0,16]
75 Double_t fVcTPC; //[0,0,16]
2a205ee9 76
75617407 77 ClassDef(MyHeader,4) // My header class
6b4a0264 78};
79
80class MyPart : public TObject
81{
82public:
75617407 83 enum { /*from AliESDtrack.h */
84 kITSin=0x0001,kITSout=0x0002,kITSrefit=0x0004,kITSpid=0x0008,
85 kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
86 kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
87 kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
88 kHMPIDout=0x10000,kHMPIDpid=0x20000,
89 kEMCALmatch=0x40000,
90 kPHOSmatch=0x200000,
91 kTRDbackup =0x80000,
92 kTRDStop=0x20000000,
93 kESDpid=0x40000000,
94 kTIME=0x80000000,
95 kGlobalMerge=0x08000000,
96 kITSpureSA=0x10000000,
97 kMultInV0=0x2000000, //BIT(25): assumed to be belong to V0 in multiplicity estimates
98 kMultSec=0x4000000 //BIT(26): assumed to be secondary (due to the DCA) in multiplicity estimates
99 };
100
101 MyPart(ULong_t st=0, Char_t c=0, Double_t pt=0, Double_t eta=0, Double_t phi=0,
102 Short_t ncltpc=0, Short_t ncltpc1=0, Short_t ncltpcs=0,Char_t nclits=0, Double_t chi2tpc=0,
103 Double_t chi2tpc1=0, Double_t chi2its=0, Double_t d=0, Double_t z=0, Double_t dtpc=0, Double_t ztpc=0) :
104 TObject(), fSt(st), fC(c), fPt(pt), fEta(eta), fPhi(phi), fNClTPC(ncltpc), fNClTPC1(ncltpc1),
105 fNClTPCShared(ncltpcs),fNClITS(nclits), fChi2TPC(chi2tpc), fChi2TPC1(chi2tpc1), fChi2ITS(chi2its),
106 fD(d), fZ(z), fDTPC(dtpc), fZTPC(ztpc) {;}
107
108
109 Double_t Px() const { return fPt*TMath::Cos(fPhi); }
110 Double_t Py() const { return fPt*TMath::Sin(fPhi); }
111 Double_t Pz() const { return fPt*TMath::SinH(fEta); }
5f010a9c 112 Bool_t IsITSRefit() const { return (fSt&(ULong64_t)kITSrefit); }
113 Bool_t IsTPCIn() const { return (fSt&(ULong64_t)kTPCin); }
114 Bool_t IsTPCRefit() const { return (fSt&(ULong64_t)kITSrefit); }
75617407 115
116public:
5f010a9c 117 ULong64_t fSt;
6b4a0264 118 Char_t fC;
75617407 119 Double32_t fPt; //[0,0,16]
120 Double32_t fEta; //[0,0,10]
121 Double32_t fPhi; //[0,0,10]
122 Short_t fNClTPC;
123 Short_t fNClTPC1;
124 Short_t fNClTPCShared;
125 Char_t fNClITS;
126 Double32_t fChi2TPC; //[0,0,10]
5f010a9c 127 Double32_t fChi2TPC1; //[0,0,10]
75617407 128 Double32_t fChi2ITS; //[0,0,10]
129 Double32_t fD; //[0,0,16]
130 Double32_t fZ; //[0,0,16]
131 Double32_t fDTPC; //[0,0,16]
132 Double32_t fZTPC; //[0,0,16]
133
5f010a9c 134 ClassDef(MyPart,3) // My particle class in cylindrical coordinates
6b4a0264 135};
2a205ee9 136
137class MyTracklet : public TObject
138{
139public:
140 MyTracklet(Double_t dphi=0, Double_t dth=0, Double_t eta=0, Double_t phi=0) :
141 TObject(), fDPhi(dphi), fDTh(dth), fEta(eta), fPhi(phi) {;}
75617407 142
143public:
2a205ee9 144 Double32_t fDPhi; //[0,0,10]
145 Double32_t fDTh; //[0,0,10]
146 Double32_t fEta; //[0,0,10]
147 Double32_t fPhi; //[0,0,10]
75617407 148
2a205ee9 149 ClassDef(MyTracklet,1) // My tracklet class
150};
6b4a0264 151#endif