]>
Commit | Line | Data |
---|---|---|
9af36e3a | 1 | #ifndef AliD0toKpi_H |
2 | #define AliD0toKpi_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------------------------- | |
7 | // Class AliD0toKpi | |
8 | // Reconstructed D0 -> K^- pi^+ class | |
9 | // | |
10 | // Note: the two decay tracks are labelled: 0 (positive track) | |
11 | // 1 (negative track) | |
12 | // | |
13 | // Origin: A. Dainese andrea.dainese@lnl.infn.it | |
14 | //------------------------------------------------------------------------- | |
15 | ||
16 | #include <TObject.h> | |
17 | #include <TMath.h> | |
18 | ||
19 | //---------------------------------------------------------------------------- | |
20 | // Some constants (masses + parameterized TOF PID) | |
21 | // | |
22 | // particle masses | |
23 | const Double_t kMD0 = 1.8645; // D0 mass | |
24 | const Double_t kMK = 0.49368; // K+ mass | |
25 | const Double_t kMPi = 0.13957; // pi+ mass | |
26 | ||
27 | // --- TOF tagging probabilities --- | |
28 | // central HIJING | |
29 | // B = 0.4 T | |
30 | // tracking errors in TPC included | |
31 | // With TRD | |
32 | // | |
33 | // *** Pb-Pb dNch/dy=6000 *** | |
34 | // | |
35 | // PIONS | |
36 | const Int_t kPiBinsPbPb = 10; | |
37 | const Double_t kPiBinWidthPbPb = 0.250; | |
38 | const Double_t kPiTagPiPbPb[kPiBinsPbPb] = {0.211421,0.652184,0.624421,0.614727,0.610777,0.628015,0.631520,0.630324,0.637551,0.575235}; | |
39 | const Double_t kPiTagNidPbPb[kPiBinsPbPb] = {0.788579,0.347816,0.375579,0.385273,0.389223,0.371985,0.368480,0.369676,0.362449,0.424765}; | |
40 | // KAONS | |
41 | const Int_t kKBinsPbPb = 10; | |
42 | const Double_t kKBinWidthPbPb = 0.250; | |
43 | const Double_t kKTagKPbPb[kKBinsPbPb] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.519029,0.464117,0.247308}; | |
44 | const Double_t kKTagPiPbPb[kKBinsPbPb] = {0.102049,0.289930,0.101930,0.057771,0.040286,0.028567,0.053108,0.094369,0.066302,0.247308}; | |
45 | const Double_t kKTagNidPbPb[kKBinsPbPb] = {0.897951,0.608815,0.500408,0.474643,0.442705,0.416410,0.362707,0.386603,0.469580,0.505383}; | |
46 | // PROTONS | |
47 | const Int_t kPBinsPbPb = 9; | |
48 | const Double_t kPBinWidthPbPb = 0.500; | |
49 | const Double_t kPTagPPbPb[kPBinsPbPb] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; | |
50 | const Double_t kPTagPiPbPb[kPBinsPbPb] = {0.195955,0.094949,0.039962,0.026039,0.007556,0.016986,0.030333,0.000000,0.000000}; | |
51 | const Double_t kPTagNidPbPb[kPBinsPbPb] = {0.786105,0.554370,0.424751,0.390697,0.429508,0.422491,0.423675,0.401940,0.648755}; | |
52 | // | |
53 | // pp PYTHIA | |
54 | // | |
55 | // *** cuts for pp *** | |
56 | // | |
57 | // PIONS | |
58 | const Int_t kPiBinsPP = 10; | |
59 | const Double_t kPiBinWidthPP = 0.250; | |
60 | const Double_t kPiTagPiPP[kPiBinsPP] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710}; | |
61 | const Double_t kPiTagNidPP[kPiBinsPP] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290}; | |
62 | // KAONS | |
63 | const Int_t kKBinsPP = 10; | |
64 | const Double_t kKBinWidthPP = 0.250; | |
65 | const Double_t kKTagKPP[kKBinsPP] = {0.000000,0.173393,0.439690,0.519423,0.587025,0.605372,0.586021,0.650139,0.444444,0.299363}; | |
66 | const Double_t kKTagPiPP[kKBinsPP] = {0.000000,0.001495,0.000000,-0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038}; | |
67 | const Double_t kKTagNidPP[kKBinsPP] = {1.000000,0.825112,0.560310,0.480577,0.412975,0.394628,0.381720,0.289289,0.454106,0.458599}; | |
68 | // PROTONS | |
69 | const Int_t kPBinsPP = 9; | |
70 | const Double_t kPBinWidthPP = 0.500; | |
71 | const Double_t kPTagPPP[kPBinsPP] = {0.029404,0.438640,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294}; | |
72 | const Double_t kPTagPiPP[kPBinsPP] = {0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000}; | |
73 | const Double_t kPTagNidPP[kPBinsPP] = {0.970596,0.561360,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706}; | |
74 | ||
75 | ||
76 | ||
77 | ||
78 | //----------------------------------------------------------------------------- | |
79 | class AliD0toKpi : public TObject { | |
80 | public: | |
81 | // | |
82 | AliD0toKpi(); | |
83 | AliD0toKpi(Int_t ev,Int_t trkNum[2], | |
84 | Double_t v1[3],Double_t v2[3],Double_t dca, | |
85 | Double_t mom[6],Double_t d0[2]); | |
86 | virtual ~AliD0toKpi(); | |
9af36e3a | 87 | |
88 | Double_t Alpha() const { return (Ql(0)-Ql(1))/(Ql(0)+Ql(1)); } | |
89 | void ApplyPID(TString pidScheme="TOFparamPbPb"); | |
90 | Double_t ChildrenRelAngle() const; | |
91 | void ComputeWgts(); | |
92 | void CorrectWgt4BR(Double_t factor); | |
93 | Double_t CosPointing() const; | |
94 | Double_t CosPointingXY() const; | |
95 | void CosThetaStar(Double_t &ctsD0,Double_t &ctsD0bar) const; | |
96 | Double_t Ct() const {return Length()*kMD0/P();} | |
97 | Double_t Energy() const { return TMath::Sqrt(P()*P()+kMD0*kMD0); } | |
98 | Double_t Eta() const; | |
99 | Double_t EtaChild(Int_t child) const; | |
100 | Int_t EventNo() const {return TMath::Abs(fEvent);} | |
101 | Double_t GetDCA() const { return 10000.*fDCA; } | |
102 | Int_t GetTrkNum(Int_t child) const { return fTrkNum[child]; } | |
103 | Double_t Getd0Child(Int_t child) const { return fd0[child]; } | |
104 | Int_t GetPdgChild(Int_t child) const { return fPdg[child]; } | |
105 | Int_t GetPdgMum(Int_t child) const {return fMum[child]; } | |
106 | void GetWgts(Double_t &WgtD0,Double_t &WgtD0bar,TString sample) const; | |
107 | void GetPrimaryVtx(Double_t vtx[3]) const | |
108 | { vtx[0]=fV1x; vtx[1]=fV1y; vtx[2]=fV1z; } | |
109 | void GetSecondaryVtx(Double_t vtx[3]) const | |
110 | { vtx[0]=fV2x; vtx[1]=fV2y; vtx[2]=fV2z; } | |
111 | ||
112 | Double_t ImpPar() const; | |
113 | void InvMass(Double_t &mD0,Double_t &mD0bar) const; | |
114 | Bool_t IsSignal() const { if(fSignal) return kTRUE; return kFALSE; } | |
115 | Double_t Length() const | |
116 | { return TMath::Sqrt((fV1x-fV2x)*(fV1x-fV2x) | |
117 | +(fV1y-fV2y)*(fV1y-fV2y)+(fV1z-fV2z)*(fV1z-fV2z)); } | |
118 | Double_t P() const { return TMath::Sqrt(Pt()*Pt()+Pz()*Pz()); } | |
119 | Double_t PChild(Int_t child) const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]+fPz[child]*fPz[child]); } | |
120 | Double_t ProdImpParams() const { return fd0[0]*fd0[1]; } | |
121 | Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); } | |
122 | Double_t PtChild(Int_t child) const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]); } | |
123 | Double_t Px() const { return (fPx[0]+fPx[1]); } | |
124 | Double_t Py() const { return (fPy[0]+fPy[1]); } | |
125 | Double_t Pz() const { return (fPz[0]+fPz[1]); } | |
126 | Double_t Ql(Int_t child) const; | |
127 | Double_t Qt() const; | |
128 | Double_t Rapidity() const { return 0.5*TMath::Log((Energy()+Pz())/(Energy()-Pz()+1.e-13)); } | |
129 | Bool_t Select(const Double_t* cuts,Int_t& okD0,Int_t& okD0bar) const; | |
130 | void SetPrimaryVtx(Double_t vtx[3]) | |
131 | { fV1x=vtx[0]; fV1y=vtx[1]; fV1z=vtx[2]; } | |
132 | void SetSignal() { fSignal = kTRUE; } | |
133 | void SetTOFmasses(Double_t mass[2]) | |
134 | { fTOFmass[0]=mass[0]; fTOFmass[1]=mass[1]; } | |
135 | void SetPIDresponse(Double_t resp0[5],Double_t resp1[5]); | |
136 | void SetPdgCodes(Int_t pdg[2]) {fPdg[0]=pdg[0];fPdg[1]=pdg[1]; } | |
137 | void SetMumPdgCodes(Int_t mum[2]) {fMum[0]=mum[0];fMum[1]=mum[1]; } | |
138 | Double_t LinearInterpolation(Double_t p,Int_t nBins,Double_t Bin, | |
139 | const Double_t *values) const; | |
140 | // | |
141 | private: | |
142 | // | |
143 | Bool_t fSignal; // TRUE if signal, FALSE if background (for simulation) | |
144 | Int_t fEvent; // number of the event this D0 comes from | |
145 | // -1 if the D0 comes from ev. mixing | |
146 | ||
147 | Int_t fTrkNum[2]; // numbers of the two decay tracks | |
148 | ||
149 | Double_t fV1x; // X-position of the primary vertex of the event | |
150 | Double_t fV1y; // Y-position of the primary vertex of the event | |
151 | Double_t fV1z; // Z-position of the primary vertex of the event | |
152 | Double_t fV2x; // X-position of the reconstructed secondary vertex | |
153 | Double_t fV2y; // Y-position of the reconstructed secondary vertex | |
154 | Double_t fV2z; // Z-position of the reconstructed secondary vertex | |
155 | Double_t fDCA; // DCA of the two tracks | |
156 | ||
157 | Double_t fPx[2]; // X,Y,Z | |
158 | Double_t fPy[2]; // momenta of the two tracks | |
159 | Double_t fPz[2]; // at the reconstructed vertex | |
160 | ||
161 | Double_t fd0[2]; // impact parameters in the bending plane | |
162 | ||
163 | Int_t fPdg[2]; // PDG codes of the two tracks (for sim.) | |
164 | Int_t fMum[2]; // PDG codes of the mothers (for sim.) | |
165 | ||
166 | Double_t fTagPi[2]; // probability to be tagged as pion | |
167 | Double_t fTagKa[2]; // probability to be tagged as kaon | |
168 | Double_t fTagPr[2]; // probability to be tagged as proton | |
169 | Double_t fTagNid[2]; // probability to be tagged as "non-identified" | |
170 | ||
171 | Double_t fPIDrespEl[2]; // det. response to be electron | |
172 | Double_t fPIDrespMu[2]; // det. response to be muon | |
173 | Double_t fPIDrespPi[2]; // det. response to be pion | |
174 | Double_t fPIDrespKa[2]; // det. response to be kaon | |
175 | Double_t fPIDrespPr[2]; // det. response to be proton | |
176 | Double_t fTOFmass[2]; // mass estimated by the TOF (-1000. if track not reached TOF) | |
177 | ||
178 | Double_t fWgtAD0,fWgtAD0bar; // weights for the 3 samples | |
179 | Double_t fWgtBD0,fWgtBD0bar; // weights for the 3 samples | |
180 | Double_t fWgtCD0,fWgtCD0bar; // A: (K,Pi)+(K,?) B: (?,Pi) C: (?,?) | |
181 | Double_t fWgtDD0,fWgtDD0bar; // D: all other pairs | |
182 | ||
183 | ClassDef(AliD0toKpi,1) // Reconstructed D0 candidate class | |
184 | }; | |
185 | ||
186 | #endif | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 |