ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.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 bendavid 1.1 //--------------------------------------------------------------------------------------------------
2 loizides 1.12 // $Id: Electron.h,v 1.11 2008/07/25 16:04:44 bendavid 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.12 const Track *Trk() const { return BestTrk(); }
28 loizides 1.9 Double_t Mass() const { return 0.51099892e-3; }
29 loizides 1.8
30 loizides 1.10 void SetGsfTrk(Track* t) { fGsfTrackRef = t; }
31     void SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
32 loizides 1.8
33     protected:
34 loizides 1.9 TRef fGsfTrackRef; //global combined track reference
35     TRef fTrackerTrackRef; //tracker track reference
36 loizides 1.8
37 loizides 1.7 ClassDef(Electron, 1) // Electron class
38 bendavid 1.1 };
39 loizides 1.4 }
40 loizides 1.8
41 loizides 1.9 //--------------------------------------------------------------------------------------------------
42 loizides 1.10 inline const mithep::Track *mithep::Electron::BestTrk() const
43 loizides 1.9 {
44 loizides 1.10 // Return "best" track.
45    
46     if (GsfTrk())
47     return GsfTrk();
48     else if (TrackerTrk())
49     return TrackerTrk();
50 loizides 1.9
51 loizides 1.10 return 0;
52 loizides 1.9 }
53    
54     //--------------------------------------------------------------------------------------------------
55 loizides 1.10 inline const mithep::Track *mithep::Electron::GsfTrk() const
56 loizides 1.9 {
57 loizides 1.10 // Return global combined track.
58 loizides 1.9
59 loizides 1.10 return static_cast<const Track*>(fGsfTrackRef.GetObject());
60 loizides 1.9 }
61    
62     //--------------------------------------------------------------------------------------------------
63 loizides 1.10 inline const mithep::Track *mithep::Electron::TrackerTrk() const
64 loizides 1.9 {
65 loizides 1.10 // Return tracker track.
66 loizides 1.9
67 loizides 1.10 return static_cast<const Track*>(fTrackerTrackRef.GetObject());
68 loizides 1.9 }
69 loizides 1.8 #endif