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_ |
std::string | 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.
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 182 of file TopDQMHelpers.h.
SelectionStep< Object >::SelectionStep | ( | const edm::ParameterSet & | cfg, |
edm::ConsumesCollector && | iC | ||
) |
default constructor
Definition at line 234 of file TopDQMHelpers.h.
References SelectionStep< Object >::btagLabel_, SelectionStep< Object >::btagWorkingPoint_, SelectionStep< Object >::eidCutValue_, SelectionStep< Object >::electronId_, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), SelectionStep< Object >::gsfEs_, SelectionStep< Object >::jetCorrector_, bTagSequences_cff::jetID, 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 274 of file TopDQMHelpers.h.
References accept(), edm::Event::getByToken(), customizeTrackingMonitorSeedNumber::idx, n, getGTfromDQMFile::obj, and alcazmumu_cfi::src.
Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().
bool SelectionStep< Object >::select | ( | const edm::Event & | event, |
const std::string & | type | ||
) |
apply selection with special treatment for PFCandidates
Definition at line 311 of file TopDQMHelpers.h.
References accept(), edm::Event::getByToken(), reco::PFCandidate::gsfElectronRef(), customizeTrackingMonitorSeedNumber::idx, edm::Ref< C, T, F >::isNonnull(), reco::PFCandidate::muonRef(), n, getGTfromDQMFile::obj, and alcazmumu_cfi::src.
Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().
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 398 of file TopDQMHelpers.h.
References accept(), JetCorrector::correction(), mvaPFMET_cff::corrector, edm::EventSetup::find(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), customizeTrackingMonitorSeedNumber::idx, metsig::jet, bTagSequences_cff::jetID, edm::eventsetup::EventSetupRecordKey::makeKey(), n, getGTfromDQMFile::obj, and alcazmumu_cfi::src.
Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().
bool SelectionStep< Object >::selectVertex | ( | const edm::Event & | event | ) |
Definition at line 373 of file TopDQMHelpers.h.
References accept(), edm::Event::getByToken(), n, getGTfromDQMFile::obj, and alcazmumu_cfi::src.
|
private |
choice for b-tag as extra selection type
Definition at line 218 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
choice of b-tag working point as extra selection type
Definition at line 220 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 214 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
electronId label as extra selection type
Definition at line 202 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 225 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jet corrector as extra selection type
Definition at line 216 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jetID as an extra selection type
Definition at line 222 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
selection string on the jetID
Definition at line 229 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 200 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
min/max for object multiplicity
Definition at line 200 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 224 of file TopDQMHelpers.h.
|
private |
string cut selector
Definition at line 227 of file TopDQMHelpers.h.
|
private |
input collection
Definition at line 198 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().