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