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 (const HcalDbService *conditions, const HcalTimeSlew *delay)
 
void beginRun (edm::EventSetup const &es)
 
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)
 
void setTimeSlew (const HcalTimeSlew *timeSlew)
 

Private Attributes

std::vector< HcalPulseContainmentEntryentries_
 
float fixedphase_ns_
 
const HcalTimeSlewhcalTimeSlew_delay_
 
float max_fracerror_
 
HcalPulseShapes shapes_
 

Detailed Description

Definition at line 10 of file HcalPulseContainmentManager.h.

Constructor & Destructor Documentation

◆ HcalPulseContainmentManager()

HcalPulseContainmentManager::HcalPulseContainmentManager ( float  max_fracerror)

Definition at line 7 of file HcalPulseContainmentManager.cc.

8  : entries_(), shapes_(), max_fracerror_(max_fracerror) {
9  hcalTimeSlew_delay_ = nullptr;
10 }

References hcalTimeSlew_delay_.

Member Function Documentation

◆ beginRun() [1/2]

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

◆ beginRun() [2/2]

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

◆ correction()

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

Definition at line 26 of file HcalPulseContainmentManager.cc.

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

References get(), HcalPulseContainmentCorrection::getCorrection(), and HLT_2018_cff::toAdd.

◆ get()

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

Definition at line 45 of file HcalPulseContainmentManager.cc.

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

References entries_, mps_splice::entry, hcalTimeSlew_delay_, max_fracerror_, HcalPulseShapes::shapeForReco(), shapes_, and HLT_2018_cff::toAdd.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), beginRun(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), correction(), 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(), 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(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

◆ setTimeSlew()

void HcalPulseContainmentManager::setTimeSlew ( const HcalTimeSlew timeSlew)
inline

Definition at line 19 of file HcalPulseContainmentManager.h.

19 { hcalTimeSlew_delay_ = timeSlew; }

References hcalTimeSlew_delay_.

Member Data Documentation

◆ entries_

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

Definition at line 34 of file HcalPulseContainmentManager.h.

Referenced by get().

◆ fixedphase_ns_

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 36 of file HcalPulseContainmentManager.h.

◆ hcalTimeSlew_delay_

const HcalTimeSlew* HcalPulseContainmentManager::hcalTimeSlew_delay_
private

◆ max_fracerror_

float HcalPulseContainmentManager::max_fracerror_
private

Definition at line 37 of file HcalPulseContainmentManager.h.

Referenced by get().

◆ shapes_

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 35 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), and get().

HcalPulseContainmentManager::shapes_
HcalPulseShapes shapes_
Definition: HcalPulseContainmentManager.h:35
HcalPulseContainmentManager::entries_
std::vector< HcalPulseContainmentEntry > entries_
Definition: HcalPulseContainmentManager.h:34
HcalPulseContainmentManager::max_fracerror_
float max_fracerror_
Definition: HcalPulseContainmentManager.h:37
mps_splice.entry
entry
Definition: mps_splice.py:68
HcalPulseShapes::shapeForReco
const Shape & shapeForReco(const HcalDetId &detId) const
Definition: HcalPulseShapes.cc:525
HcalPulseContainmentCorrection
Definition: HcalPulseContainmentCorrection.h:15
HcalPulseContainmentManager::get
const HcalPulseContainmentCorrection * get(const HcalDetId &detId, int toAdd, float fixedphase_ns)
Definition: HcalPulseContainmentManager.cc:45
edm::ESHandle
Definition: DTSurvey.h:22
HcalTimeSlewRecord
Definition: HcalTimeSlewRecord.h:4
HcalPulseShapes::beginRun
void beginRun(edm::EventSetup const &es)
Definition: HcalPulseShapes.cc:143
HcalPulseContainmentManager::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: HcalPulseContainmentManager.h:39
HcalPulseContainmentCorrection::getCorrection
double getCorrection(double fc_ampl) const
Definition: HcalPulseContainmentCorrection.cc:51
HcalPulseShape
Definition: HcalPulseShape.h:6
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:67
HLT_2018_cff.toAdd
toAdd
Definition: HLT_2018_cff.py:50595