ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/StableDaughter.h
Revision: 1.1
Committed: Tue Jul 29 13:32:49 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Log Message:
Added StableDaughter class

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: StableDaughter.h,v 1.1 2008/07/25 16:04:44 bendavid Exp $
3     //
4     // StableDaughter
5     //
6     // Stable particle to be used as part of a decay tree.
7     // Explicitly stores the three momentum at the decay vertex as well as the link to the mother.
8     //
9     // Authors: C.Loizides, J.Bendavid
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef DATATREE_STABLEDAUGHTER_H
13     #define 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() : StableParticle(0) {}
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     fMomentumAtVertex(px,py,pz) {}
28     ~StableDaughter() {}
29    
30     Double_t Eta() const { return fMomentumAtVertex.Eta(); }
31     const Particle *Mother() const;
32     Double_t Phi() const { return fMomentumAtVertex.Phi(); }
33     Double_t P() const { return fMomentumAtVertex.R(); }
34     Double_t Pt() const { return fMomentumAtVertex.Rho(); }
35     Double_t Px() const { return fMomentumAtVertex.X(); }
36     Double_t Py() const { return fMomentumAtVertex.Y(); }
37     Double_t Pz() const { return fMomentumAtVertex.Z(); }
38     void SetThreeMom(Double_t px, Double_t y, Double_t z);
39     const ThreeVector &ThreeMom() const { return fMomentumAtVertex; }
40    
41     protected:
42     ThreeVector fMomentumAtVertex;
43     TRef fMother; //tracker track reference
44    
45     ClassDef(StableDaughter, 1) // StableDaughter 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     fMomentumAtVertex.SetXYZ(px, py, pz);
63     }
64     #endif