35 : chargeInfo_(chargeInfo),
37 trackClusterMatching_(tcm), trackExtrapolations_(te),
39 fiducialFlags_(ff), showerShape_(ss), conversionRejection_(crv)
45 setPdgId(-11*charge) ;
46 corrections_.ecalEnergy = superCluster()->energy() ;
73 assert(electron.
core()->ctfTrack()==core->ctfTrack()) ;
74 assert(electron.
core()->ctfGsfOverlap()==core->ctfGsfOverlap()) ;
97 ambiguousGsfTracks_(ambiguousTracks),
103 trackClusterMatching_.electronCluster = electronCluster ;
105 conversionRejection_.partner = conversionPartner ;
106 assert(closestCtfTrack==core->ctfTrack()) ;
107 assert(electron.
core()->ctfGsfOverlap()==core->ctfGsfOverlap()) ;
138 {
return new GsfElectron(*
this,core,electronCluster,closestCtfTrack,conversionPartner,ambiguousTracks) ; }
145 <<
"All preselection flags are false,"
146 <<
" either the data is too old or electrons were not preselected." ;
154 momentum *= newEnergy/momentum.e() ;
174 case P4_FROM_SUPER_CLUSTER:
175 corrections_.fromSuperClusterP4 =
p4 ;
176 corrections_.fromSuperClusterP4Error =
error ;
179 corrections_.combinedP4 =
p4 ;
180 corrections_.combinedP4Error =
error ;
182 case P4_PFLOW_COMBINATION:
183 corrections_.pflowP4 =
p4 ;
184 corrections_.pflowP4Error =
error ;
187 throw cms::Exception(
"GsfElectron")<<
"unexpected p4 kind: "<<kind ;
192 corrections_.candidateP4Kind = kind ;
203 default:
throw cms::Exception(
"GsfElectron")<<
"unexpected p4 kind: "<<kind ;
215 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.
ConversionRejection conversionRejection_
float fromSuperClusterP4Error
virtual Vector momentum() const
spatial momentum vector
float p4Error(P4Kind kind) const
bool passingCutBasedPreselection() const
bool passingMvaPreselection() const
SuperClusterRef superCluster() const
reference to a SuperCluster
GsfTrackRefVector ambiguousGsfTracks_
FiducialFlags fiducialFlags_
void setTrackMomentumError(float trackMomentumError)
GsfTrackRef gsfTrack() const
reference to a GsfTrack
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual bool overlap(const Candidate &) const
check overlap with another candidate
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual GsfElectronCoreRef core() const
float eEleClusterOverPout
void setCorrectedEcalEnergy(float newEnergy, float newEnergyError)
GsfElectron * clone() const
returns a clone of the Candidate object
TrackClusterMatching trackClusterMatching_
bool passCutBasedPreselection_
TrackExtrapolations trackExtrapolations_
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
LorentzVector fromSuperClusterP4
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
bool ecalDrivenSeed() const