1 |
bendavid |
1.1 |
//--------------------------------------------------------------------------------------------------
|
2 |
loizides |
1.4 |
// $Id: StableDaughter.h,v 1.3 2008/07/29 16:17:18 loizides Exp $
|
3 |
bendavid |
1.1 |
//
|
4 |
|
|
// StableDaughter
|
5 |
|
|
//
|
6 |
loizides |
1.3 |
// Stable particle to be used as part of a decay tree. Explicitly stores the three momentum at
|
7 |
|
|
// the decay vertex as well as the link to the mother.
|
8 |
bendavid |
1.1 |
//
|
9 |
|
|
// Authors: C.Loizides, J.Bendavid
|
10 |
|
|
//--------------------------------------------------------------------------------------------------
|
11 |
|
|
|
12 |
|
|
#ifndef DATATREE_STABLEDAUGHTER_H
|
13 |
|
|
#define DATATREE_STABLEDAUGHTER_H
|
14 |
|
|
|
15 |
|
|
#include "MitAna/DataTree/interface/StableParticle.h"
|
16 |
|
|
#include "MitAna/DataTree/interface/Types.h"
|
17 |
|
|
|
18 |
|
|
namespace mithep
|
19 |
|
|
{
|
20 |
|
|
class StableDaughter : public StableParticle
|
21 |
|
|
{
|
22 |
|
|
public:
|
23 |
loizides |
1.3 |
StableDaughter() {}
|
24 |
bendavid |
1.1 |
StableDaughter(UInt_t absPdgId, Track *track) : StableParticle(absPdgId, track) {}
|
25 |
|
|
StableDaughter(UInt_t absPdgId, Track *track, Double_t px, Double_t py, Double_t pz) :
|
26 |
|
|
StableParticle(absPdgId, track),
|
27 |
loizides |
1.4 |
fMomAtVertex(px,py,pz) {}
|
28 |
bendavid |
1.1 |
~StableDaughter() {}
|
29 |
|
|
|
30 |
loizides |
1.4 |
Double_t Eta() const { return fMomAtVertex.Eta(); }
|
31 |
bendavid |
1.1 |
const Particle *Mother() const;
|
32 |
loizides |
1.4 |
Double_t Phi() const { return fMomAtVertex.Phi(); }
|
33 |
|
|
Double_t P() const { return fMomAtVertex.R(); }
|
34 |
|
|
Double_t Pt() const { return fMomAtVertex.Rho(); }
|
35 |
|
|
Double_t Px() const { return fMomAtVertex.X(); }
|
36 |
|
|
Double_t Py() const { return fMomAtVertex.Y(); }
|
37 |
|
|
Double_t Pz() const { return fMomAtVertex.Z(); }
|
38 |
bendavid |
1.1 |
void SetThreeMom(Double_t px, Double_t y, Double_t z);
|
39 |
loizides |
1.4 |
const ThreeVector &ThreeMom() const { return fMomAtVertex; }
|
40 |
bendavid |
1.1 |
|
41 |
|
|
protected:
|
42 |
loizides |
1.3 |
ThreeVector fMomAtVertex; //fitted momentum at vertex
|
43 |
|
|
TRef fMother; //tracker track reference
|
44 |
bendavid |
1.1 |
|
45 |
loizides |
1.3 |
ClassDef(StableDaughter, 1) // Stable daughter class
|
46 |
bendavid |
1.1 |
};
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
//--------------------------------------------------------------------------------------------------
|
50 |
|
|
inline const mithep::Particle *mithep::StableDaughter::Mother() const
|
51 |
|
|
{
|
52 |
|
|
// Return decay mother.
|
53 |
|
|
|
54 |
|
|
return static_cast<const Particle*>(fMother.GetObject());
|
55 |
|
|
}
|
56 |
|
|
|
57 |
|
|
//--------------------------------------------------------------------------------------------------
|
58 |
|
|
inline void mithep::StableDaughter::SetThreeMom(Double_t px, Double_t py, Double_t pz)
|
59 |
|
|
{
|
60 |
|
|
// Set three momentum.
|
61 |
|
|
|
62 |
loizides |
1.3 |
fMomAtVertex.SetXYZ(px, py, pz);
|
63 |
bendavid |
1.1 |
}
|
64 |
|
|
#endif
|