1 #ifndef aod2patFilterZee_H
2 #define aod2patFilterZee_H
65 virtual void endJob()
override ;
100 produces< pat::ElectronCollection >
101 (
"patElectrons").setBranchAlias(
"patElectrons");
103 produces< pat::METCollection>(
"patCaloMets").setBranchAlias(
"patCaloMets");
131 std::cout <<
"aod2patFilterZee: Could not get electron collection with label: "
138 for (reco::GsfElectronCollection::const_iterator elec = pElecs->begin();
139 elec != pElecs->end(); ++elec) {
144 myElectron.
setEcalIso(elec->dr04EcalRecHitSumEt());
145 myElectron.
setHcalIso(elec->dr04HcalTowerSumEt());
147 patElectrons->push_back(myElectron);
154 if (! calomets.isValid()) {
155 std::cout <<
"aod2patFilterZee: Could not get met collection with label: "
161 for (reco::CaloMETCollection::const_iterator
met = mycalomets->begin();
162 met != mycalomets->end(); ++
met ) {
164 patCaloMets->push_back(mymet);
170 iEvent.
put( patElectrons,
"patElectrons");
171 iEvent.
put( patCaloMets,
"patCaloMets");
Analysis-level MET class.
T getUntrackedParameter(std::string const &, T const &) const
virtual void beginJob() override
virtual void endJob() override
aod2patFilterZee(const edm::ParameterSet &)
edm::InputTag metCollectionTag_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< MET > METCollection
virtual bool filter(edm::Event &, const edm::EventSetup &) override
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< Electron > ElectronCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::InputTag electronCollectionTag_
std::vector< reco::CaloMET > CaloMETCollection
collection of CaloMET objects
Analysis-level electron class.
edm::EDGetTokenT< reco::GsfElectronCollection > electronCollectionToken_
edm::EDGetTokenT< reco::CaloMETCollection > metCollectionToken_
void setTrackIso(float trackIso)
Sets tracker isolation variable.
void setEcalIso(float caloIso)
Sets ecal isolation variable.
void setHcalIso(float caloIso)
Sets hcal isolation variable.