CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfElectron.h
Go to the documentation of this file.
1 #ifndef GsfElectron_h
2 #define GsfElectron_h
3 
8 //#include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
14 //#include "DataFormats/Math/interface/LorentzVector.h"
18 #include <vector>
19 #include <limits>
20 
21 namespace reco
22  {
23 
24 
25 /****************************************************************************
26  * \class reco::GsfElectron
27  *
28  * An Electron with a GsfTrack seeded from an ElectronSeed.
29  * Renamed from PixelMatchGsfElectron.
30  * Originally adapted from the TRecElectron class in ORCA.
31  *
32  * \author Claude Charlot - Laboratoire Leprince-Ringuet - École polytechnique, CNRS/IN2P3
33  * \author David Chamont - Laboratoire Leprince-Ringuet - École polytechnique, CNRS/IN2P3
34  *
35  ****************************************************************************/
36 
37 class GsfElectron : public RecoCandidate
38  {
39 
40  //=======================================================
41  // Constructors
42  //
43  // The clone() method with arguments, and the copy
44  // constructor with edm references is designed for
45  // someone which want to duplicates all
46  // collections.
47  //=======================================================
48 
49  public :
50 
51  // some nested structures defined later on
52  struct ChargeInfo ;
53  struct TrackClusterMatching ;
54  struct TrackExtrapolations ;
55  struct ClosestCtfTrack ;
56  struct FiducialFlags ;
57  struct ShowerShape ;
58  struct IsolationVariables ;
59  struct ConversionRejection ;
61 
62  GsfElectron() ;
63  GsfElectron( const GsfElectronCoreRef & ) ;
65  (
66  const GsfElectron &,
67  const GsfElectronCoreRef &
68  ) ;
70  (
71  const GsfElectron & electron,
72  const GsfElectronCoreRef & core,
74  const TrackRef & closestCtfTrack,
75  const TrackBaseRef & conversionPartner,
76  const GsfTrackRefVector & ambiguousTracks
77  ) ;
79  (
80  int charge,
81  const ChargeInfo &,
82  const GsfElectronCoreRef &,
83  const TrackClusterMatching &,
84  const TrackExtrapolations &,
85  const ClosestCtfTrack &,
86  const FiducialFlags &,
87  const ShowerShape &,
88  const ConversionRejection &
89  ) ;
91  (
92  int charge,
93  const ChargeInfo &,
94  const GsfElectronCoreRef &,
95  const TrackClusterMatching &,
96  const TrackExtrapolations &,
97  const ClosestCtfTrack &,
98  const FiducialFlags &,
99  const ShowerShape &,
100  const ShowerShape &,
101  const ConversionRejection &
102  ) ;
103  GsfElectron * clone() const ;
105  (
106  const GsfElectronCoreRef & core,
107  const CaloClusterPtr & electronCluster,
108  const TrackRef & closestCtfTrack,
109  const TrackBaseRef & conversionPartner,
110  const GsfTrackRefVector & ambiguousTracks
111  ) const ;
112  virtual ~GsfElectron() {} ;
113 
114  private:
115 
116  void init() ;
117 
118 
119  //=======================================================
120  // Candidate methods and complementary information
121  //
122  // The gsf electron producer has tried to best evaluate
123  // the four momentum and charge and given those values to
124  // the GsfElectron constructor, which forwarded them to
125  // the Candidate constructor. Those values can be retreived
126  // with getters inherited from Candidate : p4() and charge().
127  //=======================================================
128 
129  public:
130 
131  // Inherited from Candidate
132  // const LorentzVector & charge() const ;
133  // const LorentzVector & p4() const ;
134 
135  // Complementary struct
136  struct ChargeInfo
137  {
145  {}
146  } ;
147 
148  // Charge info accessors
149  // to get gsf track charge: gsfTrack()->charge()
150  // to get ctf track charge, if closestCtfTrackRef().isNonnull(): closestCtfTrackRef()->charge()
151  int scPixCharge() const { return chargeInfo_.scPixCharge ; }
155  const ChargeInfo & chargeInfo() const { return chargeInfo_ ; }
156 
157  // Candidate redefined methods
158  virtual bool isElectron() const { return true ; }
159  virtual bool overlap( const Candidate & ) const ;
160 
161  private:
162 
163  // Complementary attributes
165 
166 
167  //=======================================================
168  // Core Attributes
169  //
170  // They all have been computed before, when building the
171  // collection of GsfElectronCore instances. Each GsfElectron
172  // has a reference toward a GsfElectronCore.
173  //=======================================================
174 
175  public:
176 
177  // accessors
178  virtual GsfElectronCoreRef core() const ;
179  void setCore(const reco::GsfElectronCoreRef &core) { core_ = core; }
180 
181  // forward core methods
182  virtual SuperClusterRef superCluster() const { return core()->superCluster() ; }
183  virtual GsfTrackRef gsfTrack() const { return core()->gsfTrack() ; }
184  virtual TrackRef closestTrack() const { return core()->ctfTrack() ; }
185  float ctfGsfOverlap() const { return core()->ctfGsfOverlap() ; }
186  bool ecalDrivenSeed() const { return core()->ecalDrivenSeed() ; }
187  bool trackerDrivenSeed() const { return core()->trackerDrivenSeed() ; }
188  SuperClusterRef parentSuperCluster() const { return core()->parentSuperCluster() ; }
189 
190  // backward compatibility
192  {
193  TrackRef ctfTrack ; // best matching ctf track
194  float shFracInnerHits ; // fraction of common hits between the ctf and gsf tracks
196  ClosestCtfTrack( TrackRef track, float sh ) : ctfTrack(track), shFracInnerHits(sh) {}
197  } ;
198  float shFracInnerHits() const { return core()->ctfGsfOverlap() ; }
199  TrackRef closestCtfTrackRef() const { return core()->ctfTrack() ; }
200  ClosestCtfTrack closestCtfTrack() const { return ClosestCtfTrack(core()->ctfTrack(),core()->ctfGsfOverlap()) ; }
201 
202  private:
203 
204  // attributes
206 
207 
208  //=======================================================
209  // Track-Cluster Matching Attributes
210  //=======================================================
211 
212  public:
213 
215  {
216  CaloClusterPtr electronCluster ; // basic cluster best matching gsf track
217  float eSuperClusterOverP ; // the supercluster energy / track momentum at the PCA to the beam spot
218  float eSeedClusterOverP ; // the seed cluster energy / track momentum at the PCA to the beam spot
219  float eSeedClusterOverPout ; // the seed cluster energy / track momentum at calo extrapolated from the outermost track state
220  float eEleClusterOverPout ; // the electron cluster energy / track momentum at calo extrapolated from the outermost track state
221  float deltaEtaSuperClusterAtVtx ; // the supercluster eta - track eta position at calo extrapolated from innermost track state
222  float deltaEtaSeedClusterAtCalo ; // the seed cluster eta - track eta position at calo extrapolated from the outermost track state
223  float deltaEtaEleClusterAtCalo ; // the electron cluster eta - track eta position at calo extrapolated from the outermost state
224  float deltaPhiEleClusterAtCalo ; // the electron cluster phi - track phi position at calo extrapolated from the outermost track state
225  float deltaPhiSuperClusterAtVtx ; // the supercluster phi - track phi position at calo extrapolated from the innermost track state
226  float deltaPhiSeedClusterAtCalo ; // the seed cluster phi - track phi position at calo extrapolated from the outermost track state
228  : eSuperClusterOverP(0.),
229  eSeedClusterOverP(0.),
232  deltaEtaSuperClusterAtVtx(std::numeric_limits<float>::max()),
233  deltaEtaSeedClusterAtCalo(std::numeric_limits<float>::max()),
234  deltaEtaEleClusterAtCalo(std::numeric_limits<float>::max()),
235  deltaPhiEleClusterAtCalo(std::numeric_limits<float>::max()),
236  deltaPhiSuperClusterAtVtx(std::numeric_limits<float>::max()),
237  deltaPhiSeedClusterAtCalo(std::numeric_limits<float>::max())
238  {}
239  } ;
240 
241  // accessors
254 
255  // for backward compatibility, usefull ?
258 
259 
260  private:
261 
262  // attributes
264 
265 
266  //=======================================================
267  // Track extrapolations
268  //=======================================================
269 
270  public :
271 
273  {
274  math::XYZPointF positionAtVtx ; // the track PCA to the beam spot
275  math::XYZPointF positionAtCalo ; // the track PCA to the supercluster position
276  math::XYZVectorF momentumAtVtx ; // the track momentum at the PCA to the beam spot
277  math::XYZVectorF momentumAtCalo ; // the track momentum extrapolated at the supercluster position from the innermost track state
278  math::XYZVectorF momentumOut ; // the track momentum extrapolated at the seed cluster position from the outermost track state
279  math::XYZVectorF momentumAtEleClus ; // the track momentum extrapolated at the ele cluster position from the outermost track state
280  math::XYZVectorF momentumAtVtxWithConstraint ; // the track momentum at the PCA to the beam spot using bs constraint
281  } ;
282 
283  // accessors
292 
293  // setter (if you know what you're doing)
295 
296  // for backward compatibility
299 
300 
301  private:
302 
303  // attributes
305 
306 
307  //=======================================================
308  // SuperCluster direct access
309  //=======================================================
310 
311  public :
312 
313  // direct accessors
314  math::XYZPoint superClusterPosition() const { return superCluster()->position() ; } // the super cluster position
315  int basicClustersSize() const { return superCluster()->clustersSize() ; } // number of basic clusters inside the supercluster
316  CaloCluster_iterator basicClustersBegin() const { return superCluster()->clustersBegin() ; }
317  CaloCluster_iterator basicClustersEnd() const { return superCluster()->clustersEnd() ; }
318 
319  // for backward compatibility
320  math::XYZPoint caloPosition() const { return superCluster()->position() ; }
321 
322 
323 
324  //=======================================================
325  // Fiducial Flags
326  //=======================================================
327 
328  public :
329 
331  {
332  bool isEB ; // true if particle is in ECAL Barrel
333  bool isEE ; // true if particle is in ECAL Endcaps
334  bool isEBEEGap ; // true if particle is in the crack between EB and EE
335  bool isEBEtaGap ; // true if particle is in EB, and inside the eta gaps between modules
336  bool isEBPhiGap ; // true if particle is in EB, and inside the phi gaps between modules
337  bool isEEDeeGap ; // true if particle is in EE, and inside the gaps between dees
338  bool isEERingGap ; // true if particle is in EE, and inside the gaps between rings
343  {}
344  } ;
345 
346  // accessors
347  bool isEB() const { return fiducialFlags_.isEB ; }
348  bool isEE() const { return fiducialFlags_.isEE ; }
349  bool isGap() const { return ((isEBEEGap())||(isEBGap())||(isEEGap())) ; }
350  bool isEBEEGap() const { return fiducialFlags_.isEBEEGap ; }
351  bool isEBGap() const { return (isEBEtaGap()||isEBPhiGap()) ; }
352  bool isEBEtaGap() const { return fiducialFlags_.isEBEtaGap ; }
353  bool isEBPhiGap() const { return fiducialFlags_.isEBPhiGap ; }
354  bool isEEGap() const { return (isEEDeeGap()||isEERingGap()) ; }
355  bool isEEDeeGap() const { return fiducialFlags_.isEEDeeGap ; }
356  bool isEERingGap() const { return fiducialFlags_.isEERingGap ; }
357  const FiducialFlags & fiducialFlags() const { return fiducialFlags_ ; }
358 
359 
360  private:
361 
362  // attributes
364 
365 
366  //=======================================================
367  // Shower Shape Variables
368  //=======================================================
369 
370  public :
371 
372  struct ShowerShape
373  {
374  float sigmaEtaEta ; // weighted cluster rms along eta and inside 5x5 (absolute eta)
375  float sigmaIetaIeta ; // weighted cluster rms along eta and inside 5x5 (Xtal eta)
376  float sigmaIphiIphi ; // weighted cluster rms along phi and inside 5x5 (Xtal phi)
377  float e1x5 ; // energy inside 1x5 in etaxphi around the seed Xtal
378  float e2x5Max ; // energy inside 2x5 in etaxphi around the seed Xtal (max bwt the 2 possible sums)
379  float e5x5 ; // energy inside 5x5 in etaxphi around the seed Xtal
380  float r9 ; // ratio of the 3x3 energy and supercluster energy
381  float hcalDepth1OverEcal ; // hcal over ecal seed cluster energy using 1st hcal depth (using hcal towers within a cone)
382  float hcalDepth2OverEcal ; // hcal over ecal seed cluster energy using 2nd hcal depth (using hcal towers within a cone)
383  std::vector<CaloTowerDetId> hcalTowersBehindClusters ; //
384  float hcalDepth1OverEcalBc ; // hcal over ecal seed cluster energy using 1st hcal depth (using hcal towers behind clusters)
385  float hcalDepth2OverEcalBc ; // hcal over ecal seed cluster energy using 2nd hcal depth (using hcal towers behind clusters)
387  : sigmaEtaEta(std::numeric_limits<float>::max()),
388  sigmaIetaIeta(std::numeric_limits<float>::max()),
389  sigmaIphiIphi(std::numeric_limits<float>::max()),
390  e1x5(0.), e2x5Max(0.), e5x5(0.),
391  r9(-std::numeric_limits<float>::max()),
394  {}
395  } ;
396 
397  // accessors
398  float sigmaEtaEta() const { return showerShape_.sigmaEtaEta ; }
399  float sigmaIetaIeta() const { return showerShape_.sigmaIetaIeta ; }
400  float sigmaIphiIphi() const { return showerShape_.sigmaIphiIphi ; }
401  float e1x5() const { return showerShape_.e1x5 ; }
402  float e2x5Max() const { return showerShape_.e2x5Max ; }
403  float e5x5() const { return showerShape_.e5x5 ; }
404  float r9() const { return showerShape_.r9 ; }
407  float hcalOverEcal() const { return hcalDepth1OverEcal() + hcalDepth2OverEcal() ; }
408  const std::vector<CaloTowerDetId> & hcalTowersBehindClusters() const { return showerShape_.hcalTowersBehindClusters ; }
412  const ShowerShape & showerShape() const { return showerShape_ ; }
413  // non-zero-suppressed and no-fractions shower shapes
414  // ecal energy is always that from the full 5x5
418  float full5x5_e1x5() const { return full5x5_showerShape_.e1x5 ; }
419  float full5x5_e2x5Max() const { return full5x5_showerShape_.e2x5Max ; }
420  float full5x5_e5x5() const { return full5x5_showerShape_.e5x5 ; }
421  float full5x5_r9() const { return full5x5_showerShape_.r9 ; }
429 
430  // setters (if you know what you're doing)
433 
434  // for backward compatibility (this will only ever be the ZS shapes!)
435  float scSigmaEtaEta() const { return sigmaEtaEta() ; }
436  float scSigmaIEtaIEta() const { return sigmaIetaIeta() ; }
437  float scE1x5() const { return e1x5() ; }
438  float scE2x5Max() const { return e2x5Max() ; }
439  float scE5x5() const { return e5x5() ; }
440  float hadronicOverEm() const {return hcalOverEcal();}
441  float hadronicOverEm1() const {return hcalDepth1OverEcal();}
442  float hadronicOverEm2() const {return hcalDepth2OverEcal();}
443 
444 
445  private:
446 
447  // attributes
450 
451 
452  //=======================================================
453  // Isolation Variables
454  //=======================================================
455 
456  public :
457 
459  {
460  float tkSumPt ; // track iso deposit with electron footprint removed
461  float ecalRecHitSumEt ; // ecal iso deposit with electron footprint removed
462  float hcalDepth1TowerSumEt ; // hcal depht 1 iso deposit with electron footprint removed
463  float hcalDepth2TowerSumEt ; // hcal depht 2 iso deposit with electron footprint removed
464  float hcalDepth1TowerSumEtBc ; // hcal depht 1 iso deposit without towers behind clusters
465  float hcalDepth2TowerSumEtBc ; // hcal depht 2 iso deposit without towers behind clusters
467  : tkSumPt(0.), ecalRecHitSumEt(0.),
470  {}
471  } ;
472 
473  // 03 accessors
474  float dr03TkSumPt() const { return dr03_.tkSumPt ; }
475  float dr03EcalRecHitSumEt() const { return dr03_.ecalRecHitSumEt ; }
482  const IsolationVariables & dr03IsolationVariables() const { return dr03_ ; }
483 
484  // 04 accessors
485  float dr04TkSumPt() const { return dr04_.tkSumPt ; }
486  float dr04EcalRecHitSumEt() const { return dr04_.ecalRecHitSumEt ; }
493  const IsolationVariables & dr04IsolationVariables() const { return dr04_ ; }
494 
495  // setters ?!?
496  void setDr03Isolation( const IsolationVariables & dr03 ) { dr03_ = dr03 ; }
497  void setDr04Isolation( const IsolationVariables & dr04 ) { dr04_ = dr04 ; }
498 
499  // for backward compatibility
500  void setIsolation03( const IsolationVariables & dr03 ) { dr03_ = dr03 ; }
501  void setIsolation04( const IsolationVariables & dr04 ) { dr04_ = dr04 ; }
502  const IsolationVariables & isolationVariables03() const { return dr03_ ; }
503  const IsolationVariables & isolationVariables04() const { return dr04_ ; }
504 
505  private:
506 
507  // attributes
510 
511 
512  //=======================================================
513  // Conversion Rejection Information
514  //=======================================================
515 
516  public :
517 
519  {
520  int flags ; // -max:not-computed, other: as computed by Puneeth conversion code
521  TrackBaseRef partner ; // conversion partner
522  float dist ; // distance to the conversion partner
523  float dcot ; // difference of cot(angle) with the conversion partner track
524  float radius ; // signed conversion radius
526  : flags(-1),
527  dist(std::numeric_limits<float>::max()),
528  dcot(std::numeric_limits<float>::max()),
529  radius(std::numeric_limits<float>::max())
530  {}
531  } ;
532 
533  // accessors
534  int convFlags() const { return conversionRejection_.flags ; }
536  float convDist() const { return conversionRejection_.dist ; }
537  float convDcot() const { return conversionRejection_.dcot ; }
538  float convRadius() const { return conversionRejection_.radius ; }
540 
541  private:
542 
543  // attributes
545 
546 
547  //=======================================================
548  // Pflow Information
549  //=======================================================
550 
551  public:
552 
554  {
555  //first three data members that changed names, according to DataFormats/MuonReco/interface/MuonPFIsolation.h
558  float sumPhotonEt;
559  //then four new data members, corresponding to DataFormats/MuonReco/interface/MuonPFIsolation.h
563  float sumPUPt;
564 
568  } ;
569 
570  struct MvaInput
571  {
572  int earlyBrem ; // Early Brem detected (-2=>unknown,-1=>could not be evaluated,0=>wrong,1=>true)
573  int lateBrem ; // Late Brem detected (-2=>unknown,-1=>could not be evaluated,0=>wrong,1=>true)
574  float sigmaEtaEta ; // Sigma-eta-eta with the PF cluster
575  float hadEnergy ; // Associated PF Had Cluster energy
576  float deltaEta ; // PF-cluster GSF track delta-eta
577  int nClusterOutsideMustache ; // -2 => unknown, -1 =>could not be evaluated, 0 and more => number of clusters
580  : earlyBrem(-2), lateBrem(-2),
581  sigmaEtaEta(std::numeric_limits<float>::max()),
582  hadEnergy(0.),
583  deltaEta(std::numeric_limits<float>::max()),
585  etOutsideMustache(-std::numeric_limits<float>::max())
586  {}
587  } ;
588 
589  struct MvaOutput
590  {
591  int status ; // see PFCandidateElectronExtra::StatusFlag
592  float mva ;
593  float mvaByPassForIsolated ; // complementary MVA used in preselection
595  : status(-1), mva(-999999999.), mvaByPassForIsolated(-999999999.)
596  {}
597  } ;
598 
599  // accessors
600  const ShowerShape & pfShowerShape() const { return pfShowerShape_ ; }
602  const MvaInput & mvaInput() const { return mvaInput_ ; }
603  const MvaOutput & mvaOutput() const { return mvaOutput_ ; }
604 
605  // setters
606  void setPfShowerShape( const ShowerShape & shape ) { pfShowerShape_ = shape ; }
608  void setMvaInput( const MvaInput & mi ) { mvaInput_ = mi ; }
609  void setMvaOutput( const MvaOutput & mo ) { mvaOutput_ = mo ; }
610 
611  // for backward compatibility
612  float mva() const { return mvaOutput_.mva ; }
613 
614  private:
615 
620 
621 
622  //=======================================================
623  // Preselection and Ambiguity
624  //=======================================================
625 
626  public :
627 
628  // accessors
629  bool ecalDriven() const ; // return true if ecalDrivenSeed() and passingCutBasedPreselection()
632  bool ambiguous() const { return ambiguous_ ; }
636 
637  // setters
640  void setAmbiguous( bool flag ) { ambiguous_ = flag ; }
643 
644  // backward compatibility
646  bool passingMvaPreselection() const { return passMvaPreslection_ ; }
647 
648  private:
649 
650  // attributes
653  bool passMvaPreslection_ ; // to be removed : passPflowPreslection_
654  bool ambiguous_ ;
655  GsfTrackRefVector ambiguousGsfTracks_ ; // ambiguous gsf tracks
656 
657 
658  //=======================================================
659  // Brem Fractions and Classification
660  //=======================================================
661 
662  public :
663 
665  {
666  float trackFbrem ; // the brem fraction from gsf fit: (track momentum in - track momentum out) / track momentum in
667  float superClusterFbrem ; // the brem fraction from supercluster: (supercluster energy - electron cluster energy) / supercluster energy
668  float pfSuperClusterFbrem ; // the brem fraction from pflow supercluster
670  : trackFbrem(-1.e30), superClusterFbrem(-1.e30), pfSuperClusterFbrem(-1.e30)
671  {}
672  } ;
674 
675  // accessors
676  float trackFbrem() const { return classVariables_.trackFbrem ; }
680  Classification classification() const { return class_ ; }
681 
682  // utilities
683  int numberOfBrems() const { return basicClustersSize()-1 ; }
684  float fbrem() const { return trackFbrem() ; }
685 
686  // setters
691  void setClassification( Classification myclass ) { class_ = myclass ; }
692 
693  private:
694 
695  // attributes
697  Classification class_ ; // fbrem and number of clusters based electron classification
698 
699 
700  //=======================================================
701  // Corrections
702  //
703  // The only methods, with classification, which modify
704  // the electrons after they have been constructed.
705  // They change a given characteristic, such as the super-cluster
706  // energy, and propagate the change consistently
707  // to all the depending attributes.
708  // We expect the methods to be called in a given order
709  // and so to store specific kind of corrections
710  // 1) classify()
711  // 2) correctEcalEnergy() : depending on classification and eta
712  // 3) correctMomemtum() : depending on classification and ecal energy and tracker momentum errors
713  //
714  // Beware that correctEcalEnergy() is modifying few attributes which
715  // were potentially used for preselection, whose value used in
716  // preselection will not be available any more :
717  // hcalDepth1OverEcal, hcalDepth2OverEcal, eSuperClusterOverP,
718  // eSeedClusterOverP, eEleClusterOverPout.
719  //=======================================================
720 
721  public :
722 
724 
725  struct Corrections
726  {
727  bool isEcalEnergyCorrected ; // true if ecal energy has been corrected
728  float correctedEcalEnergy ; // corrected energy (if !isEcalEnergyCorrected this value is identical to the supercluster energy)
729  float correctedEcalEnergyError ; // error on energy
730  //bool isMomentumCorrected ; // DEPRECATED
731  float trackMomentumError ; // track momentum error from gsf fit
732  //
733  LorentzVector fromSuperClusterP4 ; // for P4_FROM_SUPER_CLUSTER
734  float fromSuperClusterP4Error ; // for P4_FROM_SUPER_CLUSTER
735  LorentzVector combinedP4 ; // for P4_COMBINATION
736  float combinedP4Error ; // for P4_COMBINATION
737  LorentzVector pflowP4 ; // for P4_PFLOW_COMBINATION
738  float pflowP4Error ; // for P4_PFLOW_COMBINATION
739  P4Kind candidateP4Kind ; // say which momentum has been stored in reco::Candidate
740  //
743  /*isMomentumCorrected(false),*/ trackMomentumError(999.),
746  {}
747  } ;
748 
749  // setters
750  void setCorrectedEcalEnergyError( float newEnergyError ) ;
751  void setCorrectedEcalEnergy( float newEnergy ) ;
753  void setP4( P4Kind kind, const LorentzVector & p4, float p4Error, bool setCandidate ) ;
754  using RecoCandidate::setP4 ;
755 
756  // accessors
761  const LorentzVector & p4( P4Kind kind ) const ;
762  using RecoCandidate::p4 ;
763  float p4Error( P4Kind kind ) const ;
765  const Corrections & corrections() const { return corrections_ ; }
766 
767  // bare setter (if you know what you're doing)
769 
770  // for backward compatibility
772  float ecalEnergy() const { return correctedEcalEnergy() ; }
773  float ecalEnergyError() const { return correctedEcalEnergyError() ; }
774  //bool isMomentumCorrected() const { return corrections_.isMomentumCorrected ; }
775  float caloEnergy() const { return correctedEcalEnergy() ; }
776  bool isEnergyScaleCorrected() const { return isEcalEnergyCorrected() ; }
777  void correctEcalEnergy( float newEnergy, float newEnergyError )
778  {
779  setCorrectedEcalEnergy(newEnergy) ;
780  setEcalEnergyError(newEnergyError) ;
781  }
783  { setTrackMomentumError(trackMomentumError) ; setP4(P4_COMBINATION,p4,p4Error,true) ; }
784 
785 
786  private:
787 
788  // attributes
790 
791  } ;
792 
793  } // namespace reco
794 
795 #endif
const PflowIsolationVariables & pfIsolationVariables() const
Definition: GsfElectron.h:601
CaloCluster_iterator basicClustersEnd() const
Definition: GsfElectron.h:317
float sigmaIphiIphi() const
Definition: GsfElectron.h:400
CaloClusterPtr electronCluster() const
Definition: GsfElectron.h:242
bool isEEGap() const
Definition: GsfElectron.h:354
void setDr04Isolation(const IsolationVariables &dr04)
Definition: GsfElectron.h:497
const ShowerShape & showerShape() const
Definition: GsfElectron.h:412
float dr04HcalTowerSumEt() const
Definition: GsfElectron.h:489
void correctEcalEnergy(float newEnergy, float newEnergyError)
Definition: GsfElectron.h:777
void setTrackFbrem(float fbrem)
Definition: GsfElectron.h:687
MvaInput mvaInput_
Definition: GsfElectron.h:618
ClosestCtfTrack closestCtfTrack() const
Definition: GsfElectron.h:200
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
Definition: GsfElectron.cc:203
void setPassCutBasedPreselection(bool flag)
Definition: GsfElectron.h:638
float trackMomentumError() const
Definition: GsfElectron.h:760
GsfTrackRefVector::const_iterator ambiguousGsfTracksBegin() const
Definition: GsfElectron.h:634
SuperClusterRef parentSuperCluster() const
Definition: GsfElectron.h:188
float scSigmaEtaEta() const
Definition: GsfElectron.h:435
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:179
const Corrections & corrections() const
Definition: GsfElectron.h:765
bool isEBEtaGap() const
Definition: GsfElectron.h:352
float dr03HcalDepth1TowerSumEtBc() const
Definition: GsfElectron.h:479
float eSuperClusterOverP() const
Definition: GsfElectron.h:243
P4Kind candidateP4Kind() const
Definition: GsfElectron.h:764
const TrackExtrapolations & trackExtrapolations() const
Definition: GsfElectron.h:291
float full5x5_e5x5() const
Definition: GsfElectron.h:420
float full5x5_hcalDepth1OverEcalBc() const
Definition: GsfElectron.h:425
math::XYZVectorF trackMomentumAtVtxWithConstraint() const
Definition: GsfElectron.h:290
const IsolationVariables & isolationVariables03() const
Definition: GsfElectron.h:502
bool isEBEEGap() const
Definition: GsfElectron.h:350
float dr04HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:487
float hcalDepth2OverEcal() const
Definition: GsfElectron.h:406
float full5x5_e1x5() const
Definition: GsfElectron.h:418
float hadronicOverEm1() const
Definition: GsfElectron.h:441
Classification class_
Definition: GsfElectron.h:697
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:782
float full5x5_hcalDepth2OverEcal() const
Definition: GsfElectron.h:423
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:286
ShowerShape pfShowerShape_
Definition: GsfElectron.h:616
ConversionRejection conversionRejection_
Definition: GsfElectron.h:544
void setMvaInput(const MvaInput &mi)
Definition: GsfElectron.h:608
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
Definition: GsfElectron.h:563
float p4Error(P4Kind kind) const
Definition: GsfElectron.cc:241
float full5x5_sigmaIphiIphi() const
Definition: GsfElectron.h:417
void setShowerShape(const ShowerShape &s)
Definition: GsfElectron.h:431
virtual void setP4(const LorentzVector &p4)
set 4-momentum
float dr04TkSumPt() const
Definition: GsfElectron.h:485
Corrections corrections_
Definition: GsfElectron.h:789
float sumNeutralHadronEtHighThreshold
sum pt of neutral hadrons with a higher threshold
Definition: GsfElectron.h:561
bool isEERingGap() const
Definition: GsfElectron.h:356
bool passingCutBasedPreselection() const
Definition: GsfElectron.h:630
const ShowerShape & pfShowerShape() const
Definition: GsfElectron.h:600
bool passingMvaPreselection() const
Definition: GsfElectron.h:646
float dr03HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:477
float sumChargedParticlePt
sum-pt of charged Particles(inludes e/mu)
Definition: GsfElectron.h:560
float fbrem() const
Definition: GsfElectron.h:684
const std::vector< CaloTowerDetId > & hcalTowersBehindClusters() const
Definition: GsfElectron.h:408
void setAmbiguous(bool flag)
Definition: GsfElectron.h:640
GsfTrackRefVector ambiguousGsfTracks_
Definition: GsfElectron.h:655
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: Point3D.h:10
float scE2x5Max() const
Definition: GsfElectron.h:438
float e2x5Max() const
Definition: GsfElectron.h:402
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
int basicClustersSize() const
Definition: GsfElectron.h:315
float convDist() const
Definition: GsfElectron.h:536
ChargeInfo chargeInfo_
Definition: GsfElectron.h:164
float convRadius() const
Definition: GsfElectron.h:538
void setPfIsolationVariables(const PflowIsolationVariables &iso)
Definition: GsfElectron.h:607
math::XYZPointF TrackPositionAtVtx() const
Definition: GsfElectron.h:297
void setDr03Isolation(const IsolationVariables &dr03)
Definition: GsfElectron.h:496
bool isEEDeeGap() const
Definition: GsfElectron.h:355
void setMvaOutput(const MvaOutput &mo)
Definition: GsfElectron.h:609
float dr04HcalTowerSumEtBc() const
Definition: GsfElectron.h:492
bool ambiguous() const
Definition: GsfElectron.h:632
const IsolationVariables & dr04IsolationVariables() const
Definition: GsfElectron.h:493
const ClassificationVariables & classificationVariables() const
Definition: GsfElectron.h:679
float superClusterFbrem() const
Definition: GsfElectron.h:677
bool isEcalEnergyCorrected() const
Definition: GsfElectron.h:757
bool isEE() const
Definition: GsfElectron.h:348
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
bool isEB() const
Definition: GsfElectron.h:347
TrackRef closestCtfTrackRef() const
Definition: GsfElectron.h:199
virtual reco::TrackRef track() const
reference to a Track
GsfTrackRefVector::const_iterator ambiguousGsfTracksEnd() const
Definition: GsfElectron.h:635
void setSuperClusterFbrem(float fbrem)
Definition: GsfElectron.h:688
float convDcot() const
Definition: GsfElectron.h:537
float full5x5_sigmaIetaIeta() const
Definition: GsfElectron.h:416
void clearAmbiguousGsfTracks()
Definition: GsfElectron.h:641
bool isGsfScPixChargeConsistent() const
Definition: GsfElectron.h:153
const IsolationVariables & isolationVariables04() const
Definition: GsfElectron.h:503
PflowIsolationVariables pfIso_
Definition: GsfElectron.h:617
bool isGap() const
Definition: GsfElectron.h:349
float dr04HcalDepth2TowerSumEt() const
Definition: GsfElectron.h:488
math::XYZVectorF trackMomentumAtCalo() const
Definition: GsfElectron.h:287
float mva() const
Definition: GsfElectron.h:612
bool isGsfCtfChargeConsistent() const
Definition: GsfElectron.h:154
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:247
void setCorrectedEcalEnergyError(float newEnergyError)
Definition: GsfElectron.cc:183
virtual bool isElectron() const
Definition: GsfElectron.h:158
float sigmaIetaIeta() const
Definition: GsfElectron.h:399
float hadronicOverEm() const
Definition: GsfElectron.h:440
float dr03HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:480
float eSeedClusterOverP() const
Definition: GsfElectron.h:244
MvaOutput mvaOutput_
Definition: GsfElectron.h:619
float dr04EcalRecHitSumEt() const
Definition: GsfElectron.h:486
FiducialFlags fiducialFlags_
Definition: GsfElectron.h:363
float deltaPhiSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:251
const MvaInput & mvaInput() const
Definition: GsfElectron.h:602
float sumPhotonEtHighThreshold
sum pt of PF photons with a higher threshold
Definition: GsfElectron.h:562
float full5x5_sigmaEtaEta() const
Definition: GsfElectron.h:415
ShowerShape showerShape_
Definition: GsfElectron.h:448
float trackFbrem() const
Definition: GsfElectron.h:676
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:182
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:288
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:558
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:250
int numberOfBrems() const
Definition: GsfElectron.h:683
virtual int charge() const
electric charge
float hcalOverEcal() const
Definition: GsfElectron.h:407
void setPassMvaPreselection(bool flag)
Definition: GsfElectron.h:645
float dr04HcalDepth1TowerSumEtBc() const
Definition: GsfElectron.h:490
float dr03TkSumPt() const
Definition: GsfElectron.h:474
math::XYZPointF trackPositionAtCalo() const
Definition: GsfElectron.h:285
std::vector< CaloTowerDetId > hcalTowersBehindClusters
Definition: GsfElectron.h:383
float dr03HcalDepth1TowerSumEt() const
Definition: GsfElectron.h:476
math::XYZPointF TrackPositionAtCalo() const
Definition: GsfElectron.h:298
float eEleClusterOverPout() const
Definition: GsfElectron.h:246
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:557
float eSeedClusterOverPout() const
Definition: GsfElectron.h:245
float full5x5_hcalOverEcalBc() const
Definition: GsfElectron.h:427
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: Vector3D.h:17
float hadronicOverEm2() const
Definition: GsfElectron.h:442
float hcalOverEcalBc() const
Definition: GsfElectron.h:411
int scPixCharge() const
Definition: GsfElectron.h:151
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:436
void setIsolation04(const IsolationVariables &dr04)
Definition: GsfElectron.h:501
IsolationVariables dr04_
Definition: GsfElectron.h:509
float ecalEnergyError() const
Definition: GsfElectron.h:773
float deltaPhiEleClusterTrackAtCalo() const
Definition: GsfElectron.h:252
void setDeltaPhiSuperClusterAtVtx(float dphi)
Definition: GsfElectron.h:257
bool isEnergyScaleCorrected() const
Definition: GsfElectron.h:776
void setEcalEnergyError(float energyError)
Definition: GsfElectron.h:771
void setPfShowerShape(const ShowerShape &shape)
Definition: GsfElectron.h:606
dictionary cv
Definition: cuy.py:362
void setTrackMomentumError(float trackMomentumError)
Definition: GsfElectron.cc:199
math::XYZPoint superClusterPosition() const
Definition: GsfElectron.h:314
float full5x5_hcalDepth1OverEcal() const
Definition: GsfElectron.h:422
float hcalDepth1OverEcal() const
Definition: GsfElectron.h:405
float shFracInnerHits() const
Definition: GsfElectron.h:198
float correctedEcalEnergy() const
Definition: GsfElectron.h:758
ClassificationVariables classVariables_
Definition: GsfElectron.h:696
bool isEBGap() const
Definition: GsfElectron.h:351
GsfElectronCoreRef core_
Definition: GsfElectron.h:205
ShowerShape full5x5_showerShape_
Definition: GsfElectron.h:449
virtual ~GsfElectron()
Definition: GsfElectron.h:112
TrackBaseRef convPartner() const
Definition: GsfElectron.h:535
const ChargeInfo & chargeInfo() const
Definition: GsfElectron.h:155
float full5x5_e2x5Max() const
Definition: GsfElectron.h:419
CaloCluster_iterator basicClustersBegin() const
Definition: GsfElectron.h:316
void clear()
Clear the vector.
Definition: RefVector.h:133
float deltaEtaEleClusterTrackAtCalo() const
Definition: GsfElectron.h:249
void setClassification(Classification myclass)
Definition: GsfElectron.h:691
float e1x5() const
Definition: GsfElectron.h:401
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Classification classification() const
Definition: GsfElectron.h:680
float hcalDepth2OverEcalBc() const
Definition: GsfElectron.h:410
const MvaOutput & mvaOutput() const
Definition: GsfElectron.h:603
float full5x5_hcalOverEcal() const
Definition: GsfElectron.h:424
virtual bool overlap(const Candidate &) const
check overlap with another candidate
Definition: GsfElectron.cc:150
math::XYZPoint caloPosition() const
Definition: GsfElectron.h:320
GsfTrackRefVector::size_type ambiguousGsfTracksSize() const
Definition: GsfElectron.h:633
float dr04HcalDepth2TowerSumEtBc() const
Definition: GsfElectron.h:491
float full5x5_hcalDepth2OverEcalBc() const
Definition: GsfElectron.h:426
float ecalEnergy() const
Definition: GsfElectron.h:772
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:41
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:475
math::XYZVectorF trackMomentumAtEleClus() const
Definition: GsfElectron.h:289
float e5x5() const
Definition: GsfElectron.h:403
float dr03HcalTowerSumEtBc() const
Definition: GsfElectron.h:481
float full5x5_r9() const
Definition: GsfElectron.h:421
math::XYZVectorF momentumAtVtxWithConstraint
Definition: GsfElectron.h:280
float correctedEcalEnergyError() const
Definition: GsfElectron.h:759
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< float > > LorentzVector
Definition: analysisEnums.h:9
void setCorrectedEcalEnergy(float newEnergy)
Definition: GsfElectron.cc:186
void setIsolation03(const IsolationVariables &dr03)
Definition: GsfElectron.h:500
float r9() const
Definition: GsfElectron.h:404
float deltaEtaSeedClusterTrackAtCalo() const
Definition: GsfElectron.h:248
const ShowerShape & full5x5_showerShape() const
Definition: GsfElectron.h:428
void setTrackExtrapolations(const TrackExtrapolations &te)
Definition: GsfElectron.h:294
const IsolationVariables & dr03IsolationVariables() const
Definition: GsfElectron.h:482
int convFlags() const
Definition: GsfElectron.h:534
math::XYZPointF trackPositionAtVtx() const
Definition: GsfElectron.h:284
void setPfSuperClusterFbrem(float fbrem)
Definition: GsfElectron.h:689
bool isEBPhiGap() const
Definition: GsfElectron.h:353
bool isGsfCtfScPixChargeConsistent() const
Definition: GsfElectron.h:152
ClosestCtfTrack(TrackRef track, float sh)
Definition: GsfElectron.h:196
const TrackClusterMatching & trackClusterMatching() const
Definition: GsfElectron.h:253
bool trackerDrivenSeed() const
Definition: GsfElectron.h:187
void setPassPflowPreselection(bool flag)
Definition: GsfElectron.h:639
GsfElectron * clone() const
returns a clone of the Candidate object
Definition: GsfElectron.cc:159
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:64
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:478
const ConversionRejection & conversionRejectionVariables() const
Definition: GsfElectron.h:539
void setDeltaEtaSuperClusterAtVtx(float de)
Definition: GsfElectron.h:256
void setCorrections(const Corrections &c)
Definition: GsfElectron.h:768
void setClassificationVariables(const ClassificationVariables &cv)
Definition: GsfElectron.h:690
float scE5x5() const
Definition: GsfElectron.h:439
volatile std::atomic< bool > shutdown_flag false
TrackClusterMatching trackClusterMatching_
Definition: GsfElectron.h:263
float pfSuperClusterFbrem() const
Definition: GsfElectron.h:678
bool passCutBasedPreselection_
Definition: GsfElectron.h:651
float hcalDepth1OverEcalBc() const
Definition: GsfElectron.h:409
IsolationVariables dr03_
Definition: GsfElectron.h:508
void addAmbiguousGsfTrack(const reco::GsfTrackRef &t)
Definition: GsfElectron.h:642
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:556
void full5x5_setShowerShape(const ShowerShape &s)
Definition: GsfElectron.h:432
TrackExtrapolations trackExtrapolations_
Definition: GsfElectron.h:304
float caloEnergy() const
Definition: GsfElectron.h:775
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
bool ecalDriven() const
Definition: GsfElectron.cc:172
bool passPflowPreselection_
Definition: GsfElectron.h:652
float ctfGsfOverlap() const
Definition: GsfElectron.h:185
const FiducialFlags & fiducialFlags() const
Definition: GsfElectron.h:357
float sigmaEtaEta() const
Definition: GsfElectron.h:398
float scE1x5() const
Definition: GsfElectron.h:437
virtual TrackRef closestTrack() const
Definition: GsfElectron.h:184
float energyError(float E, float *par)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
Definition: GsfElectron.h:183
bool ecalDrivenSeed() const
Definition: GsfElectron.h:186
bool passingPflowPreselection() const
Definition: GsfElectron.h:631