AliPhysics  1168478 (1168478)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAODRecoCascadeHF.h
Go to the documentation of this file.
1 #ifndef ALIAODRECOCASCADEHF_H
2 #define ALIAODRECOCASCADEHF_H
3 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice */
5 
6 /* $Id$ */
7 
8 //***********************************************************
9 // Class AliAODRecoCascadeHF
10 // base class for AOD reconstructed heavy-flavour cascade decays
11 // (D*->D0pi, ...)
12 // The convention is: prong 0 is the bachelor, prong 1 is the "V0"
13 //
14 // Author: X-M. Zhang, zhangxm@iopp.ccnu.edu.cn
15 //***********************************************************
16 
17 #include <TRef.h>
18 #include <TRefArray.h>
19 #include <TClonesArray.h>
20 #include <TClass.h>
21 #include "AliAODVertex.h"
22 #include "AliAODv0.h"
23 #include "AliAODcascade.h"
25 #include "AliRDHFCuts.h"
26 
28 
29  public:
30 
32  AliAODRecoCascadeHF(AliAODVertex *vtx2, Short_t charge,
33  Double_t *px, Double_t *py, Double_t *pz,
34  Double_t *d0, Double_t *d0err, Double_t dca);
35  AliAODRecoCascadeHF(AliAODVertex *vtx2, Short_t charge,
36  Double_t *d0, Double_t *d0err, Double_t dca);
37  virtual ~AliAODRecoCascadeHF();
38 
41 
42  // 2prong (D0 for Dstar)
44  if(!GetDaughter(1)) return 0;
45  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODRecoDecayHF2Prong") ){
46  AliWarning("Object is not of type AliAODRecoDecayHF2Prong");
47  return 0;
48  }
49  return (AliAODRecoDecayHF2Prong*)GetDaughter(1);
50  }
51 
52  // Bachelor (soft pion for Dstar)
53  AliAODTrack* GetBachelor() const {return (AliAODTrack*)GetDaughter(0);}
54 
55  // v0 (Ks or Lambda for Lambda_c)
56  AliAODv0* Getv0() const {
57  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODv0") ){
58  AliWarning("Object is not of type v0");
59  return 0;
60  }
61  return (AliAODv0*)GetDaughter(1);
62  }
63 
64  // Cascade
65  AliAODcascade* GetCascade() const {
66  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODcascade") ){
67  AliWarning("Object is not of type cascade");
68  return 0;
69  }
70  return (AliAODcascade*)GetDaughter(1);
71  }
72  Int_t GetIDv0() const { return (Int_t)fIDv0; }
73 
74  void SetIDv0(Short_t id) { fIDv0 = id; }
75  // Get v0 positive track
76  AliAODTrack* Getv0PositiveTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(0); }
77  // Get v0 negative track
78  AliAODTrack* Getv0NegativeTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(1); }
79 
80  // D*->D0pi, D0->Kpi
81  Double_t EDstar() const {return E(413);}
82  Double_t YDstar() const {return Y(413);}
83  Bool_t SelectDstar(const Double_t *cutsDstar,const Double_t *cutsD0,Bool_t testD0=kTRUE) const;
84  Double_t InvMassD0() const {return (Charge()>0 ? Get2Prong()->InvMassD0() : Get2Prong()->InvMassD0bar());}
87  Double_t AngleD0dkpPisoft() const;
88  Bool_t TrigonometricalCut() const;
89 
90  // Lc invariant mass
92  UInt_t pdg[2]={2212,310}; return InvMass(2,pdg);
93  }
95  UInt_t pdg[2]={211,3122}; return InvMass(2,pdg);
96  }
97  Bool_t SelectLctoV0(const Double_t *cutsLctoV0, Bool_t okLck0sp, Bool_t okLcLpi, Bool_t okLcLbarpi) const;
98 
99  // D+ and Ds decaying into cascade
101  UInt_t pdg[2]={211,310}; return InvMass(2,pdg);
102  }
104  UInt_t pdg[2]={321,310}; return InvMass(2,pdg);
105  }
106 
107  Int_t MatchToMC(Int_t pdgabs,Int_t pdgabs2prong,
108  Int_t *pdgDg,Int_t *pdgDg2prong,
109  TClonesArray *mcArray, Bool_t isV0=kFALSE) const;
110 
112 
115  Double_t DecayLengthV0() const;
116  Double_t DecayLengthXYV0() const;
119 
120  protected:
121  Short_t fIDv0; // unique track ID, points back to the ESD track
122 
123  ClassDef(AliAODRecoCascadeHF, 4); // heavy-flavour cascade class
124 };
125 
126 #endif
Int_t charge
ClassDef(AliAODRecoCascadeHF, 4)
Int_t pdg
double Double_t
Definition: External.C:58
Double_t InvMassDstoK0sK() const
Double_t DeltaInvMass() const
void SetIDv0(Short_t id)
Bool_t TrigonometricalCut() const
Double_t YDstar() const
Double_t NormalizedV0DecayLength() const
Int_t MatchToMC(Int_t pdgabs, Int_t pdgabs2prong, Int_t *pdgDg, Int_t *pdgDg2prong, TClonesArray *mcArray, Bool_t isV0=kFALSE) const
AliAODTrack * Getv0NegativeTrack() const
AliAODv0 * Getv0() const
Double_t InvMassLctoLambdaPi() const
Double_t CosV0PointingAngleXY() const
Double_t NormalizedV0DecayLengthXY() const
Double_t DecayLengthXYV0() const
Bool_t SelectDstar(const Double_t *cutsDstar, const Double_t *cutsD0, Bool_t testD0=kTRUE) const
Double_t AngleD0dkpPisoft() const
Double_t InvMassLctoK0sP() const
AliAODTrack * Getv0PositiveTrack() const
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
Double_t EDstar() const
AliAODTrack * GetBachelor() const
Double_t CosV0PointingAngle() const
short Short_t
Definition: External.C:23
AliAODcascade * GetCascade() const
Bool_t SelectLctoV0(const Double_t *cutsLctoV0, Bool_t okLck0sp, Bool_t okLcLpi, Bool_t okLcLbarpi) const
Bool_t CheckCascadeFlags(AliRDHFCuts::ESele selFlag=AliRDHFCuts::kLctoV0Cuts)
Double_t InvMassD0() const
Double_t InvMassDstarKpipi() const
bool Bool_t
Definition: External.C:53
Double_t DecayLengthV0() const
AliAODRecoDecayHF2Prong * Get2Prong() const
Double_t InvMassDplustoK0spi() const
AliAODRecoCascadeHF & operator=(const AliAODRecoCascadeHF &source)