61 |
|
|
62 |
|
#include "MitAna/DataTree/interface/Track.h" |
63 |
|
#include "MitAna/DataTree/interface/ChargedParticle.h" |
64 |
+ |
#include "MitAna/DataTree/interface/MuonQuality.h" |
65 |
|
|
66 |
|
namespace mithep { |
67 |
|
class Muon : public ChargedParticle { |
68 |
|
public: |
69 |
|
Muon(); |
69 |
– |
~Muon() {} |
70 |
|
|
71 |
|
enum EClassType { |
72 |
|
kNone, //no track assigned |
73 |
|
kGlobal, //"Global" |
74 |
< |
kTrackerOnly, //"TrackerOnly" |
74 |
> |
kTracker, //"Tracker" |
75 |
|
kSta, //"Standalone" |
76 |
|
kAny //any "best" of the above |
77 |
|
}; |
78 |
|
|
79 |
|
const Track *BestTrk() const; |
80 |
< |
const Track *GlobalTrk() const { return fGlobalTrackRef.Obj(); } |
81 |
< |
const Track *StandaloneTrk() const { return fStandaloneTrackRef.Obj(); } |
82 |
< |
const Track *TrackerTrk() const { return fTrackerTrackRef.Obj(); } |
80 |
> |
const Track *GlobalTrk() const { return fGlobalTrkRef.Obj(); } |
81 |
> |
const Track *StandaloneTrk() const { return fStaTrkRef.Obj(); } |
82 |
> |
const Track *TrackerTrk() const { return fTrkTrkRef.Obj(); } |
83 |
|
const Track *Trk() const { return BestTrk(); } |
84 |
+ |
Double_t D0PV() const { return fD0PV; } |
85 |
+ |
Double_t D0PVErr() const { return fD0PVErr; } |
86 |
+ |
Double_t D0PVSignificance() const { return fD0PV/fD0PVErr; } |
87 |
+ |
Double_t Ip3dPV() const { return fIp3dPV; } |
88 |
+ |
Double_t Ip3dPVErr() const { return fIp3dPVErr; } |
89 |
+ |
Double_t Ip3dPVSignificance() const { return fIp3dPV/fIp3dPVErr; } |
90 |
+ |
Double_t D0PVBS() const { return fD0PVBS; } |
91 |
+ |
Double_t D0PVBSErr() const { return fD0PVBSErr; } |
92 |
+ |
Double_t D0PVBSSignificance() const { return fD0PVBS/fD0PVBSErr; } |
93 |
+ |
Double_t Ip3dPVBS() const { return fIp3dPVBS; } |
94 |
+ |
Double_t Ip3dPVBSErr() const { return fIp3dPVBSErr; } |
95 |
+ |
Double_t Ip3dPVBSSignificance() const { return fIp3dPVBS/fIp3dPVBSErr; } |
96 |
+ |
Double_t PVCompatibility() const { return fPVCompatibility; } |
97 |
+ |
Double_t PVBSCompatibility() const { return fPVBSCompatibility; } |
98 |
|
Double_t EmEnergy() const { return fEmEnergy; } |
99 |
|
Double_t EmS9Energy() const { return fEmS9Energy; } |
100 |
|
Double_t GetDX(Int_t iStation) const; |
106 |
|
Int_t GetNSegments(Int_t iStation) const; |
107 |
|
Bool_t Has(EClassType type) const; |
108 |
|
Bool_t HasTrk() const; |
109 |
< |
Bool_t HasGlobalTrk() const { return fGlobalTrackRef.IsValid(); } |
110 |
< |
Bool_t HasStandaloneTrk() const |
111 |
< |
{ return fStandaloneTrackRef.IsValid(); } |
98 |
< |
Bool_t HasTrackerTrk() const { return fTrackerTrackRef.IsValid(); } |
109 |
> |
Bool_t HasGlobalTrk() const { return fGlobalTrkRef.IsValid(); } |
110 |
> |
Bool_t HasStandaloneTrk() const { return fStaTrkRef.IsValid(); } |
111 |
> |
Bool_t HasTrackerTrk() const { return fTrkTrkRef.IsValid(); } |
112 |
|
Double_t HadEnergy() const { return fHadEnergy; } |
113 |
|
Double_t HadS9Energy() const { return fHadS9Energy; } |
114 |
|
Double_t HoEnergy() const { return fHoEnergy; } |
115 |
|
Double_t HoS9Energy() const { return fHoS9Energy; } |
116 |
|
EClassType Is() const; |
117 |
+ |
Bool_t IsGlobalMuon() const { return fIsGlobalMuon; } |
118 |
+ |
Bool_t IsTrackerMuon() const { return fIsTrackerMuon; } |
119 |
+ |
Bool_t IsStandaloneMuon() const { return fIsStandaloneMuon; } |
120 |
+ |
Bool_t IsCaloMuon() const { return fIsCaloMuon; } |
121 |
|
Double_t IsoR03SumPt() const { return fIsoR03SumPt; } |
122 |
|
Double_t IsoR03EmEt() const { return fIsoR03EmEt; } |
123 |
|
Double_t IsoR03HadEt() const { return fIsoR03HadEt; } |
124 |
|
Double_t IsoR03HoEt() const { return fIsoR03HoEt; } |
125 |
< |
Int_t IsoR03NTracks() const { return fIsoR03NTracks; } |
126 |
< |
Int_t IsoR03NJets() const { return fIsoR03NJets; } |
125 |
> |
UShort_t IsoR03NTracks() const { return fIsoR03NTracks; } |
126 |
> |
UShort_t IsoR03NJets() const { return fIsoR03NJets; } |
127 |
|
Double_t IsoR05SumPt() const { return fIsoR05SumPt; } |
128 |
|
Double_t IsoR05EmEt() const { return fIsoR05EmEt; } |
129 |
|
Double_t IsoR05HadEt() const { return fIsoR05HadEt; } |
130 |
|
Double_t IsoR05HoEt() const { return fIsoR05HoEt; } |
131 |
< |
Int_t IsoR05NTracks() const { return fIsoR05NTracks; } |
132 |
< |
Int_t IsoR05NJets() const { return fIsoR05NJets; } |
133 |
< |
Double_t Mass() const { return 105.658369e-3; } |
134 |
< |
Int_t NChambers() const { return fNTraversedChambers; } |
135 |
< |
Int_t NSegments() const { return fStationMask.NBitsSet(); } |
131 |
> |
UShort_t IsoR05NTracks() const { return fIsoR05NTracks; } |
132 |
> |
UShort_t IsoR05NJets() const { return fIsoR05NJets; } |
133 |
> |
UInt_t NValidHits() const { return fNValidHits; } |
134 |
> |
UInt_t NChambers() const { return fNTraversedChambers; } |
135 |
> |
UInt_t NSegments() const { return fStationMask.NBitsSet(); } |
136 |
|
Int_t LastHit() const; |
137 |
|
Int_t LastStation(Double_t iMaxD, Double_t iMaxP) const; |
138 |
< |
Int_t LastStation(Int_t iMax=8) const; |
139 |
< |
EObjType ObjType() const { return kMuon; } |
140 |
< |
Bool_t PromptTight(EClassType type) const; |
138 |
> |
Int_t LastStation(Int_t iMax=8) const; |
139 |
> |
Int_t ObjId() const { return ObjType()*1000+Is(); } |
140 |
> |
EObjType ObjType() const { return kMuon; } |
141 |
> |
void Print(Option_t *opt="") const; |
142 |
> |
Bool_t PromptTight(EClassType type) const; |
143 |
> |
const MuonQuality &Quality() const { return fQuality; } |
144 |
> |
MuonQuality &Quality() { return fQuality; } |
145 |
|
Bool_t StationBit(Int_t bit) const { return fStationMask.TestBit(bit); } |
146 |
< |
Bool_t TMLastStation(Double_t iDYMin = 3., Double_t iPYMin = 3., |
147 |
< |
Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 2) const; |
148 |
< |
Bool_t TMOneStation(Double_t iDYMin = 3., Double_t iPYMin = 3., |
149 |
< |
Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 1) const; |
150 |
< |
void SetGlobalTrk(const Track *t) { fGlobalTrackRef = t; } |
151 |
< |
void SetStandaloneTrk(const Track *t) { fStandaloneTrackRef = t; } |
152 |
< |
void SetTrackerTrk(const Track *t) { fTrackerTrackRef = t; } |
146 |
> |
Bool_t TMLastStation(Double_t iDYMin = 3, Double_t iPYMin = 3, |
147 |
> |
Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 2) const; |
148 |
> |
Bool_t TMOneStation(Double_t iDYMin = 3, Double_t iPYMin = 3, |
149 |
> |
Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 1) const; |
150 |
> |
void SetCharge(Char_t x) { fCharge = x; ClearCharge(); } |
151 |
> |
void SetGlobalTrk(const Track *t) |
152 |
> |
{ fGlobalTrkRef = t; ClearMom(); ClearCharge(); } |
153 |
> |
void SetStandaloneTrk(const Track *t) |
154 |
> |
{ fStaTrkRef = t; ClearMom(); ClearCharge(); } |
155 |
> |
void SetTrackerTrk(const Track *t) |
156 |
> |
{ fTrkTrkRef = t; ClearMom(); ClearCharge(); } |
157 |
|
void SetDX(Int_t iStation, Double_t iDX); |
158 |
|
void SetDY(Int_t iStation, Double_t iDY); |
159 |
< |
void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; } |
160 |
< |
void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; } |
161 |
< |
void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; } |
162 |
< |
void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; } |
163 |
< |
void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; } |
164 |
< |
void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; } |
165 |
< |
void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; } |
166 |
< |
void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; } |
167 |
< |
void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; } |
168 |
< |
void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; } |
169 |
< |
void SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; } |
170 |
< |
void SetIsoR03NJets(Int_t isoR03NJets) { fIsoR03NJets = isoR03NJets; } |
171 |
< |
void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; } |
172 |
< |
void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; } |
173 |
< |
void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; } |
174 |
< |
void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; } |
175 |
< |
void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; } |
176 |
< |
void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; } |
177 |
< |
void SetNChambers(Int_t iNTraCh) { fNTraversedChambers = iNTraCh; } |
159 |
> |
void SetD0PV(Double_t x) { fD0PV = x; } |
160 |
> |
void SetD0PVErr(Double_t x) { fD0PVErr = x; } |
161 |
> |
void SetIp3dPV(Double_t x) { fIp3dPV = x; } |
162 |
> |
void SetIp3dPVErr(Double_t x) { fIp3dPVErr = x; } |
163 |
> |
void SetD0PVBS(Double_t x) { fD0PVBS = x; } |
164 |
> |
void SetD0PVBSErr(Double_t x) { fD0PVBSErr = x; } |
165 |
> |
void SetIp3dPVBS(Double_t x) { fIp3dPVBS = x; } |
166 |
> |
void SetIp3dPVBSErr(Double_t x) { fIp3dPVBSErr = x; } |
167 |
> |
void SetPVCompatibility(Double_t x) { fPVCompatibility = x; } |
168 |
> |
void SetPVBSCompatibility(Double_t x) { fPVBSCompatibility = x; } |
169 |
> |
void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; } |
170 |
> |
void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; } |
171 |
> |
void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; } |
172 |
> |
void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; } |
173 |
> |
void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; } |
174 |
> |
void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; } |
175 |
> |
void SetIsGlobalMuon(Bool_t b) { fIsGlobalMuon = b; } |
176 |
> |
void SetIsTrackerMuon(Bool_t b) { fIsTrackerMuon = b; } |
177 |
> |
void SetIsStandaloneMuon(Bool_t b) { fIsStandaloneMuon = b; } |
178 |
> |
void SetIsCaloMuon(Bool_t b) { fIsCaloMuon = b; } |
179 |
> |
void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; } |
180 |
> |
void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; } |
181 |
> |
void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; } |
182 |
> |
void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; } |
183 |
> |
void SetIsoR03NTracks(UShort_t isoR03NTrk) { fIsoR03NTracks = isoR03NTrk; } |
184 |
> |
void SetIsoR03NJets(UShort_t isoR03NJets) { fIsoR03NJets = isoR03NJets; } |
185 |
> |
void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; } |
186 |
> |
void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; } |
187 |
> |
void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; } |
188 |
> |
void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; } |
189 |
> |
void SetIsoR05NTracks(UShort_t isoR05NTrk) { fIsoR05NTracks = isoR05NTrk; } |
190 |
> |
void SetIsoR05NJets(UShort_t isoR05NJets) { fIsoR05NJets = isoR05NJets; } |
191 |
> |
void SetNValidHits(UShort_t iNValidHits) { fNValidHits = iNValidHits; } |
192 |
> |
void SetNChambers(UShort_t iNTraCh) { fNTraversedChambers = iNTraCh; } |
193 |
|
void SetNSegments(Int_t iStation, Int_t NSegments); |
194 |
+ |
void SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi); |
195 |
|
void SetPullX(Int_t iStation, Double_t iPullX); |
196 |
|
void SetPullY(Int_t iStation, Double_t iPullY); |
197 |
< |
void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); } |
197 |
> |
void SetStationMask(UInt_t iStMask) { fStationMask.SetBits(iStMask); } |
198 |
|
void SetTrackDist(Int_t iStation, Double_t iDist); |
199 |
|
void SetTrackDistErr(Int_t iStation, Double_t iDistErr); |
200 |
|
|
201 |
|
protected: |
202 |
< |
Ref<Track> fGlobalTrackRef; //global combined track reference |
203 |
< |
Ref<Track> fStandaloneTrackRef; //standalone muon track reference |
204 |
< |
Ref<Track> fTrackerTrackRef; //tracker track reference |
205 |
< |
Double32_t fIsoR03SumPt; //isolation size R=0.3 sum pt |
206 |
< |
Double32_t fIsoR03EmEt; //isolation size R=0.3 em trans energy |
207 |
< |
Double32_t fIsoR03HadEt; //isolation size R=0.3 had trans energy |
208 |
< |
Double32_t fIsoR03HoEt; //isolation size R=0.3 ho trans energy |
209 |
< |
Int_t fIsoR03NTracks; //isolation size R=0.3 number of tracks |
210 |
< |
Int_t fIsoR03NJets; //isolation size R=0.3 number of jets |
211 |
< |
Double32_t fIsoR05SumPt; //isolation size R=0.5 sum pt |
212 |
< |
Double32_t fIsoR05EmEt; //isolation size R=0.5 em trans energy |
213 |
< |
Double32_t fIsoR05HadEt; //isolation size R=0.5 had trans energy |
214 |
< |
Double32_t fIsoR05HoEt; //isolation size R=0.5 ho trans energy |
215 |
< |
Int_t fIsoR05NTracks; //isolation size R=0.5 number of tracks |
216 |
< |
Int_t fIsoR05NJets; //isolation size R=0.5 number of jets |
217 |
< |
Double32_t fEmEnergy; //energy deposit in ecal |
218 |
< |
Double32_t fHadEnergy; //energy deposit in hcal |
219 |
< |
Double32_t fHoEnergy; //energy deposit in outer hcal |
220 |
< |
Double32_t fEmS9Energy; //energy deposit in 3x3 ecal |
221 |
< |
Double32_t fHadS9Energy; //energy deposit in 3x3 hcal |
222 |
< |
Double32_t fHoS9Energy; //energy deposit in 3x3 outer hcal |
223 |
< |
Int_t fNTraversedChambers; //number of tranversed chambers |
202 |
> |
Double_t GetCharge() const; |
203 |
> |
Double_t GetMass() const { return 105.658369e-3; } |
204 |
> |
void GetMom() const; |
205 |
> |
|
206 |
> |
Vect3C fMom; //stored three-momentum |
207 |
> |
Char_t fCharge; //stored charge - filled with -99 when reading old files |
208 |
> |
Ref<Track> fGlobalTrkRef; //global combined track reference |
209 |
> |
Ref<Track> fStaTrkRef; //standalone muon track reference |
210 |
> |
Ref<Track> fTrkTrkRef; //tracker track reference |
211 |
> |
Double32_t fIsoR03SumPt; //[0,0,14]isolation size R=0.3 sum pt |
212 |
> |
Double32_t fIsoR03EmEt; //[0,0,14]isolation size R=0.3 em trans energy |
213 |
> |
Double32_t fIsoR03HadEt; //[0,0,14]isolation size R=0.3 had trans energy |
214 |
> |
Double32_t fIsoR03HoEt; //[0,0,14]isolation size R=0.3 ho trans energy |
215 |
> |
UShort_t fIsoR03NTracks; //isolation size R=0.3 number of tracks |
216 |
> |
UShort_t fIsoR03NJets; //isolation size R=0.3 number of jets |
217 |
> |
Double32_t fIsoR05SumPt; //[0,0,14]isolation size R=0.5 sum pt |
218 |
> |
Double32_t fIsoR05EmEt; //[0,0,14]isolation size R=0.5 em trans energy |
219 |
> |
Double32_t fIsoR05HadEt; //[0,0,14]isolation size R=0.5 had trans energy |
220 |
> |
Double32_t fIsoR05HoEt; //[0,0,14]isolation size R=0.5 ho trans energy |
221 |
> |
UShort_t fIsoR05NTracks; //isolation size R=0.5 number of tracks |
222 |
> |
UShort_t fIsoR05NJets; //isolation size R=0.5 number of jets |
223 |
> |
Double32_t fEmEnergy; //[0,0,14]energy deposit in ecal |
224 |
> |
Double32_t fHadEnergy; //[0,0,14]energy deposit in hcal |
225 |
> |
Double32_t fHoEnergy; //[0,0,14]energy deposit in outer hcal |
226 |
> |
Double32_t fEmS9Energy; //[0,0,14]energy deposit in 3x3 ecal |
227 |
> |
Double32_t fHadS9Energy; //[0,0,14]energy deposit in 3x3 hcal |
228 |
> |
Double32_t fHoS9Energy; //[0,0,14]energy deposit in 3x3 outer hcal |
229 |
> |
Double32_t fD0PV; //[0,0,14]transverse impact parameter to signal PV |
230 |
> |
Double32_t fD0PVErr; //[0,0,14]transverse impact parameter uncertainty to signal PV |
231 |
> |
Double32_t fIp3dPV; //[0,0,14]3d impact parameter to signal PV |
232 |
> |
Double32_t fIp3dPVErr; //[0,0,14]3d impact parameter uncertainty to signal PV |
233 |
> |
Double32_t fD0PVBS; //[0,0,14]transverse impact parameter to signal PV w/ bs constraint |
234 |
> |
Double32_t fD0PVBSErr; //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint |
235 |
> |
Double32_t fIp3dPVBS; //[0,0,14]3d impact parameter to signal PV w/ bs constraint |
236 |
> |
Double32_t fIp3dPVBSErr; //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint |
237 |
> |
Double32_t fPVCompatibility; //[0,0,14]chi^2 compatibility with signal PV (ndof=2) |
238 |
> |
Double32_t fPVBSCompatibility; //[0,0,14]chi^2 compatibility with signal PV w/ bs constraint (ndof=2) |
239 |
> |
UShort_t fNValidHits; //number of Valid hits in global fit |
240 |
> |
UShort_t fNTraversedChambers; //number of traversed chambers |
241 |
> |
MuonQuality fQuality; //muon quality |
242 |
|
BitMask8 fStationMask; //bitmap of station with tracks, 0-3 DT, 4-7 CSCs |
243 |
< |
Double32_t fDX[8]; //uncertainty in x in given muon chamber |
244 |
< |
Double32_t fDY[8]; //uncertainty in y in given muon chamber |
245 |
< |
Double32_t fPullX[8]; //pull in x in given muon chamber |
246 |
< |
Double32_t fPullY[8]; //pull in y in given muon chamber |
247 |
< |
Double32_t fTrackDist[8]; //dist. to track in trans. plane in given muon chamber |
248 |
< |
Double32_t fTrackDistErr[8]; //error of dist. to track in trans. plane in chamber |
243 |
> |
Double32_t fDX[8]; //[0,0,14]uncertainty in x in given muon chamber |
244 |
> |
Double32_t fDY[8]; //[0,0,14]uncertainty in y in given muon chamber |
245 |
> |
Double32_t fPullX[8]; //[0,0,14]pull in x in given muon chamber |
246 |
> |
Double32_t fPullY[8]; //[0,0,14]pull in y in given muon chamber |
247 |
> |
Double32_t fTrackDist[8]; //[0,0,14]dist. to track in trans. plane in muon chamber |
248 |
> |
Double32_t fTrackDistErr[8]; //[0,0,14]error of dist. to track in trans. plane |
249 |
|
Int_t fNSegments[8]; //number of segments in given muon chamber |
250 |
+ |
Bool_t fIsGlobalMuon; //GlobalMuon algo flag |
251 |
+ |
Bool_t fIsTrackerMuon; //TrackerMuon algo flag |
252 |
+ |
Bool_t fIsStandaloneMuon; //StandaloneMuon algo flag |
253 |
+ |
Bool_t fIsCaloMuon; //CaloMuon algo flag |
254 |
|
|
255 |
< |
ClassDef(Muon, 1) // Muon class |
255 |
> |
ClassDef(Muon, 6) // Muon class |
256 |
|
}; |
257 |
|
} |
258 |
|
|
261 |
|
{ |
262 |
|
// Return "best" track. |
263 |
|
|
264 |
< |
if (HasGlobalTrk()) |
202 |
< |
return GlobalTrk(); |
203 |
< |
else if (HasTrackerTrk()) |
264 |
> |
if (HasTrackerTrk()) |
265 |
|
return TrackerTrk(); |
266 |
+ |
else if (HasGlobalTrk()) |
267 |
+ |
return GlobalTrk(); |
268 |
|
else if (HasStandaloneTrk()) |
269 |
|
return StandaloneTrk(); |
270 |
|
|
273 |
|
} |
274 |
|
|
275 |
|
//-------------------------------------------------------------------------------------------------- |
276 |
+ |
inline Double_t mithep::Muon::GetCharge() const |
277 |
+ |
{ |
278 |
+ |
// Return stored charge, unless it is set to invalid (-99), |
279 |
+ |
// in that case get charge from track as before |
280 |
+ |
|
281 |
+ |
if (fCharge==-99) |
282 |
+ |
return mithep::ChargedParticle::GetCharge(); |
283 |
+ |
else |
284 |
+ |
return fCharge; |
285 |
+ |
|
286 |
+ |
} |
287 |
+ |
|
288 |
+ |
//-------------------------------------------------------------------------------------------------- |
289 |
+ |
inline void mithep::Muon::GetMom() const |
290 |
+ |
{ |
291 |
+ |
// Get momentum of the muon. We use an explicitly stored three vector, with the pdg mass, |
292 |
+ |
// since the momentum vector may be computed non-trivially in cmssw (since the tracker |
293 |
+ |
// information has better resolution apparently in some cases than the global fit.) |
294 |
+ |
// If momentum is unfilled, fall back to old method of getting momentum from best track |
295 |
+ |
// (for backwards compatibility.) |
296 |
+ |
|
297 |
+ |
if (fMom.Rho()>0.0) { |
298 |
+ |
fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass()); |
299 |
+ |
} |
300 |
+ |
else { |
301 |
+ |
mithep::ChargedParticle::GetMom(); |
302 |
+ |
} |
303 |
+ |
|
304 |
+ |
} |
305 |
+ |
|
306 |
+ |
//-------------------------------------------------------------------------------------------------- |
307 |
|
inline Double_t mithep::Muon::GetDX(Int_t iStation) const |
308 |
|
{ |
309 |
|
// Return uncertainty in x in given chamber. |
380 |
|
if (HasGlobalTrk()) |
381 |
|
return kTRUE; |
382 |
|
break; |
383 |
< |
case kTrackerOnly: |
383 |
> |
case kTracker: |
384 |
|
if (HasTrackerTrk()) |
385 |
|
return kTRUE; |
386 |
|
break; |
415 |
|
if (HasGlobalTrk()) |
416 |
|
return kGlobal; |
417 |
|
else if (HasTrackerTrk()) |
418 |
< |
return kTrackerOnly; |
418 |
> |
return kTracker; |
419 |
|
else if (HasStandaloneTrk()) |
420 |
|
return kSta; |
421 |
|
|
479 |
|
case kGlobal: |
480 |
|
lTrack = GlobalTrk(); |
481 |
|
break; |
482 |
< |
case kTrackerOnly: |
482 |
> |
case kTracker: |
483 |
|
lTrack = TrackerTrk(); |
484 |
|
break; |
485 |
|
case kSta: |
504 |
|
|
505 |
|
//-------------------------------------------------------------------------------------------------- |
506 |
|
inline Bool_t mithep::Muon::TMOneStation(Double_t iDYMin, Double_t iPYMin, |
507 |
< |
Double_t iDXMin, Double_t iPXMin, Int_t iN) const |
507 |
> |
Double_t iDXMin, Double_t iPXMin, UInt_t iN) const |
508 |
|
{ |
509 |
|
// Check if the muon is matched to at least one station (chamber). |
510 |
|
|
531 |
|
|
532 |
|
//-------------------------------------------------------------------------------------------------- |
533 |
|
inline Bool_t mithep::Muon::TMLastStation(Double_t iDYMin, Double_t iPYMin, |
534 |
< |
Double_t iDXMin, Double_t iPXMin, Int_t iN) const |
534 |
> |
Double_t iDXMin, Double_t iPXMin, UInt_t iN) const |
535 |
|
{ |
536 |
|
// Check if the muon is matched to its last station (chamber). |
537 |
|
|
622 |
|
assert(iStation >= 0 && iStation < 8); |
623 |
|
fNSegments[iStation] = NSegments; |
624 |
|
} |
625 |
+ |
|
626 |
+ |
//------------------------------------------------------------------------------------------------- |
627 |
+ |
inline void mithep::Muon::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi) |
628 |
+ |
{ |
629 |
+ |
// Set three-vector |
630 |
+ |
|
631 |
+ |
fMom.Set(pt,eta,phi); |
632 |
+ |
ClearMom(); |
633 |
+ |
} |
634 |
|
#endif |
635 |
|
|
636 |
|
|