1 |
//--------------------------------------------------------------------------------------------------
|
2 |
// $Id: DecayData.h,v 1.12 2009/04/08 10:24:22 loizides Exp $
|
3 |
//
|
4 |
// DecayData
|
5 |
//
|
6 |
// Additional information on a stable daughter which is specific to a particular decay.
|
7 |
//
|
8 |
// Authors: J.Bendavid
|
9 |
//--------------------------------------------------------------------------------------------------
|
10 |
|
11 |
#ifndef MITANA_DATATREE_DECAYDATA_H
|
12 |
#define MITANA_DATATREE_DECAYDATA_H
|
13 |
|
14 |
#include "MitCommon/DataFormats/interface/Vect4M.h"
|
15 |
#include "MitAna/DataTree/interface/DaughterData.h"
|
16 |
|
17 |
namespace mithep
|
18 |
{
|
19 |
class DecayData : public DaughterData
|
20 |
{
|
21 |
public:
|
22 |
DecayData() : fMassError(0), fLxy(0), fLxyError(0),
|
23 |
fDxy(0), fDxyError(0), fLz(0), fLzError(0) {}
|
24 |
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 |
|
27 |
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 |
const ThreeVector RelativePosition() const;
|
36 |
void SetDxy(Double_t dxy) { fDxy = dxy; }
|
37 |
void SetDxyError(Double_t dxyError) { fDxyError = dxyError; }
|
38 |
void SetLxy(Double_t lxy) { fLxy = lxy; }
|
39 |
void SetLxyError(Double_t lxyError) { fLxyError = lxyError; }
|
40 |
void SetLz(Double_t lz) { fLz = lz; }
|
41 |
void SetLzError(Double_t lzError) { fLzError = lzError; }
|
42 |
void SetMom(Double_t px, Double_t y, Double_t z, Double_t e);
|
43 |
void SetMassError(Double_t massError) { fMassError = massError; }
|
44 |
|
45 |
protected:
|
46 |
void GetMom() const;
|
47 |
|
48 |
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 |
|
57 |
ClassDef(DecayData, 1) // Decay data for stable daughter class
|
58 |
};
|
59 |
}
|
60 |
|
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 |
//--------------------------------------------------------------------------------------------------
|
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 |
ClearMom();
|
77 |
}
|
78 |
|
79 |
//--------------------------------------------------------------------------------------------------
|
80 |
inline const mithep::ThreeVector mithep::DecayData::RelativePosition() const
|
81 |
{
|
82 |
// Compute the position vector of the decay vertex relative to the parent decay vertex.
|
83 |
|
84 |
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 |
return (dxy+dlxy+dz);
|
90 |
}
|
91 |
#endif
|