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),

◆ 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")) {}

◆ ~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.

22 { return theHBParameters; }

References theHBParameters.

◆ heParameters()

const HcalSimParameters& HcalSimParameterMap::heParameters ( ) const
inline

Definition at line 23 of file HcalSimParameterMap.h.

23 { return theHEParameters; }

References theHEParameters.

◆ hfParameters1()

const HFSimParameters& HcalSimParameterMap::hfParameters1 ( ) const
inline

Definition at line 25 of file HcalSimParameterMap.h.

25 { return theHFParameters1; }

References theHFParameters1.

◆ hfParameters2()

const HFSimParameters& HcalSimParameterMap::hfParameters2 ( ) const
inline

Definition at line 26 of file HcalSimParameterMap.h.

26 { return theHFParameters2; }

References theHFParameters2.

◆ hoParameters()

const HcalSimParameters& HcalSimParameterMap::hoParameters ( ) const
inline

Definition at line 24 of file HcalSimParameterMap.h.

24 { return theHOParameters; }

References theHOParameters.

◆ setDbService()

void HcalSimParameterMap::setDbService ( const HcalDbService service)

◆ setFrameSize() [1/2]

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

Definition at line 85 of file HcalSimParameterMap.cc.

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 }

References ecalEBTriggerPrimitiveDigis_cfi::binOfMaximum.

◆ setFrameSize() [2/2]

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

Definition at line 68 of file HcalSimParameterMap.cc.

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 {
79  CaloSimParameters &parameters = const_cast<CaloSimParameters &>(simParameters(detId));
80  setFrameSize(parameters, frameSize);
81  }
82  }
83 }

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

◆ setHOHamamatsuDetIds()

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

Definition at line 34 of file HcalSimParameterMap.h.

34 { theHOHamamatsuDetIds = ids; }

References theHOHamamatsuDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

◆ setHOZecotekDetIds()

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

Definition at line 33 of file HcalSimParameterMap.h.

33 { theHOZecotekDetIds = ids; }

References theHOZecotekDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

◆ simParameters()

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

Implements CaloVSimParameterMap.

Definition at line 30 of file HcalSimParameterMap.cc.

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 }

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(), HcalDigitizer::finalizeEvent(), and setFrameSize().

◆ zdcParameters()

const HFSimParameters& HcalSimParameterMap::zdcParameters ( ) const
inline

Definition at line 27 of file HcalSimParameterMap.h.

27 { return theZDCParameters; }

References 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().

HcalSimParameterMap::theHFParameters1
HFSimParameters theHFParameters1
Definition: HcalSimParameterMap.h:44
HcalGenericDetId
Definition: HcalGenericDetId.h:15
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HFSimParameters::setDbService
void setDbService(const HcalDbService *service)
Definition: HFSimParameters.h:19
HcalSimParameterMap::theHFParameters2
HFSimParameters theHFParameters2
Definition: HcalSimParameterMap.h:45
HcalBarrel
Definition: HcalAssistant.h:33
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
HcalSimParameterMap::theHOHamamatsuSiPMParameters
HcalSimParameters theHOHamamatsuSiPMParameters
Definition: HcalSimParameterMap.h:43
CaloSimParameters
Main class for Parameters in different subdetectors.
Definition: CaloSimParameters.h:14
HcalOuter
Definition: HcalAssistant.h:35
edm::LogWarning
Definition: MessageLogger.h:141
HcalSimParameterMap::theHOZecotekDetIds
std::vector< HcalDetId > theHOZecotekDetIds
Definition: HcalSimParameterMap.h:47
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
HcalSimParameterMap::theHBParameters
HcalSimParameters theHBParameters
Definition: HcalSimParameterMap.h:39
HcalSimParameterMap::theZDCParameters
HFSimParameters theZDCParameters
Definition: HcalSimParameterMap.h:46
HcalSimParameterMap::setFrameSize
void setFrameSize(const DetId &detId, int frameSize)
Definition: HcalSimParameterMap.cc:68
HcalDetId
Definition: HcalDetId.h:12
HcalSimParameterMap::theHOZecotekSiPMParameters
HcalSimParameters theHOZecotekSiPMParameters
Definition: HcalSimParameterMap.h:42
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition: ecalEBTriggerPrimitiveDigis_cfi.py:9
HcalForward
Definition: HcalAssistant.h:36
HcalSimParameterMap::theHOParameters
HcalSimParameters theHOParameters
Definition: HcalSimParameterMap.h:41
HcalEndcap
Definition: HcalAssistant.h:34
HcalSimParameterMap::theHEParameters
HcalSimParameters theHEParameters
Definition: HcalSimParameterMap.h:40
HcalSimParameterMap::theHOHamamatsuDetIds
std::vector< HcalDetId > theHOHamamatsuDetIds
Definition: HcalSimParameterMap.h:48
HcalSimParameterMap::simParameters
const CaloSimParameters & simParameters(const DetId &id) const override
Definition: HcalSimParameterMap.cc:30
HcalSimParameters::setDbService
void setDbService(const HcalDbService *service)
Definition: HcalSimParameters.cc:56