ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/StableData.h
Revision: 1.1
Committed: Tue Sep 30 12:52:52 2008 UTC (16 years, 7 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_004
Log Message:
added StableData and DecayData classes

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2     // $Id: StableData.h,v 1.1 2008/09/19 11:58:02 bendavid Exp $
3     //
4     // StableData
5     //
6     // Additional information on a stable daughter which is specific to a particular decay
7     //
8     //
9     // Authors: J.Bendavid
10     //--------------------------------------------------------------------------------------------------
11    
12     #ifndef MITANA_DATATREE_STABLEDATA_H
13     #define MITANA_DATATREE_STABLEDATA_H
14    
15     #include "MitAna/DataTree/interface/StableParticle.h"
16     #include "MitAna/DataTree/interface/DaughterData.h"
17     #include "MitAna/DataTree/interface/Types.h"
18    
19     namespace mithep
20     {
21     class StableData : public DaughterData
22     {
23     public:
24     StableData() {}
25     StableData(Particle* p, const ThreeVector &mom) :
26     DaughterData(p),
27     fMomAtVertex(mom) {}
28     StableData(Particle* p, Double_t px, Double_t py, Double_t pz) :
29     DaughterData(p),
30     fMomAtVertex(px,py,pz) {}
31     virtual ~StableData() {}
32    
33     Double_t Px() const { return fMomAtVertex.X(); }
34     Double_t Py() const { return fMomAtVertex.Y(); }
35     Double_t Pz() const { return fMomAtVertex.Z(); }
36     Double_t P() const { return fMomAtVertex.R(); }
37     Double_t E() const { return TMath::Sqrt(P()*P()+Mass()*Mass()); }
38     Double_t Mass() const { return Original()->Mass(); }
39     FourVector Mom() const;
40     void SetThreeMom(Double_t px, Double_t y, Double_t z);
41     void SetThreeMom(const ThreeVector &mom) { fMomAtVertex = mom; }
42     const ThreeVector &ThreeMom() const { return fMomAtVertex; }
43    
44     protected:
45     ThreeVector fMomAtVertex; //fitted momentum at vertex
46    
47     ClassDef(StableData, 1) // Stable daughter class
48     };
49     }
50     //-------------------------------------------------------------------------------------------------
51     inline mithep::FourVector mithep::StableData::Mom() const
52     {
53     // Return Momentum
54    
55     return FourVector(Px(), Py(), Pz(), E());
56     }
57    
58     //--------------------------------------------------------------------------------------------------
59     inline void mithep::StableData::SetThreeMom(Double_t px, Double_t py, Double_t pz)
60     {
61     // Set four momentum.
62    
63     fMomAtVertex.SetXYZ(px, py, pz);
64     }
65     #endif