34 produces<edm::ValueMap<reco::SuperClusterRef> >(
PFSCValueMap_);
44 std::auto_ptr<reco::SuperClusterCollection>
47 std::auto_ptr<reco::BasicClusterCollection>
50 std::auto_ptr<reco::PreshowerClusterCollection>
56 std::auto_ptr<edm::ValueMap<reco::SuperClusterRef> >
83 unsigned ncand=(
status)?pfCandidates->size():0;
85 for(
unsigned i=0;
i<ncand; ++
i ) {
99 pfClusters_.push_back(std::vector<const reco::PFCluster *>());
108 if(blockRef.
isNull())
continue;
187 std::ostringstream err;
188 err<<
" cannot get PFCandidates: "
202 std::ostringstream err;
203 err<<
" cannot get GSFTracks: "
215 std::vector<const reco::PFCluster *> & pfClusters,
219 if(myPFClusterRef.
isNull())
return;
222 pfClusters.push_back(&myPFCluster);
232 myPFCluster.
seed()));
240 myPFClusterRef->hitsAndFractions(),plane));
246 unsigned basicClusterCounter=0;
249 for(
unsigned iGSF=0;iGSF<
size;++iGSF)
252 for(
unsigned ibc=0;ibc<nbc;++ibc)
257 ++basicClusterCounter;
265 unsigned psClusterCounter=0;
268 for(
unsigned iGSF=0;iGSF<
size;++iGSF)
271 for(
unsigned ibc=0;ibc<nbc;++ibc)
285 for(
unsigned iGSF=0;iGSF<
size;++iGSF)
299 unsigned ngsf=gsfTracks->size();
300 std::vector<float>
values;
301 for(
unsigned igsf=0;igsf<ngsf;++igsf)
304 std::map<reco::GsfTrackRef,float>::const_iterator itcheck=
gsfMvaMap_.find(theTrackRef);
308 values.push_back(-99.);
313 values.push_back(itcheck->second);
316 filler.
insert(gsfTracks,values.begin(),values.end());
327 unsigned ngsf=gsfTracks->size();
328 std::vector<reco::SuperClusterRef>
values;
329 for(
unsigned igsf=0;igsf<ngsf;++igsf)
332 std::map<reco::GsfTrackRef,reco::SuperClusterRef>::const_iterator itcheck=
scMap_.find(theTrackRef);
340 values.push_back(itcheck->second);
343 filler.
insert(gsfTracks,values.begin(),values.end());
351 for(
unsigned iGSF=0;iGSF<nGSF;++iGSF)
361 for(
unsigned ibc=0;ibc<nbasics;++ibc)
375 edm::LogError(
"PFElectronTranslator") <<
" Major problem in PFElectron Translator" << std::endl;
402 for(
unsigned ibc=0;ibc<nbasics;++ibc)
406 const std::vector< std::pair<DetId, float> > & v1 =
basicClusters_[iGSF][ibc].hitsAndFractions();
408 for( std::vector< std::pair<DetId, float> >::const_iterator diIt = v1.begin();
417 for(
unsigned ips=0;ips<nps;++ips)
432 superClusters.push_back(mySuperCluster);
439 unsigned refindex=pfbe.
index();
444 for(;myDaughterCandidate!=itend;++myDaughterCandidate)
455 return *myPFCandidate;
std::vector< std::vector< const reco::PFCluster * > > pfClusters_
reco::GsfTrackRef gsfTrackRef() const
T getParameter(std::string const &) const
std::string PFPreshowerClusterCollection_
Abstract base class for a PFBlock element (track, cluster...)
const math::XYZPoint & position() const
cluster centroid position
std::string PFMVAValueMap_
bool fetchCandidateCollection(edm::Handle< reco::PFCandidateCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
double rawEcalEnergy() const
return corrected Ecal energy
void addHitAndFraction(DetId id, float fraction)
Particle flow cluster, see clustering algorithm in PFClusterAlgo.
std::map< reco::GsfTrackRef, float > gsfMvaMap_
virtual const_iterator end() const
last daughter const_iterator
std::vector< reco::CaloClusterPtrVector > basicClusterPtr_
double pflowPhiWidth() const
void insert(const H &h, I begin, I end)
void createBasicClusterPtrs(const edm::OrphanHandle< reco::BasicClusterCollection > &basicClustersHandle)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
void setPhiWidth(double pw)
double pflowEtaWidth() const
void fillSCRefValueMap(edm::Event &iEvent, edm::ValueMap< reco::SuperClusterRef >::Filler &filler) const
const ElementsInBlocks & elementsInBlocks() const
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
AlgoId algo() const
algorithm identifier
void setEtaWidth(double ew)
std::vector< reco::GsfTrackRef > GsfTrackRef_
bool isNull() const
Checks for null.
const CaloID & caloID() const
const reco::PFCandidate & correspondingDaughterCandidate(const reco::PFCandidate &cand, const reco::PFBlockElement &pfbe) const
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void fillMVAValueMap(edm::Event &iEvent, edm::ValueMap< float >::Filler &filler) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< reco::PreshowerClusterCollection > preshowerClusters_
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
virtual const_iterator begin() const
first daughter const_iterator
virtual PFClusterRef clusterRef() const
void createSuperClusterGsfMapRefs(const edm::OrphanHandle< reco::SuperClusterCollection > &superClustersHandle)
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
virtual void produce(edm::Event &, const edm::EventSetup &)
std::vector< int > gsfPFCandidateIndex_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag inputTagPFCandidates_
std::map< reco::GsfTrackRef, reco::SuperClusterRef > scMap_
edm::InputTag inputTagGSFTracks_
float mva_e_pi() const
mva for electron-pion discrimination
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
DetId seed() const
return DetId of seed
void fetchGsfCollection(edm::Handle< reco::GsfTrackCollection > &c, const edm::InputTag &tag, const edm::Event &iEvent) const
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_
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< reco::CaloClusterPtrVector > preshowerClusterPtr_
void createSuperClusters(const reco::PFCandidateCollection &, reco::SuperClusterCollection &superClusters) const
void addPreshowerCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
std::vector< BasicCluster > BasicClusterCollection
collection of BasicCluster objects
void addCluster(const CaloClusterPtr &r)
add reference to constituent BasicCluster
std::vector< reco::BasicClusterCollection > basicClusters_
Particle reconstructed by the particle flow algorithm.
void createPreshowerCluster(const reco::PFBlockElement &PFBE, reco::PreshowerClusterCollection &preshowerClusters, unsigned plane) const
PFElectronTranslator(const edm::ParameterSet &)
std::string PFSCValueMap_
std::string PFSuperClusterCollection_
virtual ParticleType particleId() const
void createPreshowerClusterPtrs(const edm::OrphanHandle< reco::PreshowerClusterCollection > &preshowerClustersHandle)
virtual void beginRun(edm::Run &run, const edm::EventSetup &c)
tuple size
Write out results.
void setPreshowerEnergy(double preshowerEnergy)