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 HcalTopology *topo, const edm::ESHandle< HcalTimeSlew > &delay, const edm::ESHandle< HcalMCParams > &mcParams, const edm::ESHandle< HcalRecoParams > &recoParams)
 
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)
void HcalPulseContainmentManager::beginRun ( const HcalTopology topo,
const edm::ESHandle< HcalTimeSlew > &  delay,
const edm::ESHandle< HcalMCParams > &  mcParams,
const edm::ESHandle< HcalRecoParams > &  recoParams 
)

Definition at line 29 of file HcalPulseContainmentManager.cc.

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

30 {
31  hcalTimeSlew_delay_ = &*delay;
32 
33  shapes_.beginRun(topo, mcParams, recoParams);
34 }
void beginRun(edm::EventSetup const &es)
double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 36 of file HcalPulseContainmentManager.cc.

References pfDeepCMVAJetTags_cfi::toAdd.

38 {
39 
40  /*
41  int sub = detId.subdet();
42  int depth = detId.depth();
43  int inteta = detId.ieta();
44  int intphi = detId.iphi();
45 
46  std::cout << "* HcalPulseContainmentManager::correction, cell:"
47  << " sub, ieta, iphi, depth = "
48  << sub << " " << inteta << " " << intphi
49  << " " << depth << " toAaa= " << toAdd
50  <<" phase = " << fixedphase_ns << " ampl = "
51  << fc_ampl
52  << std::endl;
53  */
54 
55  return get(detId, toAdd, fixedphase_ns)->getCorrection(fc_ampl);
56 }
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 59 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().

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