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.2 by bendavid, Mon Jun 9 00:06:36 2008 UTC vs.
Revision 1.12 by loizides, Tue Jul 29 07:55:40 2008 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines