AliPhysics  29d4213 (29d4213)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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 
72  // Get v0 positive track
73  AliAODTrack* Getv0PositiveTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(0); }
74  // Get v0 negative track
75  AliAODTrack* Getv0NegativeTrack() const { return (AliAODTrack*)Getv0()->GetDaughter(1); }
76 
77  // D*->D0pi, D0->Kpi
78  Double_t EDstar() const {return E(413);}
79  Double_t YDstar() const {return Y(413);}
80  Bool_t SelectDstar(const Double_t *cutsDstar,const Double_t *cutsD0,Bool_t testD0=kTRUE) const;
81  Double_t InvMassD0() const {return (Charge()>0 ? Get2Prong()->InvMassD0() : Get2Prong()->InvMassD0bar());}
82  Double_t InvMassDstarKpipi() const;
83  Double_t DeltaInvMass() const {return (InvMassDstarKpipi()-InvMassD0());}
84  Double_t AngleD0dkpPisoft() const;
85  Bool_t TrigonometricalCut() const;
86 
87  // Lc invariant mass
88  Double_t InvMassLctoK0sP() const {
89  UInt_t pdg[2]={2212,310}; return InvMass(2,pdg);
90  }
91  Double_t InvMassLctoLambdaPi() const {
92  UInt_t pdg[2]={211,3122}; return InvMass(2,pdg);
93  }
94  Bool_t SelectLctoV0(const Double_t *cutsLctoV0, Bool_t okLck0sp, Bool_t okLcLpi, Bool_t okLcLbarpi) const;
95 
96  Int_t MatchToMC(Int_t pdgabs,Int_t pdgabs2prong,
97  Int_t *pdgDg,Int_t *pdgDg2prong,
98  TClonesArray *mcArray, Bool_t isV0=kFALSE) const;
99 
100  Double_t CosV0PointingAngle() const;
101  Double_t CosV0PointingAngleXY() const;
102  Double_t DecayLengthV0() const;
103  Double_t DecayLengthXYV0() const;
104  Double_t NormalizedV0DecayLength() const;
105  Double_t NormalizedV0DecayLengthXY() const;
106 
107  protected:
108 
109  ClassDef(AliAODRecoCascadeHF, 2); // heavy-flavour cascade class
110 };
111 
112 #endif
Int_t charge
Int_t pdg
Double_t DeltaInvMass() const
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
ClassDef(AliAODRecoCascadeHF, 2)
AliAODRecoCascadeHF & operator=(const AliAODRecoCascadeHF &source)