Commit | Line | Data |
---|---|---|

3e87ef69 | 1 | // @(#) $Id$ |

2 | ||

3 | #ifndef AliD0toKpi_H | |

4 | #define AliD0toKpi_H | |

5 | /******************************************************************* | |

6 | * * | |

7 | * Reconstructed D^0 -> K^- pi^+ candidate clss * | |

8 | * * | |

9 | * origin: A. Dainese andrea.dainese@pd.infn.it * | |

10 | *******************************************************************/ | |

11 | ||

12 | #include <TMath.h> | |

13 | #include <TVector3.h> | |

14 | ||

15 | // particle masses | |

16 | const Double_t kMD0 = 1.8645; // D0 mass | |

17 | const Double_t kMK = 0.49368; // K+ mass | |

18 | const Double_t kMPi = 0.13957; // Pi+ mass | |

19 | ||

20 | // --- TOF tagging probabilities --- | |

21 | // central HIJING | |

22 | // B = 0.4 T | |

23 | // tracking errors in TPC included | |

24 | // With TRD | |

25 | // | |

26 | // *** TOF default cuts for PbPb *** | |

27 | // | |

28 | /* | |

29 | // PIONS | |

30 | const Int_t kPiBins = 20; | |

31 | const Double_t kPiBinWidth = 0.125; | |

32 | const Double_t kPiTagPi[kPiBins] = {0.000000,0.591070,0.908567,0.848575,0.770351,0.722956,0.706888,0.695148,0.687808,0.686050,0.689962,0.690553,0.687770,0.687936,0.691099,0.696442,0.704000,0.708352,0.709448,0.712480}; | |

33 | const Double_t kPiTagNid[kPiBins] = {1.000000,0.408930,0.091433,0.151425,0.229649,0.277044,0.293112,0.304852,0.312192,0.313950,0.310038,0.309447,0.312230,0.312064,0.308901,0.303558,0.296000,0.291648,0.290552,0.287520}; | |

34 | // KAONS | |

35 | const Int_t kKBins = 20; | |

36 | const Double_t kKBinWidth = 0.125; | |

37 | const Double_t kKTagK[kKBins] = {0.000000,0.000000,0.039577,0.164515,0.308500,0.366434,0.412601,0.450548,0.472678,0.497862,0.517206,0.529481,0.550700,0.522383,0.491087,0.472946,0.380244,0.360244,0.314122,0.221509}; | |

38 | const Double_t kKTagPi[kKBins] = {0.000000,0.204099,0.576011,0.617346,0.390463,0.282998,0.221205,0.178188,0.161715,0.145718,0.139147,0.140506,0.133797,0.165070,0.187582,0.216733,0.340557,0.377610,0.426489,0.521731}; | |

39 | const Double_t kKTagNid[kKBins] = {1.000000,0.795901,0.384412,0.218139,0.301037,0.350568,0.366194,0.371264,0.365607,0.356420,0.343647,0.330012,0.315503,0.312547,0.321331,0.310321,0.279199,0.262147,0.259390,0.256760}; | |

40 | // PROTONS | |

41 | const Int_t kPBins = 36; | |

42 | const Double_t kPBinWidth = 0.125; | |

43 | const Double_t kPTagP[kPBins] = {0.000000,0.002889,0.038156,0.085494,0.192829,0.297104,0.377435,0.429866,0.486685,0.501615,0.511019,0.524895,0.541178,0.559191,0.577053,0.585619,0.574745,0.572519,0.580219,0.586295,0.591467,0.601517,0.609334,0.611916,0.606260,0.596428,0.576680,0.556772,0.551359,0.547600,0.532903,0.506974,0.468212,0.309770,0.150187,0.000000}; | |

44 | const Double_t kPTagPi[kPBins] = {0.000000,0.200825,0.576272,0.691605,0.494897,0.341871,0.254065,0.204454,0.160916,0.152080,0.141468,0.127294,0.111641,0.098054,0.088475,0.077363,0.074684,0.074395,0.075396,0.076185,0.076013,0.068483,0.060666,0.064324,0.072480,0.084812,0.107060,0.129468,0.137381,0.143640,0.160837,0.189266,0.230528,0.391470,0.553553,0.706240}; | |

45 | const Double_t kPTagNid[kPBins] = {1.000000,0.796286,0.385572,0.222901,0.312273,0.361025,0.368500,0.365680,0.352399,0.346305,0.347514,0.347811,0.347181,0.342755,0.334471,0.337018,0.350571,0.353086,0.344385,0.337520,0.332520,0.330000,0.330000,0.323760,0.321260,0.318760,0.316260,0.313760,0.311260,0.308760,0.306260,0.303760,0.301260,0.298760,0.296260,0.293760}; | |

46 | // | |

47 | // ***** Cuts_1 ****** | |

48 | // | |

49 | // PIONS | |

50 | const Int_t kPiBins = 10; | |

51 | const Double_t kPiBinWidth = 0.250; | |

52 | const Double_t kPiTagPi[kPiBins] = {0.040920,0.402873,0.561528,0.549381,0.481544,0.445760,0.393588,0.369643,0.345340,0.323165}; | |

53 | const Double_t kPiTagNid[kPiBins] = {0.959080,0.597127,0.438472,0.450619,0.518456,0.554240,0.606412,0.630357,0.654660,0.676835}; | |

54 | // KAONS | |

55 | const Int_t kKBins = 10; | |

56 | const Double_t kKBinWidth = 0.250; | |

57 | const Double_t kKTagK[kKBins] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.601888,0.589805,0.609983,0.412181}; | |

58 | const Double_t kKTagPi[kKBins] = {0.102049,0.066665,0.031082,0.018655,0.016786,0.014284,0.017703,0.023592,0.039782,0.123654}; | |

59 | const Double_t kKTagNid[kKBins] = {0.897951,0.832080,0.571256,0.513759,0.466206,0.430694,0.380410,0.386603,0.350236,0.464165}; | |

60 | // PROTONS | |

61 | const Int_t kPBins = 9; | |

62 | const Double_t kPBinWidth = 0.500; | |

63 | const Double_t kPTagP[kPBins] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; | |

64 | const Double_t kPTagPi[kPBins] = {0.045999,0.034981,0.016826,0.013887,0.003778,0.008493,-0.000000,0.000000,0.000000}; | |

65 | const Double_t kPTagNid[kPBins] = {0.936062,0.614337,0.447888,0.402849,0.433287,0.430983,0.454008,0.401940,0.648755}; | |

66 | // | |

67 | // **** Cuts_2 **** | |

68 | // | |

69 | // PIONS | |

70 | const Int_t kPiBins = 10; | |

71 | const Double_t kPiBinWidth = 0.250; | |

72 | const Double_t kPiTagPi[kPiBins] = {0.041204,0.405645,0.563019,0.550815,0.485707,0.454333,0.406930,0.387574,0.376332,0.349019}; | |

73 | const Double_t kPiTagNid[kPiBins] = {0.958796,0.594355,0.436981,0.449185,0.514293,0.545667,0.593070,0.612426,0.623668,0.650981}; | |

74 | // KAONS | |

75 | const Int_t kKBins = 10; | |

76 | const Double_t kKBinWidth = 0.250; | |

77 | const Double_t kKTagK[kKBins] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.588611,0.581941,0.596722,0.370963}; | |

78 | const Double_t kKTagPi[kKBins] = {0.102049,0.071067,0.032453,0.021062,0.017905,0.014284,0.017703,0.031456,0.053042,0.206090}; | |

79 | const Double_t kKTagNid[kKBins] = {0.897951,0.827677,0.569885,0.511352,0.465087,0.430694,0.393687,0.386603,0.350236,0.422947}; | |

80 | // PROTONS | |

81 | const Int_t kPBins = 9; | |

82 | const Double_t kPBinWidth = 0.500; | |

83 | const Double_t kPTagP[kPBins] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; | |

84 | const Double_t kPTagPi[kPBins] = {0.046459,0.036068,0.017878,0.013887,0.003778,0.008493,0.015166,0.000000,0.000000}; | |

85 | const Double_t kPTagNid[kPBins] = {0.935602,0.613251,0.446836,0.402849,0.433287,0.430983,0.438842,0.401940,0.648755}; | |

86 | // | |

87 | // **** Cuts_3 **** | |

88 | // | |

89 | // PIONS | |

90 | const Int_t kPiBins = 10; | |

91 | const Double_t kPiBinWidth = 0.250; | |

92 | const Double_t kPiTagPi[kPiBins] = {0.185562,0.587715,0.605042,0.606765,0.600542,0.597826,0.552951,0.531017,0.482590,0.423347}; | |

93 | const Double_t kPiTagNid[kPiBins] = {0.814438,0.412285,0.394958,0.393235,0.399458,0.402174,0.447049,0.468983,0.517410,0.576653}; | |

94 | // KAONS | |

95 | const Int_t kKBins = 10; | |

96 | const Double_t kKBinWidth = 0.250; | |

97 | const Double_t kKTagK[kKBins] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.542621,0.517159,0.267917}; | |

98 | const Double_t kKTagPi[kKBins] = {0.102049,0.220749,0.078618,0.046939,0.032453,0.022446,0.035405,0.055048,0.066302,0.247308}; | |

99 | const Double_t kKTagNid[kKBins] = {0.897951,0.677996,0.523719,0.485475,0.450539,0.422532,0.380410,0.402331,0.416538,0.484774}; | |

100 | // PROTONS | |

101 | const Int_t kPBins = 9; | |

102 | const Double_t kPBinWidth = 0.500; | |

103 | const Double_t kPTagP[kPBins] = {0.017940,0.350681,0.535286,0.583264,0.562935,0.560524,0.545992,0.598060,0.351245}; | |

104 | const Double_t kPTagPi[kPBins] = {0.136617,0.076481,0.032075,0.020831,0.003778,0.016986,0.030333,0.000000,0.000000}; | |

105 | const Double_t kPTagNid[kPBins] = {0.845444,0.572838,0.432639,0.395905,0.433287,0.422491,0.423675,0.401940,0.648755}; | |

106 | // | |

107 | // *** Cuts_4 *** | |

108 | // | |

109 | // PIONS | |

110 | const Int_t kPiBins = 10; | |

111 | const Double_t kPiBinWidth = 0.250; | |

112 | const Double_t kPiTagPi[kPiBins] = {0.211421,0.652184,0.624421,0.614727,0.610777,0.628015,0.631520,0.630324,0.637551,0.575235}; | |

113 | const Double_t kPiTagNid[kPiBins] = {0.788579,0.347816,0.375579,0.385273,0.389223,0.371985,0.368480,0.369676,0.362449,0.424765}; | |

114 | // KAONS | |

115 | const Int_t kKBins = 10; | |

116 | const Double_t kKBinWidth = 0.250; | |

117 | const Double_t kKTagK[kKBins] = {0.000000,0.101255,0.397662,0.467586,0.517008,0.555023,0.584185,0.519029,0.464117,0.247308}; | |

118 | const Double_t kKTagPi[kKBins] = {0.102049,0.289930,0.101930,0.057771,0.040286,0.028567,0.053108,0.094369,0.066302,0.247308}; | |

119 | const Double_t kKTagNid[kKBins] = {0.897951,0.608815,0.500408,0.474643,0.442705,0.416410,0.362707,0.386603,0.469580,0.505383}; | |

120 | // PROTONS | |

121 | const Int_t kPBins = 9; | |

122 | const Double_t kPBinWidth = 0.500; | |

123 | ||

124 | const Double_t kPTagPi[kPBins] = {0.195955,0.094949,0.039962,0.026039,0.007556,0.016986,0.030333,0.000000,0.000000}; | |

125 | const Double_t kPTagNid[kPBins] = {0.786105,0.554370,0.424751,0.390697,0.429508,0.422491,0.423675,0.401940,0.648755}; | |

126 | // | |

127 | // pp PYTHIA | |

128 | // | |

129 | // *** Same Cuts as PbPb_4 | |

130 | // | |

131 | // PIONS | |

132 | const Int_t kPiBins = 10; | |

133 | const Double_t kPiBinWidth = 0.250; | |

134 | const Double_t kPiTagPi[kPiBins] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710}; | |

135 | const Double_t kPiTagNid[kPiBins] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290}; | |

136 | // KAONS | |

137 | const Int_t kKBins = 10; | |

138 | const Double_t kKBinWidth = 0.250; | |

139 | const Double_t kKTagK[kKBins] = {0.000000,0.115097,0.419704,0.516093,0.585443,0.599174,0.586021,0.646101,0.434783,0.273885}; | |

140 | const Double_t kKTagPi[kKBins] = {0.000000,0.001495,0.000000,0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038}; | |

141 | const Double_t kKTagNid[kKBins] = {1.000000,0.883408,0.580296,0.483907,0.414557,0.400826,0.381720,0.293327,0.463768,0.484076}; | |

142 | // PROTONS | |

143 | const Int_t kPBins = 9; | |

144 | const Double_t kPBinWidth = 0.500; | |

145 | const Double_t kPTagP[kPBins] = {0.006918,0.386968,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294}; | |

146 | const Double_t kPTagPi[kPBins] = {-0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000}; | |

147 | const Double_t kPTagNid[kPBins] = {0.993082,0.613032,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706}; | |

148 | */ | |

149 | // | |

150 | // *** cuts for pp *** | |

151 | // | |

152 | // PIONS | |

153 | const Int_t kPiBins = 10; | |

154 | const Double_t kPiBinWidth = 0.250; | |

155 | const Double_t kPiTagPi[kPiBins] = {0.194528,0.447097,0.603364,0.646413,0.647125,0.669157,0.688139,0.682564,0.689910,0.665710}; | |

156 | const Double_t kPiTagNid[kPiBins] = {0.805472,0.552903,0.396636,0.353587,0.352875,0.330843,0.311861,0.317436,0.310090,0.334290}; | |

157 | // KAONS | |

158 | const Int_t kKBins = 10; | |

159 | const Double_t kKBinWidth = 0.250; | |

160 | const Double_t kKTagK[kKBins] = {0.000000,0.173393,0.439690,0.519423,0.587025,0.605372,0.586021,0.650139,0.444444,0.299363}; | |

161 | const Double_t kKTagPi[kKBins] = {0.000000,0.001495,0.000000,-0.000000,-0.000000,0.000000,0.032258,0.060572,0.101449,0.242038}; | |

162 | const Double_t kKTagNid[kKBins] = {1.000000,0.825112,0.560310,0.480577,0.412975,0.394628,0.381720,0.289289,0.454106,0.458599}; | |

163 | // PROTONS | |

164 | const Int_t kPBins = 9; | |

165 | const Double_t kPBinWidth = 0.500; | |

166 | const Double_t kPTagP[kPBins] = {0.029404,0.438640,0.613710,0.665152,0.634961,0.657711,0.703704,0.685714,0.235294}; | |

167 | const Double_t kPTagPi[kPBins] = {0.000000,0.000000,0.000000,-0.000000,0.000000,0.000000,-0.000000,0.014286,-0.000000}; | |

168 | const Double_t kPTagNid[kPBins] = {0.970596,0.561360,0.386290,0.334848,0.365039,0.342289,0.296296,0.300000,0.764706}; | |

169 | ||

170 | ||

171 | ||

172 | //----------------------------------------------------------------------------- | |

173 | class AliD0toKpi : public TObject { | |

174 | public: | |

175 | // | |

176 | AliD0toKpi(); | |

177 | AliD0toKpi(Bool_t sgn,Int_t ev, | |

178 | Double_t v1[3],Double_t v2[3],Double_t dca, | |

179 | Double_t mom[6],Double_t d0[2], | |

180 | Int_t pdg[2],Int_t mum[2]); | |

181 | ||

182 | ||

183 | Double_t PtChild(Int_t child) const {return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]);} | |

184 | Double_t PChild(Int_t child) const {return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]+fPz[child]*fPz[child]);} | |

185 | Double_t EtaChild(Int_t child) const; | |

186 | Int_t GetPdgChild(Int_t child) const {return fPdg[child];} | |

187 | Int_t GetMumId(Int_t child) const {return fMum[child];} | |

188 | Double_t Getd0Child(Int_t child) const {return fd0[child];} | |

189 | Double_t P() const {return TMath::Sqrt(Pt()*Pt()+Pz()*Pz());} | |

190 | Double_t Pt() const {return TMath::Sqrt(Px()*Px()+Py()*Py());} | |

191 | Double_t Px() const {return (fPx[0]+fPx[1]);} | |

192 | Double_t Py() const {return (fPy[0]+fPy[1]);} | |

193 | Double_t Pz() const {return (fPz[0]+fPz[1]);} | |

194 | Double_t Energy() const {return TMath::Sqrt(P()*P()+kMD0*kMD0);} | |

195 | Double_t Rapidity() const {return 0.5*TMath::Log((Energy()+Pz())/(Energy()-Pz()+1.e-13));} | |

196 | Double_t Eta() const; | |

197 | Double_t ChildrenRelAngle() const; | |

198 | Double_t d0d0() const { return fd0[0]*fd0[1]; } | |

199 | Double_t GetDCA() const {return 10000.*fDCA;} | |

200 | Double_t CPta() const; | |

201 | Double_t CPtaXY() const; | |

202 | void DrawPIDinTOF() const; | |

203 | void InvMass(Double_t&,Double_t&) const; | |

204 | Double_t qT() const; | |

205 | Double_t qL(Int_t child) const; | |

206 | Double_t Alpha() const {return (qL(0)-qL(1))/(qL(0)+qL(1));} | |

207 | void CosThetaStar(Double_t&,Double_t&) const; | |

208 | ||

209 | Bool_t Select(const Double_t* cuts,Int_t&,Int_t&) const; | |

210 | void ComputeWgts(); | |

211 | void CorrectWgt4BR(Double_t factor); | |

212 | void SetPtWgts(); | |

213 | void GetWgts(Double_t&,Double_t&,Option_t* sample) const; | |

214 | // | |

215 | private: | |

216 | // | |

217 | Bool_t fSignal; // TRUE if signal, FALSE if background | |

218 | Int_t fEvent; // number of the event this D0 comes from | |

219 | Double_t fV1x; // | |

220 | Double_t fV1y; // position of the primary vertex of the event | |

221 | Double_t fV1z; // | |

222 | Double_t fV2x; // | |

223 | Double_t fV2y; // position of the reconstructed secondary vertex | |

224 | Double_t fV2z; // | |

225 | Double_t fDCA; // DCA of the two tracks | |

226 | ||

227 | Double_t fPx[2]; // | |

228 | Double_t fPy[2]; // momenta of the two tracks | |

229 | Double_t fPz[2]; // at the reconstructed vertex | |

230 | ||

231 | Double_t fd0[2]; // impact parameters in the bending plane | |

232 | ||

233 | Int_t fPdg[2]; // PDG codes | |

234 | Int_t fMum[2]; // PDG codes of the mothers | |

235 | ||

236 | ||

237 | Double_t fWgtAD0,fWgtAD0bar; // | |

238 | Double_t fWgtBD0,fWgtBD0bar; // weights for the 3 samples | |

239 | Double_t fWgtCD0,fWgtCD0bar; // A: (K,Pi)+(K,?) B: (?,Pi) C: (?,?) | |

240 | ||

241 | ||

242 | ||

243 | Double_t LinearInterpolation(Double_t p,Int_t nBins,Double_t Bin,const Double_t *values) const; | |

244 | ||

245 | void SetZeroWgts(Option_t* opt); | |

246 | ||

247 | ClassDef(AliD0toKpi,1) // reconstructed D0 candidate class | |

248 | }; | |

249 | ||

250 | ||

251 | #endif | |

252 | ||

253 | ||

254 | ||

255 | ||

256 | ||

257 | ||

258 | ||

259 |