CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrigObjTnPHistColl::ProbeData Class Reference

#include <TrigObjTnPHistColl.h>

Public Member Functions

void bookHists (const std::string &tagName, DQMStore::IBooker &iBooker, const HistDefs &histDefs)
 
void fill (const trigger::size_type tagKey, const trigger::TriggerEvent &trigEvt, const VarRangeCutColl< trigger::TriggerObject > &probeCuts) const
 
 ProbeData (std::string probeFilter)
 

Private Attributes

HistColl hists_
 
std::string probeFilter_
 

Detailed Description

Definition at line 214 of file TrigObjTnPHistColl.h.

Constructor & Destructor Documentation

◆ ProbeData()

TrigObjTnPHistColl::ProbeData::ProbeData ( std::string  probeFilter)
inlineexplicit

Definition at line 216 of file TrigObjTnPHistColl.h.

216 : probeFilter_(std::move(probeFilter)) {}

Member Function Documentation

◆ bookHists()

void TrigObjTnPHistColl::ProbeData::bookHists ( const std::string &  tagName,
DQMStore::IBooker iBooker,
const HistDefs histDefs 
)

Definition at line 376 of file TrigObjTnPHistColl.cc.

378  {
379  hists_.bookHists(iBooker, tagName + "_" + probeFilter_, tagName + "_" + probeFilter_, histDefs);
380 }

References trigObjTnPSource_cfi::histDefs, and JetPartonCorrections_cff::tagName.

◆ fill()

void TrigObjTnPHistColl::ProbeData::fill ( const trigger::size_type  tagKey,
const trigger::TriggerEvent trigEvt,
const VarRangeCutColl< trigger::TriggerObject > &  probeCuts 
) const

Definition at line 382 of file TrigObjTnPHistColl.cc.

384  {
385  auto probeKeys = getKeys(trigEvt, probeFilter_);
386  for (auto probeKey : probeKeys) {
387  const trigger::TriggerObject& probe = trigEvt.getObjects()[probeKey];
388  if (tagKey != probeKey && probeCuts(probe)) {
389  const trigger::TriggerObject& tag = trigEvt.getObjects()[tagKey];
390  auto massFunc = [](float pt1, float eta1, float phi1, float pt2, float eta2, float phi2) {
391  return std::sqrt(2 * pt1 * pt2 * (std::cosh(eta1 - eta2) - std::cos(phi1 - phi2)));
392  };
393  float mass = massFunc(tag.pt(), tag.eta(), tag.phi(), probe.pt(), probe.eta(), probe.phi());
394  hists_.fill(probe, mass);
395  }
396  }
397 }

References funct::cos(), trigger::TriggerObject::eta(), HLT_2018_cff::eta1, HLT_2018_cff::eta2, TrigObjTnPHistColl::getKeys(), trigger::TriggerEvent::getObjects(), EgHLTOffHistBins_cfi::mass, trigger::TriggerObject::phi(), trigObjTnPSource_cfi::probeCuts, trigger::TriggerObject::pt(), HLT_2018_cff::pt1, HLT_2018_cff::pt2, mathSSE::sqrt(), and GlobalPosition_Frontier_DevDB_cff::tag.

Member Data Documentation

◆ hists_

HistColl TrigObjTnPHistColl::ProbeData::hists_
private

Definition at line 224 of file TrigObjTnPHistColl.h.

◆ probeFilter_

std::string TrigObjTnPHistColl::ProbeData::probeFilter_
private

Definition at line 223 of file TrigObjTnPHistColl.h.

trigger::TriggerObject::phi
float phi() const
Definition: TriggerObject.h:54
TrigObjTnPHistColl::getKeys
static const trigger::Keys getKeys(const trigger::TriggerEvent &trigEvt, const std::string &filterName)
Definition: TrigObjTnPHistColl.cc:68
HLT_2018_cff.pt2
pt2
Definition: HLT_2018_cff.py:8552
HLT_2018_cff.eta1
eta1
Definition: HLT_2018_cff.py:8220
TrigObjTnPHistColl::ProbeData::probeFilter_
std::string probeFilter_
Definition: TrigObjTnPHistColl.h:223
HLT_2018_cff.pt1
pt1
Definition: HLT_2018_cff.py:8550
TrigObjTnPHistColl::HistColl::bookHists
void bookHists(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, const HistDefs &histDefs)
Definition: TrigObjTnPHistColl.cc:363
trigger::TriggerObject::pt
float pt() const
Definition: TriggerObject.h:52
trigObjTnPSource_cfi.histDefs
histDefs
Definition: trigObjTnPSource_cfi.py:73
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
HLT_2018_cff.eta2
eta2
Definition: HLT_2018_cff.py:8221
trigger::TriggerObject::eta
float eta() const
Definition: TriggerObject.h:53
trigger::TriggerEvent::getObjects
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
eostools.move
def move(src, dest)
Definition: eostools.py:511
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
TrigObjTnPHistColl::HistColl::fill
void fill(const trigger::TriggerObject &probe, float mass) const
Definition: TrigObjTnPHistColl.cc:370
JetPartonCorrections_cff.tagName
tagName
Definition: JetPartonCorrections_cff.py:12
trigObjTnPSource_cfi.probeCuts
probeCuts
Definition: trigObjTnPSource_cfi.py:54
TrigObjTnPHistColl::ProbeData::hists_
HistColl hists_
Definition: TrigObjTnPHistColl.h:224