]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ///////////////////////////////////////////////////////////// | |
17 | // | |
18 | // Base class for AOD reconstructed heavy-flavour 2-prong decay | |
19 | // | |
20 | // Author: A.Dainese, andrea.dainese@lnl.infn.it | |
21 | ///////////////////////////////////////////////////////////// | |
22 | ||
23 | #include <TDatabasePDG.h> | |
24 | #include "AliAODRecoDecayHF.h" | |
25 | #include "AliAODRecoDecayHF2Prong.h" | |
26 | ||
27 | ClassImp(AliAODRecoDecayHF2Prong) | |
28 | ||
29 | //-------------------------------------------------------------------------- | |
30 | AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong() : | |
31 | AliAODRecoDecayHF() | |
32 | { | |
33 | // | |
34 | // Default Constructor | |
35 | // | |
36 | } | |
37 | //-------------------------------------------------------------------------- | |
38 | AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(AliAODVertex *vtx2, | |
39 | Double_t *px,Double_t *py,Double_t *pz, | |
40 | Double_t *d0,Double_t *d0err,Float_t dca) : | |
41 | AliAODRecoDecayHF(vtx2,2,0,px,py,pz,d0,d0err) | |
42 | { | |
43 | // | |
44 | // Constructor with AliAODVertex for decay vertex | |
45 | // | |
46 | SetDCA(dca); | |
47 | } | |
48 | //-------------------------------------------------------------------------- | |
49 | AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(AliAODVertex *vtx2, | |
50 | Double_t *d0,Double_t *d0err,Float_t dca) : | |
51 | AliAODRecoDecayHF(vtx2,2,0,d0,d0err) | |
52 | { | |
53 | // | |
54 | // Constructor with AliAODVertex for decay vertex and without prongs momenta | |
55 | // | |
56 | SetDCA(dca); | |
57 | } | |
58 | //-------------------------------------------------------------------------- | |
59 | AliAODRecoDecayHF2Prong::AliAODRecoDecayHF2Prong(const AliAODRecoDecayHF2Prong &source) : | |
60 | AliAODRecoDecayHF(source) | |
61 | { | |
62 | // | |
63 | // Copy constructor | |
64 | // | |
65 | } | |
66 | //-------------------------------------------------------------------------- | |
67 | AliAODRecoDecayHF2Prong &AliAODRecoDecayHF2Prong::operator=(const AliAODRecoDecayHF2Prong &source) | |
68 | { | |
69 | // | |
70 | // assignment operator | |
71 | // | |
72 | if(&source == this) return *this; | |
73 | fOwnPrimaryVtx = source.fOwnPrimaryVtx; | |
74 | fSecondaryVtx = source.fSecondaryVtx; | |
75 | fCharge = source.fCharge; | |
76 | fNProngs = source.fNProngs; | |
77 | fNDCA = source.fNDCA; | |
78 | fNPID = source.fNPID; | |
79 | fEventNumber = source.fEventNumber; | |
80 | fRunNumber = source.fRunNumber; | |
81 | if(source.GetNProngs()>0) { | |
82 | fd0 = new Double_t[GetNProngs()]; | |
83 | fd0err = new Double_t[GetNProngs()]; | |
84 | memcpy(fd0,source.fd0,GetNProngs()*sizeof(Double_t)); | |
85 | memcpy(fd0err,source.fd0err,GetNProngs()*sizeof(Double_t)); | |
86 | if(source.fPx) { | |
87 | fPx = new Double_t[GetNProngs()]; | |
88 | fPy = new Double_t[GetNProngs()]; | |
89 | fPz = new Double_t[GetNProngs()]; | |
90 | memcpy(fPx,source.fPx,GetNProngs()*sizeof(Double_t)); | |
91 | memcpy(fPy,source.fPy,GetNProngs()*sizeof(Double_t)); | |
92 | memcpy(fPz,source.fPz,GetNProngs()*sizeof(Double_t)); | |
93 | } | |
94 | if(source.fPID) { | |
95 | fPID = new Double_t[5*GetNProngs()]; | |
96 | memcpy(fPID,source.fPID,GetNProngs()*sizeof(Double_t)); | |
97 | } | |
98 | if(source.fDCA) { | |
99 | fDCA = new Double32_t[GetNProngs()*(GetNProngs()-1)/2]; | |
100 | memcpy(fDCA,source.fDCA,(GetNProngs()*(GetNProngs()-1)/2)*sizeof(Float_t)); | |
101 | } | |
102 | } | |
103 | return *this; | |
104 | } | |
105 | //-------------------------------------------------------------------------- | |
106 | Bool_t AliAODRecoDecayHF2Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar) | |
107 | const { | |
108 | // | |
109 | // This function compares the D0 with a set of cuts: | |
110 | // | |
111 | // cuts[0] = inv. mass half width [GeV] | |
112 | // cuts[1] = dca [cm] | |
113 | // cuts[2] = cosThetaStar | |
114 | // cuts[3] = pTK [GeV/c] | |
115 | // cuts[4] = pTPi [GeV/c] | |
116 | // cuts[5] = d0K [cm] upper limit! | |
117 | // cuts[6] = d0Pi [cm] upper limit! | |
118 | // cuts[7] = d0d0 [cm^2] | |
119 | // cuts[8] = cosThetaPoint | |
120 | // | |
121 | // If the D0/D0bar doesn't pass the cuts it sets the weights to 0 | |
122 | // If neither D0 nor D0bar pass the cuts return kFALSE | |
123 | // | |
124 | Double_t mD0,mD0bar,ctsD0,ctsD0bar; | |
125 | okD0=1; okD0bar=1; | |
126 | ||
127 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
128 | ||
129 | if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okD0 = 0; | |
130 | if(PtProng(0) < cuts[3] || PtProng(1) < cuts[4]) okD0bar = 0; | |
131 | if(!okD0 && !okD0bar) return kFALSE; | |
132 | ||
133 | if(TMath::Abs(Getd0Prong(1)) > cuts[5] || | |
134 | TMath::Abs(Getd0Prong(0)) > cuts[6]) okD0 = 0; | |
135 | if(TMath::Abs(Getd0Prong(0)) > cuts[6] || | |
136 | TMath::Abs(Getd0Prong(1)) > cuts[5]) okD0bar = 0; | |
137 | if(!okD0 && !okD0bar) return kFALSE; | |
138 | ||
139 | if(GetDCA() > cuts[1]) { okD0 = okD0bar = 0; return kFALSE; } | |
140 | ||
141 | InvMassD0(mD0,mD0bar); | |
142 | if(TMath::Abs(mD0-mD0PDG) > cuts[0]) okD0 = 0; | |
143 | if(TMath::Abs(mD0bar-mD0PDG) > cuts[0]) okD0bar = 0; | |
144 | if(!okD0 && !okD0bar) return kFALSE; | |
145 | ||
146 | CosThetaStarD0(ctsD0,ctsD0bar); | |
147 | if(TMath::Abs(ctsD0) > cuts[2]) okD0 = 0; | |
148 | if(TMath::Abs(ctsD0bar) > cuts[2]) okD0bar = 0; | |
149 | if(!okD0 && !okD0bar) return kFALSE; | |
150 | ||
151 | if(Prodd0d0() > cuts[7]) { okD0 = okD0bar = 0; return kFALSE; } | |
152 | ||
153 | if(CosPointingAngle() < cuts[8]) { okD0 = okD0bar = 0; return kFALSE; } | |
154 | ||
155 | return kTRUE; | |
156 | } | |
157 | //----------------------------------------------------------------------------- | |
158 | Bool_t AliAODRecoDecayHF2Prong::SelectBtoJPSI(const Double_t *cuts,Int_t &okB) | |
159 | const { | |
160 | // | |
161 | // This function compares the Secondary JPSI candidates with a set of cuts: | |
162 | // | |
163 | // cuts[0] = inv. mass half width [GeV] | |
164 | // cuts[1] = dca [cm] | |
165 | // cuts[2] = cosThetaStar (negative electron) | |
166 | // cuts[3] = pTP [GeV/c] | |
167 | // cuts[4] = pTN [GeV/c] | |
168 | // cuts[5] = d0P [cm] upper limit! | |
169 | // cuts[6] = d0N [cm] upper limit! | |
170 | // cuts[7] = d0d0 [cm^2] | |
171 | // cuts[8] = cosThetaPoint | |
172 | // | |
173 | // If the candidate doesn't pass the cuts it sets the weight to 0 | |
174 | // and return kFALSE | |
175 | // | |
176 | Double_t mJPsi,ctsJPsi; | |
177 | okB=1; | |
178 | ||
179 | Double_t mJPSIPDG = TDatabasePDG::Instance()->GetParticle(443)->Mass(); | |
180 | ||
181 | if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okB = 0; | |
182 | if(!okB) return kFALSE; | |
183 | ||
184 | if(TMath::Abs(Getd0Prong(1)) > cuts[5] || | |
185 | TMath::Abs(Getd0Prong(0)) > cuts[6]) okB = 0; | |
186 | if(!okB) return kFALSE; | |
187 | ||
188 | if(GetDCA() > cuts[1]) { okB = 0; return kFALSE; } | |
189 | ||
190 | mJPsi=InvMassJPSIee(); | |
191 | if(TMath::Abs(mJPsi-mJPSIPDG) > cuts[0]) okB = 0; | |
192 | if(!okB) return kFALSE; | |
193 | ||
194 | ctsJPsi=CosThetaStarJPSI(); | |
195 | if(TMath::Abs(ctsJPsi) > cuts[2]) okB = 0; | |
196 | if(!okB) return kFALSE; | |
197 | ||
198 | if(Prodd0d0() > cuts[7]) { okB = 0; return kFALSE; } | |
199 | ||
200 | if(CosPointingAngle() < cuts[8]) { okB = 0; return kFALSE; } | |
201 | ||
202 | return kTRUE; | |
203 | } | |
204 | //----------------------------------------------------------------------------- |