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)
 
 HcalPulseContainmentManager (float max_fracerror, 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_
 
HcalPulseShapes shapes_
 

Detailed Description

Definition at line 10 of file HcalPulseContainmentManager.h.

Constructor & Destructor Documentation

◆ HcalPulseContainmentManager() [1/2]

HcalPulseContainmentManager::HcalPulseContainmentManager ( float  max_fracerror)

Definition at line 6 of file HcalPulseContainmentManager.cc.

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

References hcalTimeSlew_delay_.

◆ HcalPulseContainmentManager() [2/2]

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

Definition at line 11 of file HcalPulseContainmentManager.cc.

12  : entries_(),
13  shapes_(iC),
14  max_fracerror_(max_fracerror),

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 29 of file HcalPulseContainmentManager.cc.

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

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

◆ get()

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

Definition at line 48 of file HcalPulseContainmentManager.cc.

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

References entries_, mps_splice::entry, hcalTimeSlew_delay_, max_fracerror_, HcalPulseShapes::shapeForReco(), shapes_, and HLT_FULL_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(), 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(), 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(), rrapi.RRApi::tags(), util.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 22 of file HcalPulseContainmentManager.h.

22 { hcalTimeSlew_delay_ = timeSlew; }

References hcalTimeSlew_delay_.

Member Data Documentation

◆ delayToken_

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

Definition at line 41 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().

◆ shapes_

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 38 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), and get().

HcalPulseContainmentManager::shapes_
HcalPulseShapes shapes_
Definition: HcalPulseContainmentManager.h:38
HcalPulseContainmentManager::entries_
std::vector< HcalPulseContainmentEntry > entries_
Definition: HcalPulseContainmentManager.h:37
edm::ESInputTag
Definition: ESInputTag.h:87
HcalPulseContainmentManager::max_fracerror_
float max_fracerror_
Definition: HcalPulseContainmentManager.h:40
mps_splice.entry
entry
Definition: mps_splice.py:68
HcalPulseShapes::shapeForReco
const Shape & shapeForReco(const HcalDetId &detId) const
Definition: HcalPulseShapes.cc:524
HcalPulseContainmentCorrection
Definition: HcalPulseContainmentCorrection.h:15
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
HcalPulseContainmentManager::get
const HcalPulseContainmentCorrection * get(const HcalDetId &detId, int toAdd, float fixedphase_ns)
Definition: HcalPulseContainmentManager.cc:48
HcalPulseShapes::beginRun
void beginRun(edm::EventSetup const &es)
Definition: HcalPulseShapes.cc:146
HcalPulseContainmentManager::hcalTimeSlew_delay_
const HcalTimeSlew * hcalTimeSlew_delay_
Definition: HcalPulseContainmentManager.h:43
HcalPulseContainmentCorrection::getCorrection
double getCorrection(double fc_ampl) const
Definition: HcalPulseContainmentCorrection.cc:51
HcalPulseShape
Definition: HcalPulseShape.h:6
submitPVValidationJobs.conditions
list conditions
Definition: submitPVValidationJobs.py:674
edm::Transition::BeginRun
phase2TrackerDigitizer_cfi.delay
delay
Definition: phase2TrackerDigitizer_cfi.py:49
HLT_FULL_cff.toAdd
toAdd
Definition: HLT_FULL_cff.py:52148
HcalPulseContainmentManager::delayToken_
const edm::ESGetToken< HcalTimeSlew, HcalTimeSlewRecord > delayToken_
Definition: HcalPulseContainmentManager.h:41