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::HcalSimParameterMap ( )

hardcoded default parameters

Definition at line 8 of file HcalSimParameterMap.cc.

8  :
9  theHBParameters(2000.,
10  117, 5,
11  10, 5, true, true,
12  1, std::vector<double>(16, 117.), 10.),
13  theHEParameters(2000.,
14  178, 5,
15  10, 5, true, true,
16  16, std::vector<double>(16, 178.), 10.),
17  theHOParameters( 4000.,
18  217., 5,
19  10, 5, true, true,
20  1, std::vector<double>(16, 217.), 5.),
22  217., 5,
23  10, 5, true, true,
24  1, std::vector<double>(16, 217.), 5.),
26  217., 5,
27  10, 5, true, true,
28  1, std::vector<double>(16, 217.), 5.),
29  theHFParameters1(6., 2.79,
30  1/0.278 , -4,
31  true),
32  theHFParameters2(6., 2.06,
33  1/0.267 , -4,
34  true),
35  theZDCParameters(1., 4.3333,
36  2.09 , -4,
37  false),
40 {
41 }
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::HcalSimParameterMap ( const edm::ParameterSet p)

configurable parameters

Definition at line 43 of file HcalSimParameterMap.cc.

52 {
53 }
T getParameter(std::string const &) const
HcalSimParameters theHBParameters
HcalSimParameters theHOHamamatsuSiPMParameters
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters
HcalSimParameterMap::~HcalSimParameterMap ( )
inlineoverride

Definition at line 18 of file HcalSimParameterMap.h.

References simParameters().

18 {}

Member Function Documentation

const HcalSimParameters& HcalSimParameterMap::hbParameters ( ) const
inline

accessors

Definition at line 23 of file HcalSimParameterMap.h.

References theHBParameters.

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

Definition at line 24 of file HcalSimParameterMap.h.

References theHEParameters.

24 {return theHEParameters;}
HcalSimParameters theHEParameters
const HFSimParameters& HcalSimParameterMap::hfParameters1 ( ) const
inline

Definition at line 26 of file HcalSimParameterMap.h.

References theHFParameters1.

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

Definition at line 27 of file HcalSimParameterMap.h.

References theHFParameters2.

27 {return theHFParameters2;}
HFSimParameters theHFParameters2
const HcalSimParameters& HcalSimParameterMap::hoParameters ( ) const
inline

Definition at line 25 of file HcalSimParameterMap.h.

References theHOParameters.

25 {return theHOParameters;}
HcalSimParameters theHOParameters
void HcalSimParameterMap::setDbService ( const HcalDbService service)

Definition at line 88 of file HcalSimParameterMap.cc.

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

Referenced by HcalDigitizer::initializeEvent(), and zdcParameters().

89 {
90  theHBParameters.setDbService(dbService);
91  theHEParameters.setDbService(dbService);
92  theHOParameters.setDbService(dbService);
95  theHFParameters1.setDbService(dbService);
96  theHFParameters2.setDbService(dbService);
97  theZDCParameters.setDbService(dbService);
98 }
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
void HcalSimParameterMap::setFrameSize ( const DetId detId,
int  frameSize 
)

Definition at line 100 of file HcalSimParameterMap.cc.

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

Referenced by setHOHamamatsuDetIds(), and zdcParameters().

101 {
102  HcalGenericDetId genericId(detId);
103  if(genericId.isHcalZDCDetId())
104  setFrameSize(theZDCParameters, frameSize);
105  else
106  {
107  HcalDetId hcalDetId(detId);
108  if(hcalDetId.subdet() == HcalForward) {
109  // do both depths
110  setFrameSize(theHFParameters1,frameSize);
111  setFrameSize(theHFParameters2,frameSize);
112  }
113  else
114  {
116  setFrameSize(parameters, frameSize);
117  }
118  }
119 }
Main class for Parameters in different subdetectors.
void setFrameSize(const DetId &detId, int frameSize)
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
const CaloSimParameters & simParameters(const DetId &id) const override
HFSimParameters theZDCParameters
void HcalSimParameterMap::setFrameSize ( CaloSimParameters parameters,
int  frameSize 
)
private

Definition at line 122 of file HcalSimParameterMap.cc.

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

123 {
124  int binOfMaximum = 5;
125  if(frameSize == 10) {}
126  else if(frameSize == 6) binOfMaximum = 4;
127  else {
128  edm::LogError("HcalSimParameterMap")<< "Bad HCAL frame size " << frameSize;
129  }
130  if(parameters.readoutFrameSize() != frameSize)
131  {
132  edm::LogWarning("HcalSignalGenerator")<< "Mismatch in frame sizes. Setting to " << frameSize;
133  parameters.setReadoutFrameSize(frameSize);
134  parameters.setBinOfMaximum(binOfMaximum);
135  }
136 }
void setReadoutFrameSize(int frameSize)
some datamixing apps need this to be set dynamically
void setBinOfMaximum(int binOfMax)
int readoutFrameSize() const
for now, the LinearFrames and trhe digis will be one-to-one.
void HcalSimParameterMap::setHOHamamatsuDetIds ( const std::vector< HcalDetId > &  ids)
inline

Definition at line 38 of file HcalSimParameterMap.h.

References photons_cff::ids, setFrameSize(), and theHOHamamatsuDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

39  {
41  }
std::vector< HcalDetId > theHOHamamatsuDetIds
void HcalSimParameterMap::setHOZecotekDetIds ( const std::vector< HcalDetId > &  ids)
inline

Definition at line 34 of file HcalSimParameterMap.h.

References photons_cff::ids, and theHOZecotekDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

35  {
37  }
std::vector< HcalDetId > theHOZecotekDetIds
const CaloSimParameters & HcalSimParameterMap::simParameters ( const DetId id) const
overridevirtual

Implements CaloVSimParameterMap.

Definition at line 55 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(), HcalDigitizer::finalizeEvent(), setFrameSize(), and ~HcalSimParameterMap().

55  {
56  HcalGenericDetId genericId(detId);
57  if(genericId.isHcalZDCDetId())
58  return theZDCParameters;
59  HcalDetId hcalDetId(detId);
60  if(hcalDetId.subdet() == HcalBarrel) {
61  return theHBParameters;
62  } else if(hcalDetId.subdet() == HcalEndcap) {
63  return theHEParameters;
64  } else if(hcalDetId.subdet() == HcalOuter) {
65  if(std::find(theHOZecotekDetIds.begin(),
66  theHOZecotekDetIds.end(), hcalDetId) != theHOZecotekDetIds.end())
67  {
69  }
71  theHOHamamatsuDetIds.end(), hcalDetId) != theHOHamamatsuDetIds.end())
72  {
74  }
75  else
76  {
77  return theHOParameters;
78  }
79  } else { // HF
80  if(hcalDetId.depth() == 1 || hcalDetId.depth() == 3) {
81  return theHFParameters1;
82  } else {
83  return theHFParameters2;
84  }
85  }
86 }
HcalSimParameters theHBParameters
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
HcalSimParameters theHOHamamatsuSiPMParameters
std::vector< HcalDetId > theHOZecotekDetIds
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
std::vector< HcalDetId > theHOHamamatsuDetIds
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters
const HFSimParameters& HcalSimParameterMap::zdcParameters ( ) const
inline

Definition at line 28 of file HcalSimParameterMap.h.

References setDbService(), setFrameSize(), and theZDCParameters.

28 {return theZDCParameters;}
HFSimParameters theZDCParameters

Member Data Documentation

HcalSimParameters HcalSimParameterMap::theHBParameters
private

Definition at line 46 of file HcalSimParameterMap.h.

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

HcalSimParameters HcalSimParameterMap::theHEParameters
private

Definition at line 47 of file HcalSimParameterMap.h.

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

HFSimParameters HcalSimParameterMap::theHFParameters1
private

Definition at line 51 of file HcalSimParameterMap.h.

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

HFSimParameters HcalSimParameterMap::theHFParameters2
private

Definition at line 52 of file HcalSimParameterMap.h.

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

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

Definition at line 55 of file HcalSimParameterMap.h.

Referenced by setHOHamamatsuDetIds(), and simParameters().

HcalSimParameters HcalSimParameterMap::theHOHamamatsuSiPMParameters
private

Definition at line 50 of file HcalSimParameterMap.h.

Referenced by setDbService(), and simParameters().

HcalSimParameters HcalSimParameterMap::theHOParameters
private

Definition at line 48 of file HcalSimParameterMap.h.

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

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

Definition at line 54 of file HcalSimParameterMap.h.

Referenced by setHOZecotekDetIds(), and simParameters().

HcalSimParameters HcalSimParameterMap::theHOZecotekSiPMParameters
private

Definition at line 49 of file HcalSimParameterMap.h.

Referenced by setDbService(), and simParameters().

HFSimParameters HcalSimParameterMap::theZDCParameters
private

Definition at line 53 of file HcalSimParameterMap.h.

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