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)
 
double correction (const HcalDetId &detId, int toAdd, float fixedphase_ns, double fc_ampl)
 
void endRun ()
 
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 9 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)
double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 29 of file HcalPulseContainmentManager.cc.

References pfDeepCMVAJetTags_cfi::toAdd.

31 {
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 }
void HcalPulseContainmentManager::endRun ( )

Definition at line 24 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::endRun(), and shapes_.

Referenced by SimpleHBHEPhase1Algo::endRun().

25 {
26  shapes_.endRun();
27 }
const HcalPulseContainmentCorrection * HcalPulseContainmentManager::get ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns 
)

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

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

Definition at line 18 of file HcalPulseContainmentManager.h.

References hcalTimeSlew_delay_.

18  {
19  hcalTimeSlew_delay_ = timeSlew;
20  }

Member Data Documentation

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

Definition at line 32 of file HcalPulseContainmentManager.h.

Referenced by get().

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 34 of file HcalPulseContainmentManager.h.

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

Definition at line 35 of file HcalPulseContainmentManager.h.

Referenced by get().

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 33 of file HcalPulseContainmentManager.h.

Referenced by beginRun(), endRun(), and get().