CMS 3D CMS Logo

Classes | Public Member Functions | Private Attributes

HcalPulseContainmentManager Class Reference

#include <HcalPulseContainmentManager.h>

List of all members.

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.

: entries_(),
  shapes_(),
  max_fracerror_(max_fracerror)
{
}

Member Function Documentation

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

Definition at line 11 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::beginRun(), and shapes_.

{

  shapes_.beginRun(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.

{

  /*
          int sub     = detId.subdet();
          int depth   = detId.depth();
          int inteta  = detId.ieta();
          int intphi  = detId.iphi();
          
          std::cout << "* HcalPulseContainmentManager::correction,   cell:" 
                    << " sub, ieta, iphi, depth = " 
                    << sub << "  " << inteta << "  " << intphi 
                    << "  " << depth  << "  toAaa= " << toAdd 
                    <<"  phase = " << fixedphase_ns << "  ampl = " 
                    << fc_ampl 
                    << std::endl;
  */

  return get(detId, toAdd, fixedphase_ns)->getCorrection(fc_ampl);
}
void HcalPulseContainmentManager::endRun ( )

Definition at line 18 of file HcalPulseContainmentManager.cc.

References HcalPulseShapes::endRun(), and shapes_.

{
  shapes_.endRun();
}
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_.

{
  // const HcalPulseShape * shape = &(shapes_.shape(detId));
  const HcalPulseShape * shape = &(shapes_.shapeForReco(detId));
  for(std::vector<HcalPulseContainmentEntry>::const_iterator entryItr = entries_.begin();
      entryItr != entries_.end(); ++entryItr)
  {
    if (entryItr->shape_ == shape && entryItr->toAdd_ == toAdd && entryItr->fixedphase_ns_ == fixedphase_ns)
    {
        return &entryItr->correction_;
    }
  }

  /*
          int sub     = detId.subdet();
          int depth   = detId.depth();
          int inteta  = detId.ieta();
          int intphi  = detId.iphi();
          
          std::cout << "* HcalPulseContainmentManager::get new entry,  cell:" 
                    << " sub, ieta, iphi, depth = " 
                    << sub << "  " << inteta << "  " << intphi 
                    << "  " << depth   
                    << std::endl;
  */

  // didn't find it.  Make one.
  HcalPulseContainmentEntry entry(toAdd, fixedphase_ns, shape,
    HcalPulseContainmentCorrection(shape, toAdd, fixedphase_ns, max_fracerror_));
  entries_.push_back(entry);
  return &(entries_.back().correction_);
} 

Member Data Documentation

Definition at line 28 of file HcalPulseContainmentManager.h.

Referenced by get().

Definition at line 30 of file HcalPulseContainmentManager.h.

Definition at line 31 of file HcalPulseContainmentManager.h.

Referenced by get().

Definition at line 29 of file HcalPulseContainmentManager.h.

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