#include <HcalShapes.h>
Public Member Functions | |
void | beginRun (edm::EventSetup const &es) |
void | endRun () |
HcalShapes () | |
virtual const CaloVShape * | shape (const DetId &detId) const |
~HcalShapes () | |
Private Attributes | |
HcalShape | theHcalShape |
HFShape | theHFShape |
const HcalMCParams * | theMCParams |
std::vector< const CaloVShape * > | theShapes |
HcalSiPMShape | theSiPMShape |
ZDCShape | theZDCShape |
Definition at line 19 of file HcalShapes.h.
HcalShapes::HcalShapes | ( | ) |
Definition at line 11 of file HcalShapes.cc.
References theHcalShape, theHFShape, theShapes, theSiPMShape, and theZDCShape.
: theMCParams(0), theShapes(5), theHcalShape(), theHFShape(), theZDCShape(), theSiPMShape() { theShapes[0] = new CaloCachedShapeIntegrator(&theHcalShape); theShapes[1] = new CaloCachedShapeIntegrator(&theHcalShape); theShapes[2] = new CaloCachedShapeIntegrator(&theSiPMShape); theShapes[3] = new CaloCachedShapeIntegrator(&theHFShape); theShapes[4] = new CaloCachedShapeIntegrator(&theZDCShape); }
HcalShapes::~HcalShapes | ( | ) |
Definition at line 27 of file HcalShapes.cc.
References theMCParams, and theShapes.
{ for(std::vector<const CaloVShape *>::const_iterator shapeItr = theShapes.begin(); shapeItr != theShapes.end(); ++shapeItr) { delete *shapeItr; } theShapes.clear(); delete theMCParams; }
void HcalShapes::beginRun | ( | edm::EventSetup const & | es | ) |
Definition at line 39 of file HcalShapes.cc.
References edm::EventSetup::get(), AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), and theMCParams.
Referenced by HcalDigitizer::beginRun().
{ edm::ESHandle<HcalMCParams> p; es.get<HcalMCParamsRcd>().get(p); theMCParams = new HcalMCParams(*p.product()); }
void HcalShapes::endRun | ( | void | ) |
Definition at line 47 of file HcalShapes.cc.
References theMCParams.
Referenced by HcalDigitizer::endRun().
{ delete theMCParams; theMCParams = 0; }
const CaloVShape * HcalShapes::shape | ( | const DetId & | detId | ) | const [virtual] |
Reimplemented from CaloShapes.
Definition at line 54 of file HcalShapes.cc.
References HcalGenericDetId::genericSubdet(), HcalCondObjectContainer< Item >::getValues(), HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalGenericDetId::HcalGenZDC, HcalMCParam::signalShape(), theMCParams, and theShapes.
{ if(!theMCParams) { edm::LogWarning("HcalShapes") << "Cannot find HCAL MC Params "; // try to figure the appropriate shape HcalGenericDetId::HcalGenericSubdetector subdet = HcalGenericDetId(detId).genericSubdet(); if(subdet == HcalGenericDetId::HcalGenBarrel || subdet == HcalGenericDetId::HcalGenEndcap) return theShapes[0]; else if(subdet == HcalGenericDetId::HcalGenOuter) return theShapes[2]; else if(subdet == HcalGenericDetId::HcalGenForward) return theShapes[3]; else if(subdet == HcalGenericDetId::HcalGenZDC) return theShapes[4]; else return 0; } int shapeType = theMCParams->getValues(detId)->signalShape(); return theShapes.at(shapeType); }
HcalShape HcalShapes::theHcalShape [private] |
Definition at line 33 of file HcalShapes.h.
Referenced by HcalShapes().
HFShape HcalShapes::theHFShape [private] |
Definition at line 34 of file HcalShapes.h.
Referenced by HcalShapes().
const HcalMCParams* HcalShapes::theMCParams [private] |
Definition at line 31 of file HcalShapes.h.
Referenced by beginRun(), endRun(), shape(), and ~HcalShapes().
std::vector<const CaloVShape *> HcalShapes::theShapes [private] |
Definition at line 32 of file HcalShapes.h.
Referenced by HcalShapes(), shape(), and ~HcalShapes().
HcalSiPMShape HcalShapes::theSiPMShape [private] |
Definition at line 36 of file HcalShapes.h.
Referenced by HcalShapes().
ZDCShape HcalShapes::theZDCShape [private] |
Definition at line 35 of file HcalShapes.h.
Referenced by HcalShapes().