47 #include <Math/Point3D.h> 54 using namespace reco ;
114 : inputCfg(inputConfig),
115 strategyCfg(strategyConfig),
117 cutsCfgPflow(cutsConfigPflow),
119 recHitsCfg(recHitsConfig),
133 delete hcalHelperPflow ;
168 : cacheIDGeom(0), cacheIDTopo(0), cacheIDTDGeom(0), cacheIDMagField(0),
195 void retreiveOriginalTrackCollections
231 originalCtfTrackCollectionRetreived(
false),
232 originalGsfTrackCollectionRetreived(
false),
258 GsfElectronPtrCollection::const_iterator it ;
327 gsfTrackRef(coreRef->gsfTrack()),
328 superClusterRef(coreRef->superCluster()),
329 ctfTrackRef(coreRef->ctfTrack()), shFracInnerHits(coreRef->ctfGsfOverlap()),
338 if (!ctfTrackRef.isNull())
return ;
342 shFracInnerHits = 0 ;
349 TrackCollection::const_iterator ctfTkIter ;
350 for (ctfTkIter = ctfTrackCollection->begin(), counter = 0;
351 ctfTkIter != ctfTrackCollection->end(); ctfTkIter++, counter++)
353 double dEta = gsfTrackRef->eta() - ctfTkIter->eta() ;
354 double dPhi = gsfTrackRef->phi() - ctfTkIter->phi() ;
355 double pi = acos(-1.);
359 if (
sqrt(dEta*dEta + dPhi*dPhi) > 0.3) continue ;
361 unsigned int shared = 0 ;
362 int gsfHitCounter = 0 ;
363 int numGsfInnerHits = 0 ;
364 int numCtfInnerHits = 0 ;
370 for (elHitsIt = gsfTrackRef->recHitsBegin();
371 elHitsIt != gsfTrackRef->recHitsEnd();
372 elHitsIt++, gsfHitCounter++)
374 if (!((**elHitsIt).isValid()))
378 uint32_t gsfHit = gsfHitPattern.
getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter) ;
379 if (!(HitPattern::pixelHitFilter(gsfHit)
380 || HitPattern::stripTIBHitFilter(gsfHit)
381 || HitPattern::stripTIDHitFilter(gsfHit))){
387 int ctfHitsCounter = 0 ;
388 numCtfInnerHits = 0 ;
390 for (ctfHitsIt = ctfTkIter->recHitsBegin();
391 ctfHitsIt != ctfTkIter->recHitsEnd();
392 ctfHitsIt++, ctfHitsCounter++ )
394 if(!((**ctfHitsIt).isValid()))
397 uint32_t ctfHit = ctfHitPattern.
getHitPattern(HitPattern::TRACK_HITS, ctfHitsCounter);
398 if(!(HitPattern::pixelHitFilter(ctfHit)
399 || HitPattern::stripTIBHitFilter(ctfHit)
400 || HitPattern::stripTIDHitFilter(ctfHit)))
417 if ((numGsfInnerHits==0)||(numCtfInnerHits==0))
420 if ( static_cast<float>(shared)/
min(numGsfInnerHits,numCtfInnerHits) > shFracInnerHits )
422 shFracInnerHits =
static_cast<float>(shared)/
min(numGsfInnerHits, numCtfInnerHits);
423 ctfTrackRef =
TrackRef(currentCtfTracks,counter);
443 int chargeGsf = gsfTrackRef->charge() ;
445 info.
isGsfCtfConsistent = (ctfTrackRef.isNonnull()&&((chargeGsf*ctfTrackRef->charge())>0)) ;
452 { charge = ctfTrackRef->charge() ; }
461 float dphimin = 1.e30 ;
462 for (
CaloCluster_iterator bc=superClusterRef->clustersBegin(); bc!=superClusterRef->clustersEnd(); bc++)
464 GlobalPoint posclu((*bc)->position().x(),(*bc)->position().y(),(*bc)->position().z()) ;
466 if (!tempTSOS.isValid()) tempTSOS=outTSOS ;
484 if (!innTSOS.isValid())
return false;
491 if (!vtxTSOS.isValid()) vtxTSOS=innTSOS;
495 if (!outTSOS.isValid())
return false;
499 GlobalPoint(superClusterRef->seed()->position().x(),
500 superClusterRef->seed()->position().y(),
501 superClusterRef->seed()->position().z()));
502 if (!seedTSOS.isValid()) seedTSOS=outTSOS;
506 if (!sclTSOS.isValid()) sclTSOS=outTSOS;
533 double scale = superClusterRef->energy()/vtxMom.mag() ;
536 superClusterRef->energy() ) ;
551 int nSaturatedXtals = 0;
552 bool isSeedSaturated =
false;
553 const auto hitsAndFractions = theClus->hitsAndFractions();
554 for (
auto&& hitFractionPair : hitsAndFractions) {
557 if (
ecalRecHit->checkFlag(EcalRecHit::Flags::kSaturated)) {
560 isSeedSaturated =
true;
579 std::vector<int> recHitFlagsToBeExcluded ;
580 std::vector<int> recHitSeverityToBeExcluded ;
594 std::vector<float> covariances = EcalClusterTools::covariances(seedCluster,recHits,topology,geometry) ;
595 std::vector<float> localCovariances = EcalClusterTools::localCovariances(seedCluster,recHits,topology) ;
600 showerShape.
e2x5Max = EcalClusterTools::e2x5Max(seedCluster,recHits,topology) ;
602 showerShape.
r9 = EcalClusterTools::e3x3(seedCluster,recHits,topology)/theClus->rawEnergy() ;
629 if( see_by_spp > 0 ) {
630 showerShape.
sigmaIetaIphi = localCovariances[1] / see_by_spp;
631 }
else if ( localCovariances[1] > 0 ) {
637 showerShape.
e2nd = EcalClusterTools::e2nd(seedCluster,recHits);
638 showerShape.
eTop = EcalClusterTools::eTop(seedCluster,recHits,topology);
639 showerShape.
eLeft = EcalClusterTools::eLeft(seedCluster,recHits,topology);
640 showerShape.
eRight = EcalClusterTools::eRight(seedCluster,recHits,topology);
641 showerShape.
eBottom = EcalClusterTools::eBottom(seedCluster,recHits,topology);
643 showerShape.
e2x5Left = EcalClusterTools::e2x5Left(seedCluster,recHits,topology);
644 showerShape.
e2x5Right = EcalClusterTools::e2x5Right(seedCluster,recHits,topology);
645 showerShape.
e2x5Top = EcalClusterTools::e2x5Top(seedCluster,recHits,topology);
646 showerShape.
e2x5Bottom = EcalClusterTools::e2x5Bottom(seedCluster,recHits,topology);
660 std::vector<int> recHitFlagsToBeExcluded ;
661 std::vector<int> recHitSeverityToBeExcluded ;
710 if( see_by_spp > 0 ) {
711 showerShape.
sigmaIetaIphi = localCovariances[1] / see_by_spp;
712 }
else if ( localCovariances[1] > 0 ) {
754 :
generalData_(
new GeneralData(inputCfg,strategyCfg,cutsCfg,cutsCfgPflow,hcalCfg,hcalCfgPflow,isoCfg,recHitsCfg,superClusterErrorFunction,crackCorrectionFunction,mva_NIso_Cfg,mva_Iso_Cfg,regCfg)),
771 bool updateField(
false);
778 bool updateGeometry(
false);
780 updateGeometry =
true;
785 if ( updateField || updateGeometry ) {
827 GsfElectronPtrCollection::const_iterator it ;
832 { outEle.push_back(**it) ; }
838 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unexpected event data" ; }
866 float egHcalIsoConeSizeOutSmall=0.3, egHcalIsoConeSizeOutLarge=0.4;
868 int egHcalDepth1=1, egHcalDepth2=2;
903 std::vector<edm::InputTag> inputTagIsoVals;
911 for (
size_t j = 0; j<inputTagIsoVals.size(); ++j) {
918 inputTagIsoVals.clear();
925 for (
size_t j = 0; j<inputTagIsoVals.size(); ++j) {
934 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"lacking event data" ; }
941 LogTrace(
"GsfElectronAlgo") <<
"========== " << title <<
" ==========";
944 GsfElectronPtrCollection::const_iterator it ;
947 LogTrace(
"GsfElectronAlgo") <<
"Electron with charge, pt, eta, phi: " << (*it)->charge() <<
" , " 948 << (*it)->pt() <<
" , " << (*it)->eta() <<
" , " << (*it)->phi();
950 LogTrace(
"GsfElectronAlgo") <<
"=================================================";
956 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unexpected electron data" ; }
959 for (
unsigned int i=0 ;
i<coreCollection->size() ; ++
i )
963 bool coreFound =
false ;
964 GsfElectronPtrCollection::const_iterator itrEle ;
970 if ((*itrEle)->core()==coreRef)
976 if (coreFound) continue ;
979 if (coreRef->superCluster().
isNull())
continue ;
1000 GsfElectronCollection::const_iterator oldElectron ;
1002 ( oldElectron = oldElectrons->begin() ;
1003 oldElectron != oldElectrons->end() ;
1007 const GsfTrackRef oldElectronGsfTrackRef = oldCoreRef->gsfTrack() ;
1008 unsigned int icore ;
1009 for ( icore=0 ; icore<newCores->size() ; ++icore )
1011 if (oldElectronGsfTrackRef==(*newCores)[icore].gsfTrack())
1028 GsfElectronCollection::const_iterator pfElectron, edElectron ;
1029 unsigned int edIndex, pfIndex ;
1031 GsfElectronPtrCollection::iterator el ;
1041 ( pfIndex = 0, pfElectron = pfElectrons->begin() ; pfElectron != pfElectrons->end() ; pfIndex++, pfElectron++ )
1043 if (pfElectron->gsfTrack()==(*el)->gsfTrack())
1047 edm::LogWarning(
"GsfElectronProducer")<<
"associated pfGsfElectron already found" ;
1062 (*el)->setPfIsolationVariables(isoVariables);
1066 (*el)->setMvaInput(pfElectron->mvaInput()) ;
1067 (*el)->setMvaOutput(pfElectron->mvaOutput()) ;
1068 if ((*el)->ecalDrivenSeed())
1069 { (*el)->setP4(GsfElectron::P4_PFLOW_COMBINATION,pfElectron->p4(GsfElectron::P4_PFLOW_COMBINATION),pfElectron->p4Error(GsfElectron::P4_PFLOW_COMBINATION),
false) ; }
1071 { (*el)->setP4(GsfElectron::P4_PFLOW_COMBINATION,pfElectron->p4(GsfElectron::P4_PFLOW_COMBINATION),pfElectron->p4Error(GsfElectron::P4_PFLOW_COMBINATION),
true) ; }
1072 double noCutMin = -999999999. ;
1073 if ((*el)->mva_e_pi()<noCutMin) {
throw cms::Exception(
"GsfElectronAlgo|UnexpectedMvaValue")<<
"unexpected MVA value: "<<(*el)->mva_e_pi() ; }
1082 edIndex = 0, edElectron = edElectrons->begin() ;
1083 while ((found ==
false)&&(edElectron != edElectrons->end()))
1085 if (edElectron->gsfTrack()==(*el)->gsfTrack())
1098 (*el)->setPfIsolationVariables(isoVariables);
1120 return passmva && passCutBased;
1125 return passCutBased || passPF || passmva;
1129 return passCutBased || passPF;
1141 LogTrace(
"GsfElectronAlgo")<<
"========== removed not preselected "<<ei<<
"/"<<emax<<
"==========" ;
1156 bool eg = ele->
core()->ecalDrivenSeed() ;
1157 bool pf = ele->
core()->trackerDrivenSeed() && !ele->
core()->ecalDrivenSeed() ;
1159 if (eg&&pf) {
throw cms::Exception(
"GsfElectronAlgo|BothEcalAndPureTrackerDriven")<<
"An electron cannot be both egamma and purely pflow" ; }
1160 if ((!eg)&&(!pf)) {
throw cms::Exception(
"GsfElectronAlgo|NeitherEcalNorPureTrackerDriven")<<
"An electron cannot be neither egamma nor purely pflow" ; }
1166 double etValue = ele->
superCluster()->energy()/cosh(etaValue) ;
1167 LogTrace(
"GsfElectronAlgo") <<
"Et : " << etValue ;
1170 LogTrace(
"GsfElectronAlgo") <<
"Et criteria are satisfied";
1174 LogTrace(
"GsfElectronAlgo") <<
"E/p : " << eopValue ;
1179 LogTrace(
"GsfElectronAlgo") <<
"E/p criteria are satisfied";
1186 bool HoEveto =
false ;
1190 LogTrace(
"GsfElectronAlgo") <<
"H/E criteria are satisfied";
1194 LogTrace(
"GsfElectronAlgo") <<
"delta eta : " << deta ;
1197 LogTrace(
"GsfElectronAlgo") <<
"Delta eta criteria are satisfied";
1201 LogTrace(
"GsfElectronAlgo") <<
"delta phi : " << dphi;
1204 LogTrace(
"GsfElectronAlgo") <<
"Delta phi criteria are satisfied";
1210 LogTrace(
"GsfElectronAlgo") <<
"Sigma ieta ieta criteria are satisfied";
1216 LogTrace(
"GsfElectronAlgo") <<
"Fiducial flags criteria are satisfied";
1224 {
throw cms::Exception(
"GsfElectronAlgo|NotElectronSeed")<<
"The GsfTrack seed is not an ElectronSeed ?!" ; }
1226 {
if (elseed->subDet2()==6)
return ; }
1231 LogTrace(
"GsfElectronAlgo") <<
"TIP criterion is satisfied" ;
1233 LogTrace(
"GsfElectronAlgo") <<
"All cut based criteria are satisfied" ;
1241 if (ele->
core()->ecalDrivenSeed())
1247 {
LogTrace(
"GsfElectronAlgo") <<
"Main mva criterion is satisfied" ; }
1255 GsfElectronPtrCollection::iterator el ;
1261 std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput>::const_iterator itcheck=mvaInputs.find((*el)->gsfTrack());
1262 (*el)->setMvaInput(itcheck->second);
1267 const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs)
1269 GsfElectronPtrCollection::iterator el ;
1279 mvaOutput.
mva_e_pi = mva_NIso_Value ;
1281 (*el)->setMvaOutput(mvaOutput);
1284 std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput>::const_iterator itcheck=mvaOutputs.find((*el)->gsfTrack());
1285 (*el)->setMvaOutput(itcheck->second);
1373 int region = seedXtalId.
det();
1411 {
throw cms::Exception(
"GsfElectronAlgo|UnknownXtalRegion")<<
"createElectron(): do not know if it is a barrel or endcap seed cluster !!!!" ; }
1449 ConversionInfo conversionInfo = conversionFinder.getConversionInfo
1453 conversionVars.
flags = conversionInfo.
flag() ;
1454 conversionVars.
dist = conversionInfo.
dist() ;
1455 conversionVars.
dcot = conversionInfo.
dcot() ;
1457 if ((conversionVars.
flags==0)
or(conversionVars.
flags==1))
1459 else if ((conversionVars.
flags==2)
or(conversionVars.
flags==3))
1470 tcMatching, tkExtra, ctfInfo,
1471 fiducialFlags,showerShape, full5x5_showerShape,
1472 conversionVars, saturationInfo ) ;
1475 ele->
setP4(GsfElectron::P4_FROM_SUPER_CLUSTER,momentum,0,
true) ;
1490 if (sc->clustersSize()>1)
1492 float pf_fbrem =( sc->energy() - cl->
energy() ) / sc->energy();
1520 if (ele->
core()->ecalDrivenSeed())
1537 if (ele->
core()->ecalDrivenSeed())
1590 LogTrace(
"GsfElectronAlgo")<<
"Constructed new electron with energy "<< ele->
p4().e() ;
1605 GsfElectronPtrCollection::iterator e1, e2 ;
1619 (*e1)->clearAmbiguousGsfTracks() ;
1620 (*e1)->setAmbiguous(
false) ;
1633 GsfPFRecTrackCollection::const_iterator gsfPfRecTrack ;
1634 for ( gsfPfRecTrack=gsfPfRecTrackCollection->begin() ;
1635 gsfPfRecTrack!=gsfPfRecTrackCollection->end() ;
1638 if (gsfPfRecTrack->gsfTrackRef()==(*e1)->gsfTrack())
1642 edm::LogWarning(
"GsfElectronAlgo")<<
"associated gsfPfRecTrack already found" ;
1647 const std::vector<reco::GsfPFRecTrackRef> & duplicates(gsfPfRecTrack->convBremGsfPFRecTrackRef()) ;
1648 std::vector<reco::GsfPFRecTrackRef>::const_iterator duplicate ;
1649 for ( duplicate = duplicates.begin() ; duplicate != duplicates.end() ; duplicate ++ )
1650 { (*e1)->addAmbiguousGsfTrack((*duplicate)->gsfTrackRef()) ; }
1664 if ((*e1)->ambiguous())
continue ;
1665 if ( ignoreNotPreselected && !
isPreselected(*e1) )
continue ;
1670 <<
"Blessing electron with E/P " << (*e1)->eSuperClusterOverP()
1671 <<
", cluster " << scRef1.
get()
1672 <<
" & track " << (*e1)->gsfTrack().get() ;
1679 if ((*e2)->ambiguous())
continue ;
1680 if ( ignoreNotPreselected && !
isPreselected(*e2) )
continue ;
1686 bool sameCluster =
false ;
1688 { sameCluster = (scRef1==scRef2) ; }
1706 <<
"Discarding electron with E/P " << (*e2)->eSuperClusterOverP()
1707 <<
", cluster " << scRef2.
get()
1708 <<
" and track " << (*e2)->gsfTrack().get() ;
1709 (*e1)->addAmbiguousGsfTrack((*e2)->gsfTrack()) ;
1710 (*e2)->setAmbiguous(
true) ;
1712 else if ((*e1)->gsfTrack()==(*e2)->gsfTrack())
1715 <<
"Forgetting electron with E/P " << (*e2)->eSuperClusterOverP()
1716 <<
", cluster " << scRef2.
get()
1717 <<
" and track " << (*e2)->gsfTrack().get() ;
1718 (*e2)->setAmbiguous(
true) ;
1731 LogTrace(
"GsfElectronAlgo")<<
"========== remove ambiguous "<<ei<<
"/"<<emax<<
"==========" ;
1732 if ((*eitr)->ambiguous())
1754 sd1 = elseed->subDet1() ;
1755 sd2 = elseed->subDet2() ;
1756 dPhi1 = (ele->
charge()>0) ? elseed->dPhi1Pos() : elseed->dPhi1() ;
1757 dPhi2 = (ele->
charge()>0) ? elseed->dPhi2Pos() : elseed->dPhi2() ;
1758 dRz1 = (ele->
charge()>0) ? elseed->dRz1Pos () : elseed->dRz1 () ;
1759 dRz2 = (ele->
charge()>0) ? elseed->dRz2Pos () : elseed->dRz2 () ;
TrajectoryStateOnSurface constrainAtBeamSpot(const reco::GsfTrack &, const reco::BeamSpot &) const
(multi)TSOS after including the beamspot
CaloClusterPtr electronCluster() const
ElectronHcalHelper * hcalHelperPflow
void setPixelMatchInfomation(reco::GsfElectron *)
edm::Handle< reco::TrackCollection > originalCtfTracks
T getParameter(std::string const &) const
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
unsigned long long cacheIdentifier() const
edm::Handle< reco::ElectronSeedCollection > seeds
const MultiTrajectoryStateMode * mtsMode
bool isPreselected(reco::GsfElectron *ele)
const math::XYZPoint & position() const
cluster centroid position
void applyCombinationRegression(reco::GsfElectron &ele) const
void setMVAOutputs(const gsfAlgoHelpers::HeavyObjectCache *, const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaOutput > &mvaOutputs)
void setTrackFbrem(float fbrem)
edm::Handle< edm::ValueMap< float > > pfMva
std::unique_ptr< const SoftElectronMVAEstimator > sElectronMVAEstimator
void setP4(P4Kind kind, const LorentzVector &p4, float p4Error, bool setCandidate)
GeneralData * generalData_
const CutsConfiguration cutsCfgPflow
GeneralData(const InputTagsConfiguration &, const StrategyConfiguration &, const CutsConfiguration &cutsCfg, const CutsConfiguration &cutsCfgPflow, const ElectronHcalHelper::Configuration &hcalCfg, const ElectronHcalHelper::Configuration &hcalCfgPflow, const IsolationConfiguration &, const EcalRecHitsConfiguration &, EcalClusterFunctionBaseClass *superClusterErrorFunction, EcalClusterFunctionBaseClass *crackCorrectionFunction, const SoftElectronMVAEstimator::Configuration &mva_NIso_Cfg, const ElectronMVAEstimator::Configuration &mva_Iso_Cfg, const RegressionHelper::Configuration &)
static bool isNextToEtaBoundary(EBDetId id)
EgammaTowerIsolation * hadDepth1Isolation04Bc
reco::GsfTrackRef conversionPartnerGsfTk() const
bool originalGsfTrackCollectionRetreived
void setPassCutBasedPreselection(bool flag)
bool isNonnull() const
Checks for non-null.
bool positionFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalPoint &position) const
double intRadiusEcalEndcaps
unsigned long long cacheIDGeom
std::vector< int > recHitSeverityToBeExcludedEndcaps
void setPixelMatchDRz2(float dRz2)
unsigned ambClustersOverlapStrategy
void readEvent(const edm::Event &)
EgammaTowerIsolation * hadDepth1Isolation03Bc
double radiusOfConversion() const
bool hasActiveHcal(const reco::SuperCluster &sc)
void clonePreviousElectrons()
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
CaloTopology const * topology(0)
void retreiveOriginalTrackCollections(const reco::TrackRef &, const reco::GsfTrackRef &)
void setPixelMatchDPhi1(float dPhi1)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool ecalDrivenEcalErrorFromClassBasedParameterization
float hcalDepth2OverEcal() const
double getEtSum(const reco::Candidate *emObject) const
const IsolationConfiguration isoCfg
double intRadiusEcalBarrel
unsigned ambSortingStrategy
void calculateShowerShape(const reco::SuperClusterRef &, bool pflow, reco::GsfElectron::ShowerShape &)
void beginEvent(edm::Event &)
unsigned long long cacheIDTopo
bool useCombinationRegression
double maxSigmaIetaIetaEndcaps
TrajectoryStateOnSurface sclTSOS
const EcalRecHitsConfiguration recHitsCfg
EventSetupData * eventSetupData_
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
edm::Handle< EcalRecHitCollection > endcapRecHits
double hcalESumDepth2BehindClusters(const std::vector< CaloTowerDetId > &towers)
double pt() const final
transverse momentum
std::vector< CaloTowerDetId > hcalTowersBehindClusters(const reco::SuperCluster &sc)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
int charge() const final
electric charge
double maxDeltaEtaEndcaps
void checkSetup(const edm::EventSetup &)
void setMVAInputs(const std::map< reco::GsfTrackRef, reco::GsfElectron::MvaInput > &mvaInputs)
bool passingCutBasedPreselection() const
float deltaEtaSuperClusterAtVtx
bool passingMvaPreselection() const
float deltaPhiSuperClusterAtVtx
void computeCharge(int &charge, reco::GsfElectron::ChargeInfo &info)
GsfElectronAlgo(const InputTagsConfiguration &, const StrategyConfiguration &, const CutsConfiguration &cutsCfg, const CutsConfiguration &cutsCfgPflow, const ElectronHcalHelper::Configuration &hcalCfg, const ElectronHcalHelper::Configuration &hcalCfgPflow, const IsolationConfiguration &, const EcalRecHitsConfiguration &, EcalClusterFunctionBaseClass *superClusterErrorFunction, EcalClusterFunctionBaseClass *crackCorrectionFunction, const SoftElectronMVAEstimator::Configuration &mva_NIso_Cfg, const ElectronMVAEstimator::Configuration &mva_Iso_Cfg, const RegressionHelper::Configuration ®Cfg, const edm::ParameterSet &tkIsol03Cfg, const edm::ParameterSet &tkIsol04Cfg)
bool momentumFromModeCartesian(const TrajectoryStateOnSurface tsos, GlobalVector &momentum) const
void checkCtfTrack(edm::Handle< reco::TrackCollection > currentCtfTracks)
void completeElectrons(const gsfAlgoHelpers::HeavyObjectCache *)
float hcalDepth1TowerSumEt
double hcalESumDepth1BehindClusters(const std::vector< CaloTowerDetId > &towers)
const InputTagsConfiguration inputCfg
edm::ESHandle< EcalSeverityLevelAlgo > sevLevel
TrajectoryStateOnSurface innTSOS
float hcalDepth1TowerSumEtBc
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
EgammaTowerIsolation * hadDepth1Isolation03
const StrategyConfiguration strategyCfg
ProductID id() const
Accessor for product ID.
void setPixelMatchSubdetectors(int sd1, int sd2)
edm::ESHandle< CaloTopology > caloTopo
void doFlagChecks(const std::vector< int > &v)
reco::TrackRef conversionPartnerCtfTk() const
void createElectron(const gsfAlgoHelpers::HeavyObjectCache *)
void setSuperClusterFbrem(float fbrem)
CaloClusterPtr electronCluster
EgammaRecHitIsolation * ecalBarrelIsol04
TrajectoryStateOnSurface constrainedVtxTSOS
const RegressionHelper::Configuration regCfg
bool isGsfCtfScPixConsistent
EgammaTowerIsolation * hadDepth2Isolation03
EgammaTowerIsolation * hadDepth1Isolation04
virtual float getValue(const reco::BasicCluster &, const EcalRecHitCollection &) const =0
void setUseNumCrystals(bool b=true)
float deltaEtaSuperClusterTrackAtVtx() const
std::vector< int > recHitSeverityToBeExcludedBarrel
void setCorrectedEcalEnergyError(float newEnergyError)
float sigmaIetaIeta() const
float eSeedClusterOverPout
void calculateShowerShape_full5x5(const reco::SuperClusterRef &, bool pflow, reco::GsfElectron::ShowerShape &)
uint16_t hitPattern[ARRAY_LENGTH]
void simpleParameterizationUncertainty(reco::GsfElectron &)
unsigned long long cacheSevLevel
void setCutBasedPreselectionFlag(reco::GsfElectron *ele, const reco::BeamSpot &)
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
EgammaRecHitIsolation * ecalEndcapIsol03
EgammaTowerIsolation * hadDepth2Isolation03Bc
RealType normalized_phi(RealType phi)
GsfConstraintAtVertex * constraintAtVtx
static bool isNextToPhiBoundary(EBDetId id)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
edm::Handle< EcalRecHitCollection > barrelRecHits
float deltaPhiSuperClusterTrackAtVtx() const
std::vector< GsfElectronCore > GsfElectronCoreCollection
void correct(reco::GsfElectron &, TrajectoryStateOnSurface &)
float hcalOverEcal() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setPassMvaPreselection(bool flag)
bool pureTrackerDrivenEcalErrorFromSimpleParameterization
IsolationValueMaps pfIsolationValues
Abs< T >::type abs(const T &t)
std::vector< CaloTowerDetId > hcalTowersBehindClusters
float deltaEtaSeedClusterAtCalo
const MultiTrajectoryStateTransform * mtsTransform
static bool isNextToRingBoundary(EEDetId id)
std::list< reco::GsfElectron * > GsfElectronPtrCollection
bool originalCtfTrackCollectionRetreived
double hcalESumDepth2(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0)
double energy() const
cluster energy
const CutsConfiguration cutsCfg
ElectronHcalHelper * hcalHelper
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
double calIsolPt(Args &&...args) const
T const * get() const
Returns C++ pointer to the item.
const reco::BeamSpot * beamspot
edm::ESHandle< MagneticField > magField
GsfElectronPtrCollection * electrons
CaloClusterPtr getEleBasicCluster(const MultiTrajectoryStateTransform *)
static bool isNextToDBoundary(EEDetId id)
double maxDeltaPhiEndcaps
std::vector< int > recHitFlagsToBeExcludedBarrel
bool isNull() const
Checks for null.
void setIsolation04(const IsolationVariables &dr04)
void doSeverityChecks(const EcalRecHitCollection *const recHits, const std::vector< int > &v)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
unsigned long long cacheIDMagField
void classify(reco::GsfElectron &)
EgammaTowerIsolation * hadDepth2Isolation04Bc
const_iterator end() const
unsigned long long cacheIDTDGeom
edm::Handle< reco::GsfElectronCollection > previousElectrons
float hcalDepth2TowerSumEtBc
float hcalDepth1OverEcal() const
void setPixelMatchDPhi2(float dPhi2)
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
void classBasedParameterizationEnergy(reco::GsfElectron &, const reco::BeamSpot &bs)
edm::Handle< reco::VertexCollection > vertices
EgammaRecHitIsolation * ecalBarrelIsol03
reco::TrackRef ctfTrackRef
edm::Handle< reco::GsfElectronCollection > pflowElectrons
DetId seed() const
return DetId of seed
bool isGsfScPixConsistent
std::vector< int > recHitFlagsToBeExcludedEndcaps
void calculateSaturationInfo(const reco::SuperClusterRef &, reco::GsfElectron::SaturationInfo &)
float hcalDepth2TowerSumEt
superClusterErrorFunction
T const * product() const
EcalClusterFunctionBaseClass * superClusterErrorFunction
bool isNull() const
Checks for null.
double maxSigmaIetaIetaBarrel
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
void setPflowPreselectionFlag(reco::GsfElectron *ele)
const MvaOutput & mvaOutput() const
const reco::GsfTrackRef gsfTrackRef
bool ecalDrivenEcalEnergyFromClassBasedParameterization
void ele_convert(const Type1 &obj1, Type2 &obj2)
float hcalDepth2OverEcalBc
bool calculateTSOS(const MultiTrajectoryStateTransform *, GsfConstraintAtVertex *)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
virtual GsfElectronCoreRef core() const
float deltaEtaEleClusterAtCalo
TrajectoryStateOnSurface seedTSOS
float hcalDepth1OverEcalBc
void refineWithPflow(reco::GsfElectron &)
void setIsolation03(const IsolationVariables &dr03)
iterator find(key_type k)
edm::Handle< reco::GsfTrackCollection > originalGsfTracks
void applyEcalRegression(reco::GsfElectron &electron, const edm::Handle< reco::VertexCollection > &vertices, const edm::Handle< EcalRecHitCollection > &rechitsEB, const edm::Handle< EcalRecHitCollection > &rechitsEE) const
float eEleClusterOverPout
EgammaTowerIsolation * hadDepth2Isolation04
void setVetoClustered(bool b=true)
static std::atomic< unsigned int > counter
const reco::GsfElectronCoreRef coreRef
float deltaPhiEleClusterAtCalo
edm::Handle< reco::TrackCollection > currentCtfTracks
EleTkIsolFromCands tkIsol04Calc_
double getTowerEtSum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
edm::ESHandle< CaloGeometry > caloGeom
EcalClusterFunctionBaseClass * crackCorrectionFunction
SuperClusterRef superCluster() const override
reference to a SuperCluster
void removeAmbiguousElectrons()
double hcalESumDepth1(const reco::SuperCluster &, const std::vector< CaloTowerDetId > *excludeTowers=0)
void displayInternalElectrons(const std::string &title) const
void setPassPflowPreselection(bool flag)
EgammaRecHitIsolation * ecalEndcapIsol04
void removeNotPreselectedElectrons()
const reco::SuperClusterRef superClusterRef
TrajectoryStateOnSurface eleTSOS
float deltaPhiSeedClusterAtCalo
const Point & position() const
position
TrajectoryStateOnSurface outTSOS
RegressionHelper * regHelper
ElectronData(const reco::GsfElectronCoreRef &core, const reco::BeamSpot &bs)
void copyElectrons(reco::GsfElectronCollection &)
ElectronData * electronData_
uint16_t getHitPattern(HitCategory category, int position) const
edm::ESHandle< TrackerGeometry > trackerHandle
void setAmbiguityData(bool ignoreNotPreselected=true)
IsolationValueMaps edIsolationValues
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
virtual void init(const edm::EventSetup &es)=0
EleTkIsolFromCands tkIsol03Calc_
edm::Handle< reco::GsfElectronCoreCollection > coreElectrons
GlobalVector vtxMomWithConstraint
int ietaAbs() const
get the absolute value of the crystal ieta
void classBasedParameterizationUncertainty(reco::GsfElectron &)
T const * product() const
void checkSetup(const edm::EventSetup &)
void setPixelMatchDRz1(float dRz1)
edm::Handle< CaloTowerCollection > towers
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
void calculateMode(const MultiTrajectoryStateMode *mtsMode)
math::PtEtaPhiELorentzVectorF LorentzVector
Global3DVector GlobalVector
void checkSetup(const edm::EventSetup &)
edm::Handle< reco::GsfPFRecTrackCollection > gsfPfRecTracks
TrajectoryStateOnSurface vtxTSOS
bool ecalDrivenSeed() const
constexpr Detector det() const
get the detector field from this detid
Candidate::LorentzVector calculateMomentum()
bool passingPflowPreselection() const
const reco::BeamSpot beamSpot