ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.10
Committed: Wed Mar 18 15:44:32 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.9: +16 -15 lines
Log Message:
Introduced Double32_t [0,0,14] consistently. Updated class descriptions.

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.10 // $Id: DecayData.h,v 1.9 2009/03/03 17:04:09 loizides Exp $
3 bendavid 1.1 //
4     // DecayData
5     //
6 loizides 1.6 // Additional information on a stable daughter which is specific to a particular decay.
7 bendavid 1.1 //
8     // Authors: J.Bendavid
9     //--------------------------------------------------------------------------------------------------
10    
11     #ifndef MITANA_DATATREE_DECAYDATA_H
12     #define MITANA_DATATREE_DECAYDATA_H
13    
14     #include "MitAna/DataTree/interface/DaughterData.h"
15     #include "MitAna/DataTree/interface/Types.h"
16 loizides 1.10 #include "MitCommon/DataFormats/interface/Vect4M.h"
17 bendavid 1.1
18     namespace mithep
19     {
20     class DecayData : public DaughterData
21     {
22     public:
23 loizides 1.7 DecayData() : fMassError(0), fLxy(0), fLxyError(0),
24 loizides 1.10 fDxy(0), fDxyError(0), fLz(0), fLzError(0) {}
25 loizides 1.7 DecayData(const Particle *p, const FourVector &mom) : DaughterData(p), fMomAtVertex(mom),
26     fMassError(0), fLxy(0), fLxyError(0), fDxy(0), fDxyError(0), fLz(0), fLzError(0) {}
27 bendavid 1.1
28 loizides 1.6 Double_t Dxy() const { return fDxy; }
29     Double_t DxyError() const { return fDxyError; }
30     Double_t Lxy() const { return fLxy; }
31     Double_t LxyError() const { return fLxyError; }
32     Double_t Lz() const { return fLz; }
33     Double_t LzError() const { return fLzError; }
34     Double_t MassError() const { return fMassError; }
35     EObjType ObjType() const { return kDecayData; }
36     const ThreeVector32 RelativePosition() const;
37     void SetDxy(Double_t dxy) { fDxy = dxy; }
38     void SetDxyError(Double_t dxyError) { fDxyError = dxyError; }
39 loizides 1.9 void SetLxy(Double_t lxy) { fLxy = lxy; }
40 loizides 1.6 void SetLxyError(Double_t lxyError) { fLxyError = lxyError; }
41 loizides 1.9 void SetLz(Double_t lz) { fLz = lz; }
42 loizides 1.6 void SetLzError(Double_t lzError) { fLzError = lzError; }
43     void SetMom(Double_t px, Double_t y, Double_t z, Double_t e);
44 loizides 1.10 // void SetMom(const FourVector &mom) { fMomAtVertex = mom; ClearMom(); }
45     // void SetMom(const FourVector &mom) { fMomAtVertex = mom; ClearMom(); }
46 loizides 1.9 void SetMassError(Double_t massError) { fMassError = massError; }
47 bendavid 1.1
48     protected:
49 loizides 1.7 void GetMom() const;
50    
51 loizides 1.10 Vect4M fMomAtVertex; //fitted momentum at vertex
52     Double32_t fMassError; //[0,0,14]fitted mass error
53     Double32_t fLxy; //[0,0,14]fitted lxy
54     Double32_t fLxyError; //[0,0,14]fitted lxy error
55     Double32_t fDxy; //[0,0,14]fitted impact parameter
56     Double32_t fDxyError; //[0,0,14]fitted impact parameter error
57     Double32_t fLz; //[0,0,14]fitted lz
58     Double32_t fLzError; //[0,0,14]fitted lz error
59 bendavid 1.1
60 loizides 1.6 ClassDef(DecayData, 1) // Decay data for stable daughter class
61 bendavid 1.1 };
62     }
63 loizides 1.7
64     //--------------------------------------------------------------------------------------------------
65     inline void mithep::DecayData::GetMom() const
66     {
67     // Get momentum values from stored values.
68    
69     fCachedMom.SetCoordinates(fMomAtVertex.Pt(),fMomAtVertex.Eta(),
70     fMomAtVertex.Phi(),fMomAtVertex.M());
71     }
72    
73 bendavid 1.1 //--------------------------------------------------------------------------------------------------
74     inline void mithep::DecayData::SetMom(Double32_t px, Double32_t py, Double32_t pz, Double32_t e)
75     {
76     // Set four momentum.
77    
78     fMomAtVertex.SetXYZT(px, py, pz, e);
79 bendavid 1.8 ClearMom();
80 bendavid 1.1 }
81    
82     //--------------------------------------------------------------------------------------------------
83     inline const mithep::ThreeVector32 mithep::DecayData::RelativePosition() const
84     {
85 loizides 1.10 // Compute the position vector of the decay vertex relative to the parent decay vertex.
86 bendavid 1.1
87 loizides 1.10 mithep::ThreeVector32 dz(0,0,fLz*TMath::Abs(Pz())/Pz());
88     mithep::ThreeVector32 momPerp(Px(),Py(),0);
89 bendavid 1.1 mithep::ThreeVector32 zHat(0,0,1.0);
90     mithep::ThreeVector32 dxy = -momPerp.Cross(zHat)*fDxy/momPerp.R();
91     mithep::ThreeVector32 dlxy = momPerp*fLxy/momPerp.R();
92     return (dxy+dlxy+dz);
93     }
94     #endif