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.40 by bendavid, Thu May 6 17:30:39 2010 UTC

# Line 3 | Line 3
3   //
4   // Electron
5   //
6 < // Details to be worked out...
7 < //
8 < // Authors: C.Loizides, J. Bendavid
6 > // This class holds information about reconstructed electrons from CMSSW.
7   //
8 + // Authors: C.Loizides, J.Bendavid, S.Xie
9   //--------------------------------------------------------------------------------------------------
10  
11 < #ifndef DATATREE_ELECTRON_H
12 < #define DATATREE_ELECTRON_H
11 > #ifndef MITANA_DATATREE_ELECTRON_H
12 > #define MITANA_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 > #include "MitAna/DataCont/interface/Ref.h"
17  
18   namespace mithep
19   {
20 <  class Electron : public Lepton
20 >  class Electron : public ChargedParticle
21    {
22      public:
23 <      Electron() {}
24 <      Electron(Double_t px, Double_t py, Double_t pz, Double_t e) : Lepton(px,py,pz,e) {}
25 <      ~Electron() {}
23 >      Electron() :
24 >        fCharge(-99), fScPixCharge(0),
25 >        fESuperClusterOverP(0), fESeedClusterOverPout(0), fDeltaEtaSuperClTrkAtVtx(0),
26 >        fDeltaEtaSeedClTrkAtCalo(0), fDeltaPhiSuperClTrkAtVtx(0),
27 >        fDeltaPhiSeedClTrkAtCalo(0), fFBrem(0), fHadronicOverEm(0), fHcalDepth1OverEcal(0),
28 >        fHcalDepth2OverEcal(0), fNumberOfClusters(0), fE15(0), fE25Max(0),
29 >        fE55(0), fCovEtaEta(0), fCoviEtaiEta(0),
30 >        fCaloIsolation(0), fHcalJurassicIsolation(0),
31 >        fHcalDepth1TowerSumEtDr04(0), fHcalDepth2TowerSumEtDr04(0),
32 >        fEcalJurassicIsolation(0), fTrackIsolationDr04(0), fCaloTowerIsolation(0),
33 >        fHcalDepth1TowerSumEtDr03(0), fHcalDepth2TowerSumEtDr03(0),
34 >        fEcalRecHitSumEtDr03(0), fTrackIsolation(0), fPassLooseID(0),
35 >        fPassTightID(0), fIDLikelihood(0), fPIn(0), fPOut(0), fFracSharedHits(0),
36 >        fMva(0), fD0PV(0), fD0PVErr(0), fIp3dPV(0), fIp3dPVErr(0),
37 >        fD0PVBS(0), fD0PVBSErr(0), fIp3dPVBS(0), fIp3dPVBSErr(0),
38 >        fConvPartnerDCotTheta(0), fConvPartnerDist(0), fConvPartnerRadius(0),
39 >        fIsEnergyScaleCorrected(0), fIsMomentumCorrected(0),
40 >        fClassification(0), fIsEB(), fIsEE(0), fIsEBEEGap(0), fIsEBEtaGap(0),
41 >        fIsEBPhiGap(0), fIsEEDeeGap(0), fIsEERingGap(0),
42 >        fIsEcalDriven(0), fIsTrackerDriven(0) {}
43 >
44 >      const Track         *BestTrk()                const;
45 >      Double_t             D0PV()                   const { return fD0PV;                     }
46 >      Double_t             D0PVErr()                const { return fD0PVErr;                  }
47 >      Double_t             D0PVSignificance()       const { return fD0PV/fD0PVErr;            }
48 >      Double_t             Ip3dPV()                 const { return fIp3dPV;                   }
49 >      Double_t             Ip3dPVErr()              const { return fIp3dPVErr;                }
50 >      Double_t             Ip3dPVSignificance()     const { return fIp3dPV/fIp3dPVErr;        }
51 >      Double_t             D0PVBS()                 const { return fD0PVBS;                   }
52 >      Double_t             D0PVBSErr()              const { return fD0PVBSErr;                }
53 >      Double_t             D0PVBSSignificance()     const { return fD0PVBS/fD0PVBSErr;        }
54 >      Double_t             Ip3dPVBS()               const { return fIp3dPVBS;                 }
55 >      Double_t             Ip3dPVBSErr()            const { return fIp3dPVBSErr;              }
56 >      Double_t             Ip3dPVBSSignificance()   const { return fIp3dPVBS/fIp3dPVBSErr;    }
57 >      Double_t             ConvPartnerDCotTheta()   const { return fConvPartnerDCotTheta;     }
58 >      Double_t             ConvPartnerDist()        const { return fConvPartnerDist;          }
59 >      Double_t             ConvPartnerRadius()      const { return fConvPartnerRadius;        }
60 >      Double_t             CaloIsolation()          const { return fCaloIsolation;       } // *DEPRECATED*
61 >      Int_t                Classification()         const { return fClassification;      }
62 >      Double_t             CovEtaEta()              const { return fCovEtaEta;           }
63 >      Double_t             CoviEtaiEta()            const { return fCoviEtaiEta;         }
64 >      Double_t             DeltaEtaSuperClusterTrackAtVtx() const
65 >                             { return fDeltaEtaSuperClTrkAtVtx; }
66 >      Double_t             DeltaEtaSeedClusterTrackAtCalo() const
67 >                             { return fDeltaEtaSeedClTrkAtCalo; }
68 >      Double_t             DeltaPhiSuperClusterTrackAtVtx() const
69 >                             { return fDeltaPhiSuperClTrkAtVtx; }
70 >      Double_t             DeltaPhiSeedClusterTrackAtCalo() const
71 >                             { return fDeltaPhiSeedClTrkAtCalo; }
72 >      Double_t             E15()                    const { return fE15;                }
73 >      Double_t             E25Max()                 const { return fE25Max;             }
74 >      Double_t             E55()                    const { return fE55;                }
75 >      Double_t             ESuperClusterOverP()     const { return fESuperClusterOverP;            }
76 >      Double_t             ESeedClusterOverPout()   const { return fESeedClusterOverPout;          }
77 >      Double_t             ESeedClusterOverPIn()    const;
78 >      Double_t             FBrem()                  const { return fFBrem;                         }
79 >      Double_t             FBremOld()               const { return (PIn() - POut())/PIn();         }
80 >      Double_t             FracSharedHits()         const { return fFracSharedHits;                }
81 >      const Track         *GsfTrk()                 const { return fGsfTrackRef.Obj();             }
82 >      Double_t             HadronicOverEm()         const { return fHadronicOverEm;                }
83 >      Double_t             HcalDepth1OverEcal()     const { return fHcalDepth1OverEcal;            }
84 >      Double_t             HcalDepth2OverEcal()     const { return fHcalDepth2OverEcal;            }
85 >      Bool_t               HasGsfTrk()              const { return fGsfTrackRef.IsValid();         }
86 >      Bool_t               HasTrackerTrk()          const { return fTrackerTrackRef.IsValid();     }
87 >      Bool_t               HasSuperCluster()        const { return fSuperClusterRef.IsValid();     }
88 >      Double_t             HcalIsolation()          const { return fHcalJurassicIsolation;         } // *DEPRECATED*
89 >      Double_t             IDLikelihood()           const { return fIDLikelihood;                  }
90 >      Bool_t               IsEnergyScaleCorrected() const { return fIsEnergyScaleCorrected;        }
91 >      Bool_t               IsMomentumCorrected()    const { return fIsMomentumCorrected;           }
92 >      Bool_t               IsEB()                   const { return fIsEB;                          }
93 >      Bool_t               IsEE()                   const { return fIsEE;                          }
94 >      Bool_t               IsEBEEGap()              const { return fIsEBEEGap;                     }
95 >      Bool_t               IsEBEtaGap()             const { return fIsEBEtaGap;                    }
96 >      Bool_t               IsEBPhiGap()             const { return fIsEBPhiGap;                    }
97 >      Bool_t               IsEEDeeGap()             const { return fIsEEDeeGap;                    }
98 >      Bool_t               IsEERingGap()            const { return fIsEERingGap;                   }
99 >      Bool_t               IsEcalDriven()           const { return fIsEcalDriven;                  }
100 >      Bool_t               IsTrackerDriven()        const { return fIsTrackerDriven;               }
101 >      Double_t             Mva()                    const { return fMva;                           }
102 >      Double_t             NumberOfClusters()       const { return fNumberOfClusters;              }
103 >      EObjType             ObjType()                const { return kElectron;                      }
104 >      Double_t             PassLooseID()            const { return fPassLooseID;                   }
105 >      Double_t             PassTightID()            const { return fPassTightID;                   }
106 >      Double_t             PIn()                    const { return fPIn;                           }
107 >      Double_t             POut()                   const { return fPOut;                          }
108 >      const SuperCluster  *SCluster()               const { return fSuperClusterRef.Obj();         }
109 >      Double_t             ScPixCharge()            const { return fScPixCharge;                   }
110 >      
111 >      Double_t             EcalRecHitIsoDr04()      const { return fEcalJurassicIsolation;         }
112 >      Double_t             HcalTowerSumEtDr04()     const { return HcalDepth1TowerSumEtDr04() +
113 >                                                                   HcalDepth2TowerSumEtDr04();     }
114 >      Double_t             HcalDepth1TowerSumEtDr04() const { return fHcalDepth1TowerSumEtDr04;    }
115 >      Double_t             HcalDepth2TowerSumEtDr04() const { return fHcalDepth2TowerSumEtDr04;    }
116 >      Double_t             TrackIsolationDr04()     const { return fTrackIsolationDr04;            }
117 >      Double_t             EcalRecHitIsoDr03()      const { return fEcalRecHitSumEtDr03;           }
118 >      Double_t             HcalTowerSumEtDr03()     const { return fCaloTowerIsolation;            }
119 >      Double_t             HcalDepth1TowerSumEtDr03() const { return fHcalDepth1TowerSumEtDr03;    }
120 >      Double_t             HcalDepth2TowerSumEtDr03() const { return fHcalDepth2TowerSumEtDr03;    }
121 >      Double_t             TrackIsolationDr03()     const { return fTrackIsolation;                }
122 >      
123        
124 <      ClassDef(Electron, 1) // Electron class
124 >      void                 SetCharge(Char_t x)                    { fCharge = x; ClearCharge();    }
125 >      void                 SetScPixCharge(Char_t x)               { fScPixCharge = x;              }
126 >      void                 SetD0PV(Double_t x)                    { fD0PV = x;                     }
127 >      void                 SetD0PVErr(Double_t x)                 { fD0PVErr = x;                  }
128 >      void                 SetIp3dPV(Double_t x)                  { fIp3dPV = x;                   }
129 >      void                 SetIp3dPVErr(Double_t x)               { fIp3dPVErr = x;                }
130 >      void                 SetD0PVBS(Double_t x)                  { fD0PVBS = x;                   }
131 >      void                 SetD0PVBSErr(Double_t x)               { fD0PVBSErr = x;                }
132 >      void                 SetIp3dPVBS(Double_t x)                { fIp3dPVBS = x;                 }
133 >      void                 SetIp3dPVBSErr(Double_t x)             { fIp3dPVBSErr = x;              }
134 >      void                 SetConvPartnerDCotTheta(Double_t x)    { fConvPartnerDCotTheta = x;     }
135 >      void                 SetConvPartnerDist(Double_t x)         { fConvPartnerDist = x;          }
136 >      void                 SetConvPartnerRadius(Double_t x)       { fConvPartnerRadius = x;        }
137 >      void                 SetClassification(Int_t x)             { fClassification = x;           }
138 >      void                 SetCovEtaEta(Double_t CovEtaEta)       { fCovEtaEta = CovEtaEta;        }
139 >      void                 SetCoviEtaiEta(Double_t CoviEtaiEta)   { fCoviEtaiEta = CoviEtaiEta;    }
140 >      void                 SetDeltaEtaSuperClusterTrackAtVtx(Double_t x)  
141 >                             { fDeltaEtaSuperClTrkAtVtx = x;   }
142 >      void                 SetDeltaEtaSeedClusterTrackAtCalo(Double_t x)  
143 >                             { fDeltaEtaSeedClTrkAtCalo = x;   }
144 >      void                 SetDeltaPhiSuperClusterTrackAtVtx(Double_t x)  
145 >                             { fDeltaPhiSuperClTrkAtVtx = x;   }
146 >      void                 SetDeltaPhiSeedClusterTrackAtCalo(Double_t x)  
147 >                             { fDeltaPhiSeedClTrkAtCalo = x;   }
148 >      void                 SetE15(Double_t x)                     { fE15 = x;                      }
149 >      void                 SetE25Max(Double_t x)                  { fE25Max = x;                   }
150 >      void                 SetE55(Double_t x)                     { fE55 = x;                      }
151 >      void                 SetESeedClusterOverPout(Double_t x)    { fESeedClusterOverPout = x;     }
152 >      void                 SetESuperClusterOverP(Double_t x)      { fESuperClusterOverP = x;       }
153 >      void                 SetFBrem(Double_t x)                   { fFBrem = x;                    }
154 >      void                 SetFracSharedHits(Double_t x)          { fFracSharedHits = x;           }
155 >      void                 SetGsfTrk(const Track* t)                    
156 >                             { fGsfTrackRef = t; ClearCharge(); }
157 >      void                 SetHadronicOverEm(Double_t x)          { fHadronicOverEm = x;           }
158 >      void                 SetHcalDepth1OverEcal(Double_t x)      { fHcalDepth1OverEcal = x;       }
159 >      void                 SetHcalDepth2OverEcal(Double_t x)      { fHcalDepth2OverEcal = x;       }
160 >      void                 SetIDLikelihood(Double_t likelihood)   { fIDLikelihood = likelihood;    }
161 >      void                 SetIsEnergyScaleCorrected(Bool_t x)    { fIsEnergyScaleCorrected = x;   }
162 >      void                 SetIsMomentumCorrected(Bool_t x)       { fIsMomentumCorrected = x;      }
163 >      void                 SetNumberOfClusters(Double_t x)        { fNumberOfClusters = x;         }
164 >      void                 SetPIn(Double_t PIn)                   { fPIn = PIn;                    }
165 >      void                 SetPOut(Double_t POut)                 { fPOut = POut;                  }
166 >      void                 SetPassLooseID(Double_t passLooseID)   { fPassLooseID = passLooseID;    }
167 >      void                 SetPassTightID(Double_t passTightID)   { fPassTightID = passTightID;    }
168 >      void                 SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
169 >      void                 SetSuperCluster(const SuperCluster* sc)
170 >                             { fSuperClusterRef = sc; }
171 >      void                 SetTrackerTrk(const Track* t)                
172 >                             { fTrackerTrackRef = t; ClearCharge(); }
173 >      void                 SetEcalRecHitIsoDr04(Double_t x)        { fEcalJurassicIsolation = x;    }
174 >      void                 SetHcalDepth1TowerSumEtDr04(Double_t x) { fHcalDepth1TowerSumEtDr04 = x; }
175 >      void                 SetHcalDepth2TowerSumEtDr04(Double_t x) { fHcalDepth2TowerSumEtDr04 = x; }
176 >      void                 SetTrackIsolationDr04(Double_t x)       { fTrackIsolationDr04 = x;       }
177 >      void                 SetEcalRecHitIsoDr03(Double_t x)        { fEcalRecHitSumEtDr03 = x;      }
178 >      void                 SetHcalTowerSumEtDr03(Double_t x)       { fCaloTowerIsolation = x;       }
179 >      void                 SetHcalDepth1TowerSumEtDr03(Double_t x) { fHcalDepth1TowerSumEtDr03 = x; }
180 >      void                 SetHcalDepth2TowerSumEtDr03(Double_t x) { fHcalDepth2TowerSumEtDr03 = x; }
181 >      void                 SetTrackIsolationDr03(Double_t x)       { fTrackIsolation = x;   }
182 >      void                 SetMva(Double_t x)                      { fMva = x;              }
183 >      void                 SetIsEB(Bool_t b)                       { fIsEB = b;             }
184 >      void                 SetIsEE(Bool_t b)                       { fIsEE = b;             }
185 >      void                 SetIsEBEEGap(Bool_t b)                  { fIsEBEEGap = b;        }
186 >      void                 SetIsEBEtaGap(Bool_t b)                 { fIsEBEtaGap = b;       }
187 >      void                 SetIsEBPhiGap(Bool_t b)                 { fIsEBPhiGap = b;       }
188 >      void                 SetIsEEDeeGap(Bool_t b)                 { fIsEEDeeGap = b;       }
189 >      void                 SetIsEERingGap(Bool_t b)                { fIsEERingGap = b;      }
190 >      void                 SetIsEcalDriven(Bool_t b)               { fIsEcalDriven = b;     }
191 >      void                 SetIsTrackerDriven(Bool_t b)            { fIsTrackerDriven = b;  }
192 >      
193 >    
194 >      const Track         *TrackerTrk()            const { return fTrackerTrackRef.Obj();   }
195 >      const Track         *Trk()                   const { return BestTrk();                }
196 >
197 >    protected:
198 >      Double_t             GetCharge()             const;
199 >      Double_t             GetMass()               const { return 0.51099892e-3;            }
200 >      void                 GetMom()                const;
201 >
202 >      Vect3C               fMom;                       //stored three-momentum
203 >      Char_t               fCharge;                    //stored charge - filled with -99 when reading old files
204 >      Char_t               fScPixCharge;               //charge from supercluster-pixel matching
205 >      Ref<Track>           fGsfTrackRef;               //gsf track reference
206 >      Ref<Track>           fTrackerTrackRef;           //tracker track reference
207 >      Ref<SuperCluster>    fSuperClusterRef;           //reference to SuperCluster
208 >      Double32_t           fESuperClusterOverP;        //[0,0,14]super cluster e over p ratio
209 >      Double32_t           fESeedClusterOverPout;      //[0,0,14]seed cluster e over p mom
210 >      Double32_t           fDeltaEtaSuperClTrkAtVtx;   //[0,0,14]delta eta of super cluster with trk
211 >      Double32_t           fDeltaEtaSeedClTrkAtCalo;   //[0,0,14]delta eta of seeed cluster with trk
212 >      Double32_t           fDeltaPhiSuperClTrkAtVtx;   //[0,0,14]delta phi of super cluster with trk
213 >      Double32_t           fDeltaPhiSeedClTrkAtCalo;   //[0,0,14]delta phi of seeed cluster with trk
214 >      Double32_t           fFBrem;                     //[0,0,14]brem fraction
215 >      Double32_t           fHadronicOverEm;            //[0,0,14]hadronic over em fraction *DEPRECATED*
216 >      Double32_t           fHcalDepth1OverEcal;        //[0,0,14]hadronic over em fraction depth1
217 >      Double32_t           fHcalDepth2OverEcal;        //[0,0,14]hadronic over em fraction depth2
218 >      Double32_t           fNumberOfClusters;          //[0,0,14]number of associated clusters
219 >      Double32_t           fE15;                       //[0,0,14]1x5 crystal energy
220 >      Double32_t           fE25Max;                    //[0,0,14]2x5 crystal energy (max of two possible sums)
221 >      Double32_t           fE55;                       //[0,0,14]5x5 crystal energy
222 >      Double32_t           fCovEtaEta;                 //[0,0,14]variance eta-eta
223 >      Double32_t           fCoviEtaiEta;               //[0,0,14]covariance eta-eta (in crystals)
224 >      Double32_t           fCaloIsolation;             //[0,0,14](non-jura) ecal isolation based on rechits dR 0.3 *DEPRECATED*
225 >      Double32_t           fHcalJurassicIsolation;     //[0,0,14]hcal jura iso dR 0.4 *DEPRECATED*
226 >      Double32_t           fHcalDepth1TowerSumEtDr04;  //[0,0,14]hcal depth1 tower based isolation dR 0.4
227 >      Double32_t           fHcalDepth2TowerSumEtDr04;  //[0,0,14]hcal depth2 tower based isolation dR 0.4
228 >      Double32_t           fEcalJurassicIsolation;     //[0,0,14]ecal jura iso dR 0.4 *RENAMING*
229 >      Double32_t           fTrackIsolationDr04;        //[0,0,14]isolation based on tracks dR 0.4
230 >      Double32_t           fCaloTowerIsolation;        //[0,0,14]hcal tower based isolation dR 0.3 *DEPRECATED*
231 >      Double32_t           fHcalDepth1TowerSumEtDr03;  //[0,0,14]hcal depth1 tower based isolation dR 0.3
232 >      Double32_t           fHcalDepth2TowerSumEtDr03;  //[0,0,14]hcal depth2 tower based isolation dR 0.3
233 >      Double32_t           fEcalRecHitSumEtDr03;       //[0,0,14]ecal jura iso dR 0.3
234 >      Double32_t           fTrackIsolation;            //[0,0,14]isolation based on tracks dR 0.3 *RENAMING*
235 >      Double32_t           fPassLooseID;               //[0,0,14]pass loose id
236 >      Double32_t           fPassTightID;               //[0,0,14]pass tight id
237 >      Double32_t           fIDLikelihood;              //[0,0,14]likelihood value
238 >      Double32_t           fPIn;                       //[0,0,14]momentum at vtx
239 >      Double32_t           fPOut;                      //[0,0,14]momentum at ecal surface
240 >      Double32_t           fFracSharedHits;            //[0,0,14]fraction of shared hits btw gsf and std. track
241 >      Double32_t           fMva;                       //[0,0,14] pflow mva output
242 >      Double32_t           fD0PV;                      //[0,0,14]transverse impact parameter to signal PV
243 >      Double32_t           fD0PVErr;                   //[0,0,14]transverse impact parameter uncertainty to signal PV
244 >      Double32_t           fIp3dPV;                    //[0,0,14]3d impact parameter to signal PV
245 >      Double32_t           fIp3dPVErr;                 //[0,0,14]3d impact parameter uncertainty to signal PV
246 >      Double32_t           fD0PVBS;                    //[0,0,14]transverse impact parameter to signal PV w/ bs constraint
247 >      Double32_t           fD0PVBSErr;                 //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint
248 >      Double32_t           fIp3dPVBS;                  //[0,0,14]3d impact parameter to signal PV w/ bs constraint
249 >      Double32_t           fIp3dPVBSErr;               //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint
250 >      Double32_t           fConvPartnerDCotTheta;      //[0,0,14]delta cot theta to nearest conversion partner track
251 >      Double32_t           fConvPartnerDist;           //[0,0,14]distance in x-y plane to nearest conversion partner track
252 >      Double32_t           fConvPartnerRadius;         //[0,0,14]radius of helix intersection with conversion partner track
253 >      Bool_t               fIsEnergyScaleCorrected;    //class dependent escale correction
254 >      Bool_t               fIsMomentumCorrected;       //class dependent E-p combination
255 >      Int_t                fClassification;            //classification (see GsfElectron.h)
256 >      Bool_t               fIsEB;                      //is ECAL barrel
257 >      Bool_t               fIsEE;                      //is ECAL Endcap
258 >      Bool_t               fIsEBEEGap;                 //is in barrel-endcap gap
259 >      Bool_t               fIsEBEtaGap;                //is in EB eta module gap
260 >      Bool_t               fIsEBPhiGap;                //is in EB phi module gap
261 >      Bool_t               fIsEEDeeGap;                //is in EE dee gap
262 >      Bool_t               fIsEERingGap;               //is in EE ring gap
263 >      Bool_t               fIsEcalDriven;              //is std. egamma electron
264 >      Bool_t               fIsTrackerDriven;           //is pflow track-seeded electron
265 >
266 >    ClassDef(Electron, 4) // Electron class
267    };
268   }
269 +
270 + //--------------------------------------------------------------------------------------------------
271 + inline const mithep::Track *mithep::Electron::BestTrk() const
272 + {
273 +  // Return "best" track.
274 +
275 +  if (HasGsfTrk())
276 +    return GsfTrk();
277 +  else if (HasTrackerTrk())
278 +    return TrackerTrk();
279 +
280 +  return 0;
281 + }
282 +
283 + //--------------------------------------------------------------------------------------------------
284 + inline Double_t mithep::Electron::GetCharge() const
285 + {
286 +  // Return stored charge, unless it is set to invalid (-99),
287 +  // in that case get charge from track as before
288 +
289 +  if (fCharge==-99)
290 +    return mithep::ChargedParticle::GetCharge();
291 +  else
292 +    return fCharge;
293 +
294 + }
295 +
296 + //--------------------------------------------------------------------------------------------------
297 + inline void mithep::Electron::GetMom() const
298 + {
299 +  // Get momentum of the electron. We use an explicitly stored three vector, with the pdg mass,
300 +  // since the momentum vector may be computed non-trivially in cmssw
301 +
302 +  fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
303 + }
304 +
305 + //-------------------------------------------------------------------------------------------------
306 + inline Double_t mithep::Electron::ESeedClusterOverPIn() const
307 + {
308 +  // Return energy of the SuperCluster seed divided by the magnitude
309 +  // of the track momentum at the vertex.
310 +  
311 +  return SCluster()->Seed()->Energy() / PIn();
312 + }
313 +
314 + //-------------------------------------------------------------------------------------------------
315 + inline void mithep::Electron::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
316 + {
317 +  // Set three-vector
318 +  
319 +  fMom.Set(pt,eta,phi);
320 +  ClearMom();
321 + }
322   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines