19 previousGsfElectrons_ = consumes<reco::GsfElectronCollection>(cfg.
getParameter<
edm::InputTag>(
"previousGsfElectronsTag"));
35 nDeps_ = tokenElectronIsoVals_.size();
42 gedRegression_.reset(plugin);
44 gedRegression_->setConsumes(sumes);
46 gedRegression_.reset(
nullptr);
49 produces<reco::GsfElectronCollection> (outputCollectionLabel_);
62 if( gedRegression_ ) {
63 gedRegression_->setEvent(event);
64 gedRegression_->setEventContent(setup);
70 event.getByToken(previousGsfElectrons_,gedElectronHandle);
74 event.getByToken(pfCandidates_,pfCandidateHandle);
76 std::vector< edm::Handle< edm::ValueMap<double> > > isolationValueMaps(nDeps_);
78 for(
unsigned i=0;
i < nDeps_ ; ++
i) {
79 event.getByToken(tokenElectronIsoVals_[
i],isolationValueMaps[i]);
83 std::map<reco::GsfTrackRef, const reco::PFCandidate* > gsfPFMap;
84 reco::PFCandidateCollection::const_iterator it = pfCandidateHandle->begin();
85 reco::PFCandidateCollection::const_iterator itend = pfCandidateHandle->end() ;
86 for(;it!=itend;++it) {
88 if( it->gsfTrackRef().isNonnull()) {
89 if(
abs(it->pdgId())==11)
90 gsfPFMap[it->gsfTrackRef()]=&(*it);
96 unsigned nele=gedElectronHandle->size();
97 for(
unsigned iele=0; iele<nele;++iele) {
103 isoVariables.
sumPhotonEt = (*(isolationValueMaps)[1])[myElectronRef];
105 isoVariables.
sumPUPt = (*(isolationValueMaps)[3])[myElectronRef];
111 std::map<reco::GsfTrackRef, const reco::PFCandidate * >::const_iterator itcheck=gsfPFMap.find(newElectron.
gsfTrack());
113 if(itcheck!=gsfPFMap.end()) {
119 myMvaOutput.status = 4 ;
125 if( gedRegression_ ) {
126 gedRegression_->modifyObject(newElectron);
128 outputElectrons_p->push_back(newElectron);
131 event.put(outputElectrons_p,outputCollectionLabel_);
virtual void produce(edm::Event &, const edm::EventSetup &)
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
auto_ptr< JetDefinition::Plugin > plugin
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
void setPfIsolationVariables(const PflowIsolationVariables &iso)
void setMvaOutput(const MvaOutput &mo)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
~GEDGsfElectronFinalizer()
float sumPhotonEt
sum pt of PF photons // old float photonIso ;
GEDGsfElectronFinalizer(const edm::ParameterSet &)
Abs< T >::type abs(const T &t)
float sumNeutralHadronEt
sum pt of neutral hadrons // old float neutralHadronIso ;
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
ParameterSet const & getParameterSet(std::string const &) const
const MvaOutput & mvaOutput() const
void setPassPflowPreselection(bool flag)
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
T get(const Candidate &c)
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack