1 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
loizides |
1.12 |
// $Id: DecayParticle.h,v 1.11 2008/09/19 11:58:41 bendavid Exp $
|
3 |
loizides |
1.1 |
//
|
4 |
|
|
// Decay Particle
|
5 |
|
|
//
|
6 |
bendavid |
1.7 |
// Decay Particle for use in vertexing based analyses.
|
7 |
bendavid |
1.10 |
// Stores vertex fit information (including four momentum) and links to daughters.
|
8 |
loizides |
1.1 |
//
|
9 |
bendavid |
1.10 |
// Note that Charge is still computed as a recursive loop over daughters, as inherited from
|
10 |
|
|
// CompositeParticle, but momentum is returned from the internally stored four vector
|
11 |
|
|
//
|
12 |
|
|
// Authors: Ch.Paus, J.Bendavid...
|
13 |
loizides |
1.1 |
//--------------------------------------------------------------------------------------------------
|
14 |
|
|
|
15 |
|
|
#ifndef DATATREE_DECAYPARTICLE_H
|
16 |
|
|
#define DATATREE_DECAYPARTICLE_H
|
17 |
|
|
|
18 |
bendavid |
1.7 |
#include <TDatabasePDG.h>
|
19 |
|
|
#include <TParticlePDG.h>
|
20 |
loizides |
1.1 |
#include "MitAna/DataTree/interface/CompositeParticle.h"
|
21 |
bendavid |
1.11 |
#include "MitAna/DataTree/interface/DaughterData.h"
|
22 |
|
|
#include "MitAna/DataCont/interface/StackArray.h"
|
23 |
bendavid |
1.7 |
#include "MitAna/DataTree/interface/Types.h"
|
24 |
loizides |
1.1 |
|
25 |
|
|
namespace mithep
|
26 |
|
|
{
|
27 |
|
|
class DecayParticle : public CompositeParticle
|
28 |
|
|
{
|
29 |
|
|
public:
|
30 |
bendavid |
1.7 |
// Decay type
|
31 |
|
|
enum DecayType {Fast, Slow};
|
32 |
|
|
|
33 |
loizides |
1.2 |
DecayParticle() {}
|
34 |
bendavid |
1.7 |
DecayParticle(Int_t absPdgId, DecayType decayType) :
|
35 |
|
|
fAbsPdgId(absPdgId),
|
36 |
|
|
fDecayType(decayType),
|
37 |
|
|
fChi2(0),
|
38 |
|
|
fNdof(0),
|
39 |
|
|
fFittedMass(0),
|
40 |
|
|
fFittedMassError(0),
|
41 |
|
|
fNormalizedMass(0),
|
42 |
|
|
fLxy(0),
|
43 |
|
|
fLxyError(0),
|
44 |
|
|
fLxyToPv(0),
|
45 |
|
|
fLxyToPvError(0),
|
46 |
|
|
fDxy(0),
|
47 |
|
|
fDxyError(0),
|
48 |
|
|
fDxyToPv(0),
|
49 |
|
|
fDxyToPvError(0),
|
50 |
|
|
fLz(0),
|
51 |
|
|
fLzError(0),
|
52 |
|
|
fLzToPv(0),
|
53 |
|
|
fLzToPvError(0),
|
54 |
|
|
fCTau(0),
|
55 |
|
|
fCTauError(0),
|
56 |
|
|
fPt(0),
|
57 |
|
|
fPtError(0),
|
58 |
|
|
fPosition(0,0,0) {}
|
59 |
loizides |
1.1 |
~DecayParticle() {}
|
60 |
bendavid |
1.7 |
|
61 |
loizides |
1.12 |
UInt_t AbsPdgId() const { return fAbsPdgId; }
|
62 |
|
|
void SetAbsPdgId(UInt_t apid) { fAbsPdgId=apid; }
|
63 |
bendavid |
1.7 |
TParticlePDG *ParticlePdgEntry() const;
|
64 |
loizides |
1.12 |
Double_t PdgMass() const;
|
65 |
|
|
Double_t Prob() const { return TMath::Prob(fChi2,fNdof); }
|
66 |
|
|
Double_t Chi2() const { return fChi2; }
|
67 |
|
|
Int_t Ndof() const { return fNdof; }
|
68 |
|
|
void SetChi2(Double_t chi2) { fChi2 = chi2;}
|
69 |
|
|
void SetNdof(Int_t ndof) { fNdof = ndof;}
|
70 |
|
|
using TObject::Error;
|
71 |
bendavid |
1.7 |
|
72 |
|
|
// Fitted Mass
|
73 |
loizides |
1.12 |
Double_t FittedMass() const { return fFittedMass; }
|
74 |
bendavid |
1.7 |
void SetFittedMass(Double_t fittedMass) { fFittedMass = fittedMass;}
|
75 |
|
|
// Fitted Mass Error
|
76 |
loizides |
1.12 |
Double_t FittedMassError() const { return fFittedMassError; }
|
77 |
bendavid |
1.7 |
void SetFittedMassError(Double_t fittedMassError) { fFittedMassError = fittedMassError;}
|
78 |
|
|
// Lxy
|
79 |
loizides |
1.12 |
Double_t Lxy() const { return fLxy; }
|
80 |
bendavid |
1.7 |
void SetLxy(Double_t lxy) { fLxy = lxy;}
|
81 |
|
|
// Lxy Error
|
82 |
loizides |
1.12 |
Double_t LxyError() const { return fLxyError; }
|
83 |
bendavid |
1.7 |
void SetLxyError(Double_t lxyError) { fLxyError = lxyError;}
|
84 |
|
|
// LxyToPv (length to primary vertex)
|
85 |
loizides |
1.12 |
Double_t LxyToPv() const { return fLxyToPv; }
|
86 |
bendavid |
1.7 |
void SetLxyToPv(Double_t lxyToPv) { fLxyToPv = lxyToPv;}
|
87 |
|
|
// LxyToPv Error
|
88 |
loizides |
1.12 |
Double_t LxyToPvError() const { return fLxyToPvError; }
|
89 |
bendavid |
1.7 |
void SetLxyToPvError(Double_t lxyToPvError) { fLxyToPvError = lxyToPvError;}
|
90 |
|
|
// Dxy (two dimensional impact parameter)
|
91 |
loizides |
1.12 |
Double_t Dxy() const { return fDxy; }
|
92 |
bendavid |
1.7 |
void SetDxy(Double_t dxy) { fDxy = dxy;}
|
93 |
|
|
// Dxy Error
|
94 |
loizides |
1.12 |
Double_t DxyError() const { return fDxyError; }
|
95 |
bendavid |
1.7 |
void SetDxyError(Double_t dxyError) { fDxyError = dxyError;}
|
96 |
|
|
// DxyToPv (two dimensional impact parameter with respect to primary vertex)
|
97 |
loizides |
1.12 |
Double_t DxyToPv() const { return fDxyToPv; }
|
98 |
bendavid |
1.7 |
void SetDxyToPv(Double_t dxyToPv) { fDxyToPv = dxyToPv;}
|
99 |
|
|
// DlxyToPv Error
|
100 |
loizides |
1.12 |
Double_t DxyToPvError() const { return fDxyToPvError; }
|
101 |
bendavid |
1.7 |
void SetDxyToPvError(Double_t dxyToPvError) { fDxyToPvError = dxyToPvError;}
|
102 |
|
|
// Lz
|
103 |
loizides |
1.12 |
Double_t Lz() const { return fLz; }
|
104 |
bendavid |
1.7 |
void SetLz(Double_t lz) { fLz = lz;}
|
105 |
|
|
// Lz Error
|
106 |
loizides |
1.12 |
Double_t LzError() const { return fLzError; }
|
107 |
bendavid |
1.7 |
void SetLzError(Double_t lzError) { fLzError = lzError;}
|
108 |
|
|
// LzToPv (length to primary vertex)
|
109 |
loizides |
1.12 |
Double_t LzToPv() const { return fLzToPv; }
|
110 |
bendavid |
1.7 |
void SetLzToPv(Double_t lzToPv) { fLzToPv = lzToPv;}
|
111 |
|
|
// LzToPv Error
|
112 |
loizides |
1.12 |
Double_t LzToPvError() const { return fLzToPvError; }
|
113 |
bendavid |
1.7 |
void SetLzToPvError(Double_t lzToPvError) { fLzToPvError = lzToPvError;}
|
114 |
|
|
// CTau
|
115 |
loizides |
1.12 |
Double_t CTau() const { return fCTau; }
|
116 |
bendavid |
1.7 |
void SetCTau(Double_t cTau) { fCTau = cTau;}
|
117 |
|
|
// CTau Error
|
118 |
loizides |
1.12 |
Double_t CTauError() const { return fCTauError; }
|
119 |
bendavid |
1.7 |
void SetCTauError(Double_t cTauError) { fCTauError = cTauError;}
|
120 |
|
|
// Pt
|
121 |
loizides |
1.12 |
Double_t Pt() const { return fPt; }
|
122 |
bendavid |
1.7 |
void SetPt(Double_t pt) { fPt = pt;}
|
123 |
|
|
// Pt Error
|
124 |
loizides |
1.12 |
Double_t PtError() const { return fPtError; }
|
125 |
bendavid |
1.7 |
void SetPtError(Double_t ptError) { fPtError = ptError;}
|
126 |
|
|
//----------------------------------------------------------------------------------------------
|
127 |
|
|
// Accessors/Setter: Extended Vertex fit info from this level
|
128 |
|
|
//----------------------------------------------------------------------------------------------
|
129 |
|
|
// Position
|
130 |
loizides |
1.12 |
const ThreeVector &Position() const { return fPosition; }
|
131 |
|
|
void SetPosition(const ThreeVector &position) { fPosition = position; }
|
132 |
bendavid |
1.7 |
// Error
|
133 |
loizides |
1.12 |
const ThreeSymMatrix &Error() const { return fError; }
|
134 |
|
|
void SetError(const ThreeSymMatrix &error) { fError = error; }
|
135 |
bendavid |
1.7 |
// Big 7x7 Error Matrix
|
136 |
loizides |
1.12 |
const SevenSymMatrix &BigError() const { return fBigError; }
|
137 |
bendavid |
1.9 |
void SetBigError(const SevenSymMatrix &bigError) { fBigError = bigError; }
|
138 |
bendavid |
1.7 |
|
139 |
bendavid |
1.10 |
//Momentum Accessors/setter
|
140 |
loizides |
1.12 |
FourVector Mom() const { return fMomentum; }
|
141 |
|
|
void SetMom(Double_t px, Double_t py, Double_t pz, Double_t e);
|
142 |
|
|
void SetMom(const FourVector &p) { fMomentum = p; }
|
143 |
bendavid |
1.11 |
|
144 |
loizides |
1.12 |
const FourVector &DaughterMom(UInt_t i) const { return fDaughterData.At(i)->Mom(); }
|
145 |
|
|
const DaughterData &DaughterDat(UInt_t i) const { return *fDaughterData.At(i); }
|
146 |
bendavid |
1.11 |
|
147 |
|
|
void AddDaughter(Particle *p, const DaughterData &ddata = DaughterData());
|
148 |
|
|
|
149 |
loizides |
1.1 |
protected:
|
150 |
bendavid |
1.11 |
void AddDaughterData(const DaughterData &ddata) { fDaughterData.AddCopy(ddata); }
|
151 |
|
|
|
152 |
bendavid |
1.7 |
UInt_t fAbsPdgId;
|
153 |
|
|
DecayType fDecayType; // Decay type (either fast of slow)
|
154 |
|
|
// Fit quality
|
155 |
|
|
Double_t fChi2;
|
156 |
|
|
Int_t fNdof;
|
157 |
|
|
// Base vertex fit info
|
158 |
|
|
Double_t fFittedMass;
|
159 |
|
|
Double_t fFittedMassError;
|
160 |
|
|
Double_t fNormalizedMass;
|
161 |
|
|
Double_t fLxy;
|
162 |
|
|
Double_t fLxyError;
|
163 |
|
|
Double_t fLxyToPv;
|
164 |
|
|
Double_t fLxyToPvError;
|
165 |
|
|
Double_t fDxy;
|
166 |
|
|
Double_t fDxyError;
|
167 |
|
|
Double_t fDxyToPv;
|
168 |
|
|
Double_t fDxyToPvError;
|
169 |
|
|
Double_t fLz;
|
170 |
|
|
Double_t fLzError;
|
171 |
|
|
Double_t fLzToPv;
|
172 |
|
|
Double_t fLzToPvError;
|
173 |
|
|
Double_t fCTau;
|
174 |
|
|
Double_t fCTauError;
|
175 |
|
|
Double_t fPt;
|
176 |
|
|
Double_t fPtError;
|
177 |
|
|
// Extended vertex fit info
|
178 |
|
|
ThreeVector fPosition;
|
179 |
|
|
ThreeSymMatrix fError;
|
180 |
|
|
SevenSymMatrix fBigError;
|
181 |
bendavid |
1.8 |
// momentum
|
182 |
bendavid |
1.10 |
FourVector fMomentum; //momentum fourvector
|
183 |
bendavid |
1.11 |
StackArray<DaughterData,32> fDaughterData; //||momentum of daughters at vertex
|
184 |
loizides |
1.1 |
|
185 |
paus |
1.6 |
ClassDef(DecayParticle, 1) // Decay particle class
|
186 |
loizides |
1.1 |
};
|
187 |
|
|
}
|
188 |
bendavid |
1.7 |
|
189 |
|
|
//--------------------------------------------------------------------------------------------------
|
190 |
|
|
inline TParticlePDG *mithep::DecayParticle::ParticlePdgEntry() const
|
191 |
|
|
{
|
192 |
|
|
// Return entry to pdg database for the PARTICLE.
|
193 |
|
|
|
194 |
|
|
return TDatabasePDG::Instance()->GetParticle(fAbsPdgId);
|
195 |
|
|
}
|
196 |
bendavid |
1.8 |
|
197 |
|
|
//--------------------------------------------------------------------------------------------------
|
198 |
|
|
inline void mithep::DecayParticle::SetMom(Double_t px, Double_t py, Double_t pz, Double_t e)
|
199 |
|
|
{
|
200 |
|
|
// Set four vector.
|
201 |
|
|
|
202 |
bendavid |
1.11 |
fMomentum.SetXYZT(px,py,pz,e);
|
203 |
|
|
}
|
204 |
|
|
|
205 |
|
|
//--------------------------------------------------------------------------------------------------
|
206 |
|
|
inline void mithep::DecayParticle::AddDaughter(Particle *p, const DaughterData &ddata)
|
207 |
|
|
{
|
208 |
|
|
// Add daughter and associated fourvector
|
209 |
|
|
|
210 |
|
|
CompositeParticle::AddDaughter(p);
|
211 |
|
|
AddDaughterData(ddata);
|
212 |
bendavid |
1.8 |
}
|
213 |
loizides |
1.1 |
#endif
|