]>
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 | // | |
6185d025 | 61 | SetDCAs(6,dca); |
3244eeed | 62 | } |
63 | //-------------------------------------------------------------------------- | |
64 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(AliAODVertex *vtx2, | |
65 | Double_t *d0,Double_t *d0err, | |
66 | Double_t *dca, //Double_t sigvert, | |
67 | Double_t dist12,Double_t dist23, | |
68 | Double_t dist14,Double_t dist34, | |
69 | Short_t charge) : | |
70 | AliAODRecoDecayHF(vtx2,4,charge,d0,d0err), | |
71 | //fSigmaVert(sigvert), | |
72 | fDist12toPrim(dist12), | |
73 | fDist23toPrim(dist23), | |
74 | fDist14toPrim(dist14), | |
75 | fDist34toPrim(dist34) | |
76 | { | |
77 | // | |
78 | // Constructor with AliAODVertex for decay vertex and without prongs momenta | |
79 | // | |
6185d025 | 80 | SetDCAs(6,dca); |
3244eeed | 81 | } |
82 | //-------------------------------------------------------------------------- | |
83 | AliAODRecoDecayHF4Prong::AliAODRecoDecayHF4Prong(const AliAODRecoDecayHF4Prong &source) : | |
84 | AliAODRecoDecayHF(source), | |
85 | //fSigmaVert(source.fSigmaVert), | |
86 | fDist12toPrim(source.fDist12toPrim), | |
87 | fDist23toPrim(source.fDist23toPrim), | |
88 | fDist14toPrim(source.fDist14toPrim), | |
89 | fDist34toPrim(source.fDist34toPrim) | |
90 | { | |
91 | // | |
92 | // Copy constructor | |
93 | // | |
94 | } | |
95 | //-------------------------------------------------------------------------- | |
96 | AliAODRecoDecayHF4Prong &AliAODRecoDecayHF4Prong::operator=(const AliAODRecoDecayHF4Prong &source) | |
97 | { | |
98 | // | |
99 | // assignment operator | |
100 | // | |
101 | if(&source == this) return *this; | |
102 | fOwnPrimaryVtx = source.fOwnPrimaryVtx; | |
103 | fSecondaryVtx = source.fSecondaryVtx; | |
104 | fCharge = source.fCharge; | |
105 | fNProngs = source.fNProngs; | |
106 | fNDCA = source.fNDCA; | |
107 | fNPID = source.fNPID; | |
108 | fEventNumber = source.fEventNumber; | |
109 | fRunNumber = source.fRunNumber; | |
110 | fDist12toPrim= source.fDist12toPrim; | |
111 | fDist23toPrim= source.fDist23toPrim; | |
112 | fDist14toPrim= source.fDist14toPrim; | |
113 | fDist34toPrim= source.fDist34toPrim; | |
114 | //fSigmaVert= source.fSigmaVert; | |
115 | if(source.GetNProngs()>0) { | |
116 | fd0 = new Double_t[GetNProngs()]; | |
117 | fd0err = new Double_t[GetNProngs()]; | |
118 | memcpy(fd0,source.fd0,GetNProngs()*sizeof(Double_t)); | |
119 | memcpy(fd0err,source.fd0err,GetNProngs()*sizeof(Double_t)); | |
120 | if(source.fPx) { | |
121 | fPx = new Double_t[GetNProngs()]; | |
122 | fPy = new Double_t[GetNProngs()]; | |
123 | fPz = new Double_t[GetNProngs()]; | |
124 | memcpy(fPx,source.fPx,GetNProngs()*sizeof(Double_t)); | |
125 | memcpy(fPy,source.fPy,GetNProngs()*sizeof(Double_t)); | |
126 | memcpy(fPz,source.fPz,GetNProngs()*sizeof(Double_t)); | |
127 | } | |
128 | if(source.fPID) { | |
129 | fPID = new Double_t[5*GetNProngs()]; | |
130 | memcpy(fPID,source.fPID,GetNProngs()*sizeof(Double_t)); | |
131 | } | |
132 | if(source.fDCA) { | |
057c80d4 | 133 | fDCA = new Double32_t[GetNProngs()*(GetNProngs()-1)/2]; |
3244eeed | 134 | memcpy(fDCA,source.fDCA,(GetNProngs()*(GetNProngs()-1)/2)*sizeof(Float_t)); |
135 | } | |
6185d025 | 136 | if(source.fProngID) { |
137 | fProngID = new UShort_t[GetNProngs()]; | |
138 | memcpy(fProngID,source.fProngID,GetNProngs()*sizeof(UShort_t)); | |
139 | } | |
3244eeed | 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 | ||
13977a79 | 159 | okD0=0; okD0bar=0; |
3244eeed | 160 | Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass(); |
161 | Double_t mD0=InvMassD0(); | |
162 | if(TMath::Abs(mD0-mD0PDG)>cuts[0]) return kFALSE; | |
163 | ||
164 | //single track | |
165 | //if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2 | |
166 | ||
167 | //DCA | |
168 | //for(Int_t i=0;i<3;i++) if(cuts[11]>0 && GetDCA(i)>cuts[11])return kFALSE; | |
169 | ||
170 | //2track cuts | |
171 | //if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE; | |
172 | //if(Getd0Prong(0)*Getd0Prong(1)<0 && Getd0Prong(2)*Getd0Prong(1)<0)return kFALSE; | |
173 | ||
174 | //sec vert | |
175 | //if(fSigmaVert>cuts[6])return kFALSE; | |
176 | ||
177 | //if(DecayLength()<cuts[7])return kFALSE; | |
178 | ||
179 | return kFALSE; // for the time being | |
180 | // return kTRUE; // after implementation | |
181 | } |