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 Types | Private Member Functions | Private Attributes
HcalDigitizer Class Reference

#include <HcalDigitizer.h>

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void beginRun (const edm::EventSetup &es)
 
void endRun ()
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
 HcalDigitizer (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
void setHBHENoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHFNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHONoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setZDCNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
virtual ~HcalDigitizer ()
 

Private Types

typedef CaloTDigitizer
< HBHEDigitizerTraits
HBHEDigitizer
 
typedef CaloTDigitizer
< HFDigitizerTraits
HFDigitizer
 
typedef CaloTDigitizer
< HODigitizerTraits
HODigitizer
 
typedef CaloTDigitizer
< HcalUpgradeDigitizerTraits
UpgradeDigitizer
 
typedef CaloTDigitizer
< ZDCDigitizerTraits
ZDCDigitizer
 

Private Member Functions

void accumulateCaloHits (edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
 
void buildHOSiPMCells (const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
 
void checkGeometry (const edm::EventSetup &eventSetup)
 
void darkening (std::vector< PCaloHit > &hcalHits)
 
void fillFakeHits ()
 some hits in each subdetector, just for testing purposes More...
 
void updateGeometry (const edm::EventSetup &eventSetup)
 

Private Attributes

double deliveredLumi
 
bool hbhegeo
 
bool hfgeo
 
std::string hitsProducer_
 
bool hogeo
 
bool isHCAL
 
bool isZDC
 
HEDarkeningm_HEDarkening
 
HFRecalibrationm_HFRecalibration
 
bool relabel_
 
HcalCoderFactorytheCoderFactory
 
const CaloGeometrytheGeometry
 
HcalAmplifiertheHBHEAmplifier
 
std::vector< DetIdtheHBHEDetIds
 
HBHEDigitizertheHBHEDigitizer
 
HcalElectronicsSimtheHBHEElectronicsSim
 
HBHEHitFilter theHBHEHitFilter
 
CaloHitResponsetheHBHEResponse
 
HBHEDigitizertheHBHESiPMDigitizer
 
CaloHitResponsetheHBHESiPMResponse
 
UpgradeDigitizertheHBHEUpgradeDigitizer
 
HcalAmplifiertheHFAmplifier
 
HFDigitizertheHFDigitizer
 
HcalElectronicsSimtheHFElectronicsSim
 
HFHitFilter theHFHitFilter
 
CaloHitResponsetheHFResponse
 
UpgradeDigitizertheHFUpgradeDigitizer
 
HcalHitCorrectiontheHitCorrection
 
HcalAmplifiertheHOAmplifier
 
HODigitizertheHODigitizer
 
HcalElectronicsSimtheHOElectronicsSim
 
HOHitFilter theHOHitFilter
 
std::vector< DetIdtheHOHPDDetIds
 
CaloHitResponsetheHOResponse
 
int theHOSiPMCode
 
std::vector< DetIdtheHOSiPMDetIds
 
HODigitizertheHOSiPMDigitizer
 
HcalHitFilter theHOSiPMHitFilter
 
CaloHitResponsetheHOSiPMResponse
 
HPDIonFeedbackSimtheIonFeedback
 
CaloVNoiseSignalGeneratortheNoiseGenerator
 
CaloVNoiseHitGeneratortheNoiseHitGenerator
 
HcalSimParameterMaptheParameterMap
 
const HcalDDDRecConstantstheRecNumber
 
HcalHitRelabellertheRelabeller
 
HcalShapestheShapes
 
HcalTimeSlewSimtheTimeSlewSim
 
HcalCoderFactorytheUpgradeCoderFactory
 
HcalElectronicsSimtheUpgradeHBHEElectronicsSim
 
HcalElectronicsSimtheUpgradeHFElectronicsSim
 
HcalAmplifiertheZDCAmplifier
 
ZDCDigitizertheZDCDigitizer
 
HcalElectronicsSimtheZDCElectronicsSim
 
ZDCHitFilter theZDCHitFilter
 
CaloHitResponsetheZDCResponse
 
bool zdcgeo
 

Detailed Description

Definition at line 44 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 82 of file HcalDigitizer.h.

Definition at line 84 of file HcalDigitizer.h.

Definition at line 83 of file HcalDigitizer.h.

Definition at line 86 of file HcalDigitizer.h.

Definition at line 85 of file HcalDigitizer.h.

Constructor & Destructor Documentation

HcalDigitizer::HcalDigitizer ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)
explicit

Definition at line 84 of file HcalDigitizer.cc.

References edm::ConsumesCollector::consumes(), HcalCoderFactory::DB, deliveredLumi, Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitsProducer_, CaloHitResponse::initHBHEScale(), HLT_25ns14e33_v1_cff::InputTag, m_HEDarkening, m_HFRecalibration, relabel_, CaloHitResponse::setHBHEScale(), HcalAmplifier::setHBtuningParameter(), HcalAmplifier::setHEtuningParameter(), HcalAmplifier::setHFtuningParameter(), CaloHitResponse::setHitFilter(), HcalAmplifier::setHOtuningParameter(), HcalAmplifier::setIonFeedbackSim(), CaloTDigitizer< Traits >::setNoiseHitGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), CaloHitResponse::setPECorrection(), HcalAmplifier::setTimeSlewSim(), HcalAmplifier::setUseOldHB(), HcalAmplifier::setUseOldHE(), HcalAmplifier::setUseOldHF(), HcalAmplifier::setUseOldHO(), AlCaHLTBitMon_QueryRunRegistry::string, theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, theHBHEHitFilter, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFHitFilter, theHFResponse, theHFUpgradeDigitizer, theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOHitFilter, theHOResponse, theHOSiPMCode, theHOSiPMDigitizer, theHOSiPMHitFilter, theHOSiPMResponse, theIonFeedback, theNoiseGenerator, theNoiseHitGenerator, theParameterMap, theRelabeller, theShapes, theTimeSlewSim, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, theZDCHitFilter, theZDCResponse, and HcalCoderFactory::UPGRADE.

84  :
85  theGeometry(0),
86  theRecNumber(0),
88  theShapes(new HcalShapes()),
89  theHBHEResponse(0),
91  theHOResponse(0),
96  theHFAmplifier(0),
97  theHOAmplifier(0),
98  theZDCAmplifier(0),
99  theIonFeedback(0),
100  theCoderFactory(0),
109  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
110  theHOHitFilter(),
112  theZDCHitFilter(),
113  theHitCorrection(0),
116  theHBHEDigitizer(0),
118  theHODigitizer(0),
120  theHFDigitizer(0),
121  theZDCDigitizer(0),
124  theRelabeller(0),
125  isZDC(true),
126  isHCAL(true),
127  zdcgeo(true),
128  hbhegeo(true),
129  hogeo(true),
130  hfgeo(true),
131  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
132  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
133  deliveredLumi(0.),
134  m_HEDarkening(0),
136 {
137  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
138  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
139 
140  bool doNoise = ps.getParameter<bool>("doNoise");
141  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
142  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
143  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
144  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
145  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
146  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
147  bool doEmpty = ps.getParameter<bool>("doEmpty");
148  double HBtp = ps.getParameter<double>("HBTuningParameter");
149  double HEtp = ps.getParameter<double>("HETuningParameter");
150  double HFtp = ps.getParameter<double>("HFTuningParameter");
151  double HOtp = ps.getParameter<double>("HOTuningParameter");
152  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
153  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
154  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
155  bool agingFlagHE = ps.getParameter<bool>("HEDarkening");
156  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
157  double minFCToDelay= ps.getParameter<double>("minFCToDelay");
158 
159  if(PreMix1 && PreMix2) {
160  throw cms::Exception("Configuration")
161  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
162  "digi combination modes at the same time. Please set one mode to False\n"
163  "in the configuration file.";
164  }
165 
166  // need to make copies, because they might get different noise generators
167  theHBHEAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
168  theHFAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
169  theHOAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
170  theZDCAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
175  theHBHEAmplifier->setUseOldHB(useOldNoiseHB);
176  theHBHEAmplifier->setUseOldHE(useOldNoiseHE);
177  theHFAmplifier->setUseOldHF(useOldNoiseHF);
178  theHOAmplifier->setUseOldHO(useOldNoiseHO);
179 
182 
183 // std::cout << "HcalDigitizer: theUpgradeCoderFactory created" << std::endl;
184 
191 
192 // std::cout << "HcalDigitizer: theUpgradeElectronicsSim created" << std::endl;
193 
194  // a code of 1 means make all cells SiPM
195  std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells"));
196  //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells"));
197  // 0 means none, 1 means all, and 2 means use hardcoded
198 
199 // std::cout << std::endl << " hbSiPMCells = " << hbSiPMCells.size() << std::endl;
200 
201  bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1);
202  bool doHOHPD = (theHOSiPMCode != 1);
203  bool doHBHESiPM = !hbSiPMCells.empty();
204  bool doHOSiPM = (theHOSiPMCode != 0);
205  if(doHBHEHPD) {
207  edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers";
209 
212  bool changeResponse = ps.getParameter<bool>("ChangeResponse");
213  edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile");
214  if (changeResponse) {
215  std::string corrFileName = fname.fullPath();
216  edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName;
217  theHBHEResponse->setHBHEScale(corrFileName); //GMA
218  }
219  }
220  if(doHOHPD) {
224  }
225 
226  if(doHBHESiPM) {
229  if (doHBHEUpgrade) {
231 
232 // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer created" << std::endl;
233 
234  } else {
236  }
237  }
238  if(doHOSiPM) {
242  }
243 
244  // if both are present, fill the SiPM cells now
245  if(doHBHEHPD && doHBHESiPM) {
246 
247 // std::cout << "HcalDigitizer: fill the SiPM cells now" << std::endl;
248 
250  }
251 
254 
255  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
256  //initialize: they won't be called later if flag is set
257  theTimeSlewSim = 0;
258  if(doTimeSlew) {
259  // no time slewing for HF
260  theTimeSlewSim = new HcalTimeSlewSim(theParameterMap,minFCToDelay);
261  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim);
262  theHOAmplifier->setTimeSlewSim(theTimeSlewSim);
263  theZDCAmplifier->setTimeSlewSim(theTimeSlewSim);
264  }
265 
266  if (doHFUpgrade) {
268 
269 // std::cout << "HcalDigitizer: theHFUpgradeDigitizer created" << std::endl;
270 
271  } else {
273  }
275 
276  edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
277  relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
278  if (relabel_) {
280  }
281 
282  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
283  if(doHPDNoise) {
284  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
288  }
289 
290  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
293  if(ps.getParameter<bool>("doThermalNoise")) {
295  }
296  }
297 
298  if(ps.getParameter<bool>("injectTestHits") ) {
306 
307 // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise" << std::endl;
308  }
310  if(theHFUpgradeDigitizer) {
312 
313 // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise" << std::endl;
314  }
316  }
317 
318  if(agingFlagHE) m_HEDarkening = new HEDarkening();
319  if(agingFlagHF) m_HFRecalibration = new HFRecalibration();
320 }
void setUseOldHB(bool useOld)
void setNoiseHitGenerator(CaloVNoiseHitGenerator *generator)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void setHOtuningParameter(double tp)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HBHEHitFilter theHBHEHitFilter
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:73
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HOHitFilter theHOHitFilter
CaloTDigitizer< HcalUpgradeDigitizerTraits > UpgradeDigitizer
Definition: HcalDigitizer.h:86
void setUseOldHF(bool useOld)
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
void setHFtuningParameter(double tp)
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
HcalElectronicsSim * theUpgradeHFElectronicsSim
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:31
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:84
HcalAmplifier * theHBHEAmplifier
void setUseOldHO(bool useOld)
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:85
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
void setHEtuningParameter(double tp)
double deliveredLumi
void setUseOldHE(bool useOld)
void setHitFilter(const CaloVHitFilter *filter)
if you want to reject hits, for example, from a certain subdetector, set this
HcalShapes * theShapes
Definition: HcalDigitizer.h:89
Creates electronics signals from hits.
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:93
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:94
void setHBHEScale(std::string &)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:96
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:83
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:38
HcalAmplifier * theHOAmplifier
HFRecalibration * m_HFRecalibration
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:91
HODigitizer * theHODigitizer
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:72
string fname
main script
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:95
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:92
void setHBtuningParameter(double tp)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:82
CaloVNoiseSignalGenerator * theNoiseGenerator
HcalDigitizer::~HcalDigitizer ( )
virtual

Definition at line 323 of file HcalDigitizer.cc.

References theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFResponse, theHFUpgradeDigitizer, theHitCorrection, theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOResponse, theHOSiPMDigitizer, theHOSiPMResponse, theNoiseGenerator, theParameterMap, theRelabeller, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, and theZDCResponse.

323  {
326  if(theHODigitizer) delete theHODigitizer;
328  if(theHFDigitizer) delete theHFDigitizer;
329  delete theZDCDigitizer;
332  delete theParameterMap;
333  delete theHBHEResponse;
334  delete theHBHESiPMResponse;
335  delete theHOResponse;
336  delete theHOSiPMResponse;
337  delete theHFResponse;
338  delete theZDCResponse;
339  delete theHBHEElectronicsSim;
340  delete theHFElectronicsSim;
341  delete theHOElectronicsSim;
342  delete theZDCElectronicsSim;
345  delete theHBHEAmplifier;
346  delete theHFAmplifier;
347  delete theHOAmplifier;
348  delete theZDCAmplifier;
349  delete theCoderFactory;
350  delete theUpgradeCoderFactory;
351  delete theHitCorrection;
352  delete theNoiseGenerator;
353  if (theRelabeller) delete theRelabeller;
354 }
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
HcalAmplifier * theHFAmplifier
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
HcalElectronicsSim * theHOElectronicsSim
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:93
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:94
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:96
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:91
HODigitizer * theHODigitizer
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:95
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:92
HcalAmplifier * theZDCAmplifier
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloVNoiseSignalGenerator * theNoiseGenerator

Member Function Documentation

void HcalDigitizer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 493 of file HcalDigitizer.cc.

References accumulateCaloHits(), edm::EventSetup::get(), edm::Event::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), isZDC, and edm::ESHandle< class >::product().

Referenced by HcalDigiProducer::accumulate().

493  {
494  // Step A: Get Inputs
495  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
497  e.getByLabel(zdcTag, zdcHandle);
498  isZDC = zdcHandle.isValid();
499 
500  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
502  e.getByLabel(hcalTag, hcalHandle);
503  isHCAL = hcalHandle.isValid();
504 
506  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
507  const HcalTopology *htopoP=htopo.product();
508 
509  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine, htopoP);
510 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:75
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
T const * product() const
Definition: ESHandle.h:86
void HcalDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 512 of file HcalDigitizer.cc.

References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), edm::EventSetup::get(), PileUpEventPrincipal::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), isZDC, and edm::ESHandle< class >::product().

512  {
513  // Step A: Get Inputs
514  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
516  e.getByLabel(zdcTag, zdcHandle);
517  isZDC = zdcHandle.isValid();
518 
519  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
521  e.getByLabel(hcalTag, hcalHandle);
522  isHCAL = hcalHandle.isValid();
523 
525  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
526  const HcalTopology *htopoP=htopo.product();
527 
528  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine, htopoP);
529 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:75
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *, const HcalTopology *h)
T const * product() const
Definition: ESHandle.h:86
void HcalDigitizer::accumulateCaloHits ( edm::Handle< std::vector< PCaloHit > > const &  hcalHits,
edm::Handle< std::vector< PCaloHit > > const &  zdcHits,
int  bunchCrossing,
CLHEP::HepRandomEngine *  engine,
const HcalTopology h 
)
private

Definition at line 434 of file HcalDigitizer.cc.

References CaloTDigitizer< Traits >::add(), darkening(), HcalHitCorrection::fillChargeSums(), hbhegeo, hfgeo, hogeo, i, isHCAL, isZDC, m_HEDarkening, m_HFRecalibration, HcalHitRelabeller::process(), relabel_, theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHODigitizer, theHOSiPMDigitizer, theRelabeller, theZDCDigitizer, HcalTopology::validHcal(), and zdcgeo.

Referenced by accumulate().

434  {
435 
436  // Step A: pass in inputs, and accumulate digirs
437  if(isHCAL) {
438  std::vector<PCaloHit> hcalHitsOrig = *hcalHandle.product();
439  std::vector<PCaloHit> hcalHits;
440  hcalHits.reserve(hcalHitsOrig.size());
441 
442  for ( unsigned int i=0; i< hcalHitsOrig.size(); i++) {
443  DetId id(hcalHitsOrig[i].id());
444  HcalDetId hid(id);
445 
446  // if ( id.subdetId()==2 && hid.ietaAbs()<16 ) edm::LogError("HcalDigitizer") << "bad hcal id found in digitizer. Skipping " << id.rawId() << std::endl;
447  if ( !htopoP->validHcal(hid) ) edm::LogError("HcalDigitizer") << "bad hcal id found in digitizer. Skipping " << id.rawId() << std::endl;
448  else
449  hcalHits.push_back(hcalHitsOrig[i]);
450  }
451  //evaluate darkening before relabeling
453  darkening(hcalHits);
454  }
455  if (relabel_) {
456  // Relabel PCaloHits
457  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
458  theRelabeller->process(hcalHits);
459  }
460  if(theHitCorrection != 0) {
461  theHitCorrection->fillChargeSums(hcalHits);
462  }
463  if(hbhegeo) {
464  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
465  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing, engine);
467  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
468  }
469  }
470 
471  if(hogeo) {
472  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing, engine);
473  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
474  }
475 
476  if(hfgeo) {
477  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing, engine);
478  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
479  }
480  } else {
481  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
482  }
483 
484  if(isZDC) {
485  if(zdcgeo) {
486  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
487  }
488  } else {
489  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
490  }
491 }
int i
Definition: DBlmapReader.cc:9
HBHEDigitizer * theHBHEDigitizer
void darkening(std::vector< PCaloHit > &hcalHits)
void add(const std::vector< PCaloHit > &hits, int bunchCrossing, CLHEP::HepRandomEngine *engine)
HFDigitizer * theHFDigitizer
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
void fillChargeSums(MixCollection< PCaloHit > &hits)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
Definition: DetId.h:18
void process(std::vector< PCaloHit > &hcalHits)
HFRecalibration * m_HFRecalibration
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 598 of file HcalDigitizer.cc.

References HcalShapes::beginRun(), checkGeometry(), and theShapes.

Referenced by HcalDigiProducer::beginRun().

598  {
599  checkGeometry(es);
600  theShapes->beginRun(es);
601 }
void checkGeometry(const edm::EventSetup &eventSetup)
HcalShapes * theShapes
Definition: HcalDigitizer.h:89
void beginRun(edm::EventSetup const &es)
Definition: HcalShapes.cc:103
void HcalDigitizer::buildHOSiPMCells ( const std::vector< DetId > &  allCells,
const edm::EventSetup eventSetup 
)
private

Definition at line 666 of file HcalDigitizer.cc.

References assert(), edm::EventSetup::get(), HcalShapes::HAMAMATSU, AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< class >::product(), HcalHitFilter::setDetIds(), CaloTDigitizer< Traits >::setDetIds(), HcalSimParameterMap::setHOHamamatsuDetIds(), HcalSimParameterMap::setHOZecotekDetIds(), HcalCondObjectContainerBase::setTopo(), theHODigitizer, theHOHPDDetIds, theHOSiPMCode, theHOSiPMDetIds, theHOSiPMDigitizer, theHOSiPMHitFilter, theParameterMap, and HcalShapes::ZECOTEK.

Referenced by updateGeometry().

666  {
667  // all HPD
668 
669  if(theHOSiPMCode == 0) {
670  theHODigitizer->setDetIds(allCells);
671  } else if(theHOSiPMCode == 1) {
672  theHOSiPMDigitizer->setDetIds(allCells);
673  // FIXME pick Zecotek or hamamatsu?
674  } else if(theHOSiPMCode == 2) {
675  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
677  eventSetup.get<HcalMCParamsRcd>().get(p);
679  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
680 
681  HcalMCParams mcParams(*p.product());
682  if (mcParams.topo()==0) {
683  mcParams.setTopo(htopo.product());
684  }
685 
686  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
687  detItr != allCells.end(); ++detItr) {
688  int shapeType = mcParams.getValues(*detItr)->signalShape();
689  if(shapeType == HcalShapes::ZECOTEK) {
690  zecotekDetIds.emplace_back(*detItr);
691  theHOSiPMDetIds.push_back(*detItr);
692  } else if(shapeType == HcalShapes::HAMAMATSU) {
693  hamamatsuDetIds.emplace_back(*detItr);
694  theHOSiPMDetIds.push_back(*detItr);
695  } else {
696  theHOHPDDetIds.push_back(*detItr);
697  }
698  }
699 
705  // FIXME not applying a HitFilter to the HPDs, for now
706  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
707  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
708 
709  // make sure we don't got through this exercise again
710  theHOSiPMCode = -2;
711  }
712 }
void setDetIds(const std::vector< DetId > &detIds)
assert(m_qm.get())
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
void setHOZecotekDetIds(const std::vector< HcalDetId > &ids)
HcalHitFilter theHOSiPMHitFilter
std::vector< DetId > theHOHPDDetIds
void setHOHamamatsuDetIds(const std::vector< HcalDetId > &ids)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
HODigitizer * theHOSiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
void setTopo(const HcalTopology *topo)
void HcalDigitizer::checkGeometry ( const edm::EventSetup eventSetup)
private

make sure the digitizer has the correct list of all cells that exist in the geometry

Definition at line 609 of file HcalDigitizer.cc.

References geometry, edm::EventSetup::get(), theGeometry, theRecNumber, and updateGeometry().

Referenced by beginRun().

609  {
610  // TODO find a way to avoid doing this every event
612  eventSetup.get<CaloGeometryRecord>().get(geometry);
614  eventSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
615 
616  // See if it's been updated
617  if (&*geometry != theGeometry) {
618  theGeometry = &*geometry;
619  theRecNumber= &*pHRNDC;
620  updateGeometry(eventSetup);
621  }
622 }
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:73
const T & get() const
Definition: EventSetup.h:56
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:72
ESHandle< TrackerGeometry > geometry
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::darkening ( std::vector< PCaloHit > &  hcalHits)
private

Definition at line 714 of file HcalDigitizer.cc.

References HEDarkening::degradation(), deliveredLumi, HLT_25ns14e33_v1_cff::depth, relval_parameters_module::energy, HFRecalibration::getCorr(), HcalEndcap, HcalForward, cuy::ii, m_HEDarkening, m_HFRecalibration, phi, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by accumulateCaloHits().

714  {
715 
716  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
717  uint32_t tmpId = hcalHits[ii].id();
718  int det, z, depth, ieta, phi, lay;
719  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
720 
721  bool darkened = false;
722  float dweight = 1.;
723 
724  //HE darkening
725  if(det==int(HcalEndcap) && m_HEDarkening){
726  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
727  darkened = true;
728  }
729 
730  //HF darkening - approximate: invert recalibration factor
731  else if(det==int(HcalForward) && m_HFRecalibration){
732  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
733  darkened = true;
734  }
735 
736  //create new hit with darkened energy
737  //if(darkened) hcalHits[ii] = PCaloHit(hcalHits[ii].energyEM()*dweight,hcalHits[ii].energyHad()*dweight,hcalHits[ii].time(),hcalHits[ii].geantTrackId(),hcalHits[ii].id());
738 
739  //reset hit energy
740  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
741  }
742 
743 }
int ii
Definition: cuy.py:588
double deliveredLumi
double getCorr(int ieta, int idepth, double lumi)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
HFRecalibration * m_HFRecalibration
HEDarkening * m_HEDarkening
float degradation(float intlumi, int ieta, int lay)
Definition: HEDarkening.cc:52
void HcalDigitizer::endRun ( void  )

Definition at line 604 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

604  {
605  theShapes->endRun();
606 }
HcalShapes * theShapes
Definition: HcalDigitizer.h:89
void endRun()
Definition: HcalShapes.cc:118
void HcalDigitizer::fillFakeHits ( )
private

some hits in each subdetector, just for testing purposes

void HcalDigitizer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 531 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), hbhegeo, hfgeo, hogeo, isHCAL, isZDC, edm::Event::put(), CaloTDigitizer< Traits >::run(), theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHODigitizer, theHOSiPMDigitizer, theZDCDigitizer, and zdcgeo.

Referenced by HcalDigiProducer::finalizeEvent().

531  {
532 
533  // Step B: Create empty output
534  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
535  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
536  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
537  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
538  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
539  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
540 
541  // Step C: Invoke the algorithm, getting back outputs.
542  if(isHCAL&&hbhegeo){
543  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult, engine);
544  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->run(*hbheResult, engine);
546  theHBHEUpgradeDigitizer->run(*hbheupgradeResult, engine);
547 
548 // std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
549  }
550  }
551  if(isHCAL&&hogeo) {
552  if(theHODigitizer) theHODigitizer->run(*hoResult, engine);
553  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult, engine);
554  }
555  if(isHCAL&&hfgeo) {
556  if(theHFDigitizer) theHFDigitizer->run(*hfResult, engine);
557  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult, engine);
558  }
559  if(isZDC&&zdcgeo) {
560  theZDCDigitizer->run(*zdcResult, engine);
561  }
562 
563  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
564  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
565  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
566  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
567  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
568  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
569 
570  /*
571  std::cout << std::endl;
572  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
573  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
574  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
575 
576  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
577  << std::endl;
578  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
579  << std::endl;
580  */
581 
582  // Step D: Put outputs into event
583  e.put(hbheResult);
584  e.put(hoResult);
585  e.put(hfResult);
586  e.put(zdcResult);
587  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
588  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
589 
590 // std::cout << std::endl << "========> HcalDigitizer e.put " << std::endl << std::endl;
591 
592  if(theHitCorrection) {
594  }
595 }
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
UpgradeDigitizer * theHFUpgradeDigitizer
edm::SortedCollection< HODataFrame > HODigiCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
ZDCDigitizer * theZDCDigitizer
edm::SortedCollection< HcalUpgradeDataFrame > HFUpgradeDigiCollection
edm::SortedCollection< HcalUpgradeDataFrame > HBHEUpgradeDigiCollection
HcalHitCorrection * theHitCorrection
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
edm::SortedCollection< HFDataFrame > HFDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)

Produces the EDM products,

Definition at line 387 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), edm::EventSetup::find(), edm::EventSetup::get(), CaloTDigitizer< Traits >::initializeHits(), edm::ESHandle< class >::product(), HcalAmplifier::setADCPeds(), HcalAmplifier::setCholesky(), HcalCoderFactory::setDbService(), HcalElectronicsSim::setDbService(), HcalAmplifier::setDbService(), HcalSimParameterMap::setDbService(), theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHOAmplifier, theHODigitizer, theHOSiPMDigitizer, theParameterMap, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, and theZDCDigitizer.

Referenced by HcalDigiProducer::initializeEvent().

387  {
388  // get the appropriate gains, noises, & widths for this event
389  edm::ESHandle<HcalDbService> conditions;
390  eventSetup.get<HcalDbRecord>().get(conditions);
391  theHBHEAmplifier->setDbService(conditions.product());
392  theHFAmplifier->setDbService(conditions.product());
393  theHOAmplifier->setDbService(conditions.product());
394  theZDCAmplifier->setDbService(conditions.product());
397 
398  theCoderFactory->setDbService(conditions.product());
400  theParameterMap->setDbService(conditions.product());
401 
403  if (eventSetup.find(edm::eventsetup::EventSetupRecordKey::makeKey<HcalCholeskyMatricesRcd>())) {
404  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
405  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
406  theHBHEAmplifier->setCholesky(myCholesky);
407  theHFAmplifier->setCholesky(myCholesky);
408  theHOAmplifier->setCholesky(myCholesky);
409  }
410  edm::ESHandle<HcalPedestals> pedshandle;
411  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
412  const HcalPedestals * myADCPedestals = pedshandle.product();
413 
414  theHBHEAmplifier->setADCPeds(myADCPedestals);
415  theHFAmplifier->setADCPeds(myADCPedestals);
416  theHOAmplifier->setADCPeds(myADCPedestals);
417 
418  if(theHitCorrection != 0) {
420  }
421 
422  //initialize hits
431 
432 }
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
void initializeHits()
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:54
HcalAmplifier * theHFAmplifier
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
HcalCoderFactory * theUpgradeCoderFactory
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
void setDbService(const HcalDbService *service)
T const * product() const
Definition: ESHandle.h:86
HODigitizer * theHODigitizer
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:53
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HcalAmplifier * theZDCAmplifier
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::setHBHENoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 357 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setHBHENoiseSignalGenerator().

357  {
358  noiseGenerator->setParameterMap(theParameterMap);
359  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
361  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
362 }
void setParameterMap(HcalSimParameterMap *map)
HBHEDigitizer * theHBHEDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
HcalAmplifier * theHBHEAmplifier
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalElectronicsSim * theHBHEElectronicsSim
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 364 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFUpgradeDigitizer, and theParameterMap.

Referenced by HcalDigiProducer::setHFNoiseSignalGenerator().

364  {
365  noiseGenerator->setParameterMap(theParameterMap);
366  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
369  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
370 }
void setParameterMap(HcalSimParameterMap *map)
HcalElectronicsSim * theHFElectronicsSim
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
HcalAmplifier * theHFAmplifier
UpgradeDigitizer * theHFUpgradeDigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
void HcalDigitizer::setHONoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 372 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOSiPMDigitizer, and theParameterMap.

Referenced by HcalDigiProducer::setHONoiseSignalGenerator().

372  {
373  noiseGenerator->setParameterMap(theParameterMap);
374  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
377  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
378 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
HcalElectronicsSim * theHOElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalAmplifier * theHOAmplifier
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 380 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theParameterMap, theZDCAmplifier, theZDCDigitizer, and theZDCElectronicsSim.

Referenced by HcalDigiProducer::setZDCNoiseSignalGenerator().

380  {
381  noiseGenerator->setParameterMap(theParameterMap);
382  noiseGenerator->setElectronicsSim(theZDCElectronicsSim);
383  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
384  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
385 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:88
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalElectronicsSim * theZDCElectronicsSim
HcalAmplifier * theZDCAmplifier
void HcalDigitizer::updateGeometry ( const edm::EventSetup eventSetup)
private

Definition at line 625 of file HcalDigitizer.cc.

References buildHOSiPMCells(), DetId::Calo, HcalDigitizerImpl::fillCells(), CaloGeometry::getValidDetIds(), hbhegeo, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hfgeo, hogeo, CaloTDigitizer< Traits >::setDetIds(), HcalHitRelabeller::setGeometry(), CaloHitResponse::setGeometry(), HcalZDCDetId::SubdetectorId, theGeometry, theHBHEDetIds, theHBHEDigitizer, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFDigitizer, theHFResponse, theHFUpgradeDigitizer, theHOResponse, theHOSiPMResponse, theRecNumber, theRelabeller, theZDCDigitizer, theZDCResponse, and zdcgeo.

Referenced by checkGeometry().

625  {
633 
634  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
635  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
636  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
637  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
638  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
639  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
640  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
641 // std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
642  if(zdcCells.empty()) zdcgeo = false;
643  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
644  if(hoCells.empty()) hogeo = false;
645  if(hfCells.empty()) hfgeo = false;
646  // combine HB & HE
647 
648  theHBHEDetIds = hbCells;
649  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
650 
652  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
653  buildHOSiPMCells(hoCells, eventSetup);
656  theZDCDigitizer->setDetIds(zdcCells);
659 
660 // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
661  }
662 
663 }
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
void setGeometry(const CaloGeometry *&, const HcalDDDRecConstants *&)
const HcalDDDRecConstants * theRecNumber
Definition: HcalDigitizer.h:73
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
std::vector< DetId > theHBHEDetIds
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:93
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:94
ZDCDigitizer * theZDCDigitizer
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:96
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:91
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:72
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:95
HBHEDigitizer * theHBHESiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:92
UpgradeDigitizer * theHBHEUpgradeDigitizer

Member Data Documentation

double HcalDigitizer::deliveredLumi
private

Definition at line 150 of file HcalDigitizer.h.

Referenced by darkening(), and HcalDigitizer().

bool HcalDigitizer::hbhegeo
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::hfgeo
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

std::string HcalDigitizer::hitsProducer_
private

Definition at line 146 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::isHCAL
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

bool HcalDigitizer::isZDC
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

HEDarkening* HcalDigitizer::m_HEDarkening
private

Definition at line 151 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and HcalDigitizer().

HFRecalibration* HcalDigitizer::m_HFRecalibration
private

Definition at line 152 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and HcalDigitizer().

bool HcalDigitizer::relabel_
private

Definition at line 144 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theCoderFactory
private

Definition at line 106 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 72 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

HcalAmplifier* HcalDigitizer::theHBHEAmplifier
private
std::vector<DetId> HcalDigitizer::theHBHEDetIds
private

Definition at line 139 of file HcalDigitizer.h.

Referenced by updateGeometry().

HBHEDigitizer* HcalDigitizer::theHBHEDigitizer
private
HcalElectronicsSim* HcalDigitizer::theHBHEElectronicsSim
private

Definition at line 109 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHBHENoiseSignalGenerator(), and ~HcalDigitizer().

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 116 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHBHEResponse
private

Definition at line 91 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HBHEDigitizer* HcalDigitizer::theHBHESiPMDigitizer
private
CaloHitResponse* HcalDigitizer::theHBHESiPMResponse
private

Definition at line 92 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

UpgradeDigitizer* HcalDigitizer::theHBHEUpgradeDigitizer
private
HcalAmplifier* HcalDigitizer::theHFAmplifier
private
HFDigitizer* HcalDigitizer::theHFDigitizer
private
HcalElectronicsSim* HcalDigitizer::theHFElectronicsSim
private

Definition at line 110 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHFNoiseSignalGenerator(), and ~HcalDigitizer().

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 117 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHFResponse
private

Definition at line 95 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

UpgradeDigitizer* HcalDigitizer::theHFUpgradeDigitizer
private
HcalHitCorrection* HcalDigitizer::theHitCorrection
private
HcalAmplifier* HcalDigitizer::theHOAmplifier
private
HODigitizer* HcalDigitizer::theHODigitizer
private
HcalElectronicsSim* HcalDigitizer::theHOElectronicsSim
private

Definition at line 111 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHONoiseSignalGenerator(), and ~HcalDigitizer().

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 118 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOHPDDetIds
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

CaloHitResponse* HcalDigitizer::theHOResponse
private

Definition at line 93 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

int HcalDigitizer::theHOSiPMCode
private

Definition at line 148 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOSiPMDetIds
private

Definition at line 141 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

HODigitizer* HcalDigitizer::theHOSiPMDigitizer
private
HcalHitFilter HcalDigitizer::theHOSiPMHitFilter
private

Definition at line 119 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHOSiPMResponse
private

Definition at line 94 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HPDIonFeedbackSim* HcalDigitizer::theIonFeedback
private

Definition at line 105 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloVNoiseSignalGenerator* HcalDigitizer::theNoiseGenerator
private

Definition at line 124 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and ~HcalDigitizer().

CaloVNoiseHitGenerator* HcalDigitizer::theNoiseHitGenerator
private

Definition at line 125 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalSimParameterMap* HcalDigitizer::theParameterMap
private
const HcalDDDRecConstants* HcalDigitizer::theRecNumber
private

Definition at line 73 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

HcalHitRelabeller* HcalDigitizer::theRelabeller
private

Definition at line 135 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HcalShapes* HcalDigitizer::theShapes
private

Definition at line 89 of file HcalDigitizer.h.

Referenced by beginRun(), endRun(), and HcalDigitizer().

HcalTimeSlewSim* HcalDigitizer::theTimeSlewSim
private

Definition at line 123 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theUpgradeCoderFactory
private

Definition at line 107 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalElectronicsSim* HcalDigitizer::theUpgradeHBHEElectronicsSim
private

Definition at line 113 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalElectronicsSim* HcalDigitizer::theUpgradeHFElectronicsSim
private

Definition at line 114 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalAmplifier* HcalDigitizer::theZDCAmplifier
private
ZDCDigitizer* HcalDigitizer::theZDCDigitizer
private
HcalElectronicsSim* HcalDigitizer::theZDCElectronicsSim
private

Definition at line 112 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setZDCNoiseSignalGenerator(), and ~HcalDigitizer().

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 120 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theZDCResponse
private

Definition at line 96 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

bool HcalDigitizer::zdcgeo
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().