AliPhysics  9fe175b (9fe175b)
 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 
27 
28  public:
29 
31  AliAODRecoCascadeHF(AliAODVertex *vtx2, Short_t charge,
32  Double_t *px, Double_t *py, Double_t *pz,
33  Double_t *d0, Double_t *d0err, Double_t dca);
34  AliAODRecoCascadeHF(AliAODVertex *vtx2, Short_t charge,
35  Double_t *d0, Double_t *d0err, Double_t dca);
36  virtual ~AliAODRecoCascadeHF();
37 
40 
41  // 2prong (D0 for Dstar)
43  if(!GetDaughter(1)) return 0;
44  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODRecoDecayHF2Prong") ){
45  AliWarning("Object is not of type AliAODRecoDecayHF2Prong");
46  return 0;
47  }
48  return (AliAODRecoDecayHF2Prong*)GetDaughter(1);
49  }
50 
51  // Bachelor (soft pion for Dstar)
52  AliAODTrack* GetBachelor() const {return (AliAODTrack*)GetDaughter(0);}
53 
54  // v0 (Ks or Lambda for Lambda_c)
55  AliAODv0* Getv0() const {
56  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODv0") ){
57  AliWarning("Object is not of type v0");
58  return 0;
59  }
60  return (AliAODv0*)GetDaughter(1);
61  }
62 
63  // Cascade
64  AliAODcascade* GetCascade() const {
65  if ( ! ((AliAODRecoDecay*)GetDaughter(1))->IsA()->InheritsFrom("AliAODcascade") ){
66  AliWarning("Object is not of type cascade");
67  return 0;
68  }
69  return (AliAODcascade*)GetDaughter(1);
70  }
71  Int_t GetIDv0() const { return (Int_t)fIDv0; }
72 
73  void SetIDv0(Short_t id) { fIDv0 = id; }
74  // Get v0 positive track
75  AliAODTrack* Getv0PositiveTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(0); }
76  // Get v0 negative track
77  AliAODTrack* Getv0NegativeTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(1); }
78 
79  // D*->D0pi, D0->Kpi
80  Double_t EDstar() const {return E(413);}
81  Double_t YDstar() const {return Y(413);}
82  Bool_t SelectDstar(const Double_t *cutsDstar,const Double_t *cutsD0,Bool_t testD0=kTRUE) const;
83  Double_t InvMassD0() const {return (Charge()>0 ? Get2Prong()->InvMassD0() : Get2Prong()->InvMassD0bar());}
84  Double_t InvMassDstarKpipi() const;
85  Double_t DeltaInvMass() const {return (InvMassDstarKpipi()-InvMassD0());}
86  Double_t AngleD0dkpPisoft() const;
87  Bool_t TrigonometricalCut() const;
88 
89  // Lc invariant mass
90  Double_t InvMassLctoK0sP() const {
91  UInt_t pdg[2]={2212,310}; return InvMass(2,pdg);
92  }
93  Double_t InvMassLctoLambdaPi() const {
94  UInt_t pdg[2]={211,3122}; return InvMass(2,pdg);
95  }
96  Bool_t SelectLctoV0(const Double_t *cutsLctoV0, Bool_t okLck0sp, Bool_t okLcLpi, Bool_t okLcLbarpi) const;
97 
98  Int_t MatchToMC(Int_t pdgabs,Int_t pdgabs2prong,
99  Int_t *pdgDg,Int_t *pdgDg2prong,
100  TClonesArray *mcArray, Bool_t isV0=kFALSE) const;
101 
102  Double_t CosV0PointingAngle() const;
103  Double_t CosV0PointingAngleXY() const;
104  Double_t DecayLengthV0() const;
105  Double_t DecayLengthXYV0() const;
106  Double_t NormalizedV0DecayLength() const;
107  Double_t NormalizedV0DecayLengthXY() const;
108 
109  protected:
110  Short_t fIDv0; // unique track ID, points back to the ESD track
111 
112  ClassDef(AliAODRecoCascadeHF, 4); // heavy-flavour cascade class
113 };
114 
115 #endif
Int_t charge
ClassDef(AliAODRecoCascadeHF, 4)
Int_t pdg
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
Double_t EDstar() const
AliAODTrack * GetBachelor() const
Double_t CosV0PointingAngle() const
AliAODcascade * GetCascade() const
Bool_t SelectLctoV0(const Double_t *cutsLctoV0, Bool_t okLck0sp, Bool_t okLcLpi, Bool_t okLcLbarpi) const
Double_t InvMassD0() const
Double_t InvMassDstarKpipi() const
Double_t DecayLengthV0() const
AliAODRecoDecayHF2Prong * Get2Prong() const
AliAODRecoCascadeHF & operator=(const AliAODRecoCascadeHF &source)