]>
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); | |
24 | virtual ~AliAODRecoDecayHF(); | |
25 | ||
26 | AliAODRecoDecayHF(const AliAODRecoDecayHF& source); | |
27 | AliAODRecoDecayHF& operator=(const AliAODRecoDecayHF& source); | |
28 | ||
29 | ||
30 | // primary vertex | |
31 | void SetOwnPrimaryVtx(AliAODVertex *vtx2) {fOwnPrimaryVtx = vtx2;} | |
32 | void CheckOwnPrimaryVtx() const | |
33 | {if(!fOwnPrimaryVtx) printf("fOwnPrimaryVtx not set"); return;} | |
34 | AliAODVertex* GetOwnPrimaryVtx() const {return fOwnPrimaryVtx;} | |
35 | void GetOwnPrimaryVtx(Double_t vtx[3]) const | |
36 | {CheckOwnPrimaryVtx();fOwnPrimaryVtx->GetPosition(vtx);} | |
6185d025 | 37 | void UnsetOwnPrimaryVtx() {fOwnPrimaryVtx=0; return;} |
3244eeed | 38 | |
39 | // kinematics & topology | |
40 | Double_t DecayLength() const | |
41 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLength(fOwnPrimaryVtx);} | |
42 | Double_t DecayLengthError() const | |
43 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthError(fOwnPrimaryVtx);} | |
44 | Double_t NormalizedDecayLength() const | |
45 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::NormalizedDecayLength(fOwnPrimaryVtx);} | |
46 | Double_t DecayLengthXY() const | |
47 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthXY(fOwnPrimaryVtx);} | |
48 | Double_t DecayLengthXYError() const | |
49 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::DecayLengthXYError(fOwnPrimaryVtx);} | |
50 | Double_t NormalizedDecayLengthXY() const | |
51 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::NormalizedDecayLengthXY(fOwnPrimaryVtx);} | |
52 | Double_t Ct(UInt_t pdg) const | |
53 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::Ct(pdg,fOwnPrimaryVtx);} | |
54 | Double_t CosPointingAngle() const | |
55 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::CosPointingAngle(fOwnPrimaryVtx);} | |
56 | Double_t CosPointingAngleXY() const | |
57 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::CosPointingAngleXY(fOwnPrimaryVtx);} | |
58 | Double_t ImpParXY() const | |
59 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::ImpParXY(fOwnPrimaryVtx);} | |
60 | Double_t QtProngFlightLine(Int_t ip) const | |
61 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::QtProngFlightLine(ip,fOwnPrimaryVtx);} | |
62 | Double_t QlProngFlightLine(Int_t ip) const | |
63 | {CheckOwnPrimaryVtx();return AliAODRecoDecay::QlProngFlightLine(ip,fOwnPrimaryVtx);} | |
64 | ||
65 | // prongs | |
66 | Double_t Getd0errProng(Int_t ip) const {return fd0err[ip];} | |
67 | Double_t Normalizedd0Prong(Int_t ip) const | |
68 | {return Getd0Prong(ip)/Getd0errProng(ip);} | |
69 | ||
6185d025 | 70 | void SetProngIDs(Int_t nIDs,UShort_t *id); |
71 | UShort_t GetProngID(Int_t ip) const | |
72 | {if(fProngID) {return fProngID[ip];} else {return 999999;}} | |
73 | ||
3244eeed | 74 | |
75 | protected: | |
76 | ||
77 | AliAODVertex *fOwnPrimaryVtx; // primary vertex for this candidate | |
6185d025 | 78 | Double_t *fd0err; //[fNProngs] error on prongs rphi impact param [cm] |
79 | UShort_t *fProngID; //[fNProngs] track ID of daughters | |
3244eeed | 80 | |
6185d025 | 81 | ClassDef(AliAODRecoDecayHF,2) // base class for AOD reconstructed |
3244eeed | 82 | // heavy-flavour decays |
83 | }; | |
84 | ||
6185d025 | 85 | inline void AliAODRecoDecayHF::SetProngIDs(Int_t nIDs,UShort_t *id) |
86 | { | |
87 | if(nIDs!=GetNProngs()) { | |
88 | printf("Wrong number of IDs, must be nProngs\n"); | |
89 | return; | |
90 | } | |
91 | if(fProngID) delete [] fProngID; | |
92 | fProngID = new UShort_t[nIDs]; | |
93 | for(Int_t i=0;i<nIDs;i++) | |
94 | fProngID[i] = id[i]; | |
95 | return; | |
96 | } | |
97 | ||
3244eeed | 98 | #endif |