ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/DecayData.h
Revision: 1.6
Committed: Tue Dec 9 17:46:59 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.5: +36 -51 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.6 // $Id: DecayData.h,v 1.5 2008/12/03 17:37:46 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    
17     namespace mithep
18     {
19     class DecayData : public DaughterData
20     {
21     public:
22     DecayData() {}
23 loizides 1.6 DecayData(const Particle *p, const FourVector &mom) : DaughterData(p), fMomAtVertex(mom) {}
24 loizides 1.5 ~DecayData() {}
25 bendavid 1.1
26 loizides 1.6 Double_t Dxy() const { return fDxy; }
27     Double_t DxyError() const { return fDxyError; }
28     Double_t E() const { return fMomAtVertex.E(); }
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     FourVector Mom() const { return FourVector(fMomAtVertex); }
35     EObjType ObjType() const { return kDecayData; }
36     Double_t P() const { return fMomAtVertex.P(); }
37     Double_t Px() const { return fMomAtVertex.Px(); }
38     Double_t Py() const { return fMomAtVertex.Py(); }
39     Double_t Pz() const { return fMomAtVertex.Pz(); }
40     const ThreeVector32 RelativePosition() const;
41     void SetDxy(Double_t dxy) { fDxy = dxy; }
42     void SetDxyError(Double_t dxyError) { fDxyError = dxyError; }
43     void SetLxy(Double_t lxy) { fLxy = lxy;}
44     void SetLxyError(Double_t lxyError) { fLxyError = lxyError; }
45     void SetLz(Double_t lz) { fLz = lz;}
46     void SetLzError(Double_t lzError) { fLzError = lzError; }
47     void SetMom(Double_t px, Double_t y, Double_t z, Double_t e);
48     void SetMom(const FourVector &mom) { fMomAtVertex = mom; }
49     void SetMassError(Double_t massError) { fMassError = massError; }
50 bendavid 1.1
51     protected:
52 bendavid 1.3 FourVectorM32 fMomAtVertex; //fitted momentum at vertex
53 loizides 1.6 Double32_t fMassError; //fitted mass error
54     Double32_t fLxy; //fitted lxy
55     Double32_t fLxyError; //fitted lxy error
56     Double32_t fDxy; //fitted impact parameter
57     Double32_t fDxyError; //fitted impact parameter error
58     Double32_t fLz; //fitted lz
59     Double32_t fLzError; //fitted lz error
60 bendavid 1.1
61 loizides 1.6 ClassDef(DecayData, 1) // Decay data for stable daughter class
62 bendavid 1.1 };
63     }
64     //--------------------------------------------------------------------------------------------------
65     inline void mithep::DecayData::SetMom(Double32_t px, Double32_t py, Double32_t pz, Double32_t e)
66     {
67     // Set four momentum.
68    
69     fMomAtVertex.SetXYZT(px, py, pz, e);
70     }
71    
72     //--------------------------------------------------------------------------------------------------
73     inline const mithep::ThreeVector32 mithep::DecayData::RelativePosition() const
74     {
75 loizides 1.6 //Compute the position vector of the decay vertex relative to the parent decay vertex.
76 bendavid 1.1
77     mithep::ThreeVector32 dz(0,0,fLz*TMath::Abs(fMomAtVertex.Pz())/fMomAtVertex.Pz());
78     mithep::ThreeVector32 momPerp(fMomAtVertex.Px(),fMomAtVertex.Py(),0);
79     mithep::ThreeVector32 zHat(0,0,1.0);
80     mithep::ThreeVector32 dxy = -momPerp.Cross(zHat)*fDxy/momPerp.R();
81     mithep::ThreeVector32 dlxy = momPerp*fLxy/momPerp.R();
82     return (dxy+dlxy+dz);
83     }
84     #endif