]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/vertexingHF/AliAODRecoDecayHF4Prong.cxx
New EMC ideal calibration with all gains=0.005
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AliAODRecoDecayHF4Prong.cxx
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   SetDCAs(6,dca);
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   //
80   SetDCAs(6,dca);
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
103   AliAODRecoDecayHF::operator=(source);
104
105   fDist12toPrim= source.fDist12toPrim;
106   fDist23toPrim= source.fDist23toPrim;
107   fDist14toPrim= source.fDist14toPrim;
108   fDist34toPrim= source.fDist34toPrim;
109   //fSigmaVert= source.fSigmaVert;
110
111   return *this;
112 }
113 //--------------------------------------------------------------------------
114 Bool_t AliAODRecoDecayHF4Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar)
115   const {
116 //
117 // This function compares the D0 with a set of cuts:
118 // 
119 // to be implemented 
120 //
121 // cuts[1] = ... 
122 // cuts[2] = ...
123 // cuts[3] = ...
124 // cuts[4] = ...
125 //
126 // If candidate D0 does not pass the cuts return kFALSE
127 //
128
129   okD0=0; okD0bar=0;
130   Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
131   Double_t mD0=InvMassD0();
132   if(TMath::Abs(mD0-mD0PDG)>cuts[0]) return kFALSE;
133
134   //single track
135   //if(TMath::Abs(PtProng(2)) < cuts[2] || TMath::Abs(Getd0Prong(2))<cuts[4])return kFALSE;//Pion2
136
137   //DCA
138   //for(Int_t i=0;i<3;i++) if(cuts[11]>0 && GetDCA(i)>cuts[11])return kFALSE;
139
140   //2track cuts
141   //if(fDist12toPrim<cuts[5] || fDist23toPrim<cuts[5])return kFALSE;
142   //if(Getd0Prong(0)*Getd0Prong(1)<0 && Getd0Prong(2)*Getd0Prong(1)<0)return kFALSE;
143
144   //sec vert
145   //if(fSigmaVert>cuts[6])return kFALSE;
146
147   //if(DecayLength()<cuts[7])return kFALSE;
148   
149   return kFALSE; // for the time being 
150   // return kTRUE; // after implementation 
151 }