CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
PFElectronTranslator Class Reference

#include <PFElectronTranslator.h>

Inheritance diagram for PFElectronTranslator:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Types

typedef std::vector
< edm::Handle< edm::ValueMap
< double > > > 
IsolationValueMaps
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

virtual void beginRun (edm::Run &run, const edm::EventSetup &c)
 
 PFElectronTranslator (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
 ~PFElectronTranslator ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

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::CaloClusterPtrVector
basicClusterPtr_
 
std::vector
< reco::BasicClusterCollection
basicClusters_
 
std::vector< reco::CandidatePtrCandidatePtr_
 
bool emptyIsOk_
 
std::string GsfElectronCollection_
 
std::string GsfElectronCoreCollection_
 
std::vector
< reco::GsfElectronCoreRef
gsfElectronCoreRefs_
 
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_
 
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::CaloClusterPtrVector
preshowerClusterPtr_
 
std::vector
< reco::PreshowerClusterCollection
preshowerClusters_
 
std::map< reco::GsfTrackRef,
reco::SuperClusterRef
scMap_
 
std::vector
< reco::SuperClusterCollection
superClusters_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 23 of file PFElectronTranslator.h.

Member Typedef Documentation

Definition at line 32 of file PFElectronTranslator.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file PFElectronTranslator.cc.

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

21  {
23  = iConfig.getParameter<edm::InputTag>("PFCandidate");
25  = iConfig.getParameter<edm::InputTag>("PFCandidateElectron");
27  = iConfig.getParameter<edm::InputTag>("GSFTracks");
28 
29  edm::ParameterSet isoVals = iConfig.getParameter<edm::ParameterSet> ("isolationValues");
30  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfChargedHadrons"));
31  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfPhotons"));
32  inputTagIsoVals_.push_back(isoVals.getParameter<edm::InputTag>("pfNeutralHadrons"));
33 
34  PFBasicClusterCollection_ = iConfig.getParameter<std::string>("PFBasicClusters");
35  PFPreshowerClusterCollection_ = iConfig.getParameter<std::string>("PFPreshowerClusters");
36  PFSuperClusterCollection_ = iConfig.getParameter<std::string>("PFSuperClusters");
37  GsfElectronCoreCollection_ = iConfig.getParameter<std::string>("PFGsfElectronCore");
38  GsfElectronCollection_ = iConfig.getParameter<std::string>("PFGsfElectron");
39 
40  PFMVAValueMap_ = iConfig.getParameter<std::string>("ElectronMVA");
41  PFSCValueMap_ = iConfig.getParameter<std::string>("ElectronSC");
42  MVACut_ = (iConfig.getParameter<edm::ParameterSet>("MVACutBlock")).getParameter<double>("MVACut");
43 
44  if (iConfig.exists("emptyIsOk")) emptyIsOk_ = iConfig.getParameter<bool>("emptyIsOk");
45  else emptyIsOk_=false;
46 
47  produces<reco::BasicClusterCollection>(PFBasicClusterCollection_);
48  produces<reco::PreshowerClusterCollection>(PFPreshowerClusterCollection_);
49  produces<reco::SuperClusterCollection>(PFSuperClusterCollection_);
50  produces<reco::GsfElectronCoreCollection>(GsfElectronCoreCollection_);
51  produces<reco::GsfElectronCollection>(GsfElectronCollection_);
52  produces<edm::ValueMap<float> >(PFMVAValueMap_);
53  produces<edm::ValueMap<reco::SuperClusterRef> >(PFSCValueMap_);
54 }
T getParameter(std::string const &) const
std::string PFPreshowerClusterCollection_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::string GsfElectronCollection_
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 ( )

Definition at line 56 of file PFElectronTranslator.cc.

56 {}

Member Function Documentation

void PFElectronTranslator::beginRun ( edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from edm::EDProducer.

Definition at line 58 of file PFElectronTranslator.cc.

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

Definition at line 513 of file PFElectronTranslator.cc.

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

Referenced by produce().

514 {
515  unsigned refindex=pfbe.index();
516  // std::cout << " N daughters " << cand.numberOfDaughters() << std::endl;
517  reco::PFCandidate::const_iterator myDaughterCandidate=cand.begin();
519 
520  for(;myDaughterCandidate!=itend;++myDaughterCandidate)
521  {
522  const reco::PFCandidate * myPFCandidate = (const reco::PFCandidate*)&*myDaughterCandidate;
523  if(myPFCandidate->elementsInBlocks().size()!=1)
524  {
525  // std::cout << " Daughter with " << myPFCandidate.elementsInBlocks().size()<< " element in block " << std::endl;
526  return cand;
527  }
528  if(myPFCandidate->elementsInBlocks()[0].second==refindex)
529  {
530  // std::cout << " Found it " << cand << std::endl;
531  return *myPFCandidate;
532  }
533  }
534  return cand;
535 }
virtual const_iterator end() const
last daughter const_iterator
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.h:332
unsigned index() const
virtual const_iterator begin() const
first daughter const_iterator
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
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 272 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().

276 {
277  reco::PFClusterRef myPFClusterRef= PFBE.clusterRef();
278  if(myPFClusterRef.isNull()) return;
279 
280  const reco::PFCluster & myPFCluster (*myPFClusterRef);
281  pfClusters.push_back(&myPFCluster);
282 // std::cout << " Creating BC " << myPFCluster.energy() << " " << coCandidate.ecalEnergy() <<" "<< coCandidate.rawEcalEnergy() <<std::endl;
283 // std::cout << " # hits " << myPFCluster.hitsAndFractions().size() << std::endl;
284 
285 // basicClusters.push_back(reco::CaloCluster(myPFCluster.energy(),
286  basicClusters.push_back(reco::CaloCluster(coCandidate.rawEcalEnergy(),
287  myPFCluster.position(),
288  myPFCluster.caloID(),
289  myPFCluster.hitsAndFractions(),
290  myPFCluster.algo(),
291  myPFCluster.seed()));
292 }
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:192
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
Definition: PFCluster.h:42
bool isNull() const
Checks for null.
Definition: Ref.h:246
virtual PFClusterRef clusterRef() const
void PFElectronTranslator::createBasicClusterPtrs ( const edm::OrphanHandle< reco::BasicClusterCollection > &  basicClustersHandle)
private

Definition at line 302 of file PFElectronTranslator.cc.

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

Referenced by produce().

303 {
304  unsigned size=GsfTrackRef_.size();
305  unsigned basicClusterCounter=0;
306  basicClusterPtr_.resize(size);
307 
308  for(unsigned iGSF=0;iGSF<size;++iGSF) // loop on tracks
309  {
310  unsigned nbc=basicClusters_[iGSF].size();
311  for(unsigned ibc=0;ibc<nbc;++ibc) // loop on basic clusters
312  {
313  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
314  reco::CaloClusterPtr bcPtr(basicClustersHandle,basicClusterCounter);
315  basicClusterPtr_[iGSF].push_back(bcPtr);
316  ++basicClusterCounter;
317  }
318  }
319 }
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< reco::BasicClusterCollection > basicClusters_
tuple size
Write out results.
void PFElectronTranslator::createGsfElectronCoreRefs ( const edm::OrphanHandle< reco::GsfElectronCoreCollection > &  gsfElectronCoreHandle)
private

Definition at line 551 of file PFElectronTranslator.cc.

References gsfElectronCoreRefs_, GsfTrackRef_, and findQualityFiles::size.

Referenced by produce().

551  {
552  unsigned size=GsfTrackRef_.size();
553 
554  for(unsigned iGSF=0;iGSF<size;++iGSF) // loop on tracks
555  {
556  edm::Ref<reco::GsfElectronCoreCollection> elecCoreRef(gsfElectronCoreHandle,iGSF);
557  gsfElectronCoreRefs_.push_back(elecCoreRef);
558  }
559 }
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
std::vector< reco::GsfTrackRef > GsfTrackRef_
tuple size
Write out results.
void PFElectronTranslator::createGsfElectronCores ( reco::GsfElectronCoreCollection gsfElectronCores) const
private

Definition at line 537 of file PFElectronTranslator.cc.

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

Referenced by produce().

537  {
538  unsigned nGSF=GsfTrackRef_.size();
539  for(unsigned iGSF=0;iGSF<nGSF;++iGSF)
540  {
541  reco::GsfElectronCore myElectronCore(GsfTrackRef_[iGSF]);
542  myElectronCore.setCtfTrack(kfTrackRef_[iGSF],-1.);
543  std::map<reco::GsfTrackRef,reco::SuperClusterRef>::const_iterator
544  itcheck=scMap_.find(GsfTrackRef_[iGSF]);
545  if(itcheck!=scMap_.end())
546  myElectronCore.setPflowSuperCluster(itcheck->second);
547  gsfElectronCores.push_back(myElectronCore);
548  }
549 }
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
std::vector< reco::TrackRef > kfTrackRef_
void PFElectronTranslator::createGsfElectrons ( const reco::PFCandidateCollection pfcand,
const IsolationValueMaps isolationValues,
reco::GsfElectronCollection gsfelectrons 
)
private

Definition at line 572 of file PFElectronTranslator.cc.

References reco::GsfElectron::addAmbiguousGsfTrack(), ambiguousGsfTracks_, CandidatePtr_, reco::GsfElectron::PflowIsolationVariables::chargedHadronIso, reco::GsfElectron::MvaInput::deltaEta, reco::PFCandidate::deltaP(), reco::GsfElectron::MvaInput::earlyBrem, reco::PFCandidate::electronExtraRef(), gsfElectronCoreRefs_, gsfPFCandidateIndex_, GsfTrackRef_, reco::GsfElectron::MvaInput::hadEnergy, reco::GsfElectron::MvaInput::lateBrem, reco::GsfElectron::MvaOutput::mva, reco::PFCandidateElectronExtra::MVA_DeltaEtaTrackCluster, reco::PFCandidate::mva_e_pi(), reco::PFCandidateElectronExtra::MVA_FirstBrem, reco::PFCandidateElectronExtra::MVA_LateBrem, reco::GsfElectron::PflowIsolationVariables::neutralHadronIso, reco::LeafCandidate::p4(), reco::GsfElectron::P4_PFLOW_COMBINATION, reco::GsfElectron::PflowIsolationVariables::photonIso, reco::GsfElectron::setMvaInput(), reco::GsfElectron::setMvaOutput(), reco::GsfElectron::setP4(), reco::GsfElectron::setPfIsolationVariables(), reco::GsfElectron::MvaInput::sigmaEtaEta, findQualityFiles::size, and reco::GsfElectron::MvaOutput::status.

Referenced by produce().

574  {
575  unsigned size=GsfTrackRef_.size();
576 
577  for(unsigned iGSF=0;iGSF<size;++iGSF) // loop on tracks
578  {
579  const reco::PFCandidate& pfCandidate(pfcand[gsfPFCandidateIndex_[iGSF]]);
580  // Electron
581  reco::GsfElectron myElectron(gsfElectronCoreRefs_[iGSF]);
582  // Warning set p4 error !
583  myElectron.setP4(reco::GsfElectron::P4_PFLOW_COMBINATION, pfCandidate.p4(),pfCandidate.deltaP(), true);
584 
585  // MVA inputs
586  reco::GsfElectron::MvaInput myMvaInput;
587  myMvaInput.earlyBrem = pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_FirstBrem);
588  myMvaInput.lateBrem = pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_LateBrem);
589  myMvaInput.deltaEta = pfCandidate.electronExtraRef()->mvaVariable(reco::PFCandidateElectronExtra::MVA_DeltaEtaTrackCluster);
590  myMvaInput.sigmaEtaEta = pfCandidate.electronExtraRef()->sigmaEtaEta();
591  myMvaInput.hadEnergy = pfCandidate.electronExtraRef()->hadEnergy();
592  myElectron.setMvaInput(myMvaInput);
593 
594  // MVA output
595  reco::GsfElectron::MvaOutput myMvaOutput;
596  myMvaOutput.status = pfCandidate.electronExtraRef()->electronStatus();
597  myMvaOutput.mva = pfCandidate.mva_e_pi();
598  myElectron.setMvaOutput(myMvaOutput);
599 
600  // ambiguous tracks
601  unsigned ntracks=ambiguousGsfTracks_[iGSF].size();
602  for(unsigned it=0;it<ntracks;++it) {
603  myElectron.addAmbiguousGsfTrack(ambiguousGsfTracks_[iGSF][it]);
604  }
605 
606  // isolation
608  myPFIso.chargedHadronIso=(*isolationValues[0])[CandidatePtr_[iGSF]];
609  myPFIso.photonIso=(*isolationValues[1])[CandidatePtr_[iGSF]];
610  myPFIso.neutralHadronIso=(*isolationValues[2])[CandidatePtr_[iGSF]];
611  myElectron.setPfIsolationVariables(myPFIso);
612 
613  gsfelectrons.push_back(myElectron);
614  }
615 
616 }
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< int > gsfPFCandidateIndex_
std::vector< reco::CandidatePtr > CandidatePtr_
std::vector< std::vector< reco::GsfTrackRef > > ambiguousGsfTracks_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
tuple size
Write out results.
void PFElectronTranslator::createPreshowerCluster ( const reco::PFBlockElement PFBE,
reco::PreshowerClusterCollection preshowerClusters,
unsigned  plane 
) const
private

Definition at line 295 of file PFElectronTranslator.cc.

References reco::PFBlockElement::clusterRef().

Referenced by produce().

296 {
297  reco::PFClusterRef myPFClusterRef= PFBE.clusterRef();
298  preshowerClusters.push_back(reco::PreshowerCluster(myPFClusterRef->energy(),myPFClusterRef->position(),
299  myPFClusterRef->hitsAndFractions(),plane));
300 }
virtual PFClusterRef clusterRef() const
void PFElectronTranslator::createPreshowerClusterPtrs ( const edm::OrphanHandle< reco::PreshowerClusterCollection > &  preshowerClustersHandle)
private

Definition at line 321 of file PFElectronTranslator.cc.

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

Referenced by produce().

322 {
323  unsigned size=GsfTrackRef_.size();
324  unsigned psClusterCounter=0;
325  preshowerClusterPtr_.resize(size);
326 
327  for(unsigned iGSF=0;iGSF<size;++iGSF) // loop on tracks
328  {
329  unsigned nbc=preshowerClusters_[iGSF].size();
330  for(unsigned ibc=0;ibc<nbc;++ibc) // loop on basic clusters
331  {
332  // std::cout << "Track "<< iGSF << " ref " << basicClusterCounter << std::endl;
333  reco::CaloClusterPtr psPtr(preshowerClustersHandle,psClusterCounter);
334  preshowerClusterPtr_[iGSF].push_back(psPtr);
335  ++psClusterCounter;
336  }
337  }
338 }
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
tuple size
Write out results.
void PFElectronTranslator::createSuperClusterGsfMapRefs ( const edm::OrphanHandle< reco::SuperClusterCollection > &  superClustersHandle)
private

Definition at line 340 of file PFElectronTranslator.cc.

References GsfTrackRef_, scMap_, and findQualityFiles::size.

Referenced by produce().

341 {
342  unsigned size=GsfTrackRef_.size();
343 
344  for(unsigned iGSF=0;iGSF<size;++iGSF) // loop on tracks
345  {
346  edm::Ref<reco::SuperClusterCollection> scRef(superClustersHandle,iGSF);
347  scMap_[GsfTrackRef_[iGSF]]=scRef;
348  }
349 }
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
tuple size
Write out results.
void PFElectronTranslator::createSuperClusters ( const reco::PFCandidateCollection pfCand,
reco::SuperClusterCollection superClusters 
) const
private

Definition at line 423 of file PFElectronTranslator.cc.

References reco::SuperCluster::addCluster(), reco::CaloCluster::addHitAndFraction(), reco::SuperCluster::addPreshowerCluster(), basicClusterPtr_, basicClusters_, gsfPFCandidateIndex_, GsfTrackRef_, pfClusters_, PFClusterWidthAlgo::pflowEtaWidth(), PFClusterWidthAlgo::pflowPhiWidth(), preshowerClusterPtr_, reco::SuperCluster::rawEnergy(), reco::SuperCluster::setEtaWidth(), reco::SuperCluster::setPhiWidth(), reco::SuperCluster::setPreshowerEnergy(), and reco::SuperCluster::setSeed().

Referenced by produce().

425 {
426  unsigned nGSF=GsfTrackRef_.size();
427  for(unsigned iGSF=0;iGSF<nGSF;++iGSF)
428  {
429 
430  // Computes energy position a la e/gamma
431  double sclusterE=0;
432  double posX=0.;
433  double posY=0.;
434  double posZ=0.;
435 
436  unsigned nbasics=basicClusters_[iGSF].size();
437  for(unsigned ibc=0;ibc<nbasics;++ibc)
438  {
439  double e = basicClusters_[iGSF][ibc].energy();
440  sclusterE += e;
441  posX += e * basicClusters_[iGSF][ibc].position().X();
442  posY += e * basicClusters_[iGSF][ibc].position().Y();
443  posZ += e * basicClusters_[iGSF][ibc].position().Z();
444  }
445  posX /=sclusterE;
446  posY /=sclusterE;
447  posZ /=sclusterE;
448 
449  if(pfCand[gsfPFCandidateIndex_[iGSF]].gsfTrackRef()!=GsfTrackRef_[iGSF])
450  {
451  edm::LogError("PFElectronTranslator") << " Major problem in PFElectron Translator" << std::endl;
452  }
453 
454  // compute the width
455  PFClusterWidthAlgo pfwidth(pfClusters_[iGSF]);
456 
457  double correctedEnergy=pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
458  reco::SuperCluster mySuperCluster(correctedEnergy,math::XYZPoint(posX,posY,posZ));
459  // protection against empty basic cluster collection ; the value is -2 in this case
460  if(nbasics)
461  {
462 // std::cout << "SuperCluster creation; energy " << pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
463 // std::cout << " " << pfCand[gsfPFCandidateIndex_[iGSF]].rawEcalEnergy() << std::endl;
464 // std::cout << "Seed energy from basic " << basicClusters_[iGSF][0].energy() << std::endl;
465  mySuperCluster.setSeed(basicClusterPtr_[iGSF][0]);
466  }
467  else
468  {
469  // std::cout << "SuperCluster creation ; seed energy " << 0 << std::endl;
470 // std::cout << "SuperCluster creation ; energy " << pfCand[gsfPFCandidateIndex_[iGSF]].ecalEnergy();
471 // std::cout << " " << pfCand[gsfPFCandidateIndex_[iGSF]].rawEcalEnergy() << std::endl;
472 // std::cout << " No seed found " << 0 << std::endl;
473 // std::cout << " MVA " << pfCand[gsfPFCandidateIndex_[iGSF]].mva_e_pi() << std::endl;
474  mySuperCluster.setSeed(reco::CaloClusterPtr());
475  }
476  // the seed should be the first basic cluster
477 
478  for(unsigned ibc=0;ibc<nbasics;++ibc)
479  {
480  mySuperCluster.addCluster(basicClusterPtr_[iGSF][ibc]);
481  // std::cout <<"Adding Ref to SC " << basicClusterPtr_[iGSF][ibc].index() << std::endl;
482  const std::vector< std::pair<DetId, float> > & v1 = basicClusters_[iGSF][ibc].hitsAndFractions();
483  // std::cout << " Number of cells " << v1.size() << std::endl;
484  for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
485  diIt != v1.end();
486  ++diIt ) {
487  // std::cout << " Adding DetId " << (diIt->first).rawId() << " " << diIt->second << std::endl;
488  mySuperCluster.addHitAndFraction(diIt->first,diIt->second);
489  } // loop over rechits
490  }
491 
492  unsigned nps=preshowerClusterPtr_[iGSF].size();
493  for(unsigned ips=0;ips<nps;++ips)
494  {
495  mySuperCluster.addPreshowerCluster(preshowerClusterPtr_[iGSF][ips]);
496  }
497 
498 
499  // Set the preshower energy
500  mySuperCluster.setPreshowerEnergy(pfCand[gsfPFCandidateIndex_[iGSF]].pS1Energy()+
501  pfCand[gsfPFCandidateIndex_[iGSF]].pS2Energy());
502 
503  // Set the cluster width
504  mySuperCluster.setEtaWidth(pfwidth.pflowEtaWidth());
505  mySuperCluster.setPhiWidth(pfwidth.pflowPhiWidth());
506  // Force the computation of rawEnergy_ of the reco::SuperCluster
507  mySuperCluster.rawEnergy();
508  superClusters.push_back(mySuperCluster);
509  }
510 }
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::GsfTrackRef > GsfTrackRef_
std::vector< int > gsfPFCandidateIndex_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
std::vector< reco::BasicClusterCollection > basicClusters_
bool PFElectronTranslator::fetchCandidateCollection ( edm::Handle< reco::PFCandidateCollection > &  c,
const edm::InputTag tag,
const edm::Event iEvent 
) const
private

Definition at line 239 of file PFElectronTranslator.cc.

References emptyIsOk_, newFWLiteAna::found, and edm::Event::getByLabel().

Referenced by fillMVAValueMap(), and produce().

241  {
242  bool found = iEvent.getByLabel(tag, c);
243 
244  if(!found && !emptyIsOk_)
245  {
246  std::ostringstream err;
247  err<<" cannot get PFCandidates: "
248  <<tag<<std::endl;
249  edm::LogError("PFElectronTranslator")<<err.str();
250  }
251  return found;
252 
253 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
void PFElectronTranslator::fetchGsfCollection ( edm::Handle< reco::GsfTrackCollection > &  c,
const edm::InputTag tag,
const edm::Event iEvent 
) const
private

Definition at line 255 of file PFElectronTranslator.cc.

References edm::hlt::Exception, newFWLiteAna::found, and edm::Event::getByLabel().

Referenced by fillMVAValueMap(), and fillSCRefValueMap().

257  {
258  bool found = iEvent.getByLabel(tag, c);
259 
260  if(!found ) {
261  std::ostringstream err;
262  err<<" cannot get GSFTracks: "
263  <<tag<<std::endl;
264  edm::LogError("PFElectronTranslator")<<err.str();
265  throw cms::Exception( "MissingProduct", err.str());
266  }
267 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
void PFElectronTranslator::fillMVAValueMap ( edm::Event iEvent,
edm::ValueMap< float >::Filler &  filler 
)
private

Definition at line 352 of file PFElectronTranslator.cc.

References reco::PFCandidate::e, fetchCandidateCollection(), fetchGsfCollection(), gsfMvaMap_, reco::PFCandidate::gsfTrackRef(), i, inputTagGSFTracks_, inputTagPFCandidateElectrons_, edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::isNull(), reco::PFCandidate::mva_e_pi(), reco::PFCandidate::particleId(), reco::tau::pfCandidates(), ntuplemaker::status, and makeHLTPrescaleTable::values.

Referenced by produce().

353 {
354  gsfMvaMap_.clear();
356  bool status=fetchCandidateCollection(pfCandidates,
358  iEvent );
359 
360  unsigned ncand=(status)?pfCandidates->size():0;
361  for( unsigned i=0; i<ncand; ++i ) {
362 
363  const reco::PFCandidate& cand = (*pfCandidates)[i];
364  if(cand.particleId()!=reco::PFCandidate::e) continue;
365  if(cand.gsfTrackRef().isNull()) continue;
366  // Fill the MVA map
367  gsfMvaMap_[cand.gsfTrackRef()]=cand.mva_e_pi();
368  }
369 
371  fetchGsfCollection(gsfTracks,
373  iEvent);
374  unsigned ngsf=gsfTracks->size();
375  std::vector<float> values;
376  for(unsigned igsf=0;igsf<ngsf;++igsf)
377  {
378  reco::GsfTrackRef theTrackRef(gsfTracks, igsf);
379  std::map<reco::GsfTrackRef,float>::const_iterator itcheck=gsfMvaMap_.find(theTrackRef);
380  if(itcheck==gsfMvaMap_.end())
381  {
382  // edm::LogWarning("PFElectronTranslator") << "MVA Map, missing GSF track ref " << std::endl;
383  values.push_back(-99.);
384  // std::cout << " Push_back -99. " << std::endl;
385  }
386  else
387  {
388  // std::cout << " Value " << itcheck->second << std::endl;
389  values.push_back(itcheck->second);
390  }
391  }
392  filler.insert(gsfTracks,values.begin(),values.end());
393 }
int i
Definition: DBlmapReader.cc:9
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
std::map< reco::GsfTrackRef, float > gsfMvaMap_
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
bool isNull() const
Checks for null.
Definition: Ref.h:246
edm::InputTag inputTagPFCandidateElectrons_
edm::InputTag inputTagGSFTracks_
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:264
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:368
tuple status
Definition: ntuplemaker.py:245
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void PFElectronTranslator::fillSCRefValueMap ( edm::Event iEvent,
edm::ValueMap< reco::SuperClusterRef >::Filler &  filler 
) const
private

Definition at line 396 of file PFElectronTranslator.cc.

References fetchGsfCollection(), inputTagGSFTracks_, edm::helper::Filler< Map >::insert(), scMap_, and makeHLTPrescaleTable::values.

Referenced by produce().

398 {
400  fetchGsfCollection(gsfTracks,
402  iEvent);
403  unsigned ngsf=gsfTracks->size();
404  std::vector<reco::SuperClusterRef> values;
405  for(unsigned igsf=0;igsf<ngsf;++igsf)
406  {
407  reco::GsfTrackRef theTrackRef(gsfTracks, igsf);
408  std::map<reco::GsfTrackRef,reco::SuperClusterRef>::const_iterator itcheck=scMap_.find(theTrackRef);
409  if(itcheck==scMap_.end())
410  {
411  // edm::LogWarning("PFElectronTranslator") << "SCRef Map, missing GSF track ref" << std::endl;
412  values.push_back(reco::SuperClusterRef());
413  }
414  else
415  {
416  values.push_back(itcheck->second);
417  }
418  }
419  filler.insert(gsfTracks,values.begin(),values.end());
420 }
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
edm::InputTag inputTagGSFTracks_
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
void PFElectronTranslator::fillValueMap ( edm::Event iEvent,
edm::ValueMap< float >::Filler &  filler 
) const
private
void PFElectronTranslator::getAmbiguousGsfTracks ( const reco::PFBlockElement PFBE,
std::vector< reco::GsfTrackRef > &  tracks 
) const
private

Definition at line 561 of file PFElectronTranslator.cc.

References reco::PFBlockElementGsfTrack::GsftrackRefPF().

Referenced by produce().

561  {
562  const reco::PFBlockElementGsfTrack * GsfEl = dynamic_cast<const reco::PFBlockElementGsfTrack*>(&PFBE);
563  if(GsfEl==0) return;
564  const std::vector<reco::GsfPFRecTrackRef>& ambPFRecTracks(GsfEl->GsftrackRefPF()->convBremGsfPFRecTrackRef());
565  unsigned ntracks=ambPFRecTracks.size();
566  for(unsigned it=0;it<ntracks;++it) {
567  tracks.push_back(ambPFRecTracks[it]->gsfTrackRef());
568  }
569 }
tuple tracks
Definition: testEve_cfg.py:39
GsfPFRecTrackRef GsftrackRefPF() const
void PFElectronTranslator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 60 of file PFElectronTranslator.cc.

References ambiguousGsfTracks_, basicClusterPtr_, basicClusters_, CandidatePtr_, correspondingDaughterCandidate(), createBasicCluster(), createBasicClusterPtrs(), createGsfElectronCoreRefs(), createGsfElectronCores(), createGsfElectrons(), createPreshowerCluster(), createPreshowerClusterPtrs(), createSuperClusterGsfMapRefs(), createSuperClusters(), reco::PFCandidate::e, reco::PFBlockElement::ECAL, asciidump::elements, reco::PFCandidate::elementsInBlocks(), fetchCandidateCollection(), edm::helper::Filler< Map >::fill(), fillMVAValueMap(), fillSCRefValueMap(), getAmbiguousGsfTracks(), edm::Event::getByLabel(), reco::PFBlockElement::GSF, GsfElectronCollection_, GsfElectronCoreCollection_, gsfElectronCoreRefs_, gsfPFCandidateIndex_, reco::PFCandidate::gsfTrackRef(), GsfTrackRef_, i, inputTagIsoVals_, inputTagPFCandidates_, edm::Ref< C, T, F >::isNull(), j, kfTrackRef_, reco::PFCandidate::mva_e_pi(), MVACut_, reco::PFCandidate::particleId(), PFBasicClusterCollection_, reco::tau::pfCandidates(), pfClusters_, PFMVAValueMap_, PFPreshowerClusterCollection_, PFSCValueMap_, PFSuperClusterCollection_, preshowerClusterPtr_, preshowerClusters_, reco::PFBlockElement::PS1, reco::PFBlockElement::PS2, edm::Event::put(), scMap_, ntuplemaker::status, superClusters_, reco::PFCandidate::trackRef(), and reco::PFBlockElement::type().

61  {
62 
63  std::auto_ptr<reco::GsfElectronCoreCollection>
64  gsfElectronCores_p(new reco::GsfElectronCoreCollection);
65 
66  std::auto_ptr<reco::GsfElectronCollection>
67  gsfElectrons_p(new reco::GsfElectronCollection);
68 
69  std::auto_ptr<reco::SuperClusterCollection>
70  superClusters_p(new reco::SuperClusterCollection);
71 
72  std::auto_ptr<reco::BasicClusterCollection>
73  basicClusters_p(new reco::BasicClusterCollection);
74 
75  std::auto_ptr<reco::PreshowerClusterCollection>
76  psClusters_p(new reco::PreshowerClusterCollection);
77 
78  std::auto_ptr<edm::ValueMap<float> > mvaMap_p(new edm::ValueMap<float>());
79  edm::ValueMap<float>::Filler mvaFiller(*mvaMap_p);
80 
81  std::auto_ptr<edm::ValueMap<reco::SuperClusterRef> >
84 
85 
87  bool status=fetchCandidateCollection(pfCandidates,
89  iEvent );
90 
91  IsolationValueMaps isolationValues(inputTagIsoVals_.size());
92  for (size_t j = 0; j<inputTagIsoVals_.size(); ++j) {
93  iEvent.getByLabel(inputTagIsoVals_[j], isolationValues[j]);
94  }
95 
96 
97  // clear the vectors
98  GsfTrackRef_.clear();
99  CandidatePtr_.clear();
100  ambiguousGsfTracks_.clear();
101  kfTrackRef_.clear();
102  basicClusters_.clear();
103  pfClusters_.clear();
104  preshowerClusters_.clear();
105  superClusters_.clear();
106  basicClusterPtr_.clear();
107  preshowerClusterPtr_.clear();
108  gsfPFCandidateIndex_.clear();
109  gsfElectronCoreRefs_.clear();
110  scMap_.clear();
111 
112 
113  // loop on the candidates
114  //CC@@
115  // we need first to create AND put the SuperCluster,
116  // basic clusters and presh clusters collection
117  // in order to get a working Handle
118  unsigned ncand=(status)?pfCandidates->size():0;
119  unsigned iGSF=0;
120  for( unsigned i=0; i<ncand; ++i ) {
121 
122  const reco::PFCandidate& cand = (*pfCandidates)[i];
123  if(cand.particleId()!=reco::PFCandidate::e) continue;
124  if(cand.gsfTrackRef().isNull()) continue;
125  // Note that -1 will still cut some total garbage candidates
126  // Fill the MVA map
127  if(cand.mva_e_pi()<MVACut_) continue;
128 
129  GsfTrackRef_.push_back(cand.gsfTrackRef());
130  kfTrackRef_.push_back(cand.trackRef());
131  gsfPFCandidateIndex_.push_back(i);
132 
133  reco::PFCandidatePtr ptrToPFElectron(pfCandidates,i);
134  //CandidatePtr_.push_back(ptrToPFElectron->sourceCandidatePtr(0));
135  CandidatePtr_.push_back(ptrToPFElectron);
136 
138  pfClusters_.push_back(std::vector<const reco::PFCluster *>());
140  ambiguousGsfTracks_.push_back(std::vector<reco::GsfTrackRef>());
141 
142  for(unsigned iele=0; iele<cand.elementsInBlocks().size(); ++iele) {
143  // first get the block
144  reco::PFBlockRef blockRef = cand.elementsInBlocks()[iele].first;
145  //
146  unsigned elementIndex = cand.elementsInBlocks()[iele].second;
147  // check it actually exists
148  if(blockRef.isNull()) continue;
149 
150  // then get the elements of the block
151  const edm::OwnVector< reco::PFBlockElement >& elements = (*blockRef).elements();
152 
153  const reco::PFBlockElement & pfbe (elements[elementIndex]);
154  // The first ECAL element should be the cluster associated to the GSF; defined as the seed
155  if(pfbe.type()==reco::PFBlockElement::ECAL)
156  {
157  // const reco::PFCandidate * coCandidate = &cand;
158  // the Brem photons are saved as daughter PFCandidate; this
159  // is convenient to access the corrected energy
160  // std::cout << " Found candidate " << correspondingDaughterCandidate(coCandidate,pfbe) << " " << coCandidate << std::endl;
162  }
163  if(pfbe.type()==reco::PFBlockElement::PS1)
164  {
166  }
167  if(pfbe.type()==reco::PFBlockElement::PS2)
168  {
170  }
171  if(pfbe.type()==reco::PFBlockElement::GSF)
172  {
174  }
175 
176  } // loop on the elements
177 
178  // save the basic clusters
179  basicClusters_p->insert(basicClusters_p->end(),basicClusters_[iGSF].begin(), basicClusters_[iGSF].end());
180  // save the preshower clusters
181  psClusters_p->insert(psClusters_p->end(),preshowerClusters_[iGSF].begin(),preshowerClusters_[iGSF].end());
182 
183  ++iGSF;
184  } // loop on PFCandidates
185 
186 
187  //Save the basic clusters and get an handle as to be able to create valid Refs (thanks to Claude)
188  // std::cout << " Number of basic clusters " << basicClusters_p->size() << std::endl;
190  iEvent.put(basicClusters_p,PFBasicClusterCollection_);
191 
192  //preshower clusters
194  iEvent.put(psClusters_p,PFPreshowerClusterCollection_);
195 
196  // now that the Basic clusters are in the event, the Ref can be created
197  createBasicClusterPtrs(bcRefProd);
198  // now that the preshower clusters are in the event, the Ref can be created
199  createPreshowerClusterPtrs(psRefProd);
200 
201  // and now the Super cluster can be created with valid references
202  if(status) createSuperClusters(*pfCandidates,*superClusters_p);
203 
204  // Let's put the super clusters in the event
205  const edm::OrphanHandle<reco::SuperClusterCollection> scRefProd = iEvent.put(superClusters_p,PFSuperClusterCollection_);
206  // create the super cluster Ref
207  createSuperClusterGsfMapRefs(scRefProd);
208 
209  // Now create the GsfElectronCoers
210  createGsfElectronCores(*gsfElectronCores_p);
211  // Put them in the as to get to be able to build a Ref
212  const edm::OrphanHandle<reco::GsfElectronCoreCollection> gsfElectronCoreRefProd =
213  iEvent.put(gsfElectronCores_p,GsfElectronCoreCollection_);
214 
215  // now create the Refs
216  createGsfElectronCoreRefs(gsfElectronCoreRefProd);
217 
218  // now make the GsfElectron
219  createGsfElectrons(*pfCandidates,isolationValues,*gsfElectrons_p);
220  iEvent.put(gsfElectrons_p,GsfElectronCollection_);
221 
222  fillMVAValueMap(iEvent,mvaFiller);
223  mvaFiller.fill();
224 
225  fillSCRefValueMap(iEvent,scRefFiller);
226  scRefFiller.fill();
227 
228  // MVA map
229  iEvent.put(mvaMap_p,PFMVAValueMap_);
230  // Gsf-SC map
231  iEvent.put(scMap_p,PFSCValueMap_);
232 
233 
234 
235 }
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
std::string PFPreshowerClusterCollection_
Abstract base class for a PFBlock element (track, cluster...)
int i
Definition: DBlmapReader.cc:9
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
void createGsfElectronCoreRefs(const edm::OrphanHandle< reco::GsfElectronCoreCollection > &gsfElectronCoreHandle)
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
std::vector< reco::GsfElectronCoreRef > gsfElectronCoreRefs_
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
list elements
Definition: asciidump.py:414
std::string GsfElectronCollection_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
void fillSCRefValueMap(edm::Event &iEvent, edm::ValueMap< reco::SuperClusterRef >::Filler &filler) const
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.h:332
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:331
std::vector< reco::GsfTrackRef > GsfTrackRef_
bool isNull() const
Checks for null.
Definition: Ref.h:246
void fillMVAValueMap(edm::Event &iEvent, edm::ValueMap< float >::Filler &filler)
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
std::vector< GsfElectronCore > GsfElectronCoreCollection
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
void createSuperClusterGsfMapRefs(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle)
int j
Definition: DBlmapReader.cc:9
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
std::vector< int > gsfPFCandidateIndex_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
std::vector< reco::CandidatePtr > CandidatePtr_
edm::InputTag inputTagPFCandidates_
std::vector< std::vector< reco::GsfTrackRef > > ambiguousGsfTracks_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
float mva_e_pi() const
mva for electron-pion discrimination
Definition: PFCandidate.h:264
std::string PFBasicClusterCollection_
void createBasicCluster(const reco::PFBlockElement &, reco::BasicClusterCollection &basicClusters, std::vector< const reco::PFCluster * > &, const reco::PFCandidate &coCandidate) const
std::vector< reco::SuperClusterCollection > superClusters_
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
void getAmbiguousGsfTracks(const reco::PFBlockElement &PFBE, std::vector< reco::GsfTrackRef > &) const
std::string GsfElectronCoreCollection_
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
std::vector< edm::InputTag > inputTagIsoVals_
std::vector< reco::BasicClusterCollection > basicClusters_
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:33
std::vector< reco::TrackRef > kfTrackRef_
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:368
std::string PFSuperClusterCollection_
void createGsfElectronCores(reco::GsfElectronCoreCollection &) const
tuple status
Definition: ntuplemaker.py:245
virtual ParticleType particleId() const
Definition: PFCandidate.h:314
void createGsfElectrons(const reco::PFCandidateCollection &, const IsolationValueMaps &isolationValues, reco::GsfElectronCollection &)
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)

Member Data Documentation

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

Definition at line 110 of file PFElectronTranslator.h.

Referenced by createGsfElectrons(), and produce().

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

Definition at line 120 of file PFElectronTranslator.h.

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

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

Definition at line 112 of file PFElectronTranslator.h.

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

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

Definition at line 106 of file PFElectronTranslator.h.

Referenced by createGsfElectrons(), and produce().

bool PFElectronTranslator::emptyIsOk_
private

Definition at line 131 of file PFElectronTranslator.h.

Referenced by fetchCandidateCollection(), and PFElectronTranslator().

std::string PFElectronTranslator::GsfElectronCollection_
private

Definition at line 99 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

std::string PFElectronTranslator::GsfElectronCoreCollection_
private

Definition at line 98 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

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

Definition at line 124 of file PFElectronTranslator.h.

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

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

Definition at line 129 of file PFElectronTranslator.h.

Referenced by fillMVAValueMap().

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

Definition at line 126 of file PFElectronTranslator.h.

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

std::vector<reco::GsfTrackRef> PFElectronTranslator::GsfTrackRef_
private
edm::InputTag PFElectronTranslator::inputTagGSFTracks_
private

Definition at line 91 of file PFElectronTranslator.h.

Referenced by fillMVAValueMap(), fillSCRefValueMap(), and PFElectronTranslator().

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

Definition at line 92 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

edm::InputTag PFElectronTranslator::inputTagPFCandidateElectrons_
private

Definition at line 90 of file PFElectronTranslator.h.

Referenced by fillMVAValueMap(), and PFElectronTranslator().

edm::InputTag PFElectronTranslator::inputTagPFCandidates_
private

Definition at line 89 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

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

Definition at line 108 of file PFElectronTranslator.h.

Referenced by createGsfElectronCores(), and produce().

double PFElectronTranslator::MVACut_
private

Definition at line 100 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

std::string PFElectronTranslator::PFBasicClusterCollection_
private

Definition at line 93 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

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

Definition at line 114 of file PFElectronTranslator.h.

Referenced by createSuperClusters(), and produce().

std::string PFElectronTranslator::PFMVAValueMap_
private

Definition at line 96 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

std::string PFElectronTranslator::PFPreshowerClusterCollection_
private

Definition at line 94 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

std::string PFElectronTranslator::PFSCValueMap_
private

Definition at line 97 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

std::string PFElectronTranslator::PFSuperClusterCollection_
private

Definition at line 95 of file PFElectronTranslator.h.

Referenced by PFElectronTranslator(), and produce().

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

Definition at line 116 of file PFElectronTranslator.h.

Referenced by createPreshowerClusterPtrs(), and produce().

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

Definition at line 118 of file PFElectronTranslator.h.

Referenced by produce().