Templated helper class to allow a selection on a certain object collection. More...
#include "DQM/Physics/interface/TopDQMHelpers.h"
Public Member Functions | |
bool | select (const edm::Event &event) |
apply selection More... | |
bool | select (const edm::Event &event, const edm::EventSetup &setup) |
apply selection override for jets More... | |
SelectionStep (const edm::ParameterSet &cfg) | |
default constructor More... | |
~SelectionStep () | |
default destructor More... | |
Private Attributes | |
edm::InputTag | btagLabel_ |
choice for b-tag as extra selection type More... | |
double | btagWorkingPoint_ |
choice of b-tag working point as extra selection type More... | |
int | eidPattern_ |
edm::InputTag | electronId_ |
electronId label as extra selection type More... | |
std::string | jetCorrector_ |
jet corrector as extra selection type More... | |
edm::InputTag | 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... | |
StringCutObjectSelector< Object > | select_ |
string cut selector More... | |
edm::InputTag | src_ |
input collection More... | |
Templated helper class to allow a selection on a certain object collection.
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 148 of file TopDQMHelpers.h.
SelectionStep< Object >::SelectionStep | ( | const edm::ParameterSet & | cfg | ) |
default constructor
Definition at line 195 of file TopDQMHelpers.h.
References SelectionStep< Object >::btagLabel_, SelectionStep< Object >::btagWorkingPoint_, SelectionStep< Object >::eidPattern_, SelectionStep< Object >::electronId_, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), SelectionStep< Object >::jetCorrector_, SelectionStep< Object >::jetIDLabel_, SelectionStep< Object >::jetIDSelect_, SelectionStep< Object >::max_, and SelectionStep< Object >::min_.
|
inline |
bool SelectionStep< Object >::select | ( | const edm::Event & | event | ) |
apply selection
Definition at line 228 of file TopDQMHelpers.h.
References accept(), edm::Event::getByLabel(), n, VarParsing::obj, and align_tpl::src.
Referenced by TopSingleLeptonDQM::analyze(), TopDiLeptonOfflineDQM::analyze(), python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), python.Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), python.Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and python.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 261 of file TopDQMHelpers.h.
References accept(), JetCorrector::correction(), edm::EventSetup::find(), edm::Event::getByLabel(), JetCorrector::getJetCorrector(), metsig::jet, n, VarParsing::obj, and align_tpl::src.
Referenced by python.Vispa.Views.LineDecayView.LineDecayContainer::createObject(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), python.Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), python.Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and python.Vispa.Views.AbstractView.AbstractView::restoreSelection().
|
private |
choice for b-tag as extra selection type
Definition at line 181 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
choice of b-tag working point as extra selection type
Definition at line 183 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 177 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
electronId label as extra selection type
Definition at line 166 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jet corrector as extra selection type
Definition at line 179 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
jetID as an extra selection type
Definition at line 185 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
selection string on the jetID
Definition at line 190 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
Definition at line 164 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
min/max for object multiplicity
Definition at line 164 of file TopDQMHelpers.h.
Referenced by SelectionStep< Object >::SelectionStep().
|
private |
string cut selector
Definition at line 188 of file TopDQMHelpers.h.
|
private |
input collection
Definition at line 162 of file TopDQMHelpers.h.