CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

HcalSimParameterMap Class Reference

#include <HcalSimParameterMap.h>

Inheritance diagram for HcalSimParameterMap:
CaloVSimParameterMap

List of all members.

Public Member Functions

const HcalSimParametershbParameters () const
 accessors
 HcalSimParameterMap ()
 hardcoded default parameters
 HcalSimParameterMap (const edm::ParameterSet &p)
 configurable parameters
const HcalSimParametersheParameters () const
const HFSimParametershfParameters1 () const
const HFSimParametershfParameters2 () const
const HcalSimParametershoParameters () const
void setDbService (const HcalDbService *service)
void setFrameSize (const DetId &detId, int frameSize)
void setHOHamamatsuDetIds (const std::vector< HcalDetId > &ids)
void setHOZecotekDetIds (const std::vector< HcalDetId > &ids)
virtual const CaloSimParameterssimParameters (const DetId &id) const
const HFSimParameterszdcParameters () const
virtual ~HcalSimParameterMap ()

Private Member Functions

void setFrameSize (CaloSimParameters &parameters, int frameSize)

Private Attributes

HcalSimParameters theHBParameters
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
std::vector< HcalDetIdtheHOHamamatsuDetIds
HcalSimParameters theHOHamamatsuSiPMParameters
HcalSimParameters theHOParameters
std::vector< HcalDetIdtheHOZecotekDetIds
HcalSimParameters theHOZecotekSiPMParameters
HFSimParameters theZDCParameters

Detailed Description

Definition at line 10 of file HcalSimParameterMap.h.


Constructor & Destructor Documentation

HcalSimParameterMap::HcalSimParameterMap ( )

hardcoded default parameters

Definition at line 8 of file HcalSimParameterMap.cc.

References theHOHamamatsuSiPMParameters, theHOZecotekSiPMParameters, and HcalSimParameters::thePixels.

                                         :
  theHBParameters(2000., std::vector<double>(16, 0.3305),
                  117, 5, 
                  10, 5, true, true,
                  1, std::vector<double>(16, 117.)),
  theHEParameters(2000., std::vector<double>(16, 0.3305),
                  178, 5,
                  10, 5, true, true,
                  16, std::vector<double>(16, 178.)),
  theHOParameters( 4000., std::vector<double>(16, 0.3065), 
                   217., 5, 
                   10, 5, true, true,
                   1, std::vector<double>(16, 217.)),
  theHOZecotekSiPMParameters( 4000., std::vector<double>(16, 3.0), // 1 mip = 15 pe = 45 fC
                   217., 5,
                   10, 5, true, true,
                   1, std::vector<double>(16, 217.)),
  theHOHamamatsuSiPMParameters( 4000., std::vector<double>(16, 3.0),
                   217., 5,
                   10, 5, true, true,
                   1, std::vector<double>(16, 217.)),
  theHFParameters1(6., 2.79,
                   1/0.278 , -4,
                   true),
  theHFParameters2(6., 2.06,
                   1/0.267 , -4,
                   true),
  theZDCParameters(1., 4.3333,
                   2.09 , -4,
                   false),
  theHOZecotekDetIds(),
  theHOHamamatsuDetIds()
{
  theHOZecotekSiPMParameters.thePixels = 36000;
  theHOHamamatsuSiPMParameters.thePixels = 960;
}
HcalSimParameterMap::HcalSimParameterMap ( const edm::ParameterSet p)
virtual HcalSimParameterMap::~HcalSimParameterMap ( ) [inline, virtual]

Definition at line 18 of file HcalSimParameterMap.h.

{}

Member Function Documentation

const HcalSimParameters& HcalSimParameterMap::hbParameters ( ) const [inline]

accessors

Definition at line 23 of file HcalSimParameterMap.h.

References theHBParameters.

{return theHBParameters;}
const HcalSimParameters& HcalSimParameterMap::heParameters ( ) const [inline]

Definition at line 24 of file HcalSimParameterMap.h.

References theHEParameters.

{return theHEParameters;}
const HFSimParameters& HcalSimParameterMap::hfParameters1 ( ) const [inline]

Definition at line 26 of file HcalSimParameterMap.h.

References theHFParameters1.

{return theHFParameters1;}
const HFSimParameters& HcalSimParameterMap::hfParameters2 ( ) const [inline]

Definition at line 27 of file HcalSimParameterMap.h.

References theHFParameters2.

{return theHFParameters2;}
const HcalSimParameters& HcalSimParameterMap::hoParameters ( ) const [inline]

Definition at line 25 of file HcalSimParameterMap.h.

References theHOParameters.

{return theHOParameters;}
void HcalSimParameterMap::setDbService ( const HcalDbService service)
void HcalSimParameterMap::setFrameSize ( const DetId detId,
int  frameSize 
)

Definition at line 109 of file HcalSimParameterMap.cc.

References HcalForward, HcalGenericDetId::isHcalZDCDetId(), ExpressReco_HICollisions_FallBack::parameters, simParameters(), HcalDetId::subdet(), theHFParameters1, theHFParameters2, and theZDCParameters.

Referenced by HcalSignalGenerator< HBHEDigitizerTraits >::fill().

{
  HcalGenericDetId genericId(detId);
  if(genericId.isHcalZDCDetId())
    setFrameSize(theZDCParameters, frameSize);
  else
  {
    HcalDetId hcalDetId(detId);
    if(hcalDetId.subdet() == HcalForward) {
      // do both depths
      setFrameSize(theHFParameters1,frameSize);
      setFrameSize(theHFParameters2,frameSize);
    }
    else
    {
      CaloSimParameters & parameters = const_cast<CaloSimParameters &>(simParameters(detId));
      setFrameSize(parameters, frameSize);
    }
  }
}
void HcalSimParameterMap::setFrameSize ( CaloSimParameters parameters,
int  frameSize 
) [private]

Definition at line 131 of file HcalSimParameterMap.cc.

References ecalTPGAnalyzer_cfg::binOfMaximum, CaloSimParameters::readoutFrameSize(), CaloSimParameters::setBinOfMaximum(), and CaloSimParameters::setReadoutFrameSize().

{
  int binOfMaximum = 5;
  if(frameSize == 10) {}
  else if(frameSize == 6) binOfMaximum = 4;
  else {
    edm::LogError("HcalSimParameterMap")<< "Bad HCAL frame size " << frameSize;
  }
  if(parameters.readoutFrameSize() != frameSize)
  {
    edm::LogWarning("HcalSignalGenerator")<< "Mismatch in frame sizes.  Setting to " << frameSize;
    parameters.setReadoutFrameSize(frameSize);
    parameters.setBinOfMaximum(binOfMaximum);
  }
}
void HcalSimParameterMap::setHOHamamatsuDetIds ( const std::vector< HcalDetId > &  ids) [inline]

Definition at line 38 of file HcalSimParameterMap.h.

References theHOHamamatsuDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

void HcalSimParameterMap::setHOZecotekDetIds ( const std::vector< HcalDetId > &  ids) [inline]

Definition at line 34 of file HcalSimParameterMap.h.

References theHOZecotekDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

  {
    theHOZecotekDetIds = ids;
  }
const CaloSimParameters & HcalSimParameterMap::simParameters ( const DetId id) const [virtual]

Implements CaloVSimParameterMap.

Definition at line 64 of file HcalSimParameterMap.cc.

References HcalDetId::depth(), spr::find(), HcalBarrel, HcalEndcap, HcalOuter, HcalGenericDetId::isHcalZDCDetId(), HcalDetId::subdet(), theHBParameters, theHEParameters, theHFParameters1, theHFParameters2, theHOHamamatsuDetIds, theHOHamamatsuSiPMParameters, theHOParameters, theHOZecotekDetIds, theHOZecotekSiPMParameters, and theZDCParameters.

Referenced by HcalBaseSignalGenerator::fC2pe(), and setFrameSize().

                                                                                      {
  HcalGenericDetId genericId(detId);
  if(genericId.isHcalZDCDetId())
    return theZDCParameters;
  HcalDetId hcalDetId(detId);
  if(hcalDetId.subdet() == HcalBarrel) {
     return theHBParameters;
  } else if(hcalDetId.subdet() == HcalEndcap) {
     return theHEParameters;
  } else if(hcalDetId.subdet() == HcalOuter) {
     if(std::find(theHOZecotekDetIds.begin(),
        theHOZecotekDetIds.end(), hcalDetId) != theHOZecotekDetIds.end())
     {
       return theHOZecotekSiPMParameters;
     }
     if(std::find(theHOHamamatsuDetIds.begin(),
        theHOHamamatsuDetIds.end(), hcalDetId) != theHOHamamatsuDetIds.end())
     {
       return theHOHamamatsuSiPMParameters;
     }
     else
     {
       return theHOParameters;
     }
  } else { // HF
    if(hcalDetId.depth() == 1) {
      return theHFParameters1;
    } else {
      return theHFParameters2;
    }
  }
}
const HFSimParameters& HcalSimParameterMap::zdcParameters ( ) const [inline]

Definition at line 28 of file HcalSimParameterMap.h.

References theZDCParameters.

{return theZDCParameters;}

Member Data Documentation

Definition at line 46 of file HcalSimParameterMap.h.

Referenced by hbParameters(), setDbService(), and simParameters().

Definition at line 47 of file HcalSimParameterMap.h.

Referenced by heParameters(), setDbService(), and simParameters().

Definition at line 51 of file HcalSimParameterMap.h.

Referenced by hfParameters1(), setDbService(), setFrameSize(), and simParameters().

Definition at line 52 of file HcalSimParameterMap.h.

Referenced by hfParameters2(), setDbService(), setFrameSize(), and simParameters().

Definition at line 55 of file HcalSimParameterMap.h.

Referenced by setHOHamamatsuDetIds(), and simParameters().

Definition at line 50 of file HcalSimParameterMap.h.

Referenced by HcalSimParameterMap(), setDbService(), and simParameters().

Definition at line 48 of file HcalSimParameterMap.h.

Referenced by hoParameters(), setDbService(), and simParameters().

Definition at line 54 of file HcalSimParameterMap.h.

Referenced by setHOZecotekDetIds(), and simParameters().

Definition at line 49 of file HcalSimParameterMap.h.

Referenced by HcalSimParameterMap(), setDbService(), and simParameters().

Definition at line 53 of file HcalSimParameterMap.h.

Referenced by setDbService(), setFrameSize(), simParameters(), and zdcParameters().