ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
Revision: 1.12
Committed: Tue Jul 29 07:55:40 2008 UTC (16 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Changes since 1.11: +2 -1 lines
Log Message:
Have consistent Trk implementation.

File Contents

# User Rev Content
1 loizides 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.12 // $Id: Muon.h,v 1.11 2008/07/25 16:04:44 bendavid 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 bendavid 1.11 #include "MitAna/DataTree/interface/ChargedParticle.h"
16 loizides 1.8 #include "MitAna/DataTree/interface/Track.h"
17 loizides 1.1
18     namespace mithep
19     {
20 bendavid 1.11 class Muon : public ChargedParticle
21 loizides 1.1 {
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.12 const Track *Trk() const { return BestTrk(); }
31 loizides 1.9 Double_t Mass() const { return 105.658369e-3; }
32    
33 loizides 1.10 void SetGlobalTrk(Track* t) { fGlobalTrackRef = t; }
34     void SetStandaloneTrk(Track* t) { fStandaloneTrackRef = t; }
35     void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
36 loizides 1.8
37     protected:
38 loizides 1.9 TRef fGlobalTrackRef; //global combined track reference
39     TRef fStandaloneTrackRef; //standalone muon track reference
40     TRef fTrackerTrackRef; //tracker track reference
41 loizides 1.8
42 loizides 1.7 ClassDef(Muon, 1) // Muon class
43 loizides 1.1 };
44 loizides 1.4 }
45 loizides 1.8
46 loizides 1.9 //--------------------------------------------------------------------------------------------------
47 loizides 1.10 inline const mithep::Track *mithep::Muon::BestTrk() const
48     {
49     // Return "best" track.
50    
51     if (GlobalTrk())
52     return GlobalTrk();
53     else if (StandaloneTrk())
54     return StandaloneTrk();
55     else if (TrackerTrk())
56     return TrackerTrk();
57    
58     return 0;
59     }
60    
61     //--------------------------------------------------------------------------------------------------
62     inline const mithep::Track *mithep::Muon::GlobalTrk() const
63 loizides 1.9 {
64     // Return global combined track.
65    
66     return static_cast<const Track*>(fGlobalTrackRef.GetObject());
67     }
68    
69     //--------------------------------------------------------------------------------------------------
70 loizides 1.10 inline const mithep::Track *mithep::Muon::StandaloneTrk() const
71 loizides 1.9 {
72     // Return standalone track.
73    
74     return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
75     }
76    
77     //--------------------------------------------------------------------------------------------------
78 loizides 1.10 inline const mithep::Track *mithep::Muon::TrackerTrk() const
79 loizides 1.9 {
80     // Return tracker track.
81    
82     return static_cast<const Track*>(fTrackerTrackRef.GetObject());
83     }
84 loizides 1.4 #endif