CMS 3D CMS Logo

Public Member Functions | Private Attributes

CastorSimParameters Class Reference

#include <CastorSimParameters.h>

Inheritance diagram for CastorSimParameters:
CaloSimParameters

List of all members.

Public Member Functions

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

Private Attributes

const CastorDbServicetheDbService
double theSamplingFactor

Detailed Description

Definition at line 8 of file CastorSimParameters.h.


Constructor & Destructor Documentation

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

Definition at line 11 of file CastorSimParameters.cc.

CastorSimParameters::CastorSimParameters ( const edm::ParameterSet p)

Definition at line 33 of file CastorSimParameters.cc.

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

Definition at line 24 of file CastorSimParameters.h.

{}

Member Function Documentation

double CastorSimParameters::fCtoGeV ( const DetId detId) const

{

Definition at line 71 of file CastorSimParameters.cc.

References CastorDbService::getGain(), CastorDbService::getGainWidth(), CastorGain::getValue(), query::result, and theDbService.

Referenced by photoelectronsToAnalog().

{
  assert(theDbService != 0);
  HcalGenericDetId hcalGenDetId(detId);
  const CastorGain* gains = theDbService->getGain(hcalGenDetId);
  const CastorGainWidth* gwidths = theDbService->getGainWidth(hcalGenDetId);
  if (!gains || !gwidths )
  {
    edm::LogError("CastorAmplifier") << "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 CastorSimParameters::photoelectronsToAnalog ( const DetId detId) const [virtual]

Reimplemented from CaloSimParameters.

Definition at line 63 of file CastorSimParameters.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 CastorSimParameters::setDbService ( const CastorDbService service) [inline]

Definition at line 26 of file CastorSimParameters.h.

References theDbService.

Referenced by CastorSimParameterMap::setDbService().

{theDbService = service;}

Member Data Documentation

the ratio of actual incident energy to deposited energy in the SimHit

Definition at line 40 of file CastorSimParameters.h.

Referenced by fCtoGeV(), and setDbService().

Definition at line 41 of file CastorSimParameters.h.

Referenced by photoelectronsToAnalog().