Templated helper class to allow a selection on a certain object collection. More...
#include <TopDQMHelpers.h>
Public Member Functions | |
bool | select (const edm::Event &event) |
apply selection More... | |
bool | select (const edm::Event &event, const std::string &type) |
apply selection with special treatment for PFCandidates More... | |
bool | select (const edm::Event &event, const edm::EventSetup &setup) |
apply selection override for jets More... | |
SelectionStep (const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC) | |
default constructor More... | |
bool | selectVertex (const edm::Event &event) |
~SelectionStep () | |
default destructor More... | |
Private Attributes | |
edm::EDGetTokenT< reco::JetTagCollection > | btagLabel_ |
choice for b-tag as extra selection type More... | |
double | btagWorkingPoint_ |
choice of b-tag working point as extra selection type More... | |
double | eidCutValue_ |
edm::EDGetTokenT< edm::ValueMap< float > > | electronId_ |
electronId label as extra selection type More... | |
edm::EDGetTokenT< edm::View< reco::GsfElectron > > | gsfEs_ |
edm::EDGetTokenT< reco::JetCorrector > | jetCorrector_ |
jet corrector as extra selection type More... | |
edm::EDGetTokenT< reco::JetIDValueMap > | jetIDLabel_ |
jetID as an extra selection type More... | |
StringCutObjectSelector< reco::JetID > * | jetIDSelect_ |
selection string on the jetID More... | |
int | max_ |
int | min_ |
min/max for object multiplicity More... | |
edm::EDGetTokenT< edm::View< reco::Vertex > > | pvs_ |
StringCutObjectSelector< Object > | select_ |
string cut selector More... | |
edm::EDGetTokenT< edm::View< Object > > | src_ |
input collection More... | |
Templated helper class to allow a selection on a certain object collection.
"DQM/Physics/interface/TopDQMHelpers.h"
Templated helper class to allow a selection on a certain object collection, which may be monitored by a separate class afterwards. The class wraps and slightly extends the features of the StringCutParser to allow also to apply event based selections, according to a minimal or maximal number of elements in the collection after the object selection has been applied. It takes an edm::ParameterSet in the constructor, which should contain the following elements:
The parameters src and select are mandatory. The parameters min and max are optional. The parameters electronId and jetCorrector are optional. They are added to keep the possibility to apply selections on id'ed electrons or on corrected jets. They may be omitted in the PSet for simplification reasons if not needed at any time. They are not effiective for other object collections but electrons or jets. If none of the two parameters min or max is found in the event the select function returns true if at least one object fullfilled the requirements.
The class has one template value, which is the object collection to apply the selection on. This has to be parsed to the StringCutParser class. The function select is overrided for jets to circumvent problems with the template specialisation. Note that for MET not type1 or muon corrections are supported on reco candidates.
Definition at line 240 of file TopDQMHelpers.h.
SelectionStep< Object >::SelectionStep | ( | const edm::ParameterSet & | cfg, |
edm::ConsumesCollector && | iC | ||
) |
default constructor
Definition at line 292 of file TopDQMHelpers.h.
References SelectionStep< Object >::btagLabel_, SelectionStep< Object >::btagWorkingPoint_, looper::cfg, SelectionStep< Object >::eidCutValue_, SelectionStep< Object >::electronId_, edm::ParameterSet::getParameter(), SelectionStep< Object >::gsfEs_, ProducerED_cfi::InputTag, SelectionStep< Object >::jetCorrector_, SelectionStep< Object >::jetIDLabel_, SelectionStep< Object >::jetIDSelect_, SelectionStep< Object >::max_, SelectionStep< Object >::min_, SelectionStep< Object >::src_, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
bool SelectionStep< Object >::select | ( | const edm::Event & | event | ) |
apply selection
Definition at line 322 of file TopDQMHelpers.h.
References accept(), topSingleLeptonDQM_PU_cfi::electronId, heavyIonCSV_trainingSettings::idx, dqmiodumpmetadata::n, getGTfromDQMFile::obj, TrackRefitter_38T_cff::src, and funct::true.
bool SelectionStep< Object >::select | ( | const edm::Event & | event, |
const std::string & | type | ||
) |
apply selection with special treatment for PFCandidates
Definition at line 358 of file TopDQMHelpers.h.
References accept(), topSingleLeptonDQM_PU_cfi::electronId, reco::PFCandidate::gsfElectronRef(), heavyIonCSV_trainingSettings::idx, edm::Ref< C, T, F >::isNonnull(), reco::PFCandidate::muonRef(), dqmiodumpmetadata::n, getGTfromDQMFile::obj, TrackRefitter_38T_cff::src, and funct::true.
bool SelectionStep< Object >::select | ( | const edm::Event & | event, |
const edm::EventSetup & | setup | ||
) |
apply selection override for jets
apply selection (w/o using the template class Object), override for jets
Definition at line 442 of file TopDQMHelpers.h.
References accept(), ZGammaplusJetsMonitor_cff::corrector, heavyIonCSV_trainingSettings::idx, edm::HandleBase::isValid(), metsig::jet, dqmiodumpmetadata::n, getGTfromDQMFile::obj, edm::Handle< T >::product(), TrackRefitter_38T_cff::src, and funct::true.
bool SelectionStep< Object >::selectVertex | ( | const edm::Event & | event | ) |
Definition at line 417 of file TopDQMHelpers.h.
References accept(), topSingleLeptonDQM_PU_cfi::electronId, dqmiodumpmetadata::n, getGTfromDQMFile::obj, and TrackRefitter_38T_cff::src.
|
private |
choice for b-tag as extra selection type
Definition at line 276 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
choice of b-tag working point as extra selection type
Definition at line 278 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
electronId pattern we expect the following pattern: 0: fails 1: passes electron ID only 2: passes electron Isolation only 3: passes electron ID and Isolation only 4: passes conversion rejection 5: passes conversion rejection and ID 6: passes conversion rejection and Isolation 7: passes the whole selection As described on https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID
Definition at line 272 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
electronId label as extra selection type
Definition at line 260 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 283 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jet corrector as extra selection type
Definition at line 274 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jetID as an extra selection type
Definition at line 280 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
selection string on the jetID
Definition at line 287 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 258 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
min/max for object multiplicity
Definition at line 258 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 282 of file TopDQMHelpers.h.
|
private |
string cut selector
Definition at line 285 of file TopDQMHelpers.h.
|
private |
input collection
Definition at line 256 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().