CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalSimParameterMap Class Reference

#include <HcalSimParameterMap.h>

Inheritance diagram for HcalSimParameterMap:
CaloVSimParameterMap

Public Member Functions

const HcalSimParametershbParameters () const
 accessors More...
 
 HcalSimParameterMap ()
 hardcoded default parameters More...
 
 HcalSimParameterMap (const edm::ParameterSet &p)
 configurable parameters More...
 
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)
 
const CaloSimParameterssimParameters (const DetId &id) const override
 
const HFSimParameterszdcParameters () const
 
 ~HcalSimParameterMap () override
 
- Public Member Functions inherited from CaloVSimParameterMap
virtual ~CaloVSimParameterMap ()=default
 

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() [1/2]

HcalSimParameterMap::HcalSimParameterMap ( )

hardcoded default parameters

Definition at line 8 of file HcalSimParameterMap.cc.

9  : theHBParameters(2000., 117, 5, 10, 5, true, true, 1, std::vector<double>(16, 117.), 10.),
10  theHEParameters(2000., 178, 5, 10, 5, true, true, 16, std::vector<double>(16, 178.), 10.),
11  theHOParameters(4000., 217., 5, 10, 5, true, true, 1, std::vector<double>(16, 217.), 5.),
12  theHOZecotekSiPMParameters(4000., 217., 5, 10, 5, true, true, 1, std::vector<double>(16, 217.), 5.),
13  theHOHamamatsuSiPMParameters(4000., 217., 5, 10, 5, true, true, 1, std::vector<double>(16, 217.), 5.),
14  theHFParameters1(6., 2.79, 1 / 0.278, -4, true),
15  theHFParameters2(6., 2.06, 1 / 0.267, -4, true),
16  theZDCParameters(1., 4.3333, 2.09, -4, false),
HcalSimParameters theHBParameters
HcalSimParameters theHOHamamatsuSiPMParameters
std::vector< HcalDetId > theHOZecotekDetIds
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
std::vector< HcalDetId > theHOHamamatsuDetIds
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters

◆ HcalSimParameterMap() [2/2]

HcalSimParameterMap::HcalSimParameterMap ( const edm::ParameterSet p)

configurable parameters

Definition at line 20 of file HcalSimParameterMap.cc.

21  : theHBParameters(p.getParameter<edm::ParameterSet>("hb")),
22  theHEParameters(p.getParameter<edm::ParameterSet>("he")),
23  theHOParameters(p.getParameter<edm::ParameterSet>("ho")),
24  theHOZecotekSiPMParameters(p.getParameter<edm::ParameterSet>("hoZecotek")),
25  theHOHamamatsuSiPMParameters(p.getParameter<edm::ParameterSet>("hoHamamatsu")),
26  theHFParameters1(p.getParameter<edm::ParameterSet>("hf1")),
27  theHFParameters2(p.getParameter<edm::ParameterSet>("hf2")),
28  theZDCParameters(p.getParameter<edm::ParameterSet>("zdc")) {}
HcalSimParameters theHBParameters
HcalSimParameters theHOHamamatsuSiPMParameters
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters

◆ ~HcalSimParameterMap()

HcalSimParameterMap::~HcalSimParameterMap ( )
inlineoverride

Definition at line 17 of file HcalSimParameterMap.h.

17 {}

Member Function Documentation

◆ hbParameters()

const HcalSimParameters& HcalSimParameterMap::hbParameters ( ) const
inline

accessors

Definition at line 22 of file HcalSimParameterMap.h.

References theHBParameters.

22 { return theHBParameters; }
HcalSimParameters theHBParameters

◆ heParameters()

const HcalSimParameters& HcalSimParameterMap::heParameters ( ) const
inline

Definition at line 23 of file HcalSimParameterMap.h.

References theHEParameters.

23 { return theHEParameters; }
HcalSimParameters theHEParameters

◆ hfParameters1()

const HFSimParameters& HcalSimParameterMap::hfParameters1 ( ) const
inline

Definition at line 25 of file HcalSimParameterMap.h.

References theHFParameters1.

25 { return theHFParameters1; }
HFSimParameters theHFParameters1

◆ hfParameters2()

const HFSimParameters& HcalSimParameterMap::hfParameters2 ( ) const
inline

Definition at line 26 of file HcalSimParameterMap.h.

References theHFParameters2.

26 { return theHFParameters2; }
HFSimParameters theHFParameters2

◆ hoParameters()

const HcalSimParameters& HcalSimParameterMap::hoParameters ( ) const
inline

Definition at line 24 of file HcalSimParameterMap.h.

References theHOParameters.

24 { return theHOParameters; }
HcalSimParameters theHOParameters

◆ setDbService()

void HcalSimParameterMap::setDbService ( const HcalDbService service)

Definition at line 57 of file HcalSimParameterMap.cc.

References HFSimParameters::setDbService(), HcalSimParameters::setDbService(), theHBParameters, theHEParameters, theHFParameters1, theHFParameters2, theHOHamamatsuSiPMParameters, theHOParameters, theHOZecotekSiPMParameters, and theZDCParameters.

Referenced by HcalSignalGenerator< HBHEDigitizerTraits >::initializeEvent(), and HcalDigitizer::initializeEvent().

57  {
58  theHBParameters.setDbService(dbService);
59  theHEParameters.setDbService(dbService);
60  theHOParameters.setDbService(dbService);
63  theHFParameters1.setDbService(dbService);
64  theHFParameters2.setDbService(dbService);
65  theZDCParameters.setDbService(dbService);
66 }
HcalSimParameters theHBParameters
void setDbService(const HcalDbService *service)
HcalSimParameters theHOHamamatsuSiPMParameters
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
void setDbService(const HcalDbService *service)
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters

◆ setFrameSize() [1/2]

void HcalSimParameterMap::setFrameSize ( const DetId detId,
int  frameSize 
)

Definition at line 68 of file HcalSimParameterMap.cc.

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

68  {
69  HcalGenericDetId genericId(detId);
70  if (genericId.isHcalZDCDetId())
71  setFrameSize(theZDCParameters, frameSize);
72  else {
73  HcalDetId hcalDetId(detId);
74  if (hcalDetId.subdet() == HcalForward) {
75  // do both depths
76  setFrameSize(theHFParameters1, frameSize);
77  setFrameSize(theHFParameters2, frameSize);
78  } else {
80  setFrameSize(parameters, frameSize);
81  }
82  }
83 }
const CaloSimParameters & simParameters(const DetId &id) const override
Main class for Parameters in different subdetectors.
void setFrameSize(const DetId &detId, int frameSize)
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
HFSimParameters theZDCParameters

◆ setFrameSize() [2/2]

void HcalSimParameterMap::setFrameSize ( CaloSimParameters parameters,
int  frameSize 
)
private

Definition at line 85 of file HcalSimParameterMap.cc.

References ecalEBTriggerPrimitiveDigis_cfi::binOfMaximum.

85  {
86  int binOfMaximum = 5;
87  if (frameSize == 10) {
88  } else if (frameSize == 6)
89  binOfMaximum = 4;
90  else {
91  edm::LogError("HcalSimParameterMap") << "Bad HCAL frame size " << frameSize;
92  }
93  if (parameters.readoutFrameSize() != frameSize) {
94  edm::LogWarning("HcalSignalGenerator") << "Mismatch in frame sizes. Setting to " << frameSize;
95  parameters.setReadoutFrameSize(frameSize);
96  parameters.setBinOfMaximum(binOfMaximum);
97  }
98 }
Log< level::Error, false > LogError
Log< level::Warning, false > LogWarning

◆ setHOHamamatsuDetIds()

void HcalSimParameterMap::setHOHamamatsuDetIds ( const std::vector< HcalDetId > &  ids)
inline

Definition at line 34 of file HcalSimParameterMap.h.

References theHOHamamatsuDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

34 { theHOHamamatsuDetIds = ids; }
std::vector< HcalDetId > theHOHamamatsuDetIds

◆ setHOZecotekDetIds()

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

Definition at line 33 of file HcalSimParameterMap.h.

References theHOZecotekDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

33 { theHOZecotekDetIds = ids; }
std::vector< HcalDetId > theHOZecotekDetIds

◆ simParameters()

const CaloSimParameters & HcalSimParameterMap::simParameters ( const DetId id) const
overridevirtual

Implements CaloVSimParameterMap.

Definition at line 30 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 HcalElectronicsSim::analogToDigital(), HcalBaseSignalGenerator::fC2pe(), and setFrameSize().

30  {
31  HcalGenericDetId genericId(detId);
32  if (genericId.isHcalZDCDetId())
33  return theZDCParameters;
34  HcalDetId hcalDetId(detId);
35  if (hcalDetId.subdet() == HcalBarrel) {
36  return theHBParameters;
37  } else if (hcalDetId.subdet() == HcalEndcap) {
38  return theHEParameters;
39  } else if (hcalDetId.subdet() == HcalOuter) {
40  if (std::find(theHOZecotekDetIds.begin(), theHOZecotekDetIds.end(), hcalDetId) != theHOZecotekDetIds.end()) {
42  }
43  if (std::find(theHOHamamatsuDetIds.begin(), theHOHamamatsuDetIds.end(), hcalDetId) != theHOHamamatsuDetIds.end()) {
45  } else {
46  return theHOParameters;
47  }
48  } else { // HF
49  if (hcalDetId.depth() == 1 || hcalDetId.depth() == 3) {
50  return theHFParameters1;
51  } else {
52  return theHFParameters2;
53  }
54  }
55 }
HcalSimParameters theHBParameters
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HcalSimParameters theHOHamamatsuSiPMParameters
std::vector< HcalDetId > theHOZecotekDetIds
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
std::vector< HcalDetId > theHOHamamatsuDetIds
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters

◆ zdcParameters()

const HFSimParameters& HcalSimParameterMap::zdcParameters ( ) const
inline

Definition at line 27 of file HcalSimParameterMap.h.

References theZDCParameters.

27 { return theZDCParameters; }
HFSimParameters theZDCParameters

Member Data Documentation

◆ theHBParameters

HcalSimParameters HcalSimParameterMap::theHBParameters
private

Definition at line 39 of file HcalSimParameterMap.h.

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

◆ theHEParameters

HcalSimParameters HcalSimParameterMap::theHEParameters
private

Definition at line 40 of file HcalSimParameterMap.h.

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

◆ theHFParameters1

HFSimParameters HcalSimParameterMap::theHFParameters1
private

Definition at line 44 of file HcalSimParameterMap.h.

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

◆ theHFParameters2

HFSimParameters HcalSimParameterMap::theHFParameters2
private

Definition at line 45 of file HcalSimParameterMap.h.

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

◆ theHOHamamatsuDetIds

std::vector<HcalDetId> HcalSimParameterMap::theHOHamamatsuDetIds
private

Definition at line 48 of file HcalSimParameterMap.h.

Referenced by setHOHamamatsuDetIds(), and simParameters().

◆ theHOHamamatsuSiPMParameters

HcalSimParameters HcalSimParameterMap::theHOHamamatsuSiPMParameters
private

Definition at line 43 of file HcalSimParameterMap.h.

Referenced by setDbService(), and simParameters().

◆ theHOParameters

HcalSimParameters HcalSimParameterMap::theHOParameters
private

Definition at line 41 of file HcalSimParameterMap.h.

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

◆ theHOZecotekDetIds

std::vector<HcalDetId> HcalSimParameterMap::theHOZecotekDetIds
private

Definition at line 47 of file HcalSimParameterMap.h.

Referenced by setHOZecotekDetIds(), and simParameters().

◆ theHOZecotekSiPMParameters

HcalSimParameters HcalSimParameterMap::theHOZecotekSiPMParameters
private

Definition at line 42 of file HcalSimParameterMap.h.

Referenced by setDbService(), and simParameters().

◆ theZDCParameters

HFSimParameters HcalSimParameterMap::theZDCParameters
private

Definition at line 46 of file HcalSimParameterMap.h.

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