|
|
|
void | produce (edm::Event &, const edm::EventSetup &) override |
|
template<typename T > |
void | setToken (DualToken< T > &token, const edm::ParameterSet &iPara, const std::string &tagAOD, const std::string &tagMiniAOD, DataFormat format) |
|
template<typename T > |
void | setToken (edm::EDGetTokenT< T > &token, const edm::ParameterSet &iPara, const std::string &tag) |
|
template<typename T > |
void | setToken (edm::EDGetTokenT< T > &token, edm::InputTag tag) |
|
template<typename T > |
void | setToken (std::vector< DualToken< T > > &tokens, const edm::ParameterSet &iPara, const std::string &tagAOD, const std::string &tagMiniAOD, DataFormat format) |
|
template<typename T > |
void | setToken (std::vector< edm::EDGetTokenT< T > > &tokens, const edm::ParameterSet &iPara, const std::string &tagName) |
|
|
static float | calTrkIso (const reco::GsfElectron &ele, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles, const std::vector< EleTkIsolFromCands::PIDVeto > &pidVetos, const EleTkIsolFromCands &trkIsoCalc) |
|
template<typename T > |
static edm::Handle< T > | getHandle (const edm::Event &iEvent, const DualToken< T > &token) |
|
template<typename T > |
static edm::Handle< T > | getHandle (const edm::Event &iEvent, const edm::EDGetTokenT< T > &token) |
|
template<typename T > |
static std::vector< edm::Handle< T > > | getHandles (const edm::Event &iEvent, const std::vector< DualToken< T > > &tokens) |
|
template<typename T > |
static bool | isEventAOD (const edm::Event &iEvent, const DualToken< T > &token) |
|
static int | nrSaturatedCrysIn5x5 (const reco::GsfElectron &ele, edm::Handle< EcalRecHitCollection > &ebHits, edm::Handle< EcalRecHitCollection > &eeHits, edm::ESHandle< CaloTopology > &caloTopo) |
|
template<typename T > |
static void | writeValueMap (edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron > > &handle, const std::vector< T > &values, const std::string &label) |
|
◆ ElectronHEEPIDValueMapProducer()
ElectronHEEPIDValueMapProducer::ElectronHEEPIDValueMapProducer |
( |
const edm::ParameterSet & |
iConfig | ) |
|
|
explicit |
Definition at line 198 of file ElectronHEEPIDValueMapProducer.cc.
209 auto fillVetos = [](
const auto&
in,
auto&
out) {
215 throw cms::Exception(
"ConfigError") <<
" Error candVetosAOD should be the same size as candsAOD " << std::endl;
220 throw cms::Exception(
"ConfigError") <<
" Error candVetosMiniAOD should be the same size as candsMiniAOD "
References beamSpotToken_, candTokens_, candVetosAOD_, candVetosMiniAOD_, dataFormat_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIso04Label_, eleTrkPtIsoLabel_, Exception, edm::ParameterSet::getParameter(), recoMuon::in, makeTrkIso04_, MillePedeFileConverter_cfg::out, EleTkIsolFromCands::pidVetoFromStr(), setToken(), findQualityFiles::size, and HcalDetIdTransform::transform().
◆ ~ElectronHEEPIDValueMapProducer()
ElectronHEEPIDValueMapProducer::~ElectronHEEPIDValueMapProducer |
( |
| ) |
|
|
override |
◆ calTrkIso()
Definition at line 271 of file ElectronHEEPIDValueMapProducer.cc.
280 for (
size_t handleNr = 0; handleNr <
handles.size(); handleNr++) {
283 if (handleNr < pidVetos.size()) {
286 throw cms::Exception(
"LogicError") <<
" somehow the pidVetos and handles do not much, given this is checked "
287 "at construction time, something has gone wrong in the code handle nr "
288 << handleNr <<
" size of vetos " << pidVetos.size();
References EleTkIsolFromCands::calIsolPt(), Exception, reco::GsfElectron::gsfTrack(), patZpeak::handle, edm::Ref< C, T, F >::isNull(), SiStripPI::max, and ZMuMuCategoriesSequences_cff::trkIso.
Referenced by produce().
◆ fillDescriptions()
◆ getHandle() [1/2]
◆ getHandle() [2/2]
◆ getHandles()
◆ isEventAOD()
template<typename T >
static bool ElectronHEEPIDValueMapProducer::isEventAOD |
( |
const edm::Event & |
iEvent, |
|
|
const DualToken< T > & |
token |
|
) |
| |
|
inlinestaticprivate |
◆ nrSaturatedCrysIn5x5()
◆ produce()
Definition at line 232 of file ElectronHEEPIDValueMapProducer.cc.
245 std::vector<float> eleTrkPtIso;
246 std::vector<float> eleTrkPtIso04;
247 std::vector<int> eleNrSaturateIn5x5;
248 for (
auto const& ele : *eleHandle) {
253 eleNrSaturateIn5x5.push_back(
nrSaturatedCrysIn5x5(ele, ebRecHitHandle, eeRecHitHandle, caloTopoHandle));
References beamSpotToken_, calTrkIso(), candTokens_, candVetosAOD_, candVetosMiniAOD_, ebRecHitToken_, eeRecHitToken_, eleNrSaturateIn5x5Label_, eleToken_, eleTrkPtIso04Label_, eleTrkPtIsoLabel_, edm::EventSetup::get(), get, getHandle(), getHandles(), iEvent, HLTEGTnPMonitor_cfi::isAOD, isEventAOD(), makeTrkIso04_, nrSaturatedCrysIn5x5(), trkIso04Calc_, trkIsoCalc_, and writeValueMap().
◆ setToken() [1/5]
◆ setToken() [2/5]
◆ setToken() [3/5]
◆ setToken() [4/5]
template<typename T >
void ElectronHEEPIDValueMapProducer::setToken |
( |
std::vector< DualToken< T > > & |
tokens, |
|
|
const edm::ParameterSet & |
iPara, |
|
|
const std::string & |
tagAOD, |
|
|
const std::string & |
tagMiniAOD, |
|
|
DataFormat |
format |
|
) |
| |
|
inlineprivate |
◆ setToken() [5/5]
◆ writeValueMap()
◆ beamSpotToken_
◆ candTokens_
◆ candVetosAOD_
◆ candVetosMiniAOD_
◆ dataFormat_
DataFormat ElectronHEEPIDValueMapProducer::dataFormat_ |
|
private |
◆ ebRecHitToken_
◆ eeRecHitToken_
◆ eleNrSaturateIn5x5Label_
const std::string ElectronHEEPIDValueMapProducer::eleNrSaturateIn5x5Label_ = "eleNrSaturateIn5x5" |
|
staticprivate |
◆ eleToken_
◆ eleTrkPtIso04Label_
const std::string ElectronHEEPIDValueMapProducer::eleTrkPtIso04Label_ = "eleTrkPtIso04" |
|
staticprivate |
◆ eleTrkPtIsoLabel_
const std::string ElectronHEEPIDValueMapProducer::eleTrkPtIsoLabel_ = "eleTrkPtIso" |
|
staticprivate |
◆ makeTrkIso04_
bool ElectronHEEPIDValueMapProducer::makeTrkIso04_ |
|
private |
◆ trkIso04Calc_
◆ trkIsoCalc_
T const * product() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
T const * product() const
DualToken< edm::View< reco::GsfElectron > > eleToken_
void setToken(edm::EDGetTokenT< T > &token, edm::InputTag tag)
bool isNull() const
Checks for null.
static void writeValueMap(edm::Event &iEvent, const edm::Handle< edm::View< reco::GsfElectron > > &handle, const std::vector< T > &values, const std::string &label)
static PIDVeto pidVetoFromStr(const std::string &vetoStr)
static const std::string eleNrSaturateIn5x5Label_
static bool isEventAOD(const edm::Event &iEvent, const DualToken< T > &token)
DualToken< EcalRecHitCollection > eeRecHitToken_
static float calTrkIso(const reco::GsfElectron &ele, const edm::View< reco::GsfElectron > &eles, const std::vector< edm::Handle< pat::PackedCandidateCollection > > &handles, const std::vector< EleTkIsolFromCands::PIDVeto > &pidVetos, const EleTkIsolFromCands &trkIsoCalc)
static const std::string eleTrkPtIso04Label_
std::vector< DualToken< pat::PackedCandidateCollection > > candTokens_
static int nrSaturatedCrysIn5x5(const reco::GsfElectron &ele, edm::Handle< EcalRecHitCollection > &ebHits, edm::Handle< EcalRecHitCollection > &eeHits, edm::ESHandle< CaloTopology > &caloTopo)
static std::vector< edm::Handle< T > > getHandles(const edm::Event &iEvent, const std::vector< DualToken< T > > &tokens)
std::vector< BaseVolumeHandle * > handles
std::vector< EleTkIsolFromCands::PIDVeto > candVetosMiniAOD_
double calIsolPt(Args &&... args) const
DualToken< EcalRecHitCollection > ebRecHitToken_
static edm::ParameterSetDescription pSetDescript()
static edm::Handle< T > getHandle(const edm::Event &iEvent, const edm::EDGetTokenT< T > &token)
T getParameter(std::string const &) const
EleTkIsolFromCands trkIso04Calc_
SuperClusterRef superCluster() const override
reference to a SuperCluster
EleTkIsolFromCands trkIsoCalc_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
static const std::string eleTrkPtIsoLabel_
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< EleTkIsolFromCands::PIDVeto > candVetosAOD_