ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/StableDaughter.h
Revision: 1.5
Committed: Wed Sep 10 03:33:27 2008 UTC (16 years, 8 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006, Mit_005, Mit_004
Changes since 1.4: +3 -3 lines
Log Message:
Cleanup

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: StableDaughter.h,v 1.4 2008/07/29 17:00:12 loizides Exp $
3 //
4 // StableDaughter
5 //
6 // Stable particle to be used as part of a decay tree. Explicitly stores the three momentum at
7 // the decay vertex as well as the link to the mother.
8 //
9 // Authors: C.Loizides, J.Bendavid
10 //--------------------------------------------------------------------------------------------------
11
12 #ifndef MITANA_DATATREE_STABLEDAUGHTER_H
13 #define MITANA_DATATREE_STABLEDAUGHTER_H
14
15 #include "MitAna/DataTree/interface/StableParticle.h"
16 #include "MitAna/DataTree/interface/Types.h"
17
18 namespace mithep
19 {
20 class StableDaughter : public StableParticle
21 {
22 public:
23 StableDaughter() {}
24 StableDaughter(UInt_t absPdgId, Track *track) : StableParticle(absPdgId, track) {}
25 StableDaughter(UInt_t absPdgId, Track *track, Double_t px, Double_t py, Double_t pz) :
26 StableParticle(absPdgId, track),
27 fMomAtVertex(px,py,pz) {}
28 ~StableDaughter() {}
29
30 Double_t Eta() const { return fMomAtVertex.Eta(); }
31 const Particle *Mother() const;
32 Double_t Phi() const { return fMomAtVertex.Phi(); }
33 Double_t P() const { return fMomAtVertex.R(); }
34 Double_t Pt() const { return fMomAtVertex.Rho(); }
35 Double_t Px() const { return fMomAtVertex.X(); }
36 Double_t Py() const { return fMomAtVertex.Y(); }
37 Double_t Pz() const { return fMomAtVertex.Z(); }
38 void SetThreeMom(Double_t px, Double_t y, Double_t z);
39 const ThreeVector &ThreeMom() const { return fMomAtVertex; }
40
41 protected:
42 ThreeVector fMomAtVertex; //fitted momentum at vertex
43 TRef fMother; //tracker track reference
44
45 ClassDef(StableDaughter, 1) // Stable daughter class
46 };
47 }
48
49 //--------------------------------------------------------------------------------------------------
50 inline const mithep::Particle *mithep::StableDaughter::Mother() const
51 {
52 // Return decay mother.
53
54 return static_cast<const Particle*>(fMother.GetObject());
55 }
56
57 //--------------------------------------------------------------------------------------------------
58 inline void mithep::StableDaughter::SetThreeMom(Double_t px, Double_t py, Double_t pz)
59 {
60 // Set three momentum.
61
62 fMomAtVertex.SetXYZ(px, py, pz);
63 }
64 #endif