ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Muon.h (file contents):
Revision 1.13 by sixie, Fri Aug 8 11:17:13 2008 UTC vs.
Revision 1.17 by bendavid, Mon Nov 17 18:55:42 2008 UTC

# Line 5 | Line 5
5   //
6   // Details to be worked out...
7   //
8 < // Authors: C.Loizides, J.Bendavid, C.Paus
8 > // Authors: J.Bendavid, C.Loizides, C.Paus, P.Harris
9   //--------------------------------------------------------------------------------------------------
10  
11 < #ifndef DATATREE_MUON_H
12 < #define DATATREE_MUON_H
11 > #ifndef MITANA_DATATREE_MUON_H
12 > #define MITANA_DATATREE_MUON_H
13  
14   #include <TRef.h>
15 #include "MitAna/DataTree/interface/ChargedParticle.h"
15   #include "MitAna/DataTree/interface/Track.h"
16 + #include "MitAna/DataTree/interface/ChargedParticle.h"
17  
18 < namespace mithep
19 < {
20 <  class Muon : public ChargedParticle
21 <  {
18 > namespace mithep {
19 >  class Muon : public ChargedParticle {
20      public:
21        Muon() {}
22        ~Muon() {}
23        
24 <      const Track   *BestTrk()            const;
25 <      const Track   *GlobalTrk()          const;
26 <      const Track   *StandaloneTrk()      const;
27 <      const Track   *TrackerTrk()         const;
28 <      const Track   *Trk()                const  { return BestTrk();          }
24 >      const Track   *BestTrk()             const;
25 >      const Track   *GlobalTrk()           const;
26 >      const Track   *StandaloneTrk()       const;
27 >      const Track   *TrackerTrk()          const;
28 >      const Track   *Trk()                 const { return BestTrk();          }
29        Double_t       IsoR03SumPt()         const { return fIsoR03SumPt;       }
30        Double_t       IsoR03EmEt()          const { return fIsoR03EmEt;        }
31        Double_t       IsoR03HadEt()         const { return fIsoR03HadEt;       }
# Line 46 | Line 44 | namespace mithep
44        Double_t       EmS9Energy()          const { return fEmS9Energy;        }
45        Double_t       HadS9Energy()         const { return fHadS9Energy;       }
46        Double_t       HoS9Energy()          const { return fHoS9Energy;        }
47 <      Double_t       Mass()                const { return 105.658369e-3;      }  
48 <      
47 >      Double_t       Mass()                const { return 105.658369e-3;             }  
48 >      Int_t          NChambers()           const { return fNTraversedChambers;       }
49 >      Int_t          NSegments()           const { return fStationMask.NBitsSet();   }
50 >      Bool_t         StationBit(Int_t bit) const { return fStationMask.TestBit(bit); }
51 >      Double_t       GetDX(Int_t iStation)             const;
52 >      Double_t       GetDY(Int_t iStation)             const;
53 >      Double_t       GetPullX(Int_t iStation)          const;
54 >      Double_t       GetPullY(Int_t iStation)          const;
55 >      Double_t       GetTrackDist(Int_t iStation)      const;
56 >      Double_t       GetTrackDistErr(Int_t iStation)   const;
57 >      Int_t          GetNSegments(Int_t iStation) const;
58        void           SetGlobalTrk(Track* t)                { fGlobalTrackRef = t;            }
59        void           SetStandaloneTrk(Track* t)            { fStandaloneTrackRef = t;        }
60        void           SetTrackerTrk(Track* t)               { fTrackerTrackRef = t;           }
# Line 69 | Line 76 | namespace mithep
76        void           SetEmS9Energy(Double_t EmS9Energy)    { fEmS9Energy = EmS9Energy;       }
77        void           SetHadS9Energy(Double_t HadS9Energy)  { fHadS9Energy = HadS9Energy;     }
78        void           SetHoS9Energy(Double_t HoS9Energy)    { fHoS9Energy = HoS9Energy;       }
79 +      void           SetNChambers(Int_t iNTraCh)           { fNTraversedChambers = iNTraCh;  }
80 +      void           SetStationMask(UInt_t iStMask)        { fStationMask.SetBits(iStMask);  }
81 +      void           SetDX(Int_t iStation, Double_t iDX);
82 +      void           SetDY(Int_t iStation, Double_t iDY);
83 +      void           SetPullX(Int_t iStation, Double_t iPullX);
84 +      void           SetPullY(Int_t iStation, Double_t iPullY);
85 +      void           SetTrackDist(Int_t iStation, Double_t iDist);
86 +      void           SetTrackDistErr(Int_t iStation, Double_t iDistErr);
87 +      void           SetNSegments(Int_t iStation, Int_t NSegments);
88  
89      protected:
90        TRef           fGlobalTrackRef;      //global combined track reference
91        TRef           fStandaloneTrackRef;  //standalone muon track reference
92        TRef           fTrackerTrackRef;     //tracker track reference
93 <      Double_t       fIsoR03SumPt;
94 <      Double_t       fIsoR03EmEt;
95 <      Double_t       fIsoR03HadEt;
96 <      Double_t       fIsoR03HoEt;
97 <      Int_t          fIsoR03NTracks;
98 <      Int_t          fIsoR03NJets;
99 <      Double_t       fIsoR05SumPt;
100 <      Double_t       fIsoR05EmEt;
101 <      Double_t       fIsoR05HadEt;
102 <      Double_t       fIsoR05HoEt;
103 <      Int_t          fIsoR05NTracks;
104 <      Int_t          fIsoR05NJets;      
105 <      Double_t       fEmEnergy;
106 <      Double_t       fHadEnergy;
107 <      Double_t       fHoEnergy;
108 <      Double_t       fEmS9Energy;
109 <      Double_t       fHadS9Energy;
110 <      Double_t       fHoS9Energy;
93 >      Double32_t     fIsoR03SumPt;         //isolation size R=0.3 sum pt
94 >      Double32_t     fIsoR03EmEt;          //isolation size R=0.3 em  trans energy
95 >      Double32_t     fIsoR03HadEt;         //isolation size R=0.3 had trans energy
96 >      Double32_t     fIsoR03HoEt;          //isolation size R=0.3 ho  trans energy
97 >      Int_t          fIsoR03NTracks;       //isolation size R=0.3 number of tracks
98 >      Int_t          fIsoR03NJets;         //isolation size R=0.3 number of jets
99 >      Double32_t     fIsoR05SumPt;         //isolation size R=0.5 sum pt
100 >      Double32_t     fIsoR05EmEt;          //isolation size R=0.5 em  trans energy
101 >      Double32_t     fIsoR05HadEt;         //isolation size R=0.5 had trans energy
102 >      Double32_t     fIsoR05HoEt;          //isolation size R=0.5 ho  trans energy
103 >      Int_t          fIsoR05NTracks;       //isolation size R=0.5 number of tracks
104 >      Int_t          fIsoR05NJets;         //isolation size R=0.5 number of jets      
105 >      Double32_t     fEmEnergy;            //?
106 >      Double32_t     fHadEnergy;           //?
107 >      Double32_t     fHoEnergy;            //?
108 >      Double32_t     fEmS9Energy;          //?
109 >      Double32_t     fHadS9Energy;         //?
110 >      Double32_t     fHoS9Energy;          //?
111 >      Int_t          fNTraversedChambers;  //number of tranversed chambers
112 >      BitMask8       fStationMask;         //bitmap of station with tracks, 0-3 DT, 4-7 CSCs segment components
113 >      Double32_t     fDX[8];               //uncertainty in x in given muon chamber
114 >      Double32_t     fDY[8];               //uncertainty in y in given muon chamber
115 >      Double32_t     fPullX[8];            //pull in x in given muon chamber
116 >      Double32_t     fPullY[8];            //pull in y in given muon chamber
117 >      Double32_t     fTrackDist[8];        //distance to track in tranverse plane in given muon chamber
118 >      Double32_t     fTrackDistErr[8];     //error of distance to track in transverse plane in given muon chamber
119 >      Int_t          fNSegments[8];        //number of segments in chamber in given muon chamber
120  
121      ClassDef(Muon, 1) // Muon class
122    };
# Line 104 | Line 129 | inline const mithep::Track *mithep::Muon
129  
130    if (GlobalTrk())
131      return GlobalTrk();
107  else if (StandaloneTrk())
108    return StandaloneTrk();
132    else if (TrackerTrk())
133      return TrackerTrk();
134 +  else if (StandaloneTrk())
135 +    return StandaloneTrk();
136  
137    return 0;
138   }
# Line 135 | Line 160 | inline const mithep::Track *mithep::Muon
160  
161    return static_cast<const Track*>(fTrackerTrackRef.GetObject());
162   }
163 +
164 + //--------------------------------------------------------------------------------------------------
165 + inline Double_t mithep::Muon::GetDX(Int_t iStation) const
166 + {
167 +  // Return uncertainty in x in given chamber.
168 +
169 +  assert(iStation >= 0 && iStation < 8);
170 +  return fDX[iStation];
171 + }
172 +
173 + //--------------------------------------------------------------------------------------------------
174 + inline Double_t mithep::Muon::GetDY(Int_t iStation) const
175 + {
176 +  // Return uncertainty in y in given chamber.
177 +
178 +  assert(iStation >= 0 && iStation < 8);
179 +  return fDY[iStation];
180 + }
181 +
182 + //--------------------------------------------------------------------------------------------------
183 + inline Double_t mithep::Muon::GetPullX(Int_t iStation) const
184 + {
185 +  // Return pull in x in given chamber.
186 +
187 +  assert(iStation >= 0 && iStation < 8);
188 +  return fPullX[iStation];
189 + }
190 +
191 + //--------------------------------------------------------------------------------------------------
192 + inline Double_t mithep::Muon::GetPullY(Int_t iStation) const
193 + {
194 +  // Return pull in y in given chamber.
195 +  
196 +  assert(iStation >= 0 && iStation < 8);
197 +  return fPullY[iStation];
198 + }
199 +
200 + //--------------------------------------------------------------------------------------------------
201 + inline Double_t mithep::Muon::GetTrackDist(Int_t iStation) const
202 + {
203 +  // Return track distance in given chamber.
204 +
205 +  assert(iStation >= 0 && iStation < 8);
206 +  return fTrackDist[iStation];
207 + }
208 +
209 + //--------------------------------------------------------------------------------------------------
210 + inline Double_t mithep::Muon::GetTrackDistErr(Int_t iStation) const
211 + {
212 +  // Return error of track distance in given chamber.
213 +
214 +  assert(iStation >= 0 && iStation < 8);
215 +  return fTrackDistErr[iStation];
216 + }
217 +
218 + //--------------------------------------------------------------------------------------------------
219 + inline Int_t mithep::Muon::GetNSegments(Int_t iStation) const
220 + {
221 +  // Return number of segments in chamber.
222 +
223 +  assert(iStation >= 0 && iStation < 8);
224 +  return fNSegments[iStation];
225 + }
226 +
227 + //--------------------------------------------------------------------------------------------------
228 + inline void mithep::Muon::SetDX(Int_t iStation, Double_t iDX)
229 + {
230 +  // Return uncertainty in x in given chamber.
231 +
232 +  assert(iStation >= 0 && iStation < 8);
233 +  fDX[iStation] = iDX;
234 + }
235 +
236 + //--------------------------------------------------------------------------------------------------
237 + inline void mithep::Muon::SetDY(Int_t iStation, Double_t iDY)
238 + {
239 +  // Return uncertainty in y in given chamber.
240 +
241 +  assert(iStation >= 0 && iStation < 8);
242 +  fDY[iStation] = iDY;
243 + }
244 +
245 + //--------------------------------------------------------------------------------------------------
246 + inline void mithep::Muon::SetPullX(Int_t iStation, Double_t iPullX)
247 + {
248 +  // Set pull in x in given chamber.
249 +
250 +  assert(iStation >= 0 && iStation < 8);
251 +  fPullX[iStation] = iPullX;
252 + }
253 +
254 + //--------------------------------------------------------------------------------------------------
255 + inline void mithep::Muon::SetPullY(Int_t iStation, Double_t iPullY)
256 + {
257 +  // Set pull in y in given chamber.
258 +
259 +  assert(iStation >= 0 && iStation < 8);
260 +  fPullY[iStation] = iPullY;
261 + }
262 +
263 + //--------------------------------------------------------------------------------------------------
264 + inline void mithep::Muon::SetTrackDist(Int_t iStation, Double_t iDist)
265 + {
266 +  // Set track distance in given chamber.
267 +
268 +  assert(iStation >= 0 && iStation < 8);
269 +  fTrackDist[iStation] = iDist;
270 + }
271 +
272 + //--------------------------------------------------------------------------------------------------
273 + inline void mithep::Muon::SetTrackDistErr(Int_t iStation, Double_t iDistErr)
274 + {
275 +  // Set error of track distance in given chamber.
276 +
277 +  assert(iStation >= 0 && iStation < 8);
278 +  fTrackDistErr[iStation] = iDistErr;
279 + }
280 +
281 + //--------------------------------------------------------------------------------------------------
282 + inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t NSegments)
283 + {
284 +  // Set number of segments in chamber.
285 +
286 +  assert(iStation >= 0 && iStation < 8);
287 +  fNSegments[iStation] = NSegments;
288 + }
289   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines