1 |
– |
// $Id$ |
2 |
– |
|
3 |
– |
#ifndef DATATREE_MUON_H |
4 |
– |
#define DATATREE_MUON_H |
5 |
– |
|
6 |
– |
#include "MitAna/DataTree/interface/Lepton.h" |
7 |
– |
|
1 |
|
//-------------------------------------------------------------------------------------------------- |
2 |
+ |
// $Id$ |
3 |
|
// |
4 |
|
// Muon |
5 |
|
// |
6 |
|
// Details to be worked out... |
7 |
|
// |
8 |
< |
// Authors: C.Loizides, J. Bendavid |
15 |
< |
// |
8 |
> |
// Authors: C.Loizides, J.Bendavid, C.Paus |
9 |
|
//-------------------------------------------------------------------------------------------------- |
10 |
|
|
11 |
+ |
#ifndef DATATREE_MUON_H |
12 |
+ |
#define DATATREE_MUON_H |
13 |
+ |
|
14 |
+ |
#include <TRef.h> |
15 |
+ |
#include "MitAna/DataTree/interface/ChargedParticle.h" |
16 |
+ |
#include "MitAna/DataTree/interface/Track.h" |
17 |
+ |
|
18 |
|
namespace mithep |
19 |
|
{ |
20 |
< |
class Muon : public Lepton |
20 |
> |
class Muon : public ChargedParticle |
21 |
|
{ |
22 |
|
public: |
23 |
|
Muon() {} |
24 |
– |
Muon(Double_t px, Double_t py, Double_t pz, Double_t e) : Lepton(px,py,pz,e) {} |
24 |
|
~Muon() {} |
25 |
|
|
26 |
< |
ClassDef(Muon, 1) // Muon class |
26 |
> |
const Track *BestTrk() const; |
27 |
> |
const Track *GlobalTrk() const; |
28 |
> |
const Track *StandaloneTrk() const; |
29 |
> |
const Track *TrackerTrk() const; |
30 |
> |
const Track *Trk() const { return BestTrk(); } |
31 |
> |
Double_t IsoR03SumPt() const { return fIsoR03SumPt; } |
32 |
> |
Double_t IsoR03EmEt() const { return fIsoR03EmEt; } |
33 |
> |
Double_t IsoR03HadEt() const { return fIsoR03HadEt; } |
34 |
> |
Double_t IsoR03HoEt() const { return fIsoR03HoEt; } |
35 |
> |
Int_t IsoR03NTracks() const { return fIsoR03NTracks; } |
36 |
> |
Int_t IsoR03NJets() const { return fIsoR03NJets; } |
37 |
> |
Double_t IsoR05SumPt() const { return fIsoR05SumPt; } |
38 |
> |
Double_t IsoR05EmEt() const { return fIsoR05EmEt; } |
39 |
> |
Double_t IsoR05HadEt() const { return fIsoR05HadEt; } |
40 |
> |
Double_t IsoR05HoEt() const { return fIsoR05HoEt; } |
41 |
> |
Int_t IsoR05NTracks() const { return fIsoR05NTracks; } |
42 |
> |
Int_t IsoR05NJets() const { return fIsoR05NJets; } |
43 |
> |
Double_t EmEnergy() const { return fEmEnergy; } |
44 |
> |
Double_t HadEnergy() const { return fHadEnergy; } |
45 |
> |
Double_t HoEnergy() const { return fHoEnergy; } |
46 |
> |
Double_t EmS9Energy() const { return fEmS9Energy; } |
47 |
> |
Double_t HadS9Energy() const { return fHadS9Energy; } |
48 |
> |
Double_t HoS9Energy() const { return fHoS9Energy; } |
49 |
> |
Double_t Mass() const { return 105.658369e-3; } |
50 |
> |
|
51 |
> |
void SetGlobalTrk(Track* t) { fGlobalTrackRef = t; } |
52 |
> |
void SetStandaloneTrk(Track* t) { fStandaloneTrackRef = t; } |
53 |
> |
void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; } |
54 |
> |
void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; } |
55 |
> |
void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; } |
56 |
> |
void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; } |
57 |
> |
void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; } |
58 |
> |
void SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; } |
59 |
> |
void SetIsoR03NJets(Int_t isoR03NJets) { fIsoR03NJets = isoR03NJets; } |
60 |
> |
void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; } |
61 |
> |
void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; } |
62 |
> |
void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; } |
63 |
> |
void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; } |
64 |
> |
void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; } |
65 |
> |
void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; } |
66 |
> |
void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; } |
67 |
> |
void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; } |
68 |
> |
void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; } |
69 |
> |
void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; } |
70 |
> |
void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; } |
71 |
> |
void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; } |
72 |
> |
|
73 |
> |
protected: |
74 |
> |
TRef fGlobalTrackRef; //global combined track reference |
75 |
> |
TRef fStandaloneTrackRef; //standalone muon track reference |
76 |
> |
TRef fTrackerTrackRef; //tracker track reference |
77 |
> |
Double_t fIsoR03SumPt; |
78 |
> |
Double_t fIsoR03EmEt; |
79 |
> |
Double_t fIsoR03HadEt; |
80 |
> |
Double_t fIsoR03HoEt; |
81 |
> |
Int_t fIsoR03NTracks; |
82 |
> |
Int_t fIsoR03NJets; |
83 |
> |
Double_t fIsoR05SumPt; |
84 |
> |
Double_t fIsoR05EmEt; |
85 |
> |
Double_t fIsoR05HadEt; |
86 |
> |
Double_t fIsoR05HoEt; |
87 |
> |
Int_t fIsoR05NTracks; |
88 |
> |
Int_t fIsoR05NJets; |
89 |
> |
Double_t fEmEnergy; |
90 |
> |
Double_t fHadEnergy; |
91 |
> |
Double_t fHoEnergy; |
92 |
> |
Double_t fEmS9Energy; |
93 |
> |
Double_t fHadS9Energy; |
94 |
> |
Double_t fHoS9Energy; |
95 |
> |
|
96 |
> |
ClassDef(Muon, 1) // Muon class |
97 |
|
}; |
98 |
|
} |
99 |
+ |
|
100 |
+ |
//-------------------------------------------------------------------------------------------------- |
101 |
+ |
inline const mithep::Track *mithep::Muon::BestTrk() const |
102 |
+ |
{ |
103 |
+ |
// Return "best" track. |
104 |
+ |
|
105 |
+ |
if (GlobalTrk()) |
106 |
+ |
return GlobalTrk(); |
107 |
+ |
else if (StandaloneTrk()) |
108 |
+ |
return StandaloneTrk(); |
109 |
+ |
else if (TrackerTrk()) |
110 |
+ |
return TrackerTrk(); |
111 |
+ |
|
112 |
+ |
return 0; |
113 |
+ |
} |
114 |
+ |
|
115 |
+ |
//-------------------------------------------------------------------------------------------------- |
116 |
+ |
inline const mithep::Track *mithep::Muon::GlobalTrk() const |
117 |
+ |
{ |
118 |
+ |
// Return global combined track. |
119 |
+ |
|
120 |
+ |
return static_cast<const Track*>(fGlobalTrackRef.GetObject()); |
121 |
+ |
} |
122 |
+ |
|
123 |
+ |
//-------------------------------------------------------------------------------------------------- |
124 |
+ |
inline const mithep::Track *mithep::Muon::StandaloneTrk() const |
125 |
+ |
{ |
126 |
+ |
// Return standalone track. |
127 |
+ |
|
128 |
+ |
return static_cast<const Track*>(fStandaloneTrackRef.GetObject()); |
129 |
+ |
} |
130 |
+ |
|
131 |
+ |
//-------------------------------------------------------------------------------------------------- |
132 |
+ |
inline const mithep::Track *mithep::Muon::TrackerTrk() const |
133 |
+ |
{ |
134 |
+ |
// Return tracker track. |
135 |
+ |
|
136 |
+ |
return static_cast<const Track*>(fTrackerTrackRef.GetObject()); |
137 |
+ |
} |
138 |
|
#endif |