CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
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.

8  :
9  theHBParameters(2000., std::vector<double>(16, 0.3305),
10  117, 5,
11  10, 5, true, true,
12  1, std::vector<double>(16, 117.)),
13  theHEParameters(2000., std::vector<double>(16, 0.3305),
14  178, 5,
15  10, 5, true, true,
16  16, std::vector<double>(16, 178.)),
17  theHOParameters( 4000., std::vector<double>(16, 0.3065),
18  217., 5,
19  10, 5, true, true,
20  1, std::vector<double>(16, 217.)),
21  theHOZecotekSiPMParameters( 4000., std::vector<double>(16, 3.0), // 1 mip = 15 pe = 45 fC
22  217., 5,
23  10, 5, true, true,
24  1, std::vector<double>(16, 217.)),
25  theHOHamamatsuSiPMParameters( 4000., std::vector<double>(16, 3.0),
26  217., 5,
27  10, 5, true, true,
28  1, std::vector<double>(16, 217.)),
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 {
43 }
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 52 of file HcalSimParameterMap.cc.

61 {
62 }
T getParameter(std::string const &) const
HcalSimParameters theHBParameters
HcalSimParameters theHOHamamatsuSiPMParameters
HcalSimParameters theHEParameters
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
HcalSimParameters theHOParameters
HFSimParameters theZDCParameters
HcalSimParameters theHOZecotekSiPMParameters
virtual HcalSimParameterMap::~HcalSimParameterMap ( )
inlinevirtual

Definition at line 18 of file HcalSimParameterMap.h.

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

98 {
99  theHBParameters.setDbService(dbService);
100  theHEParameters.setDbService(dbService);
101  theHOParameters.setDbService(dbService);
104  theHFParameters1.setDbService(dbService);
105  theHFParameters2.setDbService(dbService);
106  theZDCParameters.setDbService(dbService);
107 }
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 109 of file HcalSimParameterMap.cc.

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

110 {
111  HcalGenericDetId genericId(detId);
112  if(genericId.isHcalZDCDetId())
113  setFrameSize(theZDCParameters, frameSize);
114  else
115  {
116  HcalDetId hcalDetId(detId);
117  if(hcalDetId.subdet() == HcalForward) {
118  // do both depths
119  setFrameSize(theHFParameters1,frameSize);
120  setFrameSize(theHFParameters2,frameSize);
121  }
122  else
123  {
125  setFrameSize(parameters, frameSize);
126  }
127  }
128 }
virtual const CaloSimParameters & simParameters(const DetId &id) const
Main class for Parameters in different subdetectors.
void setFrameSize(const DetId &detId, int frameSize)
HFSimParameters theHFParameters1
HFSimParameters theHFParameters2
HFSimParameters theZDCParameters
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().

132 {
133  int binOfMaximum = 5;
134  if(frameSize == 10) {}
135  else if(frameSize == 6) binOfMaximum = 4;
136  else {
137  edm::LogError("HcalSimParameterMap")<< "Bad HCAL frame size " << frameSize;
138  }
139  if(parameters.readoutFrameSize() != frameSize)
140  {
141  edm::LogWarning("HcalSignalGenerator")<< "Mismatch in frame sizes. Setting to " << frameSize;
142  parameters.setReadoutFrameSize(frameSize);
143  parameters.setBinOfMaximum(binOfMaximum);
144  }
145 }
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 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 theHOZecotekDetIds.

Referenced by HcalDigitizer::buildHOSiPMCells().

35  {
36  theHOZecotekDetIds = ids;
37  }
std::vector< HcalDetId > theHOZecotekDetIds
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().

64  {
65  HcalGenericDetId genericId(detId);
66  if(genericId.isHcalZDCDetId())
67  return theZDCParameters;
68  HcalDetId hcalDetId(detId);
69  if(hcalDetId.subdet() == HcalBarrel) {
70  return theHBParameters;
71  } else if(hcalDetId.subdet() == HcalEndcap) {
72  return theHEParameters;
73  } else if(hcalDetId.subdet() == HcalOuter) {
74  if(std::find(theHOZecotekDetIds.begin(),
75  theHOZecotekDetIds.end(), hcalDetId) != theHOZecotekDetIds.end())
76  {
78  }
80  theHOHamamatsuDetIds.end(), hcalDetId) != theHOHamamatsuDetIds.end())
81  {
83  }
84  else
85  {
86  return theHOParameters;
87  }
88  } else { // HF
89  if(hcalDetId.depth() == 1) {
90  return theHFParameters1;
91  } else {
92  return theHFParameters2;
93  }
94  }
95 }
HcalSimParameters theHBParameters
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
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 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 HcalSimParameterMap(), 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 HcalSimParameterMap(), setDbService(), and simParameters().

HFSimParameters HcalSimParameterMap::theZDCParameters
private

Definition at line 53 of file HcalSimParameterMap.h.

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