ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.10
Committed: Mon Jul 14 20:55:19 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.9: +26 -26 lines
Log Message:
Tried to unify Getters and Setters. Getter are without Get. Setters are with Set. This change implies modifications for analysis code

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.10 // $Id: Muon.h,v 1.9 2008/07/01 08:54:57 loizides Exp $
3 loizides 1.1 //
4     // Muon
5     //
6     // Details to be worked out...
7     //
8 paus 1.5 // Authors: C.Loizides, J.Bendavid, C.Paus
9 loizides 1.1 //--------------------------------------------------------------------------------------------------
10 loizides 1.6
11 paus 1.5 #ifndef DATATREE_MUON_H
12     #define DATATREE_MUON_H
13 loizides 1.8
14     #include <TRef.h>
15 paus 1.5 #include "MitAna/DataTree/interface/Lepton.h"
16 loizides 1.8 #include "MitAna/DataTree/interface/Track.h"
17 loizides 1.1
18     namespace mithep
19     {
20     class Muon : public Lepton
21     {
22     public:
23     Muon() {}
24     ~Muon() {}
25 bendavid 1.2
26 loizides 1.10 const Track *BestTrk() const;
27     const Track *GlobalTrk() const;
28     const Track *StandaloneTrk() const;
29     const Track *TrackerTrk() const;
30 loizides 1.9 Double_t Mass() const { return 105.658369e-3; }
31    
32 loizides 1.10 void SetGlobalTrk(Track* t) { fGlobalTrackRef = t; }
33     void SetStandaloneTrk(Track* t) { fStandaloneTrackRef = t; }
34     void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
35 loizides 1.8
36     protected:
37 loizides 1.9 TRef fGlobalTrackRef; //global combined track reference
38     TRef fStandaloneTrackRef; //standalone muon track reference
39     TRef fTrackerTrackRef; //tracker track reference
40 loizides 1.8
41 loizides 1.7 ClassDef(Muon, 1) // Muon class
42 loizides 1.1 };
43 loizides 1.4 }
44 loizides 1.8
45 loizides 1.9 //--------------------------------------------------------------------------------------------------
46 loizides 1.10 inline const mithep::Track *mithep::Muon::BestTrk() const
47     {
48     // Return "best" track.
49    
50     if (GlobalTrk())
51     return GlobalTrk();
52     else if (StandaloneTrk())
53     return StandaloneTrk();
54     else if (TrackerTrk())
55     return TrackerTrk();
56    
57     return 0;
58     }
59    
60     //--------------------------------------------------------------------------------------------------
61     inline const mithep::Track *mithep::Muon::GlobalTrk() const
62 loizides 1.9 {
63     // Return global combined track.
64    
65     return static_cast<const Track*>(fGlobalTrackRef.GetObject());
66     }
67    
68     //--------------------------------------------------------------------------------------------------
69 loizides 1.10 inline const mithep::Track *mithep::Muon::StandaloneTrk() const
70 loizides 1.9 {
71     // Return standalone track.
72    
73     return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
74     }
75    
76     //--------------------------------------------------------------------------------------------------
77 loizides 1.10 inline const mithep::Track *mithep::Muon::TrackerTrk() const
78 loizides 1.9 {
79     // Return tracker track.
80    
81     return static_cast<const Track*>(fTrackerTrackRef.GetObject());
82     }
83 loizides 1.4 #endif