CMS 3D CMS Logo

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

#include <HcalPulseContainmentManager.h>

Classes

struct  HcalPulseContainmentEntry
 

Public Member Functions

void beginRun (edm::EventSetup const &es)
 
void beginRun (const HcalDbService *conditions, const HcalTimeSlew *delay)
 
double correction (const HcalDetId &detId, int toAdd, float fixedphase_ns, double fc_ampl)
 
const HcalPulseContainmentCorrectionget (const HcalDetId &detId, int toAdd, float fixedphase_ns)
 
 HcalPulseContainmentManager (float max_fracerror, bool phaseAsInSim)
 
 HcalPulseContainmentManager (float max_fracerror, bool phaseAsInSim, edm::ConsumesCollector iC)
 
void setTimeSlew (const HcalTimeSlew *timeSlew)
 

Private Attributes

const edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecorddelayToken_
 
std::vector< HcalPulseContainmentEntryentries_
 
float fixedphase_ns_
 
const HcalTimeSlewhcalTimeSlew_delay_
 
float max_fracerror_
 
bool phaseAsInSim_
 
HcalPulseShapes shapes_
 

Detailed Description

Definition at line 10 of file HcalPulseContainmentManager.h.

Constructor & Destructor Documentation

◆ HcalPulseContainmentManager() [1/2]

HcalPulseContainmentManager::HcalPulseContainmentManager ( float  max_fracerror,
bool  phaseAsInSim 
)

Definition at line 6 of file HcalPulseContainmentManager.cc.

References hcalTimeSlew_delay_.

◆ HcalPulseContainmentManager() [2/2]

HcalPulseContainmentManager::HcalPulseContainmentManager ( float  max_fracerror,
bool  phaseAsInSim,
edm::ConsumesCollector  iC 
)

Definition at line 11 of file HcalPulseContainmentManager.cc.

14  : entries_(),
15  shapes_(iC),
16  max_fracerror_(max_fracerror),
17  phaseAsInSim_(phaseAsInSim),
std::vector< HcalPulseContainmentEntry > entries_
const edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_

Member Function Documentation

◆ beginRun() [1/2]

void HcalPulseContainmentManager::beginRun ( edm::EventSetup const &  es)

Definition at line 20 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::beginRun(), delayToken_, edm::EventSetup::getData(), hcalTimeSlew_delay_, and shapes_.

Referenced by SimpleHBHEPhase1Algo::beginRun().

20  {
21  hcalTimeSlew_delay_ = &es.getData(delayToken_);
22 
23  shapes_.beginRun(es);
24 }
void beginRun(edm::EventSetup const &es)
const edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_

◆ beginRun() [2/2]

void HcalPulseContainmentManager::beginRun ( const HcalDbService conditions,
const HcalTimeSlew delay 
)

◆ correction()

double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 32 of file HcalPulseContainmentManager.cc.

References hcalRecHitTable_cff::detId, and HLT_2024v10_cff::toAdd.

32  {
33  /*
34  int sub = detId.subdet();
35  int depth = detId.depth();
36  int inteta = detId.ieta();
37  int intphi = detId.iphi();
38 
39  std::cout << "* HcalPulseContainmentManager::correction, cell:"
40  << " sub, ieta, iphi, depth = "
41  << sub << " " << inteta << " " << intphi
42  << " " << depth << " toAaa= " << toAdd
43  <<" phase = " << fixedphase_ns << " ampl = "
44  << fc_ampl
45  << std::endl;
46  */
47 
48  return get(detId, toAdd, fixedphase_ns)->getCorrection(fc_ampl);
49 }

◆ get()

const HcalPulseContainmentCorrection * HcalPulseContainmentManager::get ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns 
)

Definition at line 51 of file HcalPulseContainmentManager.cc.

References hcalRecHitTable_cff::detId, entries_, mps_splice::entry, hcalTimeSlew_delay_, max_fracerror_, phaseAsInSim_, l1trig_cff::shape, HcalPulseShapes::shapeForReco(), shapes_, and HLT_2024v10_cff::toAdd.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), SimpleHBHEPhase1Algo::m0Energy(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), util.rrapi.RRApi::reports(), rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

53  {
54  // const HcalPulseShape * shape = &(shapes_.shape(detId));
56  for (std::vector<HcalPulseContainmentEntry>::const_iterator entryItr = entries_.begin(); entryItr != entries_.end();
57  ++entryItr) {
58  if (entryItr->shape_ == shape && entryItr->toAdd_ == toAdd && entryItr->fixedphase_ns_ == fixedphase_ns) {
59  return &entryItr->correction_;
60  }
61  }
62 
63  /*
64  int sub = detId.subdet();
65  int depth = detId.depth();
66  int inteta = detId.ieta();
67  int intphi = detId.iphi();
68 
69  std::cout << "* HcalPulseContainmentManager::get new entry, cell:"
70  << " sub, ieta, iphi, depth = "
71  << sub << " " << inteta << " " << intphi
72  << " " << depth
73  << std::endl;
74  */
75 
76  // didn't find it. Make one.
77  HcalPulseContainmentEntry entry(
78  toAdd,
79  fixedphase_ns,
80  shape,
82  entries_.push_back(entry);
83  return &(entries_.back().correction_);
84 }
const Shape & shapeForReco(const HcalDetId &detId) const
std::vector< HcalPulseContainmentEntry > entries_

◆ setTimeSlew()

void HcalPulseContainmentManager::setTimeSlew ( const HcalTimeSlew timeSlew)
inline

Definition at line 22 of file HcalPulseContainmentManager.h.

References hcalTimeSlew_delay_.

22 { hcalTimeSlew_delay_ = timeSlew; }

Member Data Documentation

◆ delayToken_

const edm::ESGetToken<HcalTimeSlew, HcalTimeSlewRecord> HcalPulseContainmentManager::delayToken_
private

Definition at line 42 of file HcalPulseContainmentManager.h.

Referenced by beginRun().

◆ entries_

std::vector<HcalPulseContainmentEntry> HcalPulseContainmentManager::entries_
private

Definition at line 37 of file HcalPulseContainmentManager.h.

Referenced by get().

◆ fixedphase_ns_

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 39 of file HcalPulseContainmentManager.h.

◆ hcalTimeSlew_delay_

const HcalTimeSlew* HcalPulseContainmentManager::hcalTimeSlew_delay_
private

◆ max_fracerror_

float HcalPulseContainmentManager::max_fracerror_
private

Definition at line 40 of file HcalPulseContainmentManager.h.

Referenced by get().

◆ phaseAsInSim_

bool HcalPulseContainmentManager::phaseAsInSim_
private

Definition at line 41 of file HcalPulseContainmentManager.h.

Referenced by get().

◆ shapes_

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 38 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), and get().