ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Electron.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Electron.h (file contents):
Revision 1.6 by loizides, Wed Jun 18 19:08:14 2008 UTC vs.
Revision 1.11 by bendavid, Fri Jul 25 16:04:44 2008 UTC

# Line 5 | Line 5
5   //
6   // Details to be worked out...
7   //
8 < // Authors: C.Loizides, J. Bendavid
9 < //
8 > // Authors: C.Loizides, J.Bendavid
9   //--------------------------------------------------------------------------------------------------
10  
11   #ifndef DATATREE_ELECTRON_H
12   #define DATATREE_ELECTRON_H
13  
14 < #include "MitAna/DataTree/interface/Lepton.h"
14 > #include "MitAna/DataTree/interface/ChargedParticle.h"
15  
16   namespace mithep
17   {
18 <  class Electron : public Lepton
18 >  class Electron : public ChargedParticle
19    {
20      public:
21        Electron() {}
23      Electron(Double_t px, Double_t py, Double_t pz, Double_t e) : Lepton(px,py,pz,e) {}
22        ~Electron() {}
23        
24 <      ClassDef(Electron, 1) // Electron class
24 >      const Track         *BestTrk()         const;
25 >      const Track         *GsfTrk()          const;
26 >      const Track         *TrackerTrk()      const;
27 >      Double_t             Mass()            const { return 0.51099892e-3; }
28 >      
29 >      void                 SetGsfTrk(Track* t)     { fGsfTrackRef = t; }
30 >      void                 SetTrackerTrk(Track* t) { fTrackerTrackRef = t; }
31 >      
32 >    protected:
33 >      TRef                 fGsfTrackRef;     //global combined track reference
34 >      TRef                 fTrackerTrackRef; //tracker track reference
35 >      
36 >    ClassDef(Electron, 1) // Electron class
37    };
38   }
39 +
40 + //--------------------------------------------------------------------------------------------------
41 + inline const mithep::Track *mithep::Electron::BestTrk() const
42 + {
43 +  // Return "best" track.
44 +
45 +  if (GsfTrk())
46 +    return GsfTrk();
47 +  else if (TrackerTrk())
48 +    return TrackerTrk();
49 +
50 +  return 0;
51 + }
52 +
53 + //--------------------------------------------------------------------------------------------------
54 + inline const mithep::Track *mithep::Electron::GsfTrk() const
55 + {
56 +  // Return global combined track.
57 +
58 +  return static_cast<const Track*>(fGsfTrackRef.GetObject());
59 + }
60 +
61 + //--------------------------------------------------------------------------------------------------
62 + inline const mithep::Track *mithep::Electron::TrackerTrk() const
63 + {
64 +  // Return tracker track.
65 +
66 +  return static_cast<const Track*>(fTrackerTrackRef.GetObject());
67 + }
68   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines