AliPhysics  vAN-20150924 (e816f45)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAODRecoDecayHF2Prong.cxx
Go to the documentation of this file.
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 /* $Id$ */
17 
19 //
20 // Base class for AOD reconstructed heavy-flavour 2-prong decay
21 //
22 // Author: A.Dainese, andrea.dainese@lnl.infn.it
24 
25 #include <TDatabasePDG.h>
26 #include "AliAODRecoDecayHF.h"
28 
32 
33 //--------------------------------------------------------------------------
36 {
37  //
39  //
40 }
41 //--------------------------------------------------------------------------
43  Double_t *px,Double_t *py,Double_t *pz,
44  Double_t *d0,Double_t *d0err,Float_t dca) :
45  AliAODRecoDecayHF(vtx2,2,0,px,py,pz,d0,d0err)
46 {
47  //
49  //
50  SetDCA(dca);
51 }
52 //--------------------------------------------------------------------------
54  Double_t *d0,Double_t *d0err,Float_t dca) :
55  AliAODRecoDecayHF(vtx2,2,0,d0,d0err)
56 {
57  //
59  //
60  SetDCA(dca);
61 }
62 //--------------------------------------------------------------------------
64  AliAODRecoDecayHF(source)
65 {
66  //
68  //
69 }
70 //--------------------------------------------------------------------------
72 {
73  //
75  //
76  if(&source == this) return *this;
77 
79 
80  return *this;
81 }
82 //--------------------------------------------------------------------------
83 Bool_t AliAODRecoDecayHF2Prong::SelectD0(const Double_t *cuts,Int_t &okD0,Int_t &okD0bar)
84  const {
101  Double_t mD0,mD0bar,ctsD0,ctsD0bar;
102  okD0=1; okD0bar=1;
103 
104  Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
105 
106  if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okD0 = 0;
107  if(PtProng(0) < cuts[3] || PtProng(1) < cuts[4]) okD0bar = 0;
108  if(!okD0 && !okD0bar) return kFALSE;
109 
110  if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
111  TMath::Abs(Getd0Prong(0)) > cuts[6]) okD0 = 0;
112  if(TMath::Abs(Getd0Prong(0)) > cuts[6] ||
113  TMath::Abs(Getd0Prong(1)) > cuts[5]) okD0bar = 0;
114  if(!okD0 && !okD0bar) return kFALSE;
115 
116  if(GetDCA() > cuts[1]) { okD0 = okD0bar = 0; return kFALSE; }
117 
118  InvMassD0(mD0,mD0bar);
119  if(TMath::Abs(mD0-mD0PDG) > cuts[0]) okD0 = 0;
120  if(TMath::Abs(mD0bar-mD0PDG) > cuts[0]) okD0bar = 0;
121  if(!okD0 && !okD0bar) return kFALSE;
122 
123  CosThetaStarD0(ctsD0,ctsD0bar);
124  if(TMath::Abs(ctsD0) > cuts[2]) okD0 = 0;
125  if(TMath::Abs(ctsD0bar) > cuts[2]) okD0bar = 0;
126  if(!okD0 && !okD0bar) return kFALSE;
127 
128  if(Prodd0d0() > cuts[7]) { okD0 = okD0bar = 0; return kFALSE; }
129 
130  if(CosPointingAngle() < cuts[8]) { okD0 = okD0bar = 0; return kFALSE; }
131 
132  return kTRUE;
133 }
134 //-----------------------------------------------------------------------------
135 Bool_t AliAODRecoDecayHF2Prong::SelectBtoJPSI(const Double_t *cuts,Int_t &okB)
136  const {
153  Double_t mJPsi,ctsJPsi;
154  okB=1;
155 
156  Double_t mJPSIPDG = TDatabasePDG::Instance()->GetParticle(443)->Mass();
157 
158  if(PtProng(1) < cuts[3] || PtProng(0) < cuts[4]) okB = 0;
159  if(!okB) return kFALSE;
160 
161  if(TMath::Abs(Getd0Prong(1)) > cuts[5] ||
162  TMath::Abs(Getd0Prong(0)) > cuts[6]) okB = 0;
163  if(!okB) return kFALSE;
164 
165  if(GetDCA() > cuts[1]) { okB = 0; return kFALSE; }
166 
167  mJPsi=InvMassJPSIee();
168  if(TMath::Abs(mJPsi-mJPSIPDG) > cuts[0]) okB = 0;
169  if(!okB) return kFALSE;
170 
171  ctsJPsi=CosThetaStarJPSI();
172  if(TMath::Abs(ctsJPsi) > cuts[2]) okB = 0;
173  if(!okB) return kFALSE;
174 
175  if(Prodd0d0() > cuts[7]) { okB = 0; return kFALSE; }
176 
177  if(CosPointingAngle() < cuts[8]) { okB = 0; return kFALSE; }
178 
179  return kTRUE;
180 }
181 //-----------------------------------------------------------------------------
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
AliAODRecoDecayHF & operator=(const AliAODRecoDecayHF &source)
Double_t CosThetaStarJPSI() const
Bool_t SelectD0(const Double_t *cuts, Int_t &okD0, Int_t &okD0bar) const
AliAODRecoDecayHF2Prong & operator=(const AliAODRecoDecayHF2Prong &source)
Double_t InvMassJPSIee() const
angle of e-
Double_t CosPointingAngle() const
Bool_t SelectBtoJPSI(const Double_t *cuts, Int_t &okB) const