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_(),
9  shapes_(),
10  max_fracerror_(max_fracerror)
11 {
12  hcalTimeSlew_delay_ = nullptr;
13 }
std::vector< HcalPulseContainmentEntry > entries_

Member Function Documentation

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

Definition at line 15 of file HcalPulseContainmentManager.cc.

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

Referenced by SimpleHBHEPhase1Algo::beginRun().

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

Definition at line 24 of file HcalPulseContainmentManager.cc.

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

25 {
26  hcalTimeSlew_delay_ = delay;
27 
28  shapes_.beginRun(conditions);
29 }
void beginRun(edm::EventSetup const &es)
double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 31 of file HcalPulseContainmentManager.cc.

References pfDeepCMVAJetTags_cfi::toAdd.

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

Definition at line 54 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(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), util.rrapi.RRApi::data(), rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), 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(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

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

Member Data Documentation

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

Definition at line 33 of file HcalPulseContainmentManager.h.

Referenced by get().

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 35 of file HcalPulseContainmentManager.h.

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

Definition at line 36 of file HcalPulseContainmentManager.h.

Referenced by get().

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 34 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), and get().