CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
TrigObjTnPHistColl Class Reference

#include <TrigObjTnPHistColl.h>

Classes

class  FilterSelector
 
class  HistColl
 
class  HistDefs
 
class  HistFiller
 
class  PathSelector
 
class  ProbeData
 
class  TrigObjVarF
 

Public Member Functions

void bookHists (DQMStore::ConcurrentBooker &iBooker)
 
void fill (const trigger::TriggerEvent &trigEvt, const edm::TriggerResults &trigResults, const edm::TriggerNames &trigNames) const
 
void init (const HLTConfigProvider &hltConfig)
 
 TrigObjTnPHistColl (const edm::ParameterSet &config)
 

Static Public Member Functions

static edm::ParameterSetDescription makePSetDescription ()
 

Static Private Member Functions

static const trigger::Keys getKeys (const trigger::TriggerEvent &trigEvt, const std::string &filterName)
 

Private Attributes

std::string collName_
 
PathSelector evtTrigSel_
 
std::string folderName_
 
HistDefs histDefs_
 
VarRangeCutColl< trigger::TriggerObjectprobeCuts_
 
std::vector< ProbeDataprobeHists_
 
VarRangeCutColl< trigger::TriggerObjecttagCuts_
 
FilterSelector tagFilters_
 

Detailed Description

Definition at line 89 of file TrigObjTnPHistColl.h.

Constructor & Destructor Documentation

TrigObjTnPHistColl::TrigObjTnPHistColl ( const edm::ParameterSet config)

Definition at line 11 of file TrigObjTnPHistColl.cc.

References edm::ParameterSet::getParameter(), eostools::move(), and probeHists_.

11  :
12  tagCuts_(config.getParameter<std::vector<edm::ParameterSet>>("tagCuts")),
13  probeCuts_(config.getParameter<std::vector<edm::ParameterSet>>("probeCuts")),
14  tagFilters_(config.getParameter<edm::ParameterSet>("tagFilters")),
15  collName_(config.getParameter<std::string>("collName")),
16  folderName_(config.getParameter<std::string>("folderName")),
17  histDefs_(config.getParameter<edm::ParameterSet>("histDefs")),
18  evtTrigSel_(config.getParameter<edm::ParameterSet>("evtTrigSel"))
19 
20 {
21  auto probeFilters = config.getParameter<std::vector<std::string> >("probeFilters");
22  for(auto& probeFilter : probeFilters){
23  probeHists_.emplace_back(ProbeData(std::move(probeFilter)));
24  }
25 }
T getParameter(std::string const &) const
std::vector< ProbeData > probeHists_
VarRangeCutColl< trigger::TriggerObject > probeCuts_
VarRangeCutColl< trigger::TriggerObject > tagCuts_
FilterSelector tagFilters_
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

void TrigObjTnPHistColl::bookHists ( DQMStore::ConcurrentBooker iBooker)

Definition at line 41 of file TrigObjTnPHistColl.cc.

References collName_, folderName_, histDefs_, probeHists_, and DQMStore::IBooker::setCurrentFolder().

Referenced by TrigObjTnPHistColl::HistColl::HistColl(), init(), and TrigObjTnPHistColl::ProbeData::ProbeData().

42 {
44  for(auto& probe : probeHists_){
45  probe.bookHists(collName_,iBooker,histDefs_);
46  }
47 }
std::vector< ProbeData > probeHists_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
void TrigObjTnPHistColl::fill ( const trigger::TriggerEvent trigEvt,
const edm::TriggerResults trigResults,
const edm::TriggerNames trigNames 
) const

Definition at line 49 of file TrigObjTnPHistColl.cc.

References evtTrigSel_, trigger::TriggerEvent::getObjects(), TrigObjTnPHistColl::FilterSelector::getPassingKeys(), probeCuts_, probeHists_, tagCuts_, and tagFilters_.

Referenced by TrigObjTnPHistColl::HistColl::HistColl(), init(), and TrigObjTnPHistColl::ProbeData::ProbeData().

52 {
53  if(evtTrigSel_(trigResults,trigNames)==false) return;
54 
55  auto tagTrigKeys = tagFilters_.getPassingKeys(trigEvt);
56  for(auto& tagKey : tagTrigKeys){
57  const trigger::TriggerObject& tagObj = trigEvt.getObjects()[tagKey];
58  if(tagCuts_(tagObj)){
59  for(auto& probeColl : probeHists_) probeColl.fill(tagKey,trigEvt,probeCuts_);
60  }
61  }
62 }
std::vector< ProbeData > probeHists_
VarRangeCutColl< trigger::TriggerObject > probeCuts_
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
const trigger::Keys getPassingKeys(const trigger::TriggerEvent &trigEvt) const
VarRangeCutColl< trigger::TriggerObject > tagCuts_
FilterSelector tagFilters_
const trigger::Keys TrigObjTnPHistColl::getKeys ( const trigger::TriggerEvent trigEvt,
const std::string &  filterName 
)
staticprivate

Definition at line 67 of file TrigObjTnPHistColl.cc.

References trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), trigger::TriggerEvent::sizeFilters(), and trigger::TriggerEvent::usedProcessName().

Referenced by TrigObjTnPHistColl::ProbeData::fill(), TrigObjTnPHistColl::FilterSelector::FilterSet::getPassingKeys(), and init().

68 {
69  edm::InputTag filterTag(filterName,"",trigEvt.usedProcessName());
70  trigger::size_type filterIndex = trigEvt.filterIndex(filterTag);
71  if(filterIndex<trigEvt.sizeFilters()) return trigEvt.filterKeys(filterIndex);
72  else return trigger::Keys();
73 }
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
uint16_t size_type
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:95
std::vector< size_type > Keys
void TrigObjTnPHistColl::init ( const HLTConfigProvider hltConfig)
inline
edm::ParameterSetDescription TrigObjTnPHistColl::makePSetDescription ( )
static

Definition at line 27 of file TrigObjTnPHistColl.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addVPSet(), TrigObjTnPHistColl::FilterSelector::makePSetDescription(), TrigObjTnPHistColl::PathSelector::makePSetDescription(), TrigObjTnPHistColl::HistDefs::makePSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by TrigObjTnPSource::fillDescriptions().

28 {
30  desc.addVPSet("tagCuts",VarRangeCut<trigger::TriggerObject>::makePSetDescription(),std::vector<edm::ParameterSet>());
31  desc.addVPSet("probeCuts",VarRangeCut<trigger::TriggerObject>::makePSetDescription(),std::vector<edm::ParameterSet>());
33  desc.add<std::string>("collName","stdTag");
34  desc.add<std::string>("folderName","HLT/EGM/TrigObjTnP");
36  desc.add<std::vector<std::string>>("probeFilters",std::vector<std::string>());
38  return desc;
39 }
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
static edm::ParameterSetDescription makePSetDescription()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static edm::ParameterSetDescription makePSetDescription()
static edm::ParameterSetDescription makePSetDescription()

Member Data Documentation

std::string TrigObjTnPHistColl::collName_
private

Definition at line 222 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

PathSelector TrigObjTnPHistColl::evtTrigSel_
private

Definition at line 226 of file TrigObjTnPHistColl.h.

Referenced by fill(), and init().

std::string TrigObjTnPHistColl::folderName_
private

Definition at line 223 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

HistDefs TrigObjTnPHistColl::histDefs_
private

Definition at line 224 of file TrigObjTnPHistColl.h.

Referenced by bookHists().

VarRangeCutColl<trigger::TriggerObject> TrigObjTnPHistColl::probeCuts_
private

Definition at line 220 of file TrigObjTnPHistColl.h.

Referenced by fill().

std::vector<ProbeData> TrigObjTnPHistColl::probeHists_
private

Definition at line 225 of file TrigObjTnPHistColl.h.

Referenced by bookHists(), fill(), and TrigObjTnPHistColl().

VarRangeCutColl<trigger::TriggerObject> TrigObjTnPHistColl::tagCuts_
private

Definition at line 220 of file TrigObjTnPHistColl.h.

Referenced by fill().

FilterSelector TrigObjTnPHistColl::tagFilters_
private

Definition at line 221 of file TrigObjTnPHistColl.h.

Referenced by fill().