ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.13
Committed: Mon Jul 13 11:00:27 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_025c_branch2, Mit_025c_branch1, Mit_025c_branch0, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010
Branch point for: Mit_025c_branch
Changes since 1.12: +2 -3 lines
Log Message:
Include files checked.

File Contents

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