CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFElectronTranslator Class Reference
Inheritance diagram for PFElectronTranslator:
edm::stream::EDProducer<>

Public Types

typedef std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
 
- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Public Member Functions

 PFElectronTranslator (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFElectronTranslator () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

const reco::PFCandidatecorrespondingDaughterCandidate (const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
 
void createBasicCluster (const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster *> &, const reco::PFCandidate &coCandidate) const
 
void createBasicClusterPtrs (const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
 
void createGsfElectronCoreRefs (const edm::OrphanHandle< reco::GsfElectronCoreCollection > &gsfElectronCoreHandle)
 
void createGsfElectronCores (reco::GsfElectronCoreCollection &) const
 
void createGsfElectrons (const reco::PFCandidateCollection &, const IsolationValueMaps &isolationValues, reco::GsfElectronCollection &)
 
void createPreshowerCluster (const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
 
void createPreshowerClusterPtrs (const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
 
void createSuperClusterGsfMapRefs (const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle)
 
void createSuperClusters (const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
 
bool fetchCandidateCollection (edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
 
void fetchGsfCollection (edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
 
void fillMVAValueMap (edm::Event &iEvent, edm::ValueMap< float >::Filler &filler)
 
void fillSCRefValueMap (edm::Event &iEvent, edm::ValueMap< reco::SuperClusterRef >::Filler &filler) const
 
void fillValueMap (edm::Event &iEvent, edm::ValueMap< float >::Filler &filler) const
 
void getAmbiguousGsfTracks (const reco::PFBlockElement &PFBE, std::vector< reco::GsfTrackRef > &) const
 

Private Attributes

std::vector< std::vector< reco::GsfTrackRef > > ambiguousGsfTracks_
 
std::vector< reco::CaloClusterPtrVectorbasicClusterPtr_
 
std::vector< reco::BasicClusterCollectionbasicClusters_
 
std::vector< reco::CandidatePtrCandidatePtr_
 
bool checkStatusFlag_
 
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcdecalMustacheSCParametersToken_
 
bool emptyIsOk_
 
std::string GsfElectronCollection_
 
std::string GsfElectronCoreCollection_
 
std::vector< reco::GsfElectronCoreRefgsfElectronCoreRefs_
 
std::map< reco::GsfTrackRef, float > gsfMvaMap_
 
std::vector< int > gsfPFCandidateIndex_
 
std::vector< reco::GsfTrackRefGsfTrackRef_
 
edm::InputTag inputTagGSFTracks_
 
std::vector< edm::InputTaginputTagIsoVals_
 
edm::InputTag inputTagPFCandidateElectrons_
 
edm::InputTag inputTagPFCandidates_
 
std::vector< reco::TrackRefkfTrackRef_
 
const EcalMustacheSCParametersmustacheSCParams_
 
double MVACut_
 
std::string PFBasicClusterCollection_
 
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
 
std::string PFMVAValueMap_
 
std::string PFPreshowerClusterCollection_
 
std::string PFSCValueMap_
 
std::string PFSuperClusterCollection_
 
std::vector< reco::CaloClusterPtrVectorpreshowerClusterPtr_
 
std::vector< reco::PreshowerClusterCollectionpreshowerClusters_
 
std::map< reco::GsfTrackRef, reco::SuperClusterRefscMap_
 
std::vector< reco::SuperClusterCollectionsuperClusters_
 

Detailed Description

Definition at line 28 of file PFElectronTranslator.cc.

Member Typedef Documentation

◆ IsolationValueMaps

Definition at line 35 of file PFElectronTranslator.cc.

Constructor & Destructor Documentation

◆ PFElectronTranslator()

PFElectronTranslator::PFElectronTranslator ( const edm::ParameterSet iConfig)
explicit

Definition at line 143 of file PFElectronTranslator.cc.

References checkStatusFlag_, ecalMustacheSCParametersToken_, emptyIsOk_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), GsfElectronCollection_, GsfElectronCoreCollection_, inputTagGSFTracks_, inputTagIsoVals_, inputTagPFCandidateElectrons_, inputTagPFCandidates_, MVACut_, PFBasicClusterCollection_, PFMVAValueMap_, PFPreshowerClusterCollection_, PFSCValueMap_, PFSuperClusterCollection_, AlCaHLTBitMon_QueryRunRegistry::string, and pfElectronTranslator_cfi::useIsolationValues.

143  {
144  inputTagPFCandidates_ = iConfig.getParameter<edm::InputTag>("PFCandidate");
145  inputTagPFCandidateElectrons_ = iConfig.getParameter<edm::InputTag>("PFCandidateElectron");
146  inputTagGSFTracks_ = iConfig.getParameter<edm::InputTag>("GSFTracks");
147 
148  bool useIsolationValues = iConfig.getParameter<bool>("useIsolationValues");
149  if (useIsolationValues) {
150  if (!iConfig.exists("isolationValues"))
151  throw cms::Exception("PFElectronTranslator|InternalError") << "Missing ParameterSet isolationValues";
152  else {
153  edm::ParameterSet isoVals = iConfig.getParameter<edm::ParameterSet>("isolationValues");
154  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfSumChargedHadronPt"));
155  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfSumPhotonEt"));
156  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfSumNeutralHadronEt"));
157  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfSumPUPt"));
158  }
159  }
160 
161  PFBasicClusterCollection_ = iConfig.getParameter<std::string>("PFBasicClusters");
162  PFPreshowerClusterCollection_ = iConfig.getParameter<std::string>("PFPreshowerClusters");
163  PFSuperClusterCollection_ = iConfig.getParameter<std::string>("PFSuperClusters");
164  GsfElectronCoreCollection_ = iConfig.getParameter<std::string>("PFGsfElectronCore");
165  GsfElectronCollection_ = iConfig.getParameter<std::string>("PFGsfElectron");
166 
167  PFMVAValueMap_ = iConfig.getParameter<std::string>("ElectronMVA");
168  PFSCValueMap_ = iConfig.getParameter<std::string>("ElectronSC");
169  MVACut_ = (iConfig.getParameter<edm::ParameterSet>("MVACutBlock")).getParameter<double>("MVACut");
170  checkStatusFlag_ = iConfig.getParameter<bool>("CheckStatusFlag");
171 
172  if (iConfig.exists("emptyIsOk"))
173  emptyIsOk_ = iConfig.getParameter<bool>("emptyIsOk");
174  else
175  emptyIsOk_ = false;
176 
177  ecalMustacheSCParametersToken_ = esConsumes<EcalMustacheSCParameters, EcalMustacheSCParametersRcd>();
178 
179  produces<reco::BasicClusterCollection>(PFBasicClusterCollection_);
180  produces<reco::PreshowerClusterCollection>(PFPreshowerClusterCollection_);
181  produces<reco::SuperClusterCollection>(PFSuperClusterCollection_);
182  produces<reco::GsfElectronCoreCollection>(GsfElectronCoreCollection_);
183  produces<reco::GsfElectronCollection>(GsfElectronCollection_);
184  produces<edm::ValueMap<float>>(PFMVAValueMap_);
185  produces<edm::ValueMap<reco::SuperClusterRef>>(PFSCValueMap_);
186 }
std::string PFPreshowerClusterCollection_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
bool exists(std::string const &parameterName) const
checks if a parameter exists
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
edm::InputTag inputTagPFCandidateElectrons_
edm::InputTag inputTagPFCandidates_
edm::InputTag inputTagGSFTracks_
std::string PFBasicClusterCollection_
std::string GsfElectronCoreCollection_
std::vector< edm::InputTag > inputTagIsoVals_
std::string PFSuperClusterCollection_

◆ ~PFElectronTranslator()

PFElectronTranslator::~PFElectronTranslator ( )
override

Definition at line 188 of file PFElectronTranslator.cc.

188 {}

Member Function Documentation

◆ correspondingDaughterCandidate()

const reco::PFCandidate & PFElectronTranslator::correspondingDaughterCandidate ( const reco::PFCandidate cand,
const reco::PFBlockElement pfbe 
) const
private

Definition at line 598 of file PFElectronTranslator.cc.

References reco::PFCandidate::elementsInBlocks(), and reco::PFBlockElement::index().

Referenced by produce().

599  {
600  unsigned refindex = pfbe.index();
601  // std::cout << " N daughters " << cand.numberOfDaughters() << std::endl;
602  reco::PFCandidate::const_iterator myDaughterCandidate = cand.begin();
604 
605  for (; myDaughterCandidate != itend; ++myDaughterCandidate) {
606  const reco::PFCandidate* myPFCandidate = (const reco::PFCandidate*)&*myDaughterCandidate;
607  if (myPFCandidate->elementsInBlocks().size() != 1) {
608  // std::cout << " Daughter with " << myPFCandidate.elementsInBlocks().size()<< " element in block " << std::endl;
609  return cand;
610  }
611  if (myPFCandidate->elementsInBlocks()[0].second == refindex) {
612  // std::cout << " Found it " << cand << std::endl;
613  return *myPFCandidate;
614  }
615  }
616  return cand;
617 }
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:665
unsigned index() const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41

◆ createBasicCluster()

void PFElectronTranslator::createBasicCluster ( const reco::PFBlockElement PFBE,
reco::BasicClusterCollection basicClusters,
std::vector< const reco::PFCluster *> &  pfClusters,
const reco::PFCandidate coCandidate 
) const
private

Definition at line 387 of file PFElectronTranslator.cc.

References reco::CaloCluster::algo(), reco::CaloCluster::caloID(), reco::PFBlockElement::clusterRef(), reco::CaloCluster::hitsAndFractions(), edm::Ref< C, T, F >::isNull(), reco::CaloCluster::position(), reco::PFCandidate::rawEcalEnergy(), and reco::CaloCluster::seed().

Referenced by produce().

390  {
391  const reco::PFClusterRef& myPFClusterRef = PFBE.clusterRef();
392  if (myPFClusterRef.isNull())
393  return;
394 
395  const reco::PFCluster& myPFCluster(*myPFClusterRef);
396  pfClusters.push_back(&myPFCluster);
397  // std::cout << " Creating BC " << myPFCluster.energy() << " " << coCandidate.ecalEnergy() <<" "<< coCandidate.rawEcalEnergy() <<std::endl;
398  // std::cout << " # hits " << myPFCluster.hitsAndFractions().size() << std::endl;
399 
400  // basicClusters.push_back(reco::CaloCluster(myPFCluster.energy(),
401  basicClusters.push_back(reco::CaloCluster(
402  // myPFCluster.energy(),
403  coCandidate.rawEcalEnergy(),
404  myPFCluster.position(),
405  myPFCluster.caloID(),
406  myPFCluster.hitsAndFractions(),
407  myPFCluster.algo(),
408  myPFCluster.seed()));
409 }
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
virtual const PFClusterRef & clusterRef() const
bool isNull() const
Checks for null.
Definition: Ref.h:235
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:224

◆ createBasicClusterPtrs()

void PFElectronTranslator::createBasicClusterPtrs ( const edm::OrphanHandle< reco::BasicClusterCollection > &  basicClustersHandle)
private

Definition at line 419 of file PFElectronTranslator.cc.

References basicClusterPtr_, basicClusters_, GsfTrackRef_, and findQualityFiles::size.

Referenced by produce().

420  {
421  unsigned size = GsfTrackRef_.size();
422  unsigned basicClusterCounter = 0;
423  basicClusterPtr_.resize(size);
424 
425  for (unsigned iGSF = 0; iGSF < size; ++iGSF) // loop on tracks
426  {
427  unsigned nbc = basicClusters_[iGSF].size();
428  for (unsigned ibc = 0; ibc < nbc; ++ibc) // loop on basic clusters
429  {
430  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
431  reco::CaloClusterPtr bcPtr(basicClustersHandle, basicClusterCounter);
432  basicClusterPtr_[iGSF].push_back(bcPtr);
433  ++basicClusterCounter;
434  }
435  }
436 }
size
Write out results.
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< reco::BasicClusterCollection > basicClusters_

◆ createGsfElectronCoreRefs()

void PFElectronTranslator::createGsfElectronCoreRefs ( const edm::OrphanHandle< reco::GsfElectronCoreCollection > &  gsfElectronCoreHandle)
private

Definition at line 631 of file PFElectronTranslator.cc.

References gsfElectronCoreRefs_, GsfTrackRef_, and findQualityFiles::size.

Referenced by produce().

632  {
633  unsigned size = GsfTrackRef_.size();
634 
635  for (unsigned iGSF = 0; iGSF < size; ++iGSF) // loop on tracks
636  {
637  edm::Ref<reco::GsfElectronCoreCollection> elecCoreRef(gsfElectronCoreHandle, iGSF);
638  gsfElectronCoreRefs_.push_back(elecCoreRef);
639  }
640 }
size
Write out results.
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
std::vector< reco::GsfTrackRef > GsfTrackRef_

◆ createGsfElectronCores()

void PFElectronTranslator::createGsfElectronCores ( reco::GsfElectronCoreCollection gsfElectronCores) const
private

Definition at line 619 of file PFElectronTranslator.cc.

References GsfTrackRef_, kfTrackRef_, scMap_, reco::GsfElectronCore::setCtfTrack(), and reco::GsfElectronCore::setParentSuperCluster().

Referenced by produce().

619  {
620  unsigned nGSF = GsfTrackRef_.size();
621  for (unsigned iGSF = 0; iGSF < nGSF; ++iGSF) {
622  reco::GsfElectronCore myElectronCore(GsfTrackRef_[iGSF]);
623  myElectronCore.setCtfTrack(kfTrackRef_[iGSF], -1.);
624  std::map<reco::GsfTrackRef, reco::SuperClusterRef>::const_iterator itcheck = scMap_.find(GsfTrackRef_[iGSF]);
625  if (itcheck != scMap_.end())
626  myElectronCore.setParentSuperCluster(itcheck->second);
627  gsfElectronCores.push_back(myElectronCore);
628  }
629 }
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< reco::TrackRef > kfTrackRef_

◆ createGsfElectrons()

void PFElectronTranslator::createGsfElectrons ( const reco::PFCandidateCollection pfcand,
const IsolationValueMaps isolationValues,
reco::GsfElectronCollection gsfelectrons 
)
private

Definition at line 654 of file PFElectronTranslator.cc.

References reco::GsfElectron::addAmbiguousGsfTrack(), ambiguousGsfTracks_, CandidatePtr_, reco::GsfElectron::MvaInput::deltaEta, reco::PFCandidate::deltaP(), reco::GsfElectron::MvaInput::earlyBrem, reco::PFCandidate::electronExtraRef(), reco::GsfElectron::MvaInput::etOutsideMustache, gsfElectronCoreRefs_, gsfPFCandidateIndex_, GsfTrackRef_, reco::GsfElectron::MvaInput::hadEnergy, displacedMuonProducer_cff::isolationValues, reco::GsfElectron::MvaInput::lateBrem, reco::Mustache::MustacheID(), mustacheSCParams_, reco::PFCandidateElectronExtra::MVA_DeltaEtaTrackCluster, reco::PFCandidate::mva_e_pi(), reco::GsfElectron::MvaOutput::mva_e_pi, reco::PFCandidateElectronExtra::MVA_FirstBrem, reco::PFCandidateElectronExtra::MVA_LateBrem, reco::GsfElectron::MvaInput::nClusterOutsideMustache, vertices_cff::ntracks, reco::LeafCandidate::p4(), reco::GsfElectron::P4_PFLOW_COMBINATION, reco::GsfElectron::parentSuperCluster(), pfDeepBoostedJetPreprocessParams_cfi::pfcand, reco::GsfElectron::setMvaInput(), reco::GsfElectron::setMvaOutput(), reco::GsfElectron::setP4(), reco::GsfElectron::setPfIsolationVariables(), reco::GsfElectron::MvaInput::sigmaEtaEta, findQualityFiles::size, reco::GsfElectron::MvaOutput::status, reco::GsfElectron::PflowIsolationVariables::sumChargedHadronPt, reco::GsfElectron::PflowIsolationVariables::sumNeutralHadronEt, reco::GsfElectron::PflowIsolationVariables::sumPhotonEt, and reco::GsfElectron::PflowIsolationVariables::sumPUPt.

Referenced by produce().

656  {
657  unsigned size = GsfTrackRef_.size();
658 
659  for (unsigned iGSF = 0; iGSF < size; ++iGSF) // loop on tracks
660  {
661  const reco::PFCandidate& pfCandidate(pfcand[gsfPFCandidateIndex_[iGSF]]);
662  // Electron
663  reco::GsfElectron myElectron(gsfElectronCoreRefs_[iGSF]);
664  // Warning set p4 error !
665  myElectron.setP4(reco::GsfElectron::P4_PFLOW_COMBINATION, pfCandidate.p4(), pfCandidate.deltaP(), true);
666 
667  // MVA inputs
668  reco::GsfElectron::MvaInput myMvaInput;
669  myMvaInput.earlyBrem = pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_FirstBrem);
670  myMvaInput.lateBrem = pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_LateBrem);
671  myMvaInput.deltaEta =
672  pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_DeltaEtaTrackCluster);
673  myMvaInput.sigmaEtaEta = pfCandidate.electronExtraRef()->sigmaEtaEta();
674  myMvaInput.hadEnergy = pfCandidate.electronExtraRef()->hadEnergy();
675 
676  // Mustache
677  reco::Mustache myMustache(mustacheSCParams_);
678  myMustache.MustacheID(
679  *(myElectron.parentSuperCluster()), myMvaInput.nClusterOutsideMustache, myMvaInput.etOutsideMustache);
680 
681  myElectron.setMvaInput(myMvaInput);
682 
683  // MVA output
684  reco::GsfElectron::MvaOutput myMvaOutput;
685  myMvaOutput.status = pfCandidate.electronExtraRef()->electronStatus();
686  myMvaOutput.mva_e_pi = pfCandidate.mva_e_pi();
687  myElectron.setMvaOutput(myMvaOutput);
688 
689  // ambiguous tracks
690  unsigned ntracks = ambiguousGsfTracks_[iGSF].size();
691  for (unsigned it = 0; it < ntracks; ++it) {
692  myElectron.addAmbiguousGsfTrack(ambiguousGsfTracks_[iGSF][it]);
693  }
694 
695  // isolation
696  if (!isolationValues.empty()) {
698  myPFIso.sumChargedHadronPt = (*isolationValues[0])[CandidatePtr_[iGSF]];
699  myPFIso.sumPhotonEt = (*isolationValues[1])[CandidatePtr_[iGSF]];
700  myPFIso.sumNeutralHadronEt = (*isolationValues[2])[CandidatePtr_[iGSF]];
701  myPFIso.sumPUPt = (*isolationValues[3])[CandidatePtr_[iGSF]];
702  myElectron.setPfIsolationVariables(myPFIso);
703  }
704 
705  gsfelectrons.push_back(myElectron);
706  }
707 }
size
Write out results.
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
Definition: GsfElectron.h:670
std::vector< reco::GsfTrackRef > GsfTrackRef_
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
Definition: GsfElectron.h:665
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
Definition: GsfElectron.h:664
std::vector< int > gsfPFCandidateIndex_
std::vector< reco::CandidatePtr > CandidatePtr_
std::vector< std::vector< reco::GsfTrackRef > > ambiguousGsfTracks_
const EcalMustacheSCParameters * mustacheSCParams_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
Definition: GsfElectron.h:663

◆ createPreshowerCluster()

void PFElectronTranslator::createPreshowerCluster ( const reco::PFBlockElement PFBE,
reco::PreshowerClusterCollection preshowerClusters,
unsigned  plane 
) const
private

Definition at line 411 of file PFElectronTranslator.cc.

References reco::PFBlockElement::clusterRef().

Referenced by produce().

413  {
414  const reco::PFClusterRef& myPFClusterRef = PFBE.clusterRef();
415  preshowerClusters.push_back(reco::PreshowerCluster(
416  myPFClusterRef->energy(), myPFClusterRef->position(), myPFClusterRef->hitsAndFractions(), plane));
417 }
virtual const PFClusterRef & clusterRef() const

◆ createPreshowerClusterPtrs()

void PFElectronTranslator::createPreshowerClusterPtrs ( const edm::OrphanHandle< reco::PreshowerClusterCollection > &  preshowerClustersHandle)
private

Definition at line 438 of file PFElectronTranslator.cc.

References GsfTrackRef_, preshowerClusterPtr_, preshowerClusters_, and findQualityFiles::size.

Referenced by produce().

439  {
440  unsigned size = GsfTrackRef_.size();
441  unsigned psClusterCounter = 0;
442  preshowerClusterPtr_.resize(size);
443 
444  for (unsigned iGSF = 0; iGSF < size; ++iGSF) // loop on tracks
445  {
446  unsigned nbc = preshowerClusters_[iGSF].size();
447  for (unsigned ibc = 0; ibc < nbc; ++ibc) // loop on basic clusters
448  {
449  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
450  reco::CaloClusterPtr psPtr(preshowerClustersHandle, psClusterCounter);
451  preshowerClusterPtr_[iGSF].push_back(psPtr);
452  ++psClusterCounter;
453  }
454  }
455 }
size
Write out results.
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_

◆ createSuperClusterGsfMapRefs()

void PFElectronTranslator::createSuperClusterGsfMapRefs ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle)
private

Definition at line 457 of file PFElectronTranslator.cc.

References GsfTrackRef_, scMap_, and findQualityFiles::size.

Referenced by produce().

458  {
459  unsigned size = GsfTrackRef_.size();
460 
461  for (unsigned iGSF = 0; iGSF < size; ++iGSF) // loop on tracks
462  {
463  edm::Ref<reco::SuperClusterCollection> scRef(superClustersHandle, iGSF);
464  scMap_[GsfTrackRef_[iGSF]] = scRef;
465  }
466 }
size
Write out results.
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
std::vector< reco::GsfTrackRef > GsfTrackRef_

◆ createSuperClusters()

void PFElectronTranslator::createSuperClusters ( const reco::PFCandidateCollection pfCand,
reco::SuperClusterCollection superClusters 
) const
private

Definition at line 522 of file PFElectronTranslator.cc.

References reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), basicClusterPtr_, basicClusters_, MillePedeFileConverter_cfg::e, gsfPFCandidateIndex_, GsfTrackRef_, pfClusters_, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, preshowerClusterPtr_, reco::SuperCluster::rawEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), reco::SuperCluster::setSeed(), HLT_2023v12_cff::superClusters, and trackerHitRTTI::vector.

Referenced by produce().

523  {
524  unsigned nGSF = GsfTrackRef_.size();
525  for (unsigned iGSF = 0; iGSF < nGSF; ++iGSF) {
526  // Computes energy position a la e/gamma
527  double sclusterE = 0;
528  double posX = 0.;
529  double posY = 0.;
530  double posZ = 0.;
531 
532  unsigned nbasics = basicClusters_[iGSF].size();
533  for (unsigned ibc = 0; ibc < nbasics; ++ibc) {
534  double e = basicClusters_[iGSF][ibc].energy();
535  sclusterE += e;
536  posX += e * basicClusters_[iGSF][ibc].position().X();
537  posY += e * basicClusters_[iGSF][ibc].position().Y();
538  posZ += e * basicClusters_[iGSF][ibc].position().Z();
539  }
540  posX /= sclusterE;
541  posY /= sclusterE;
542  posZ /= sclusterE;
543 
544  if (pfCand[gsfPFCandidateIndex_[iGSF]].gsfTrackRef() != GsfTrackRef_[iGSF]) {
545  edm::LogError("PFElectronTranslator") << " Major problem in PFElectron Translator" << std::endl;
546  }
547 
548  // compute the width
549  PFClusterWidthAlgo pfwidth(pfClusters_[iGSF]);
550 
551  double correctedEnergy = pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
552  reco::SuperCluster mySuperCluster(correctedEnergy, math::XYZPoint(posX, posY, posZ));
553  // protection against empty basic cluster collection ; the value is -2 in this case
554  if (nbasics) {
555  // std::cout << "SuperCluster creation; energy " << pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
556  // std::cout << " " << pfCand[gsfPFCandidateIndex_[iGSF]].rawEcalEnergy() << std::endl;
557  // std::cout << "Seed energy from basic " << basicClusters_[iGSF][0].energy() << std::endl;
558  mySuperCluster.setSeed(basicClusterPtr_[iGSF][0]);
559  } else {
560  // std::cout << "SuperCluster creation ; seed energy " << 0 << std::endl;
561  // std::cout << "SuperCluster creation ; energy " << pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
562  // std::cout << " " << pfCand[gsfPFCandidateIndex_[iGSF]].rawEcalEnergy() << std::endl;
563  // std::cout << " No seed found " << 0 << std::endl;
564  // std::cout << " MVA " << pfCand[gsfPFCandidateIndex_[iGSF]].mva_e_pi() << std::endl;
565  mySuperCluster.setSeed(reco::CaloClusterPtr());
566  }
567  // the seed should be the first basic cluster
568 
569  for (unsigned ibc = 0; ibc < nbasics; ++ibc) {
570  mySuperCluster.addCluster(basicClusterPtr_[iGSF][ibc]);
571  // std::cout <<"Adding Ref to SC " << basicClusterPtr_[iGSF][ibc].index() << std::endl;
572  const std::vector<std::pair<DetId, float>>& v1 = basicClusters_[iGSF][ibc].hitsAndFractions();
573  // std::cout << " Number of cells " << v1.size() << std::endl;
574  for (std::vector<std::pair<DetId, float>>::const_iterator diIt = v1.begin(); diIt != v1.end(); ++diIt) {
575  // std::cout << " Adding DetId " << (diIt->first).rawId() << " " << diIt->second << std::endl;
576  mySuperCluster.addHitAndFraction(diIt->first, diIt->second);
577  } // loop over rechits
578  }
579 
580  unsigned nps = preshowerClusterPtr_[iGSF].size();
581  for (unsigned ips = 0; ips < nps; ++ips) {
582  mySuperCluster.addPreshowerCluster(preshowerClusterPtr_[iGSF][ips]);
583  }
584 
585  // Set the preshower energy
586  mySuperCluster.setPreshowerEnergy(pfCand[gsfPFCandidateIndex_[iGSF]].pS1Energy() +
587  pfCand[gsfPFCandidateIndex_[iGSF]].pS2Energy());
588 
589  // Set the cluster width
590  mySuperCluster.setEtaWidth(pfwidth.pflowEtaWidth());
591  mySuperCluster.setPhiWidth(pfwidth.pflowPhiWidth());
592  // Force the computation of rawEnergy_ of the reco::SuperCluster
593  mySuperCluster.rawEnergy();
594  superClusters.push_back(mySuperCluster);
595  }
596 }
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
Log< level::Error, false > LogError
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< int > gsfPFCandidateIndex_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
std::vector< reco::BasicClusterCollection > basicClusters_

◆ fetchCandidateCollection()

bool PFElectronTranslator::fetchCandidateCollection ( edm::Handle< reco::PFCandidateCollection > &  c,
const edm::InputTag tag,
const edm::Event iEvent 
) const
private

Definition at line 358 of file PFElectronTranslator.cc.

References HltBtagPostValidation_cff::c, emptyIsOk_, submitPVResolutionJobs::err, newFWLiteAna::found, iEvent, and makeGlobalPositionRcd_cfg::tag.

Referenced by fillMVAValueMap(), and produce().

360  {
361  bool found = iEvent.getByLabel(tag, c);
362 
363  if (!found && !emptyIsOk_) {
364  std::ostringstream err;
365  err << " cannot get PFCandidates: " << tag << std::endl;
366  edm::LogError("PFElectronTranslator") << err.str();
367  }
368  return found;
369 }
Log< level::Error, false > LogError
int iEvent
Definition: GenABIO.cc:224

◆ fetchGsfCollection()

void PFElectronTranslator::fetchGsfCollection ( edm::Handle< reco::GsfTrackCollection > &  c,
const edm::InputTag tag,
const edm::Event iEvent 
) const
private

Definition at line 371 of file PFElectronTranslator.cc.

References HltBtagPostValidation_cff::c, submitPVResolutionJobs::err, Exception, newFWLiteAna::found, iEvent, and makeGlobalPositionRcd_cfg::tag.

Referenced by fillMVAValueMap(), and fillSCRefValueMap().

373  {
374  bool found = iEvent.getByLabel(tag, c);
375 
376  if (!found) {
377  std::ostringstream err;
378  err << " cannot get GSFTracks: " << tag << std::endl;
379  edm::LogError("PFElectronTranslator") << err.str();
380  throw cms::Exception("MissingProduct", err.str());
381  }
382 }
Log< level::Error, false > LogError
int iEvent
Definition: GenABIO.cc:224

◆ fillMVAValueMap()

void PFElectronTranslator::fillMVAValueMap ( edm::Event iEvent,
edm::ValueMap< float >::Filler &  filler 
)
private

Definition at line 468 of file PFElectronTranslator.cc.

References reco::PFCandidate::e, fetchCandidateCollection(), fetchGsfCollection(), trigObjTnPSource_cfi::filler, gsfMvaMap_, ecalDrivenGsfElectronCoresHGC_cff::gsfTracks, mps_fire::i, iEvent, inputTagGSFTracks_, inputTagPFCandidateElectrons_, zmumugammaAnalyzer_cfi::pfCandidates, mps_update::status, and contentValuesCheck::values.

Referenced by produce().

468  {
469  gsfMvaMap_.clear();
472 
473  unsigned ncand = (status) ? pfCandidates->size() : 0;
474  for (unsigned i = 0; i < ncand; ++i) {
475  const reco::PFCandidate& cand = (*pfCandidates)[i];
476  if (cand.particleId() != reco::PFCandidate::e)
477  continue;
478  if (cand.gsfTrackRef().isNull())
479  continue;
480  // Fill the MVA map
481  gsfMvaMap_[cand.gsfTrackRef()] = cand.mva_e_pi();
482  }
483 
486  unsigned ngsf = gsfTracks->size();
487  std::vector<float> values;
488  for (unsigned igsf = 0; igsf < ngsf; ++igsf) {
489  reco::GsfTrackRef theTrackRef(gsfTracks, igsf);
490  std::map<reco::GsfTrackRef, float>::const_iterator itcheck = gsfMvaMap_.find(theTrackRef);
491  if (itcheck == gsfMvaMap_.end()) {
492  // edm::LogWarning("PFElectronTranslator") << "MVA Map, missing GSF track ref " << std::endl;
493  values.push_back(-99.);
494  // std::cout << " Push_back -99. " << std::endl;
495  } else {
496  // std::cout << " Value " << itcheck->second << std::endl;
497  values.push_back(itcheck->second);
498  }
499  }
500  filler.insert(gsfTracks, values.begin(), values.end());
501 }
std::map< reco::GsfTrackRef, float > gsfMvaMap_
int iEvent
Definition: GenABIO.cc:224
edm::InputTag inputTagPFCandidateElectrons_
edm::InputTag inputTagGSFTracks_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const

◆ fillSCRefValueMap()

void PFElectronTranslator::fillSCRefValueMap ( edm::Event iEvent,
edm::ValueMap< reco::SuperClusterRef >::Filler &  filler 
) const
private

Definition at line 503 of file PFElectronTranslator.cc.

References fetchGsfCollection(), trigObjTnPSource_cfi::filler, ecalDrivenGsfElectronCoresHGC_cff::gsfTracks, iEvent, inputTagGSFTracks_, scMap_, and contentValuesCheck::values.

Referenced by produce().

504  {
507  unsigned ngsf = gsfTracks->size();
508  std::vector<reco::SuperClusterRef> values;
509  for (unsigned igsf = 0; igsf < ngsf; ++igsf) {
510  reco::GsfTrackRef theTrackRef(gsfTracks, igsf);
511  std::map<reco::GsfTrackRef, reco::SuperClusterRef>::const_iterator itcheck = scMap_.find(theTrackRef);
512  if (itcheck == scMap_.end()) {
513  // edm::LogWarning("PFElectronTranslator") << "SCRef Map, missing GSF track ref" << std::endl;
514  values.push_back(reco::SuperClusterRef());
515  } else {
516  values.push_back(itcheck->second);
517  }
518  }
519  filler.insert(gsfTracks, values.begin(), values.end());
520 }
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
int iEvent
Definition: GenABIO.cc:224
edm::InputTag inputTagGSFTracks_
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const

◆ fillValueMap()

void PFElectronTranslator::fillValueMap ( edm::Event iEvent,
edm::ValueMap< float >::Filler &  filler 
) const
private

◆ getAmbiguousGsfTracks()

void PFElectronTranslator::getAmbiguousGsfTracks ( const reco::PFBlockElement PFBE,
std::vector< reco::GsfTrackRef > &  tracks 
) const
private

Definition at line 642 of file PFElectronTranslator.cc.

References reco::PFBlockElementGsfTrack::GsftrackRefPF(), vertices_cff::ntracks, and DiMuonV_cfg::tracks.

Referenced by produce().

643  {
644  const reco::PFBlockElementGsfTrack* GsfEl = dynamic_cast<const reco::PFBlockElementGsfTrack*>(&PFBE);
645  if (GsfEl == nullptr)
646  return;
647  const std::vector<reco::GsfPFRecTrackRef>& ambPFRecTracks(GsfEl->GsftrackRefPF()->convBremGsfPFRecTrackRef());
648  unsigned ntracks = ambPFRecTracks.size();
649  for (unsigned it = 0; it < ntracks; ++it) {
650  tracks.push_back(ambPFRecTracks[it]->gsfTrackRef());
651  }
652 }
const GsfPFRecTrackRef & GsftrackRefPF() const

◆ produce()

void PFElectronTranslator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 190 of file PFElectronTranslator.cc.

References ambiguousGsfTracks_, basicClusterPtr_, basicClusters_, CandidatePtr_, checkStatusFlag_, correspondingDaughterCandidate(), createBasicCluster(), createBasicClusterPtrs(), createGsfElectronCoreRefs(), createGsfElectronCores(), createGsfElectrons(), createPreshowerCluster(), createPreshowerClusterPtrs(), createSuperClusterGsfMapRefs(), createSuperClusters(), reco::PFCandidate::e, reco::PFBlockElement::ECAL, ecalMustacheSCParametersToken_, bookConverter::elements, fetchCandidateCollection(), fillMVAValueMap(), fillSCRefValueMap(), getAmbiguousGsfTracks(), edm::EventSetup::getData(), reco::PFBlockElement::GSF, GsfElectronCollection_, GsfElectronCoreCollection_, gsfElectronCoreRefs_, gsfPFCandidateIndex_, GsfTrackRef_, mps_fire::i, iEvent, inputTagIsoVals_, inputTagPFCandidates_, edm::Ref< C, T, F >::isNull(), displacedMuonProducer_cff::isolationValues, dqmiolumiharvest::j, kfTrackRef_, eostools::move(), mustacheSCParams_, MVACut_, PFBasicClusterCollection_, zmumugammaAnalyzer_cfi::pfCandidates, pfClusters_, PFMVAValueMap_, PFPreshowerClusterCollection_, PFSCValueMap_, PFSuperClusterCollection_, preshowerClusterPtr_, preshowerClusters_, reco::PFBlockElement::PS1, reco::PFBlockElement::PS2, scMap_, reco::PFCandidateElectronExtra::Selected, mps_update::status, superClusters_, and reco::PFBlockElement::type().

190  {
192 
193  auto gsfElectronCores_p = std::make_unique<reco::GsfElectronCoreCollection>();
194 
195  auto gsfElectrons_p = std::make_unique<reco::GsfElectronCollection>();
196 
197  auto superClusters_p = std::make_unique<reco::SuperClusterCollection>();
198 
199  auto basicClusters_p = std::make_unique<reco::BasicClusterCollection>();
200 
201  auto psClusters_p = std::make_unique<reco::PreshowerClusterCollection>();
202 
203  auto mvaMap_p = std::make_unique<edm::ValueMap<float>>();
204  edm::ValueMap<float>::Filler mvaFiller(*mvaMap_p);
205 
206  auto scMap_p = std::make_unique<edm::ValueMap<reco::SuperClusterRef>>();
207  edm::ValueMap<reco::SuperClusterRef>::Filler scRefFiller(*scMap_p);
208 
211 
213  for (size_t j = 0; j < inputTagIsoVals_.size(); ++j) {
214  iEvent.getByLabel(inputTagIsoVals_[j], isolationValues[j]);
215  }
216 
217  // clear the vectors
218  GsfTrackRef_.clear();
219  CandidatePtr_.clear();
220  ambiguousGsfTracks_.clear();
221  kfTrackRef_.clear();
222  basicClusters_.clear();
223  pfClusters_.clear();
224  preshowerClusters_.clear();
225  superClusters_.clear();
226  basicClusterPtr_.clear();
227  preshowerClusterPtr_.clear();
228  gsfPFCandidateIndex_.clear();
229  gsfElectronCoreRefs_.clear();
230  scMap_.clear();
231 
232  // loop on the candidates
233  //CC@@
234  // we need first to create AND put the SuperCluster,
235  // basic clusters and presh clusters collection
236  // in order to get a working Handle
237  unsigned ncand = (status) ? pfCandidates->size() : 0;
238  unsigned iGSF = 0;
239  for (unsigned i = 0; i < ncand; ++i) {
240  const reco::PFCandidate& cand = (*pfCandidates)[i];
241  if (cand.particleId() != reco::PFCandidate::e)
242  continue;
243  if (cand.gsfTrackRef().isNull())
244  continue;
245  // Note that -1 will still cut some total garbage candidates
246  // Fill the MVA map
247  if (cand.mva_e_pi() < MVACut_)
248  continue;
249 
250  // Check the status flag
251  if (checkStatusFlag_ && !cand.electronExtraRef()->electronStatus(reco::PFCandidateElectronExtra::Selected)) {
252  continue;
253  }
254 
255  GsfTrackRef_.push_back(cand.gsfTrackRef());
256  kfTrackRef_.push_back(cand.trackRef());
257  gsfPFCandidateIndex_.push_back(i);
258 
259  reco::PFCandidatePtr ptrToPFElectron(pfCandidates, i);
260  //CandidatePtr_.push_back(ptrToPFElectron->sourceCandidatePtr(0));
261  CandidatePtr_.push_back(ptrToPFElectron);
262 
264  pfClusters_.push_back(std::vector<const reco::PFCluster*>());
266  ambiguousGsfTracks_.push_back(std::vector<reco::GsfTrackRef>());
267 
268  for (unsigned iele = 0; iele < cand.elementsInBlocks().size(); ++iele) {
269  // first get the block
270  reco::PFBlockRef blockRef = cand.elementsInBlocks()[iele].first;
271  //
272  unsigned elementIndex = cand.elementsInBlocks()[iele].second;
273  // check it actually exists
274  if (blockRef.isNull())
275  continue;
276 
277  // then get the elements of the block
278  const edm::OwnVector<reco::PFBlockElement>& elements = (*blockRef).elements();
279 
280  const reco::PFBlockElement& pfbe(elements[elementIndex]);
281  // The first ECAL element should be the cluster associated to the GSF; defined as the seed
282  if (pfbe.type() == reco::PFBlockElement::ECAL) {
283  // const reco::PFCandidate * coCandidate = &cand;
284  // the Brem photons are saved as daughter PFCandidate; this
285  // is convenient to access the corrected energy
286  // std::cout << " Found candidate " << correspondingDaughterCandidate(coCandidate,pfbe) << " " << coCandidate << std::endl;
288  }
289  if (pfbe.type() == reco::PFBlockElement::PS1) {
291  }
292  if (pfbe.type() == reco::PFBlockElement::PS2) {
294  }
295  if (pfbe.type() == reco::PFBlockElement::GSF) {
297  }
298 
299  } // loop on the elements
300 
301  // save the basic clusters
302  basicClusters_p->insert(basicClusters_p->end(), basicClusters_[iGSF].begin(), basicClusters_[iGSF].end());
303  // save the preshower clusters
304  psClusters_p->insert(psClusters_p->end(), preshowerClusters_[iGSF].begin(), preshowerClusters_[iGSF].end());
305 
306  ++iGSF;
307  } // loop on PFCandidates
308 
309  //Save the basic clusters and get an handle as to be able to create valid Refs (thanks to Claude)
310  // std::cout << " Number of basic clusters " << basicClusters_p->size() << std::endl;
312  iEvent.put(std::move(basicClusters_p), PFBasicClusterCollection_);
313 
314  //preshower clusters
316  iEvent.put(std::move(psClusters_p), PFPreshowerClusterCollection_);
317 
318  // now that the Basic clusters are in the event, the Ref can be created
319  createBasicClusterPtrs(bcRefProd);
320  // now that the preshower clusters are in the event, the Ref can be created
321  createPreshowerClusterPtrs(psRefProd);
322 
323  // and now the Super cluster can be created with valid references
324  if (status)
325  createSuperClusters(*pfCandidates, *superClusters_p);
326 
327  // Let's put the super clusters in the event
329  iEvent.put(std::move(superClusters_p), PFSuperClusterCollection_);
330  // create the super cluster Ref
331  createSuperClusterGsfMapRefs(scRefProd);
332 
333  // Now create the GsfElectronCoers
334  createGsfElectronCores(*gsfElectronCores_p);
335  // Put them in the as to get to be able to build a Ref
336  const edm::OrphanHandle<reco::GsfElectronCoreCollection> gsfElectronCoreRefProd =
337  iEvent.put(std::move(gsfElectronCores_p), GsfElectronCoreCollection_);
338 
339  // now create the Refs
340  createGsfElectronCoreRefs(gsfElectronCoreRefProd);
341 
342  // now make the GsfElectron
343  createGsfElectrons(*pfCandidates, isolationValues, *gsfElectrons_p);
344  iEvent.put(std::move(gsfElectrons_p), GsfElectronCollection_);
345 
346  fillMVAValueMap(iEvent, mvaFiller);
347  mvaFiller.fill();
348 
349  fillSCRefValueMap(iEvent, scRefFiller);
350  scRefFiller.fill();
351 
352  // MVA map
353  iEvent.put(std::move(mvaMap_p), PFMVAValueMap_);
354  // Gsf-SC map
355  iEvent.put(std::move(scMap_p), PFSCValueMap_);
356 }
std::string PFPreshowerClusterCollection_
Abstract base class for a PFBlock element (track, cluster...)
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
void createGsfElectronCoreRefs(const edm::OrphanHandle< reco::GsfElectronCoreCollection > &gsfElectronCoreHandle)
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
void getAmbiguousGsfTracks(const reco::PFBlockElement &PFBE, std::vector< reco::GsfTrackRef > &) const
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
void createGsfElectronCores(reco::GsfElectronCoreCollection &) const
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
edm::ESGetToken< EcalMustacheSCParameters, EcalMustacheSCParametersRcd > ecalMustacheSCParametersToken_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
std::vector< reco::GsfTrackRef > GsfTrackRef_
int iEvent
Definition: GenABIO.cc:224
void fillMVAValueMap(edm::Event &iEvent, edm::ValueMap< float >::Filler &filler)
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster *> &, const reco::PFCandidate &coCandidate) const
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
void createSuperClusterGsfMapRefs(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle)
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
void fillSCRefValueMap(edm::Event &iEvent, edm::ValueMap< reco::SuperClusterRef >::Filler &filler) const
std::vector< int > gsfPFCandidateIndex_
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
bool isNull() const
Checks for null.
Definition: Ref.h:235
std::vector< reco::CandidatePtr > CandidatePtr_
edm::InputTag inputTagPFCandidates_
std::vector< std::vector< reco::GsfTrackRef > > ambiguousGsfTracks_
const EcalMustacheSCParameters * mustacheSCParams_
std::string PFBasicClusterCollection_
std::vector< reco::SuperClusterCollection > superClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
std::string GsfElectronCoreCollection_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
std::vector< edm::InputTag > inputTagIsoVals_
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
std::vector< reco::BasicClusterCollection > basicClusters_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
std::vector< reco::TrackRef > kfTrackRef_
std::string PFSuperClusterCollection_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
void createGsfElectrons(const reco::PFCandidateCollection &, const IsolationValueMaps &isolationValues, reco::GsfElectronCollection &)
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
def move(src, dest)
Definition: eostools.py:511
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const

Member Data Documentation

◆ ambiguousGsfTracks_

std::vector<std::vector<reco::GsfTrackRef> > PFElectronTranslator::ambiguousGsfTracks_
private

Definition at line 113 of file PFElectronTranslator.cc.

Referenced by createGsfElectrons(), and produce().

◆ basicClusterPtr_

std::vector<reco::CaloClusterPtrVector> PFElectronTranslator::basicClusterPtr_
private

Definition at line 123 of file PFElectronTranslator.cc.

Referenced by createBasicClusterPtrs(), createSuperClusters(), and produce().

◆ basicClusters_

std::vector<reco::BasicClusterCollection> PFElectronTranslator::basicClusters_
private

Definition at line 115 of file PFElectronTranslator.cc.

Referenced by createBasicClusterPtrs(), createSuperClusters(), and produce().

◆ CandidatePtr_

std::vector<reco::CandidatePtr> PFElectronTranslator::CandidatePtr_
private

Definition at line 109 of file PFElectronTranslator.cc.

Referenced by createGsfElectrons(), and produce().

◆ checkStatusFlag_

bool PFElectronTranslator::checkStatusFlag_
private

Definition at line 103 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ ecalMustacheSCParametersToken_

edm::ESGetToken<EcalMustacheSCParameters, EcalMustacheSCParametersRcd> PFElectronTranslator::ecalMustacheSCParametersToken_
private

Definition at line 135 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ emptyIsOk_

bool PFElectronTranslator::emptyIsOk_
private

Definition at line 138 of file PFElectronTranslator.cc.

Referenced by fetchCandidateCollection(), and PFElectronTranslator().

◆ GsfElectronCollection_

std::string PFElectronTranslator::GsfElectronCollection_
private

Definition at line 101 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ GsfElectronCoreCollection_

std::string PFElectronTranslator::GsfElectronCoreCollection_
private

Definition at line 100 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ gsfElectronCoreRefs_

std::vector<reco::GsfElectronCoreRef> PFElectronTranslator::gsfElectronCoreRefs_
private

Definition at line 127 of file PFElectronTranslator.cc.

Referenced by createGsfElectronCoreRefs(), createGsfElectrons(), and produce().

◆ gsfMvaMap_

std::map<reco::GsfTrackRef, float> PFElectronTranslator::gsfMvaMap_
private

Definition at line 132 of file PFElectronTranslator.cc.

Referenced by fillMVAValueMap().

◆ gsfPFCandidateIndex_

std::vector<int> PFElectronTranslator::gsfPFCandidateIndex_
private

Definition at line 129 of file PFElectronTranslator.cc.

Referenced by createGsfElectrons(), createSuperClusters(), and produce().

◆ GsfTrackRef_

std::vector<reco::GsfTrackRef> PFElectronTranslator::GsfTrackRef_
private

◆ inputTagGSFTracks_

edm::InputTag PFElectronTranslator::inputTagGSFTracks_
private

◆ inputTagIsoVals_

std::vector<edm::InputTag> PFElectronTranslator::inputTagIsoVals_
private

Definition at line 94 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ inputTagPFCandidateElectrons_

edm::InputTag PFElectronTranslator::inputTagPFCandidateElectrons_
private

Definition at line 92 of file PFElectronTranslator.cc.

Referenced by fillMVAValueMap(), and PFElectronTranslator().

◆ inputTagPFCandidates_

edm::InputTag PFElectronTranslator::inputTagPFCandidates_
private

Definition at line 91 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ kfTrackRef_

std::vector<reco::TrackRef> PFElectronTranslator::kfTrackRef_
private

Definition at line 111 of file PFElectronTranslator.cc.

Referenced by createGsfElectronCores(), and produce().

◆ mustacheSCParams_

const EcalMustacheSCParameters* PFElectronTranslator::mustacheSCParams_
private

Definition at line 136 of file PFElectronTranslator.cc.

Referenced by createGsfElectrons(), and produce().

◆ MVACut_

double PFElectronTranslator::MVACut_
private

Definition at line 102 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ PFBasicClusterCollection_

std::string PFElectronTranslator::PFBasicClusterCollection_
private

Definition at line 95 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ pfClusters_

std::vector<std::vector<const reco::PFCluster*> > PFElectronTranslator::pfClusters_
private

Definition at line 117 of file PFElectronTranslator.cc.

Referenced by createSuperClusters(), and produce().

◆ PFMVAValueMap_

std::string PFElectronTranslator::PFMVAValueMap_
private

Definition at line 98 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ PFPreshowerClusterCollection_

std::string PFElectronTranslator::PFPreshowerClusterCollection_
private

Definition at line 96 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ PFSCValueMap_

std::string PFElectronTranslator::PFSCValueMap_
private

Definition at line 99 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ PFSuperClusterCollection_

std::string PFElectronTranslator::PFSuperClusterCollection_
private

Definition at line 97 of file PFElectronTranslator.cc.

Referenced by PFElectronTranslator(), and produce().

◆ preshowerClusterPtr_

std::vector<reco::CaloClusterPtrVector> PFElectronTranslator::preshowerClusterPtr_
private

◆ preshowerClusters_

std::vector<reco::PreshowerClusterCollection> PFElectronTranslator::preshowerClusters_
private

Definition at line 119 of file PFElectronTranslator.cc.

Referenced by createPreshowerClusterPtrs(), and produce().

◆ scMap_

std::map<reco::GsfTrackRef, reco::SuperClusterRef> PFElectronTranslator::scMap_
private

◆ superClusters_

std::vector<reco::SuperClusterCollection> PFElectronTranslator::superClusters_
private

Definition at line 121 of file PFElectronTranslator.cc.

Referenced by produce().