]>
Commit | Line | Data |
---|---|---|
3244eeed | 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 4-prong decay | |
19 | // | |
20 | // Authors: G.E.Bruno Giuseppe.Bruno@to.infn.it, R.Romita Rossella.Romita@ba.infn.it | |
21 | ///////////////////////////////////////////////////////////// | |
22 | ||
23 | #include <TDatabasePDG.h> | |
24 | #include "AliAODRecoDecayHF.h" | |
25 | #include "AliAODRecoDecayHF4Prong.h" | |
26 | #include "TRandom.h" // for the time being | |
27 | ||
28 | ClassImp(AliAODRecoDecayHF4Prong) | |
29 | ||
30 | //-------------------------------------------------------------------------- | |
31 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong() : | |
32 | AliAODRecoDecayHF(), | |
33 | //fSigmaVert(0), | |
34 | fDist12toPrim(0), | |
35 | fDist23toPrim(0), | |
36 | fDist14toPrim(0), | |
37 | fDist34toPrim(0) | |
38 | { | |
39 | // | |
40 | // Default Constructor | |
41 | // | |
42 | } | |
43 | //-------------------------------------------------------------------------- | |
44 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(AliAODVertex *vtx2, | |
45 | Double_t *px,Double_t *py,Double_t *pz, | |
46 | Double_t *d0,Double_t *d0err, | |
47 | Double_t *dca, //Double_t sigvert, | |
48 | Double_t dist12,Double_t dist23, | |
49 | Double_t dist14,Double_t dist34, | |
50 | Short_t charge) : | |
51 | AliAODRecoDecayHF(vtx2,4,charge,px,py,pz,d0,d0err), | |
52 | // fSigmaVert(sigvert), | |
53 | fDist12toPrim(dist12), | |
54 | fDist23toPrim(dist23), | |
55 | fDist14toPrim(dist14), | |
56 | fDist34toPrim(dist34) | |
57 | { | |
58 | // | |
59 | // Constructor with AliAODVertex for decay vertex | |
60 | // | |
61 | Float_t dcafloat[6]; | |
62 | for(Int_t i=0;i<6;i++) dcafloat[i]=dca[i]; | |
63 | SetDCAs(6,dcafloat); | |
64 | } | |
65 | //-------------------------------------------------------------------------- | |
66 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(AliAODVertex *vtx2, | |
67 | Double_t *d0,Double_t *d0err, | |
68 | Double_t *dca, //Double_t sigvert, | |
69 | Double_t dist12,Double_t dist23, | |
70 | Double_t dist14,Double_t dist34, | |
71 | Short_t charge) : | |
72 | AliAODRecoDecayHF(vtx2,4,charge,d0,d0err), | |
73 | //fSigmaVert(sigvert), | |
74 | fDist12toPrim(dist12), | |
75 | fDist23toPrim(dist23), | |
76 | fDist14toPrim(dist14), | |
77 | fDist34toPrim(dist34) | |
78 | { | |
79 | // | |
80 | // Constructor with AliAODVertex for decay vertex and without prongs momenta | |
81 | // | |
82 | Float_t dcafloat[6]; | |
83 | for(Int_t i=0;i<6;i++) dcafloat[i]=dca[i]; | |
84 | SetDCAs(6,dcafloat); | |
85 | } | |
86 | //-------------------------------------------------------------------------- | |
87 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(const AliAODRecoDecayHF4Prong &source) : | |
88 | AliAODRecoDecayHF(source), | |
89 | //fSigmaVert(source.fSigmaVert), | |
90 | fDist12toPrim(source.fDist12toPrim), | |
91 | fDist23toPrim(source.fDist23toPrim), | |
92 | fDist14toPrim(source.fDist14toPrim), | |
93 | fDist34toPrim(source.fDist34toPrim) | |
94 | { | |
95 | // | |
96 | // Copy constructor | |
97 | // | |
98 | } | |
99 | //-------------------------------------------------------------------------- | |
100 | AliAODRecoDecayHF4Prong &AliAODRecoDecayHF4Prong::operator=(const AliAODRecoDecayHF4Prong &source) | |
101 | { | |
102 | // | |
103 | // assignment operator | |
104 | // | |
105 | if(&source == this) return *this; | |
106 | fOwnPrimaryVtx = source.fOwnPrimaryVtx; | |
107 | fSecondaryVtx = source.fSecondaryVtx; | |
108 | fCharge = source.fCharge; | |
109 | fNProngs = source.fNProngs; | |
110 | fNDCA = source.fNDCA; | |
111 | fNPID = source.fNPID; | |
112 | fEventNumber = source.fEventNumber; | |
113 | fRunNumber = source.fRunNumber; | |
114 | fDist12toPrim= source.fDist12toPrim; | |
115 | fDist23toPrim= source.fDist23toPrim; | |
116 | fDist14toPrim= source.fDist14toPrim; | |
117 | fDist34toPrim= source.fDist34toPrim; | |
118 | //fSigmaVert= source.fSigmaVert; | |
119 | if(source.GetNProngs()>0) { | |
120 | fd0 = new Double_t[GetNProngs()]; | |
121 | fd0err = new Double_t[GetNProngs()]; | |
122 | memcpy(fd0,source.fd0,GetNProngs()*sizeof(Double_t)); | |
123 | memcpy(fd0err,source.fd0err,GetNProngs()*sizeof(Double_t)); | |
124 | if(source.fPx) { | |
125 | fPx = new Double_t[GetNProngs()]; | |
126 | fPy = new Double_t[GetNProngs()]; | |
127 | fPz = new Double_t[GetNProngs()]; | |
128 | memcpy(fPx,source.fPx,GetNProngs()*sizeof(Double_t)); | |
129 | memcpy(fPy,source.fPy,GetNProngs()*sizeof(Double_t)); | |
130 | memcpy(fPz,source.fPz,GetNProngs()*sizeof(Double_t)); | |
131 | } | |
132 | if(source.fPID) { | |
133 | fPID = new Double_t[5*GetNProngs()]; | |
134 | memcpy(fPID,source.fPID,GetNProngs()*sizeof(Double_t)); | |
135 | } | |
136 | if(source.fDCA) { | |
137 | fDCA = new Float_t[GetNProngs()*(GetNProngs()-1)/2]; | |
138 | memcpy(fDCA,source.fDCA,(GetNProngs()*(GetNProngs()-1)/2)*sizeof(Float_t)); | |
139 | } | |
140 | } | |
141 | return *this; | |
142 | } | |
143 | //-------------------------------------------------------------------------- | |
144 | Bool_t AliAODRecoDecayHF4Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar) | |
145 | const { | |
146 | // | |
147 | // This function compares the D0 with a set of cuts: | |
148 | // | |
149 | // to be implemented | |
150 | // | |
151 | // cuts[1] = ... | |
152 | // cuts[2] = ... | |
153 | // cuts[3] = ... | |
154 | // cuts[4] = ... | |
155 | // | |
156 | // If candidate D0 does not pass the cuts return kFALSE | |
157 | // | |
158 | ||
159 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); | |
160 | Double_t mD0=InvMassD0(); | |
161 | if(TMath::Abs(mD0-mD0PDG)>cuts[0]) return kFALSE; | |
162 | ||
163 | //single track | |
164 | //if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2 | |
165 | ||
166 | //DCA | |
167 | //for(Int_t i=0;i<3;i++) if(cuts[11]>0 && GetDCA(i)>cuts[11])return kFALSE; | |
168 | ||
169 | //2track cuts | |
170 | //if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE; | |
171 | //if(Getd0Prong(0)*Getd0Prong(1)<0 && Getd0Prong(2)*Getd0Prong(1)<0)return kFALSE; | |
172 | ||
173 | //sec vert | |
174 | //if(fSigmaVert>cuts[6])return kFALSE; | |
175 | ||
176 | //if(DecayLength()<cuts[7])return kFALSE; | |
177 | ||
178 | return kFALSE; // for the time being | |
179 | // return kTRUE; // after implementation | |
180 | } |