ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.12
Committed: Wed Apr 8 10:24:22 2009 UTC (16 years ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b, Mit_009a, Mit_009
Changes since 1.11: +8 -8 lines
Log Message:
Use ThreeVector rather than ThreeVector32.

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.12 // $Id: DecayData.h,v 1.11 2009/03/20 18:23:27 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 loizides 1.12 const ThreeVector RelativePosition() const;
37 loizides 1.6 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.11 void SetMassError(Double_t massError) { fMassError = massError; }
45 bendavid 1.1
46     protected:
47 loizides 1.7 void GetMom() const;
48    
49 loizides 1.10 Vect4M fMomAtVertex; //fitted momentum at vertex
50     Double32_t fMassError; //[0,0,14]fitted mass error
51     Double32_t fLxy; //[0,0,14]fitted lxy
52     Double32_t fLxyError; //[0,0,14]fitted lxy error
53     Double32_t fDxy; //[0,0,14]fitted impact parameter
54     Double32_t fDxyError; //[0,0,14]fitted impact parameter error
55     Double32_t fLz; //[0,0,14]fitted lz
56     Double32_t fLzError; //[0,0,14]fitted lz error
57 bendavid 1.1
58 loizides 1.6 ClassDef(DecayData, 1) // Decay data for stable daughter class
59 bendavid 1.1 };
60     }
61 loizides 1.7
62     //--------------------------------------------------------------------------------------------------
63     inline void mithep::DecayData::GetMom() const
64     {
65     // Get momentum values from stored values.
66    
67     fCachedMom.SetCoordinates(fMomAtVertex.Pt(),fMomAtVertex.Eta(),
68     fMomAtVertex.Phi(),fMomAtVertex.M());
69     }
70    
71 bendavid 1.1 //--------------------------------------------------------------------------------------------------
72     inline void mithep::DecayData::SetMom(Double32_t px, Double32_t py, Double32_t pz, Double32_t e)
73     {
74     // Set four momentum.
75    
76     fMomAtVertex.SetXYZT(px, py, pz, e);
77 bendavid 1.8 ClearMom();
78 bendavid 1.1 }
79    
80     //--------------------------------------------------------------------------------------------------
81 loizides 1.12 inline const mithep::ThreeVector mithep::DecayData::RelativePosition() const
82 bendavid 1.1 {
83 loizides 1.10 // Compute the position vector of the decay vertex relative to the parent decay vertex.
84 bendavid 1.1
85 loizides 1.12 mithep::ThreeVector dz(0,0,fLz*TMath::Abs(Pz())/Pz());
86     mithep::ThreeVector momPerp(Px(),Py(),0);
87     mithep::ThreeVector zHat(0,0,1.0);
88     mithep::ThreeVector dxy = -momPerp.Cross(zHat)*fDxy/momPerp.R();
89     mithep::ThreeVector dlxy = momPerp*fLxy/momPerp.R();
90 bendavid 1.1 return (dxy+dlxy+dz);
91     }
92     #endif