ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.9
Committed: Tue Jul 1 08:54:57 2008 UTC (16 years, 10 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.8: +50 -28 lines
Log Message:
Cleanup of leptons

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.9 // $Id: Muon.h,v 1.8 2008/06/30 16:54:40 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.9 const Track *GetGlobalTrack() const;
27     const Track *GetStandaloneTrack() const;
28     const Track *GetTrackerTrack() const;
29     const Track* GetTrack() const;
30     Double_t Mass() const { return 105.658369e-3; }
31    
32     void SetGlobalTrack(Track* t) { fGlobalTrackRef = t; }
33     void SetStandaloneTrack(Track* t) { fStandaloneTrackRef = t; }
34     void SetTrackerTrack(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     inline const mithep::Track *mithep::Muon::GetGlobalTrack() const
47     {
48     // Return global combined track.
49    
50     return static_cast<const Track*>(fGlobalTrackRef.GetObject());
51     }
52    
53     //--------------------------------------------------------------------------------------------------
54     inline const mithep::Track *mithep::Muon::GetStandaloneTrack() const
55     {
56     // Return standalone track.
57    
58     return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
59     }
60    
61     //--------------------------------------------------------------------------------------------------
62     inline const mithep::Track *mithep::Muon::GetTrackerTrack() const
63     {
64     // Return tracker track.
65    
66     return static_cast<const Track*>(fTrackerTrackRef.GetObject());
67     }
68    
69     //--------------------------------------------------------------------------------------------------
70     inline const mithep::Track *mithep::Muon::GetTrack() const
71     {
72     // Return "best" track.
73    
74     if (GetGlobalTrack())
75     return GetGlobalTrack();
76     else if (GetStandaloneTrack())
77     return GetStandaloneTrack();
78     else if (GetTrackerTrack())
79     return GetTrackerTrack();
80 loizides 1.8
81 loizides 1.9 return 0;
82     }
83 loizides 1.4 #endif