CMS 3D CMS Logo

Public Member Functions | Private Attributes

HFSimParameters Class Reference

#include <HFSimParameters.h>

Inheritance diagram for HFSimParameters:
CaloSimParameters

List of all members.

Public Member Functions

double fCtoGeV (const DetId &detId) const
 HFSimParameters (const edm::ParameterSet &p)
 HFSimParameters (double simHitToPhotoelectrons, double photoelectronsToAnalog, double samplingFactor, double timePhase, bool syncPhase)
virtual double photoelectronsToAnalog (const DetId &detId) const
void setDbService (const HcalDbService *service)
virtual ~HFSimParameters ()

Private Attributes

const HcalDbServicetheDbService
double theSamplingFactor

Detailed Description

Definition at line 8 of file HFSimParameters.h.


Constructor & Destructor Documentation

HFSimParameters::HFSimParameters ( double  simHitToPhotoelectrons,
double  photoelectronsToAnalog,
double  samplingFactor,
double  timePhase,
bool  syncPhase 
)

Definition at line 11 of file HFSimParameters.cc.

HFSimParameters::HFSimParameters ( const edm::ParameterSet p)

Definition at line 20 of file HFSimParameters.cc.

:  CaloSimParameters(p),
   theDbService(0),
   theSamplingFactor( p.getParameter<double>("samplingFactor") )
{
}
virtual HFSimParameters::~HFSimParameters ( ) [inline, virtual]

Definition at line 15 of file HFSimParameters.h.

{}

Member Function Documentation

double HFSimParameters::fCtoGeV ( const DetId detId) const

{

Definition at line 34 of file HFSimParameters.cc.

References HcalDbService::getGain(), HcalDbService::getGainWidth(), HcalGain::getValue(), query::result, and theDbService.

Referenced by photoelectronsToAnalog().

{
  assert(theDbService != 0);
  HcalGenericDetId hcalGenDetId(detId);
  const HcalGain* gains = theDbService->getGain(hcalGenDetId);
  const HcalGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId);
  if (!gains || !gwidths )
  {
    edm::LogError("HcalAmplifier") << "Could not fetch HCAL conditions for channel " << hcalGenDetId;
  }
  // only one gain will be recorded per channel, so just use capID 0 for now
  
  double result = gains->getValue(0);
//  if(doNoise_)
//    result += CLHEP::RandGaussQ::shoot(0.,  gwidths->getValue(0));
//  }
  return result;
}
double HFSimParameters::photoelectronsToAnalog ( const DetId detId) const [virtual]

Reimplemented from CaloSimParameters.

Definition at line 28 of file HFSimParameters.cc.

References fCtoGeV(), CaloSimParameters::simHitToPhotoelectrons(), and theSamplingFactor.

{
  // pe/fC = pe/GeV * GeV/fC  = (0.24 pe/GeV * 6 for photomult * 0.2146GeV/fC)
  return 1./(theSamplingFactor * simHitToPhotoelectrons(detId) * fCtoGeV(detId));
}
void HFSimParameters::setDbService ( const HcalDbService service) [inline]

Definition at line 17 of file HFSimParameters.h.

References theDbService.

Referenced by HcalSimParameterMap::setDbService().

{theDbService = service;}

Member Data Documentation

Definition at line 24 of file HFSimParameters.h.

Referenced by fCtoGeV(), and setDbService().

Definition at line 25 of file HFSimParameters.h.

Referenced by photoelectronsToAnalog().