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