ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.15
Committed: Wed Sep 10 17:10:55 2008 UTC (16 years, 7 months ago) by pharris
Content type: text/plain
Branch: MAIN
Changes since 1.14: +88 -28 lines
Log Message:
Added Field for Muon Quality

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Muon.h,v 1.13 2008/08/08 11:17:13 sixie Exp $
3 //
4 // Muon
5 //
6 // Details to be worked out...
7 //
8 // Authors: C.Loizides(AKA TREE NAZI), 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 #include "MitAna/DataTree/interface/BitMask32.h"
19
20 namespace mithep {
21 class Muon : public ChargedParticle {
22 public:
23 Muon() {}
24 ~Muon() {}
25
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 //PCH
51 Int_t NChambers() const { return fNTraversedChambers;}
52
53 BitMask32 Stations() const { return fStationMask; }
54 UInt_t StationMask() const { return fStationMask.Bits(); }
55 Int_t NSegments() const { return fStationMask.NBitsSet();}
56
57 Float_t GetDX(int iStation) const {
58 if(iStation >= 0 && iStation < 8) return fDX[iStation];
59 return 99999;
60 }
61 Float_t GetDY(int iStation) const {
62 if(iStation >= 0 && iStation < 8) return fDY[iStation];
63 return 99999;
64 }
65 Float_t GetPullX(int iStation) const {
66 if(iStation >= 0 && iStation < 8) return fPullX[iStation];
67 return 99999;
68 }
69 Float_t GetPullY(int iStation) const {
70 if(iStation >= 0 && iStation < 8) return fPullY[iStation];
71 return 99999;
72 }
73 Float_t GetTrackDist(int iStation) const {
74 if(iStation >= 0 && iStation < 8) return fTrackDist[iStation];
75 return 99999;
76 }
77 Float_t GetTrackDistErr(int iStation) const {
78 if(iStation >= 0 && iStation < 8) return fTrackDistErr[iStation];
79 return 99999;
80 }
81 Int_t GetNSegments(int iStation) const {
82 if(iStation >= 0 && iStation < 8) return fNSegments[iStation];
83 return 99999;
84 }
85 void SetGlobalTrk(Track* t) { fGlobalTrackRef = t; }
86 void SetStandaloneTrk(Track* t) { fStandaloneTrackRef = t; }
87 void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
88 void SetIsoR03SumPt(Double_t isoR03SumPt) { fIsoR03SumPt = isoR03SumPt; }
89 void SetIsoR03EmEt(Double_t isoR03EmEt) { fIsoR03EmEt = isoR03EmEt; }
90 void SetIsoR03HadEt(Double_t isoR03HadEt) { fIsoR03HadEt = isoR03HadEt; }
91 void SetIsoR03HoEt(Double_t isoR03HoEt) { fIsoR03HoEt = isoR03HoEt; }
92 void SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; }
93 void SetIsoR03NJets(Int_t isoR03NJets) { fIsoR03NJets = isoR03NJets; }
94 void SetIsoR05SumPt(Double_t isoR05SumPt) { fIsoR05SumPt = isoR05SumPt; }
95 void SetIsoR05EmEt(Double_t isoR05EmEt) { fIsoR05EmEt = isoR05EmEt; }
96 void SetIsoR05HadEt(Double_t isoR05HadEt) { fIsoR05HadEt = isoR05HadEt; }
97 void SetIsoR05HoEt(Double_t isoR05HoEt) { fIsoR05HoEt = isoR05HoEt; }
98 void SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; }
99 void SetIsoR05NJets(Int_t isoR05NJets) { fIsoR05NJets = isoR05NJets; }
100 void SetEmEnergy(Double_t EmEnergy) { fEmEnergy = EmEnergy; }
101 void SetHadEnergy(Double_t HadEnergy) { fHadEnergy = HadEnergy; }
102 void SetHoEnergy(Double_t HoEnergy) { fHoEnergy = HoEnergy; }
103 void SetEmS9Energy(Double_t EmS9Energy) { fEmS9Energy = EmS9Energy; }
104 void SetHadS9Energy(Double_t HadS9Energy) { fHadS9Energy = HadS9Energy; }
105 void SetHoS9Energy(Double_t HoS9Energy) { fHoS9Energy = HoS9Energy; }
106
107 //PCH
108 void SetNChambers(Int_t iNTraversedChambers) {fNTraversedChambers = iNTraversedChambers;}
109 void SetStationMask(UInt_t iStationMask) {fStationMask.SetBits(iStationMask);}
110 void SetDX(int iStation,Float_t iDX) {if(iStation >= 0 && iStation < 8) fDX[iStation] = iDX;}
111 void SetDY(int iStation,Float_t iDY) {if(iStation >= 0 && iStation < 8) fDY[iStation] = iDY;}
112 void SetPullX(int iStation,Float_t iPullX) {if(iStation >= 0 && iStation < 8) fPullX[iStation] = iPullX;}
113 void SetPullY(int iStation,Float_t iPullY) {if(iStation >= 0 && iStation < 8) fPullY[iStation] = iPullY;}
114 void SetTrackDist(int iStation,Float_t iDist) {if(iStation >= 0 && iStation < 8) fTrackDist[iStation] = iDist;}
115 void SetTrackDistErr(int iStation,Float_t iDistErr) {if(iStation >= 0 && iStation < 8) fTrackDistErr[iStation] = iDistErr;}
116 void SetNSegments (int iStation,int iNSegements) {if(iStation >= 0 && iStation < 8) fNSegments [iStation] = iNSegements;}
117
118 protected:
119 TRef fGlobalTrackRef; //global combined track reference
120 TRef fStandaloneTrackRef; //standalone muon track reference
121 TRef fTrackerTrackRef; //tracker track reference
122 Double_t fIsoR03SumPt;
123 Double_t fIsoR03EmEt;
124 Double_t fIsoR03HadEt;
125 Double_t fIsoR03HoEt;
126 Int_t fIsoR03NTracks;
127 Int_t fIsoR03NJets;
128 Double_t fIsoR05SumPt;
129 Double_t fIsoR05EmEt;
130 Double_t fIsoR05HadEt;
131 Double_t fIsoR05HoEt;
132 Int_t fIsoR05NTracks;
133 Int_t fIsoR05NJets;
134 Double_t fEmEnergy;
135 Double_t fHadEnergy;
136 Double_t fHoEnergy;
137 Double_t fEmS9Energy;
138 Double_t fHadS9Energy;
139 Double_t fHoS9Energy;
140 //-------------> Added By PCH
141 //-------------> 0-3 DT 4-7 CSCs Segment Components
142 Int_t fNTraversedChambers;
143 BitMask32 fStationMask;
144
145 Float_t fDX[8];
146 Float_t fDY[8];
147 Float_t fPullX[8];
148 Float_t fPullY[8];
149 Float_t fTrackDist[8];
150 Float_t fTrackDistErr[8];
151 Int_t fNSegments[8];
152 ClassDef(Muon, 1) // Muon class
153 };
154 }
155
156 //--------------------------------------------------------------------------------------------------
157 inline const mithep::Track *mithep::Muon::BestTrk() const
158 {
159 // Return "best" track.
160
161 if (GlobalTrk())
162 return GlobalTrk();
163 else if (StandaloneTrk())
164 return StandaloneTrk();
165 else if (TrackerTrk())
166 return TrackerTrk();
167
168 return 0;
169 }
170
171 //--------------------------------------------------------------------------------------------------
172 inline const mithep::Track *mithep::Muon::GlobalTrk() const
173 {
174 // Return global combined track.
175
176 return static_cast<const Track*>(fGlobalTrackRef.GetObject());
177 }
178
179 //--------------------------------------------------------------------------------------------------
180 inline const mithep::Track *mithep::Muon::StandaloneTrk() const
181 {
182 // Return standalone track.
183
184 return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
185 }
186
187 //--------------------------------------------------------------------------------------------------
188 inline const mithep::Track *mithep::Muon::TrackerTrk() const
189 {
190 // Return tracker track.
191
192 return static_cast<const Track*>(fTrackerTrackRef.GetObject());
193 }
194 #endif
195
196
197
198