ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.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: +38 -21 lines
Log Message:
Cleanup of leptons

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.9 // $Id: Electron.h,v 1.8 2008/06/30 16:54:40 loizides Exp $
3 bendavid 1.1 //
4 paus 1.3 // Electron
5 bendavid 1.1 //
6     // Details to be worked out...
7     //
8 loizides 1.9 // Authors: C.Loizides, J.Bendavid
9 bendavid 1.1 //--------------------------------------------------------------------------------------------------
10    
11 loizides 1.6 #ifndef DATATREE_ELECTRON_H
12     #define DATATREE_ELECTRON_H
13    
14     #include "MitAna/DataTree/interface/Lepton.h"
15    
16 bendavid 1.1 namespace mithep
17     {
18     class Electron : public Lepton
19     {
20     public:
21     Electron() {}
22     ~Electron() {}
23    
24 loizides 1.9 const Track *GetGsfTrack() const;
25     const Track *GetTrackerTrack() const;
26     const Track *GetTrack() const;
27     Double_t Mass() const { return 0.51099892e-3; }
28 loizides 1.8
29 loizides 1.9 void SetGsfTrack(Track* t) { fGsfTrackRef = t; }
30     void SetTrackerTrack(Track* t) { fTrackerTrackRef = t; }
31 loizides 1.8
32     protected:
33 loizides 1.9 TRef fGsfTrackRef; //global combined track reference
34     TRef fTrackerTrackRef; //tracker track reference
35 loizides 1.8
36 loizides 1.7 ClassDef(Electron, 1) // Electron class
37 bendavid 1.1 };
38 loizides 1.4 }
39 loizides 1.8
40 loizides 1.9 //--------------------------------------------------------------------------------------------------
41     inline const mithep::Track *mithep::Electron::GetGsfTrack() const
42     {
43     // Return global combined track.
44    
45     return static_cast<const Track*>(fGsfTrackRef.GetObject());
46     }
47    
48     //--------------------------------------------------------------------------------------------------
49     inline const mithep::Track *mithep::Electron::GetTrackerTrack() const
50     {
51     // Return tracker track.
52    
53     return static_cast<const Track*>(fTrackerTrackRef.GetObject());
54     }
55    
56     //--------------------------------------------------------------------------------------------------
57     inline const mithep::Track *mithep::Electron::GetTrack() const
58     {
59     // Return "best" track.
60    
61     if (GetGsfTrack())
62     return GetGsfTrack();
63     else if (GetTrackerTrack())
64     return GetTrackerTrack();
65    
66     return 0;
67     }
68 loizides 1.8 #endif