47 #include <Math/Point3D.h>
54 using namespace reco ;
114 : inputCfg(inputConfig),
115 strategyCfg(strategyConfig),
117 cutsCfgPflow(cutsConfigPflow),
119 recHitsCfg(recHitsConfig),
122 superClusterErrorFunction(superClusterErrorFunc),
123 crackCorrectionFunction(crackCorrectionFunc),
133 delete hcalHelperPflow ;
168 : cacheIDGeom(0), cacheIDTopo(0), cacheIDTDGeom(0), cacheIDMagField(0),
175 delete constraintAtVtx ;
176 delete mtsTransform ;
195 void retreiveOriginalTrackCollections
232 originalCtfTrackCollectionRetreived(
false),
233 originalGsfTrackCollectionRetreived(
false),
234 tkIsolation03(0), tkIsolation04(0),
235 hadDepth1Isolation03(0), hadDepth1Isolation04(0),
236 hadDepth2Isolation03(0), hadDepth2Isolation04(0),
237 hadDepth1Isolation03Bc(0), hadDepth1Isolation04Bc(0),
238 hadDepth2Isolation03Bc(0), hadDepth2Isolation04Bc(0),
239 ecalBarrelIsol03(0), ecalBarrelIsol04(0),
240 ecalEndcapIsol03(0), ecalEndcapIsol04(0)
247 delete tkIsolation03 ;
248 delete tkIsolation04 ;
249 delete hadDepth1Isolation03 ;
250 delete hadDepth1Isolation04 ;
251 delete hadDepth2Isolation03 ;
252 delete hadDepth2Isolation04 ;
253 delete hadDepth1Isolation03Bc ;
254 delete hadDepth1Isolation04Bc ;
255 delete hadDepth2Isolation03Bc ;
256 delete hadDepth2Isolation04Bc ;
257 delete ecalBarrelIsol03 ;
258 delete ecalBarrelIsol04 ;
259 delete ecalEndcapIsol03 ;
260 delete ecalEndcapIsol04 ;
262 GsfElectronPtrCollection::const_iterator it ;
271 if ((!originalCtfTrackCollectionRetreived)&&(ctfTrack.
isNonnull()))
273 event->get(ctfTrack.
id(),originalCtfTracks) ;
274 originalCtfTrackCollectionRetreived =
true ;
276 if ((!originalGsfTrackCollectionRetreived)&&(gsfTrack.
isNonnull()))
278 event->get(gsfTrack.
id(),originalGsfTracks) ;
279 originalGsfTrackCollectionRetreived =
true ;
331 gsfTrackRef(coreRef->gsfTrack()),
332 superClusterRef(coreRef->superCluster()),
333 ctfTrackRef(coreRef->ctfTrack()), shFracInnerHits(coreRef->ctfGsfOverlap()),
342 if (!ctfTrackRef.isNull())
return ;
346 shFracInnerHits = 0 ;
353 TrackCollection::const_iterator ctfTkIter ;
354 for (ctfTkIter = ctfTrackCollection->begin(), counter = 0;
355 ctfTkIter != ctfTrackCollection->end(); ctfTkIter++, counter++)
357 double dEta = gsfTrackRef->eta() - ctfTkIter->eta() ;
358 double dPhi = gsfTrackRef->phi() - ctfTkIter->phi() ;
359 double pi = acos(-1.);
363 if (
sqrt(dEta*dEta + dPhi*dPhi) > 0.3) continue ;
365 unsigned int shared = 0 ;
366 int gsfHitCounter = 0 ;
367 int numGsfInnerHits = 0 ;
368 int numCtfInnerHits = 0 ;
374 for (elHitsIt = gsfTrackRef->recHitsBegin();
375 elHitsIt != gsfTrackRef->recHitsEnd();
376 elHitsIt++, gsfHitCounter++)
378 if (!((**elHitsIt).isValid()))
382 uint32_t gsfHit = gsfHitPattern.
getHitPattern(HitPattern::TRACK_HITS, gsfHitCounter) ;
383 if (!(HitPattern::pixelHitFilter(gsfHit)
384 || HitPattern::stripTIBHitFilter(gsfHit)
385 || HitPattern::stripTIDHitFilter(gsfHit))){
391 int ctfHitsCounter = 0 ;
392 numCtfInnerHits = 0 ;
394 for (ctfHitsIt = ctfTkIter->recHitsBegin();
395 ctfHitsIt != ctfTkIter->recHitsEnd();
396 ctfHitsIt++, ctfHitsCounter++ )
398 if(!((**ctfHitsIt).isValid()))
401 uint32_t ctfHit = ctfHitPattern.
getHitPattern(HitPattern::TRACK_HITS, ctfHitsCounter);
402 if(!(HitPattern::pixelHitFilter(ctfHit)
403 || HitPattern::stripTIBHitFilter(ctfHit)
404 || HitPattern::stripTIDHitFilter(ctfHit)))
421 if ((numGsfInnerHits==0)||(numCtfInnerHits==0))
424 if ( static_cast<float>(shared)/
min(numGsfInnerHits,numCtfInnerHits) > shFracInnerHits )
426 shFracInnerHits =
static_cast<float>(shared)/
min(numGsfInnerHits, numCtfInnerHits);
427 ctfTrackRef =
TrackRef(currentCtfTracks,counter);
447 int chargeGsf = gsfTrackRef->charge() ;
449 info.
isGsfCtfConsistent = (ctfTrackRef.isNonnull()&&((chargeGsf*ctfTrackRef->charge())>0)) ;
456 { charge = ctfTrackRef->charge() ; }
465 float dphimin = 1.e30 ;
466 for (
CaloCluster_iterator bc=superClusterRef->clustersBegin(); bc!=superClusterRef->clustersEnd(); bc++)
468 GlobalPoint posclu((*bc)->position().x(),(*bc)->position().y(),(*bc)->position().z()) ;
470 if (!tempTSOS.isValid()) tempTSOS=outTSOS ;
488 if (!innTSOS.isValid())
return false;
495 if (!vtxTSOS.isValid()) vtxTSOS=innTSOS;
499 if (!outTSOS.isValid())
return false;
503 GlobalPoint(superClusterRef->seed()->position().x(),
504 superClusterRef->seed()->position().y(),
505 superClusterRef->seed()->position().z()));
506 if (!seedTSOS.isValid()) seedTSOS=outTSOS;
510 if (!sclTSOS.isValid()) sclTSOS=outTSOS;
537 double scale = superClusterRef->energy()/vtxMom.mag() ;
540 superClusterRef->energy() ) ;
549 int detector = seedXtalId.
subdetId() ;
554 std::vector<int> recHitFlagsToBeExcluded ;
555 std::vector<int> recHitSeverityToBeExcluded ;
569 std::vector<float> covariances = EcalClusterTools::covariances(seedCluster,recHits,topology,geometry) ;
570 std::vector<float> localCovariances = EcalClusterTools::localCovariances(seedCluster,recHits,topology) ;
574 showerShape.
e1x5 = EcalClusterTools::e1x5(seedCluster,recHits,topology) ;
575 showerShape.
e2x5Max = EcalClusterTools::e2x5Max(seedCluster,recHits,topology) ;
576 showerShape.
e5x5 = EcalClusterTools::e5x5(seedCluster,recHits,topology) ;
577 showerShape.
r9 = EcalClusterTools::e3x3(seedCluster,recHits,topology)/theClus->rawEnergy() ;
598 if( see_by_spp > 0 ) {
599 showerShape.
sigmaIetaIphi = localCovariances[1] / see_by_spp;
600 }
else if ( localCovariances[1] > 0 ) {
605 showerShape.
eMax = EcalClusterTools::eMax(seedCluster,recHits);
606 showerShape.
e2nd = EcalClusterTools::e2nd(seedCluster,recHits);
607 showerShape.
eTop = EcalClusterTools::eTop(seedCluster,recHits,topology);
608 showerShape.
eLeft = EcalClusterTools::eLeft(seedCluster,recHits,topology);
609 showerShape.
eRight = EcalClusterTools::eRight(seedCluster,recHits,topology);
610 showerShape.
eBottom = EcalClusterTools::eBottom(seedCluster,recHits,topology);
619 int detector = seedXtalId.
subdetId() ;
624 std::vector<int> recHitFlagsToBeExcluded ;
625 std::vector<int> recHitSeverityToBeExcluded ;
668 if( see_by_spp > 0 ) {
669 showerShape.
sigmaIetaIphi = localCovariances[1] / see_by_spp;
670 }
else if ( localCovariances[1] > 0 ) {
703 :
generalData_(
new GeneralData(inputCfg,strategyCfg,cutsCfg,cutsCfgPflow,hcalCfg,hcalCfgPflow,isoCfg,recHitsCfg,superClusterErrorFunction,crackCorrectionFunction,mva_NIso_Cfg,mva_Iso_Cfg,regCfg)),
719 bool updateField(
false);
726 bool updateGeometry(
false);
728 updateGeometry =
true;
733 if ( updateField || updateGeometry ) {
775 GsfElectronPtrCollection::const_iterator it ;
780 { outEle.push_back(**it) ; }
786 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unexpected event data" ; }
814 float extRadiusSmall=0.3, extRadiusLarge=0.4 ;
820 float egHcalIsoConeSizeOutSmall=0.3, egHcalIsoConeSizeOutLarge=0.4;
822 int egHcalDepth1=1, egHcalDepth2=2;
857 std::vector<edm::InputTag> inputTagIsoVals;
865 for (
size_t j = 0;
j<inputTagIsoVals.size(); ++
j) {
872 inputTagIsoVals.clear();
879 for (
size_t j = 0;
j<inputTagIsoVals.size(); ++
j) {
888 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"lacking event data" ; }
895 LogTrace(
"GsfElectronAlgo") <<
"========== " << title <<
" ==========";
898 GsfElectronPtrCollection::const_iterator it ;
901 LogTrace(
"GsfElectronAlgo") <<
"Electron with charge, pt, eta, phi: " << (*it)->charge() <<
" , "
902 << (*it)->pt() <<
" , " << (*it)->eta() <<
" , " << (*it)->phi();
904 LogTrace(
"GsfElectronAlgo") <<
"=================================================";
910 {
throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unexpected electron data" ; }
913 for (
unsigned int i=0 ;
i<coreCollection->size() ; ++
i )
917 bool coreFound =
false ;
918 GsfElectronPtrCollection::const_iterator itrEle ;
924 if ((*itrEle)->core()==coreRef)
930 if (coreFound) continue ;
933 if (coreRef->superCluster().
isNull())
continue ;
954 GsfElectronCollection::const_iterator oldElectron ;
956 ( oldElectron = oldElectrons->begin() ;
957 oldElectron != oldElectrons->end() ;
961 const GsfTrackRef oldElectronGsfTrackRef = oldCoreRef->gsfTrack() ;
963 for ( icore=0 ; icore<newCores->size() ; ++icore )
965 if (oldElectronGsfTrackRef==(*newCores)[icore].gsfTrack())
982 GsfElectronCollection::const_iterator pfElectron, edElectron ;
983 unsigned int edIndex, pfIndex ;
985 GsfElectronPtrCollection::iterator el ;
995 ( pfIndex = 0, pfElectron = pfElectrons->begin() ; pfElectron != pfElectrons->end() ; pfIndex++, pfElectron++ )
997 if (pfElectron->gsfTrack()==(*el)->gsfTrack())
1001 edm::LogWarning(
"GsfElectronProducer")<<
"associated pfGsfElectron already found" ;
1016 (*el)->setPfIsolationVariables(isoVariables);
1020 (*el)->setMvaInput(pfElectron->mvaInput()) ;
1021 (*el)->setMvaOutput(pfElectron->mvaOutput()) ;
1022 if ((*el)->ecalDrivenSeed())
1023 { (*el)->setP4(GsfElectron::P4_PFLOW_COMBINATION,pfElectron->p4(GsfElectron::P4_PFLOW_COMBINATION),pfElectron->p4Error(GsfElectron::P4_PFLOW_COMBINATION),
false) ; }
1025 { (*el)->setP4(GsfElectron::P4_PFLOW_COMBINATION,pfElectron->p4(GsfElectron::P4_PFLOW_COMBINATION),pfElectron->p4Error(GsfElectron::P4_PFLOW_COMBINATION),
true) ; }
1026 double noCutMin = -999999999. ;
1027 if ((*el)->mva_e_pi()<noCutMin) {
throw cms::Exception(
"GsfElectronAlgo|UnexpectedMvaValue")<<
"unexpected MVA value: "<<(*el)->mva_e_pi() ; }
1036 edIndex = 0, edElectron = edElectrons->begin() ;
1037 while ((found ==
false)&&(edElectron != edElectrons->end()))
1039 if (edElectron->gsfTrack()==(*el)->gsfTrack())
1052 (*el)->setPfIsolationVariables(isoVariables);
1074 return passmva && passCutBased;
1079 return passCutBased || passPF || passmva;
1083 return passCutBased || passPF;
1095 LogTrace(
"GsfElectronAlgo")<<
"========== removed not preselected "<<ei<<
"/"<<emax<<
"==========" ;
1110 bool eg = ele->
core()->ecalDrivenSeed() ;
1111 bool pf = ele->
core()->trackerDrivenSeed() && !ele->
core()->ecalDrivenSeed() ;
1113 if (eg&&pf) {
throw cms::Exception(
"GsfElectronAlgo|BothEcalAndPureTrackerDriven")<<
"An electron cannot be both egamma and purely pflow" ; }
1114 if ((!eg)&&(!pf)) {
throw cms::Exception(
"GsfElectronAlgo|NeitherEcalNorPureTrackerDriven")<<
"An electron cannot be neither egamma nor purely pflow" ; }
1120 double etValue = ele->
superCluster()->energy()/cosh(etaValue) ;
1121 LogTrace(
"GsfElectronAlgo") <<
"Et : " << etValue ;
1124 LogTrace(
"GsfElectronAlgo") <<
"Et criteria are satisfied";
1128 LogTrace(
"GsfElectronAlgo") <<
"E/p : " << eopValue ;
1133 LogTrace(
"GsfElectronAlgo") <<
"E/p criteria are satisfied";
1140 bool HoEveto =
false ;
1144 LogTrace(
"GsfElectronAlgo") <<
"H/E criteria are satisfied";
1148 LogTrace(
"GsfElectronAlgo") <<
"delta eta : " << deta ;
1151 LogTrace(
"GsfElectronAlgo") <<
"Delta eta criteria are satisfied";
1155 LogTrace(
"GsfElectronAlgo") <<
"delta phi : " << dphi;
1158 LogTrace(
"GsfElectronAlgo") <<
"Delta phi criteria are satisfied";
1164 LogTrace(
"GsfElectronAlgo") <<
"Sigma ieta ieta criteria are satisfied";
1170 LogTrace(
"GsfElectronAlgo") <<
"Fiducial flags criteria are satisfied";
1178 {
throw cms::Exception(
"GsfElectronAlgo|NotElectronSeed")<<
"The GsfTrack seed is not an ElectronSeed ?!" ; }
1180 {
if (elseed->subDet2()==6)
return ; }
1185 LogTrace(
"GsfElectronAlgo") <<
"TIP criterion is satisfied" ;
1187 LogTrace(
"GsfElectronAlgo") <<
"All cut based criteria are satisfied" ;
1195 if (ele->
core()->ecalDrivenSeed())
1201 {
LogTrace(
"GsfElectronAlgo") <<
"Main mva criterion is satisfied" ; }
1209 GsfElectronPtrCollection::iterator el ;
1215 std::map<reco::GsfTrackRef,reco::GsfElectron::MvaInput>::const_iterator itcheck=mvaInputs.find((*el)->gsfTrack());
1216 (*el)->setMvaInput(itcheck->second);
1221 const std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput> & mvaOutputs)
1223 GsfElectronPtrCollection::iterator el ;
1233 mvaOutput.
mva_e_pi = mva_NIso_Value ;
1235 (*el)->setMvaOutput(mvaOutput);
1238 std::map<reco::GsfTrackRef,reco::GsfElectron::MvaOutput>::const_iterator itcheck=mvaOutputs.find((*el)->gsfTrack());
1239 (*el)->setMvaOutput(itcheck->second);
1328 int detector = seedXtalId.
subdetId() ;
1365 {
throw cms::Exception(
"GsfElectronAlgo|UnknownXtalRegion")<<
"createElectron(): do not know if it is a barrel or endcap seed cluster !!!!" ; }
1396 ConversionInfo conversionInfo = conversionFinder.getConversionInfo
1400 conversionVars.
flags = conversionInfo.
flag() ;
1401 conversionVars.
dist = conversionInfo.
dist() ;
1402 conversionVars.
dcot = conversionInfo.
dcot() ;
1404 if ((conversionVars.
flags==0)
or(conversionVars.
flags==1))
1406 else if ((conversionVars.
flags==2)
or(conversionVars.
flags==3))
1417 tcMatching, tkExtra, ctfInfo,
1418 fiducialFlags,showerShape, full5x5_showerShape,
1422 ele->
setP4(GsfElectron::P4_FROM_SUPER_CLUSTER,momentum,0,
true) ;
1437 if (sc->clustersSize()>1)
1439 float pf_fbrem =( sc->energy() - cl->energy() ) / sc->energy();
1467 if (ele->
core()->ecalDrivenSeed())
1484 if (ele->
core()->ecalDrivenSeed())
1536 LogTrace(
"GsfElectronAlgo")<<
"Constructed new electron with energy "<< ele->
p4().e() ;
1551 GsfElectronPtrCollection::iterator
e1,
e2 ;
1565 (*e1)->clearAmbiguousGsfTracks() ;
1566 (*e1)->setAmbiguous(
false) ;
1579 GsfPFRecTrackCollection::const_iterator gsfPfRecTrack ;
1580 for ( gsfPfRecTrack=gsfPfRecTrackCollection->begin() ;
1581 gsfPfRecTrack!=gsfPfRecTrackCollection->end() ;
1584 if (gsfPfRecTrack->gsfTrackRef()==(*e1)->gsfTrack())
1588 edm::LogWarning(
"GsfElectronAlgo")<<
"associated gsfPfRecTrack already found" ;
1593 const std::vector<reco::GsfPFRecTrackRef> & duplicates(gsfPfRecTrack->convBremGsfPFRecTrackRef()) ;
1594 std::vector<reco::GsfPFRecTrackRef>::const_iterator duplicate ;
1595 for ( duplicate = duplicates.begin() ; duplicate != duplicates.end() ; duplicate ++ )
1596 { (*e1)->addAmbiguousGsfTrack((*duplicate)->gsfTrackRef()) ; }
1610 if ((*e1)->ambiguous())
continue ;
1611 if ( ignoreNotPreselected && !
isPreselected(*e1) )
continue ;
1616 <<
"Blessing electron with E/P " << (*e1)->eSuperClusterOverP()
1617 <<
", cluster " << scRef1.
get()
1618 <<
" & track " << (*e1)->gsfTrack().get() ;
1625 if ((*e2)->ambiguous())
continue ;
1626 if ( ignoreNotPreselected && !
isPreselected(*e2) )
continue ;
1632 bool sameCluster =
false ;
1634 { sameCluster = (scRef1==scRef2) ; }
1652 <<
"Discarding electron with E/P " << (*e2)->eSuperClusterOverP()
1653 <<
", cluster " << scRef2.
get()
1654 <<
" and track " << (*e2)->gsfTrack().get() ;
1655 (*e1)->addAmbiguousGsfTrack((*e2)->gsfTrack()) ;
1656 (*e2)->setAmbiguous(
true) ;
1658 else if ((*e1)->gsfTrack()==(*e2)->gsfTrack())
1661 <<
"Forgetting electron with E/P " << (*e2)->eSuperClusterOverP()
1662 <<
", cluster " << scRef2.
get()
1663 <<
" and track " << (*e2)->gsfTrack().get() ;
1664 (*e2)->setAmbiguous(
true) ;
1677 LogTrace(
"GsfElectronAlgo")<<
"========== remove ambiguous "<<ei<<
"/"<<emax<<
"==========" ;
1678 if ((*eitr)->ambiguous())
1700 sd1 = elseed->subDet1() ;
1701 sd2 = elseed->subDet2() ;
1702 dPhi1 = (ele->
charge()>0) ? elseed->dPhi1Pos() : elseed->dPhi1() ;
1703 dPhi2 = (ele->
charge()>0) ? elseed->dPhi2Pos() : elseed->dPhi2() ;
1704 dRz1 = (ele->
charge()>0) ? elseed->dRz1Pos () : elseed->dRz1 () ;
1705 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
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
void clonePreviousElectrons()
const LorentzVector & p4(P4Kind kind) const
float eSuperClusterOverP() const
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
CaloTopology const * topology(0)
void retreiveOriginalTrackCollections(const reco::TrackRef &, const reco::GsfTrackRef &)
void setPixelMatchDPhi1(float dPhi1)
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)
std::vector< CaloTowerDetId > hcalTowersBehindClusters(const reco::SuperCluster &sc)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
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)
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
virtual float getValue(const reco::BasicCluster &, const EcalRecHitCollection &) const =0
const RegressionHelper::Configuration regCfg
bool isGsfCtfScPixConsistent
EgammaTowerIsolation * hadDepth2Isolation03
EgammaTowerIsolation * hadDepth1Isolation04
ElectronTkIsolation * tkIsolation03
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 &)
double dPhi(double phi1, double phi2)
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)
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
GsfConstraintAtVertex * constraintAtVtx
static bool isNextToPhiBoundary(EBDetId id)
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 &)
virtual int charge() const final
electric charge
float hcalOverEcal() const
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 ;
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)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
double maxDeltaPhiEndcaps
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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)
unsigned long long cacheIDMagField
void classify(reco::GsfElectron &)
EgammaTowerIsolation * hadDepth2Isolation04Bc
unsigned long long cacheIDTDGeom
edm::Handle< reco::GsfElectronCollection > previousElectrons
float hcalDepth2TowerSumEtBc
float hcalDepth1OverEcal() const
void setPixelMatchDPhi2(float dPhi2)
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)
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
bool isGsfScPixConsistent
std::vector< int > recHitFlagsToBeExcludedEndcaps
float hcalDepth2TowerSumEt
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
T const * product() 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
return(e1-e2)*(e1-e2)+dp *dp
double getPtTracks(const reco::GsfElectron *) const
TrajectoryStateOnSurface seedTSOS
float hcalDepth1OverEcalBc
void refineWithPflow(reco::GsfElectron &)
void setIsolation03(const IsolationVariables &dr03)
ESHandle< TrackerGeometry > geometry
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
double getTowerEtSum(const reco::Candidate *cand, const std::vector< CaloTowerDetId > *detIdToExclude=0) const
edm::ESHandle< CaloGeometry > caloGeom
EcalClusterFunctionBaseClass * crackCorrectionFunction
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 &)
ElectronTkIsolation * tkIsolation04
volatile std::atomic< bool > shutdown_flag false
ElectronData * electronData_
uint16_t getHitPattern(HitCategory category, int position) const
edm::ESHandle< TrackerGeometry > trackerHandle
void setAmbiguityData(bool ignoreNotPreselected=true)
IsolationValueMaps edIsolationValues
Detector det() const
get the detector field from this detid
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
virtual void init(const edm::EventSetup &es)=0
edm::Handle< reco::GsfElectronCoreCollection > coreElectrons
GlobalVector vtxMomWithConstraint
int ietaAbs() const
get the absolute value of the crystal ieta
void classBasedParameterizationUncertainty(reco::GsfElectron &)
void checkSetup(const edm::EventSetup &)
void setPixelMatchDRz1(float dRz1)
edm::Handle< CaloTowerCollection > towers
std::unique_ptr< const ElectronMVAEstimator > iElectronMVAEstimator
void calculateMode(const MultiTrajectoryStateMode *mtsMode)
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
math::PtEtaPhiELorentzVectorF LorentzVector
Global3DVector GlobalVector
void checkSetup(const edm::EventSetup &)
edm::Handle< reco::GsfPFRecTrackCollection > gsfPfRecTracks
TrajectoryStateOnSurface vtxTSOS
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
virtual double pt() const final
transverse momentum
bool ecalDrivenSeed() const
Candidate::LorentzVector calculateMomentum()
bool passingPflowPreselection() const
const reco::BeamSpot beamSpot