34 : chargeInfo_(chargeInfo),
36 trackClusterMatching_(tcm), trackExtrapolations_(te),
38 fiducialFlags_(ff), showerShape_(ss), conversionRejection_(crv)
43 setPdgId(-11*charge) ;
44 corrections_.correctedEcalEnergy = superCluster()->energy() ;
57 : chargeInfo_(chargeInfo),
59 trackClusterMatching_(tcm), trackExtrapolations_(te),
61 fiducialFlags_(ff), showerShape_(ss), full5x5_showerShape_(full5x5_ss),
62 conversionRejection_(crv)
67 setPdgId(-11*charge) ;
68 corrections_.correctedEcalEnergy = superCluster()->energy() ;
99 assert(electron.
core()->ctfTrack()==core->ctfTrack()) ;
100 assert(electron.
core()->ctfGsfOverlap()==core->ctfGsfOverlap()) ;
129 ambiguousGsfTracks_(ambiguousTracks),
135 trackClusterMatching_.electronCluster = electronCluster ;
137 conversionRejection_.partner = conversionPartner ;
138 assert(closestCtfTrack==core->ctfTrack()) ;
139 assert(electron.
core()->ctfGsfOverlap()==core->ctfGsfOverlap()) ;
170 {
return new GsfElectron(*
this,core,electronCluster,closestCtfTrack,conversionPartner,ambiguousTracks) ; }
177 <<
"All preselection flags are false,"
178 <<
" either the data is too old or electrons were not preselected." ;
189 momentum *= newEnergy/momentum.e() ;
207 case P4_FROM_SUPER_CLUSTER:
208 corrections_.fromSuperClusterP4 =
p4 ;
209 corrections_.fromSuperClusterP4Error =
error ;
212 corrections_.combinedP4 =
p4 ;
213 corrections_.combinedP4Error =
error ;
215 case P4_PFLOW_COMBINATION:
216 corrections_.pflowP4 =
p4 ;
217 corrections_.pflowP4Error =
error ;
220 throw cms::Exception(
"GsfElectron")<<
"unexpected p4 kind: "<<kind ;
225 corrections_.candidateP4Kind = kind ;
236 default:
throw cms::Exception(
"GsfElectron")<<
"unexpected p4 kind: "<<kind ;
248 default:
throw cms::Exception(
"GsfElectron")<<
"unexpected p4 kind: "<<kind ;
virtual reco::GsfTrackRef gsfTrack() const
reference to a GsfTrack
bool checkOverlap(const R &r1, const R &r2) const
check if two components overlap
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
bool isEcalEnergyCorrected
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
float correctedEcalEnergy
float correctedEcalEnergyError
ShowerShape pfShowerShape_
ConversionRejection conversionRejection_
float fromSuperClusterP4Error
float p4Error(P4Kind kind) const
bool passingCutBasedPreselection() const
bool passingMvaPreselection() const
GsfTrackRefVector ambiguousGsfTracks_
PflowIsolationVariables pfIso_
void setCorrectedEcalEnergyError(float newEnergyError)
FiducialFlags fiducialFlags_
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
void setTrackMomentumError(float trackMomentumError)
ClassificationVariables classVariables_
ShowerShape full5x5_showerShape_
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
virtual bool overlap(const Candidate &) const
check overlap with another candidate
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual GsfElectronCoreRef core() const
void setCorrectedEcalEnergy(float newEnergy)
GsfElectron * clone() const
returns a clone of the Candidate object
volatile std::atomic< bool > shutdown_flag false
TrackClusterMatching trackClusterMatching_
bool passCutBasedPreselection_
TrackExtrapolations trackExtrapolations_
bool passPflowPreselection_
LorentzVector fromSuperClusterP4
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
float energyError(float E, float *par)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
bool ecalDrivenSeed() const