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.8 by loizides, Mon Jun 30 16:54:40 2008 UTC vs.
Revision 1.13 by sixie, Fri Aug 8 11:17:13 2008 UTC

# Line 5 | Line 5
5   //
6   // Details to be worked out...
7   //
8 < // Authors: C.Loizides, J. Bendavid
8 > // Authors: C.Loizides, J.Bendavid, S.Xie
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/SuperCluster.h"
15 > #include "MitAna/DataTree/interface/ChargedParticle.h"
16  
17   namespace mithep
18   {
19 <  class Electron : public Lepton
19 >  class Electron : public ChargedParticle
20    {
21      public:
22        Electron() {}
23        ~Electron() {}
24        
25 <      Track*    GetGsfTrack() const { return (Track*)fGsfTrackRef.GetObject(); }
26 <      Track*    GetTrackerTrack() const { return (Track*)fTrackerTrackRef.GetObject(); }
27 <      
28 <      Track*    GetTrack() const {return 0;}
29 <      
30 <      Double_t  Mass() const { return 0.51099892e-3; }
31 <      
32 <      void      SetGsfTrack(Track* gsfTrack) { fGsfTrackRef = gsfTrack; }
33 <      void      SetTrackerTrack(Track* trackerTrack) { fTrackerTrackRef = trackerTrack; }
34 <      
25 >      const Track         *BestTrk()         const;
26 >      const Track         *GsfTrk()          const;
27 >      const Track         *TrackerTrk()      const;
28 >      const SuperCluster  *SCluster()        const;
29 >      const Track         *Trk()             const { return BestTrk(); }
30 >
31 >      Double_t    Mass()                           const { return 0.51099892e-3;            }
32 >      Double_t    ESuperClusterOverP()             const { return fESuperClusterOverP;      }
33 >      Double_t    ESeedClusterOverPout()           const { return fESeedClusterOverPout;    }
34 >      Double_t    DeltaEtaSuperClusterTrackAtVtx() const { return fDeltaEtaSuperClTrkAtVtx; }
35 >      Double_t    DeltaEtaSeedClusterTrackAtCalo() const { return fDeltaEtaSeedClTrkAtCalo; }
36 >      Double_t    DeltaPhiSuperClusterTrackAtVtx() const { return fDeltaPhiSuperClTrkAtVtx; }
37 >      Double_t    DeltaPhiSeedClusterTrackAtCalo() const { return fDeltaPhiSeedClTrkAtCalo; }
38 >      Double_t    HadronicOverEm()                 const { return fHadronicOverEm;          }
39 >      Double_t    IsEnergyScaleCorrected()         const { return fIsEnergyScaleCorrected;  }
40 >      Double_t    IsMomentumCorrected()            const { return fIsMomentumCorrected;     }
41 >      Double_t    NumberOfClusters()               const { return fNumberOfClusters;        }
42 >      Double_t    Classification()                 const { return fClassification;          }
43 >      Double_t    SuperClusterPx()                 const { return fSuperClusterPx;          }
44 >      Double_t    SuperClusterPy()                 const { return fSuperClusterPy;          }
45 >      Double_t    SuperClusterPz()                 const { return fSuperClusterPz;          }
46 >      Double_t    SuperClusterE()                  const { return fSuperClusterE;           }
47 >      Double_t    E33()                            const { return fE33;                     }
48 >      Double_t    E55()                            const { return fE55;                     }
49 >      Double_t    CovEtaEta()                      const { return fCovEtaEta;               }
50 >      Double_t    CovEtaPhi()                      const { return fCovEtaPhi;               }
51 >      Double_t    CovPhiPhi()                      const { return fCovPhiPhi;               }
52 >      Double_t    CaloIsolation()                  const { return fCaloIsolation;           }
53 >      Double_t    TrackIsolation()                 const { return fTrackIsolation;          }
54 >      
55 >      Double_t    ComputeTrackIsolation   (  Double_t extRadius, Double_t intRadius,
56 >                                             Double_t ptLow, Double_t maxVtxZDist,
57 >                                             mithep::Collection<Track> *tracks              );
58 >      Double_t    ComputeEcalIsolation    (  Double_t coneSize, Double_t etLow,
59 >                                             mithep::Collection<BasicCluster> *basicClusters);
60 >
61 >      void        SetGsfTrk(Track* t)                           { fGsfTrackRef = t;                }
62 >      void        SetTrackerTrk(Track* t)                       { fTrackerTrackRef = t;            }
63 >      void        SetSuperCluster(SuperCluster* sc)             { fSuperClusterRef = sc;           }
64 >      void        SetESuperClusterOverP(Double_t x)             { fESuperClusterOverP = x;         }
65 >      void        SetESeedClusterOverPout(Double_t x)           { fESeedClusterOverPout = x;       }
66 >      void        SetDeltaEtaSuperClusterTrackAtVtx(Double_t x) { fDeltaEtaSuperClTrkAtVtx = x;    }
67 >      void        SetDeltaEtaSeedClusterTrackAtCalo(Double_t x) { fDeltaEtaSeedClTrkAtCalo = x;    }
68 >      void        SetDeltaPhiSuperClusterTrackAtVtx(Double_t x) { fDeltaPhiSuperClTrkAtVtx = x;    }
69 >      void        SetDeltaPhiSeedClusterTrackAtCalo(Double_t x) { fDeltaPhiSeedClTrkAtCalo = x;    }
70 >      void        SetHadronicOverEm(Double_t x)                 { fHadronicOverEm = x;             }
71 >      void        SetIsEnergyScaleCorrected(Double_t x)         { fIsEnergyScaleCorrected = x;     }
72 >      void        SetIsMomentumCorrected(Double_t x)            { fIsMomentumCorrected = x;        }
73 >      void        SetNumberOfClusters(Double_t x)               { fNumberOfClusters = x;           }
74 >      void        SetClassification(Double_t x)                 { fClassification = x;             }
75 >      void        SetSuperClusterPx(Double_t SuperClusterPx)    { fSuperClusterPx = SuperClusterPx;}
76 >      void        SetSuperClusterPy(Double_t SuperClusterPy)    { fSuperClusterPy = SuperClusterPy;}
77 >      void        SetSuperClusterPz(Double_t SuperClusterPz)    { fSuperClusterPz = SuperClusterPz;}
78 >      void        SetSuperClusterE(Double_t SuperClusterE)      { fSuperClusterE = SuperClusterE;  }
79 >      void        SetE33(Double_t E33)                          { fE33 = E33;                      }
80 >      void        SetE55(Double_t E55)                          { fE55 = E55;                      }
81 >      void        SetCovEtaEta(Double_t CovEtaEta)              { fCovEtaEta = CovEtaEta;          }
82 >      void        SetCovEtaPhi(Double_t CovEtaPhi)              { fCovEtaPhi = CovEtaPhi;          }
83 >      void        SetCovPhiPhi(Double_t CovPhiPhi)              { fCovPhiPhi = CovPhiPhi;          }
84 >      void        SetCaloIsolation(Double_t CaloIsolation)      { fCaloIsolation = CaloIsolation;  }
85 >      void        SetTrackIsolation(Double_t TrackIsolation)    { fTrackIsolation = TrackIsolation;}
86 >
87 >
88 >
89      protected:
90 <        TRef    fGsfTrackRef;
91 <        TRef    fTrackerTrackRef;
92 <      
90 >      TRef                 fGsfTrackRef;     //global combined track reference
91 >      TRef                 fTrackerTrackRef; //tracker track reference
92 >      TRef                 fSuperClusterRef; //superCluster
93 >
94 >      Double_t             fESuperClusterOverP;
95 >      Double_t             fESeedClusterOverPout;
96 >      Double_t             fDeltaEtaSuperClTrkAtVtx;
97 >      Double_t             fDeltaEtaSeedClTrkAtCalo;
98 >      Double_t             fDeltaPhiSuperClTrkAtVtx;
99 >      Double_t             fDeltaPhiSeedClTrkAtCalo;
100 >      Double_t             fHadronicOverEm;
101 >      Double_t             fIsEnergyScaleCorrected;
102 >      Double_t             fIsMomentumCorrected;      
103 >      Double_t             fNumberOfClusters;
104 >      Double_t             fClassification;          
105 >      Double_t             fSuperClusterPx;
106 >      Double_t             fSuperClusterPy;
107 >      Double_t             fSuperClusterPz;
108 >      Double_t             fSuperClusterE;
109 >      Double_t             fE33;
110 >      Double_t             fE55;
111 >      Double_t             fCovEtaEta;
112 >      Double_t             fCovEtaPhi;
113 >      Double_t             fCovPhiPhi;
114 >      Double_t             fCaloIsolation;
115 >      Double_t             fTrackIsolation;
116 >
117      ClassDef(Electron, 1) // Electron class
118    };
119   }
41 #endif
120  
121 < #if 0
122 < > Track* Electron::GetTrack() const {
123 < >       if (GetGsfTrack())
124 < >               return GetGsfTrack();
125 < >       else if (GetTrackerTrack())
126 < >               return GetTrackerTrack();
127 < >       else return (Track*)0;
128 < > }
121 > //--------------------------------------------------------------------------------------------------
122 > inline const mithep::Track *mithep::Electron::BestTrk() const
123 > {
124 >  // Return "best" track.
125 >
126 >  if (GsfTrk())
127 >    return GsfTrk();
128 >  else if (TrackerTrk())
129 >    return TrackerTrk();
130 >
131 >  return 0;
132 > }
133 >
134 > //--------------------------------------------------------------------------------------------------
135 > inline const mithep::Track *mithep::Electron::GsfTrk() const
136 > {
137 >  // Return global combined track.
138 >
139 >  return static_cast<const Track*>(fGsfTrackRef.GetObject());
140 > }
141 >
142 > //--------------------------------------------------------------------------------------------------
143 > inline const mithep::Track *mithep::Electron::TrackerTrk() const
144 > {
145 >  // Return tracker track.
146 >
147 >  return static_cast<const Track*>(fTrackerTrackRef.GetObject());
148 > }
149 > //--------------------------------------------------------------------------------------------------
150 > inline const mithep::SuperCluster *mithep::Electron::SCluster() const
151 > {
152 >  // Return Super cluster
153 >
154 >  return static_cast<const SuperCluster*>(fSuperClusterRef.GetObject());
155 > }
156   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines