CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
HcalPulseContainmentCorrection
get (const HcalDetId &detId, int toAdd, float fixedphase_ns)
 
 HcalPulseContainmentManager (float max_fracerror)
 

Private Attributes

std::vector
< HcalPulseContainmentEntry
entries_
 
float fixedphase_ns_
 
float max_fracerror_
 
HcalPulseShapes shapes_
 

Detailed Description

Definition at line 8 of file HcalPulseContainmentManager.h.

Constructor & Destructor Documentation

HcalPulseContainmentManager::HcalPulseContainmentManager ( float  max_fracerror)

Definition at line 3 of file HcalPulseContainmentManager.cc.

4 : entries_(),
5  shapes_(),
6  max_fracerror_(max_fracerror)
7 {
8 }
std::vector< HcalPulseContainmentEntry > entries_

Member Function Documentation

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

Definition at line 11 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::beginRun(), and shapes_.

12 {
13 
14  shapes_.beginRun(es);
15 }
void beginRun(edm::EventSetup const &es)
double HcalPulseContainmentManager::correction ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns,
double  fc_ampl 
)

Definition at line 24 of file HcalPulseContainmentManager.cc.

References makeLayoutFileForGui::toAdd.

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

Definition at line 18 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::endRun(), and shapes_.

19 {
20  shapes_.endRun();
21 }
const HcalPulseContainmentCorrection * HcalPulseContainmentManager::get ( const HcalDetId detId,
int  toAdd,
float  fixedphase_ns 
)

Definition at line 48 of file HcalPulseContainmentManager.cc.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), rrapi.RRApi::columns(), rrapi.RRApi::count(), rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), rrapi.RRApi::reports(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), and rrapi.RRApi::workspaces().

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

Member Data Documentation

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

Definition at line 28 of file HcalPulseContainmentManager.h.

Referenced by get().

float HcalPulseContainmentManager::fixedphase_ns_
private

Definition at line 30 of file HcalPulseContainmentManager.h.

float HcalPulseContainmentManager::max_fracerror_
private

Definition at line 31 of file HcalPulseContainmentManager.h.

Referenced by get().

HcalPulseShapes HcalPulseContainmentManager::shapes_
private

Definition at line 29 of file HcalPulseContainmentManager.h.

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