ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.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_005, Mit_004
Log Message:
added StableData and DecayData classes

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: DecayData.h,v 1.1 2008/09/19 11:58:02 bendavid Exp $
3 //
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 DecayData(Particle *p, const FourVector32 &mom) :
26 DaughterData(p),
27 fMomAtVertex(mom) {}
28 virtual ~DecayData() {}
29
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 FourVector Mom() const { return fMomAtVertex; }
36 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 FourVector32 fMomAtVertex; //fitted momentum at vertex
65 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