ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.h
Revision: 1.11
Committed: Fri Jul 25 16:04:44 2008 UTC (16 years, 9 months ago) by bendavid
Content type: text/plain
Branch: MAIN
Changes since 1.10: +3 -3 lines
Log Message:
Renamed Lepton to ChargedParticle and added StableParticle class

File Contents

# User Rev Content
1 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 bendavid 1.11 // $Id: Electron.h,v 1.10 2008/07/14 20:55:19 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 bendavid 1.11 #include "MitAna/DataTree/interface/ChargedParticle.h"
15 loizides 1.6
16 bendavid 1.1 namespace mithep
17     {
18 bendavid 1.11 class Electron : public ChargedParticle
19 bendavid 1.1 {
20     public:
21     Electron() {}
22     ~Electron() {}
23    
24 loizides 1.10 const Track *BestTrk() const;
25     const Track *GsfTrk() const;
26     const Track *TrackerTrk() const;
27 loizides 1.9 Double_t Mass() const { return 0.51099892e-3; }
28 loizides 1.8
29 loizides 1.10 void SetGsfTrk(Track* t) { fGsfTrackRef = t; }
30     void SetTrackerTrk(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 loizides 1.10 inline const mithep::Track *mithep::Electron::BestTrk() const
42 loizides 1.9 {
43 loizides 1.10 // Return "best" track.
44    
45     if (GsfTrk())
46     return GsfTrk();
47     else if (TrackerTrk())
48     return TrackerTrk();
49 loizides 1.9
50 loizides 1.10 return 0;
51 loizides 1.9 }
52    
53     //--------------------------------------------------------------------------------------------------
54 loizides 1.10 inline const mithep::Track *mithep::Electron::GsfTrk() const
55 loizides 1.9 {
56 loizides 1.10 // Return global combined track.
57 loizides 1.9
58 loizides 1.10 return static_cast<const Track*>(fGsfTrackRef.GetObject());
59 loizides 1.9 }
60    
61     //--------------------------------------------------------------------------------------------------
62 loizides 1.10 inline const mithep::Track *mithep::Electron::TrackerTrk() const
63 loizides 1.9 {
64 loizides 1.10 // Return tracker track.
65 loizides 1.9
66 loizides 1.10 return static_cast<const Track*>(fTrackerTrackRef.GetObject());
67 loizides 1.9 }
68 loizides 1.8 #endif