ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.5
Committed: Wed Dec 3 17:37:46 2008 UTC (16 years, 5 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.4: +2 -2 lines
Log Message:
Cleanup

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.5 // $Id: DecayData.h,v 1.4 2008/12/03 16:58:17 bendavid Exp $
3 bendavid 1.1 //
4     // DecayData
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_DECAYDATA_H
13     #define MITANA_DATATREE_DECAYDATA_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 DecayData : public DaughterData
22     {
23     public:
24     DecayData() {}
25 bendavid 1.4 DecayData(const Particle *p, const FourVector &mom) :
26 bendavid 1.1 DaughterData(p),
27     fMomAtVertex(mom) {}
28 loizides 1.5 ~DecayData() {}
29 bendavid 1.1
30     Double32_t Px() const { return fMomAtVertex.Px(); }
31     Double32_t Py() const { return fMomAtVertex.Py(); }
32     Double32_t Pz() const { return fMomAtVertex.Pz(); }
33     Double32_t P() const { return fMomAtVertex.P(); }
34     Double32_t E() const { return fMomAtVertex.E(); }
35 bendavid 1.3 FourVector Mom() const { return FourVector(fMomAtVertex); }
36 bendavid 1.1 void SetMom(Double32_t px, Double32_t y, Double32_t z, Double32_t e);
37     void SetMom(const FourVector &mom) { fMomAtVertex = mom; }
38    
39     const ThreeVector32 RelativePosition() const;
40    
41     // Fitted Mass Error
42     Double32_t MassError() const { return fMassError; }
43     void SetMassError(Double32_t massError) { fMassError = massError;}
44     // Lxy
45     Double32_t Lxy() const { return fLxy; }
46     void SetLxy(Double32_t lxy) { fLxy = lxy;}
47     // Lxy Error
48     Double32_t LxyError() const { return fLxyError; }
49     void SetLxyError(Double32_t lxyError) { fLxyError = lxyError;}
50     // Dxy (two dimensional impact parameter)
51     Double32_t Dxy() const { return fDxy; }
52     void SetDxy(Double32_t dxy) { fDxy = dxy;}
53     // Dxy Error
54     Double32_t DxyError() const { return fDxyError; }
55     void SetDxyError(Double32_t dxyError) { fDxyError = dxyError;}
56     // Lz
57     Double32_t Lz() const { return fLz; }
58     void SetLz(Double32_t lz) { fLz = lz;}
59     // Lz Error
60     Double32_t LzError() const { return fLzError; }
61     void SetLzError(Double32_t lzError) { fLzError = lzError;}
62    
63     protected:
64 bendavid 1.3 FourVectorM32 fMomAtVertex; //fitted momentum at vertex
65 bendavid 1.1 Double32_t fMassError;
66     Double32_t fLxy;
67     Double32_t fLxyError;
68     Double32_t fDxy;
69     Double32_t fDxyError;
70     Double32_t fLz;
71     Double32_t fLzError;
72    
73     ClassDef(DecayData, 1) // Stable daughter class
74     };
75     }
76     //--------------------------------------------------------------------------------------------------
77     inline void mithep::DecayData::SetMom(Double32_t px, Double32_t py, Double32_t pz, Double32_t e)
78     {
79     // Set four momentum.
80    
81     fMomAtVertex.SetXYZT(px, py, pz, e);
82     }
83    
84     //--------------------------------------------------------------------------------------------------
85     inline const mithep::ThreeVector32 mithep::DecayData::RelativePosition() const
86     {
87     //compute the position vector of the decay vertex relative to the parent decay vertex
88    
89     mithep::ThreeVector32 dz(0,0,fLz*TMath::Abs(fMomAtVertex.Pz())/fMomAtVertex.Pz());
90    
91     mithep::ThreeVector32 momPerp(fMomAtVertex.Px(),fMomAtVertex.Py(),0);
92     mithep::ThreeVector32 zHat(0,0,1.0);
93    
94     mithep::ThreeVector32 dxy = -momPerp.Cross(zHat)*fDxy/momPerp.R();
95     mithep::ThreeVector32 dlxy = momPerp*fLxy/momPerp.R();
96    
97     return (dxy+dlxy+dz);
98     }
99     #endif