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)) {}
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ bookHists()

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

Definition at line 378 of file TrigObjTnPHistColl.cc.

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

380  {
381  hists_.bookHists(iBooker, tagName + "_" + probeFilter_, tagName + "_" + probeFilter_, histDefs);
382 }
void bookHists(DQMStore::IBooker &iBooker, const std::string &name, const std::string &title, const HistDefs &histDefs)

◆ fill()

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

Definition at line 384 of file TrigObjTnPHistColl.cc.

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

386  {
387  auto probeKeys = getKeys(trigEvt, probeFilter_);
388  for (auto probeKey : probeKeys) {
389  const trigger::TriggerObject& probe = trigEvt.getObjects()[probeKey];
390  if (tagKey != probeKey && probeCuts(probe)) {
391  const trigger::TriggerObject& tag = trigEvt.getObjects()[tagKey];
392  auto massFunc = [](float pt1, float eta1, float phi1, float pt2, float eta2, float phi2) {
393  return std::sqrt(2 * pt1 * pt2 * (std::cosh(eta1 - eta2) - std::cos(phi1 - phi2)));
394  };
395  float mass = massFunc(tag.pt(), tag.eta(), tag.phi(), probe.pt(), probe.eta(), probe.phi());
396  hists_.fill(probe, mass);
397  }
398  }
399 }
static const trigger::Keys getKeys(const trigger::TriggerEvent &trigEvt, const std::string &filterName)
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
T sqrt(T t)
Definition: SSEVec.h:19
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:102
void fill(const trigger::TriggerObject &probe, float mass) const

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.