]>
Commit | Line | Data |
---|---|---|
3244eeed | 1 | #ifndef ALIAODRECODECAYHF_H |
2 | #define ALIAODRECODECAYHF_H | |
3 | /* Copyright(c) 1998-2006, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //*********************************************************** | |
7 | // Class AliAODRecoDecayHF | |
8 | // base class for AOD reconstructed heavy-flavour decays | |
9 | // Author: A.Dainese, andrea.dainese@lnl.infn.it | |
10 | //*********************************************************** | |
11 | ||
12 | #include "AliAODRecoDecay.h" | |
13 | ||
14 | class AliAODRecoDecayHF : public AliAODRecoDecay { | |
15 | ||
16 | public: | |
17 | ||
18 | AliAODRecoDecayHF(); | |
19 | AliAODRecoDecayHF(AliAODVertex *vtx2,Int_t nprongs,Short_t charge, | |
20 | Double_t *px,Double_t *py,Double_t *pz, | |
21 | Double_t *d0,Double_t *d0err); | |
22 | AliAODRecoDecayHF(AliAODVertex *vtx2,Int_t nprongs,Short_t charge, | |
23 | Double_t *d0,Double_t *d0err); | |
b39168f9 | 24 | AliAODRecoDecayHF(Double_t vtx1[3],Double_t vtx2[3], |
25 | Int_t nprongs,Short_t charge, | |
26 | Double_t *px,Double_t *py,Double_t *pz,Double_t *d0); | |
3244eeed | 27 | virtual ~AliAODRecoDecayHF(); |
28 | ||
29 | AliAODRecoDecayHF(const AliAODRecoDecayHF& source); | |
30 | AliAODRecoDecayHF& operator=(const AliAODRecoDecayHF& source); | |
31 | ||
32 | ||
33 | // primary vertex | |
0a65d33f | 34 | void SetOwnPrimaryVtx(const AliAODVertex *vtx2) { UnsetOwnPrimaryVtx(); fOwnPrimaryVtx = new AliAODVertex(*vtx2);} |
3244eeed | 35 | void CheckOwnPrimaryVtx() const |
36 | {if(!fOwnPrimaryVtx) printf("fOwnPrimaryVtx not set"); return;} | |
37 | AliAODVertex* GetOwnPrimaryVtx() const {return fOwnPrimaryVtx;} | |
38 | void GetOwnPrimaryVtx(Double_t vtx[3]) const | |
39 | {CheckOwnPrimaryVtx();fOwnPrimaryVtx->GetPosition(vtx);} | |
0a65d33f | 40 | void UnsetOwnPrimaryVtx() {if(fOwnPrimaryVtx) {delete fOwnPrimaryVtx; fOwnPrimaryVtx=0;} return;} |
3244eeed | 41 | |
42 | // kinematics & topology | |
43 | Double_t DecayLength() const | |
44 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLength(fOwnPrimaryVtx);} | |
45 | Double_t DecayLengthError() const | |
46 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthError(fOwnPrimaryVtx);} | |
47 | Double_t NormalizedDecayLength() const | |
48 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::NormalizedDecayLength(fOwnPrimaryVtx);} | |
49 | Double_t DecayLengthXY() const | |
50 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthXY(fOwnPrimaryVtx);} | |
51 | Double_t DecayLengthXYError() const | |
52 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthXYError(fOwnPrimaryVtx);} | |
53 | Double_t NormalizedDecayLengthXY() const | |
54 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::NormalizedDecayLengthXY(fOwnPrimaryVtx);} | |
55 | Double_t Ct(UInt_t pdg) const | |
56 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::Ct(pdg,fOwnPrimaryVtx);} | |
57 | Double_t CosPointingAngle() const | |
58 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::CosPointingAngle(fOwnPrimaryVtx);} | |
59 | Double_t CosPointingAngleXY() const | |
60 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::CosPointingAngleXY(fOwnPrimaryVtx);} | |
61 | Double_t ImpParXY() const | |
62 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::ImpParXY(fOwnPrimaryVtx);} | |
63 | Double_t QtProngFlightLine(Int_t ip) const | |
64 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::QtProngFlightLine(ip,fOwnPrimaryVtx);} | |
65 | Double_t QlProngFlightLine(Int_t ip) const | |
66 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::QlProngFlightLine(ip,fOwnPrimaryVtx);} | |
67 | ||
68 | // prongs | |
69 | Double_t Getd0errProng(Int_t ip) const {return fd0err[ip];} | |
70 | Double_t Normalizedd0Prong(Int_t ip) const | |
71 | {return Getd0Prong(ip)/Getd0errProng(ip);} | |
72 | ||
6185d025 | 73 | void SetProngIDs(Int_t nIDs,UShort_t *id); |
74 | UShort_t GetProngID(Int_t ip) const | |
dcb444c9 | 75 | {if(fProngID) {return fProngID[ip];} else {return 9999;}} |
6185d025 | 76 | |
3244eeed | 77 | |
78 | protected: | |
79 | ||
80 | AliAODVertex *fOwnPrimaryVtx; // primary vertex for this candidate | |
6185d025 | 81 | Double_t *fd0err; //[fNProngs] error on prongs rphi impact param [cm] |
82 | UShort_t *fProngID; //[fNProngs] track ID of daughters | |
3244eeed | 83 | |
6185d025 | 84 | ClassDef(AliAODRecoDecayHF,2) // base class for AOD reconstructed |
3244eeed | 85 | // heavy-flavour decays |
86 | }; | |
87 | ||
6185d025 | 88 | inline void AliAODRecoDecayHF::SetProngIDs(Int_t nIDs,UShort_t *id) |
89 | { | |
90 | if(nIDs!=GetNProngs()) { | |
91 | printf("Wrong number of IDs, must be nProngs\n"); | |
92 | return; | |
93 | } | |
94 | if(fProngID) delete [] fProngID; | |
95 | fProngID = new UShort_t[nIDs]; | |
96 | for(Int_t i=0;i<nIDs;i++) | |
97 | fProngID[i] = id[i]; | |
98 | return; | |
99 | } | |
100 | ||
3244eeed | 101 | #endif |