ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/StableDaughter.h
Revision: 1.3
Committed: Tue Jul 29 16:17:18 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.2: +8 -8 lines
Log Message:
Cosmetics.

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.3 // $Id: StableDaughter.h,v 1.2 2008/07/29 13:44:25 loizides Exp $
3 bendavid 1.1 //
4     // StableDaughter
5     //
6 loizides 1.3 // 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 bendavid 1.1 //
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 loizides 1.3 StableDaughter() {}
24 bendavid 1.1 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 loizides 1.3 ThreeVector fMomAtVertex; //fitted momentum at vertex
43     TRef fMother; //tracker track reference
44 bendavid 1.1
45 loizides 1.3 ClassDef(StableDaughter, 1) // Stable daughter class
46 bendavid 1.1 };
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 loizides 1.3 fMomAtVertex.SetXYZ(px, py, pz);
63 bendavid 1.1 }
64     #endif