ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.14
Committed: Wed Mar 28 12:15:34 2012 UTC (13 years, 1 month ago) by paus
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, HEAD
Changes since 1.13: +2 -2 lines
Log Message:
Enable skimming.

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 paus 1.14 // $Id: DecayData.h,v 1.13 2009/07/13 11:00: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 paus 1.14 // Authors: J.Bendavid, C.Paus
9 bendavid 1.1 //--------------------------------------------------------------------------------------------------
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