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)
 
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 ( float  max_fracerror)

Definition at line 7 of file HcalPulseContainmentManager.cc.

References hcalTimeSlew_delay_.

8  : entries_(), shapes_(), max_fracerror_(max_fracerror) {
9  hcalTimeSlew_delay_ = nullptr;
10 }
std::vector< HcalPulseContainmentEntry > entries_

Member Function Documentation

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

Definition at line 12 of file HcalPulseContainmentManager.cc.

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

Referenced by SimpleHBHEPhase1Algo::beginRun().

12  {
14  es.get<HcalTimeSlewRecord>().get("HBHE", delay);
15  hcalTimeSlew_delay_ = &*delay;
16 
17  shapes_.beginRun(es);
18 }
void beginRun(edm::EventSetup const &es)
void HcalPulseContainmentManager::beginRun ( const HcalDbService conditions,
const HcalTimeSlew delay 
)

Definition at line 20 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::beginRun(), hcalTimeSlew_delay_, and shapes_.

20  {
21  hcalTimeSlew_delay_ = delay;
22 
23  shapes_.beginRun(conditions);
24 }
void beginRun(edm::EventSetup const &es)
double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 26 of file HcalPulseContainmentManager.cc.

References HLT_2018_cff::toAdd.

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 }
const HcalPulseContainmentCorrection * HcalPulseContainmentManager::get ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns 
)

Definition at line 45 of file HcalPulseContainmentManager.cc.

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

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

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 }
const Shape & shapeForReco(const HcalDetId &detId) const
std::vector< HcalPulseContainmentEntry > entries_
void HcalPulseContainmentManager::setTimeSlew ( const HcalTimeSlew timeSlew)
inline

Definition at line 19 of file HcalPulseContainmentManager.h.

References hcalTimeSlew_delay_.

19 { hcalTimeSlew_delay_ = timeSlew; }

Member Data Documentation

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

Definition at line 34 of file HcalPulseContainmentManager.h.

Referenced by get().

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 36 of file HcalPulseContainmentManager.h.

const HcalTimeSlew* HcalPulseContainmentManager::hcalTimeSlew_delay_
private
float HcalPulseContainmentManager::max_fracerror_
private

Definition at line 37 of file HcalPulseContainmentManager.h.

Referenced by get().

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 35 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), and get().