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 86 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_FULL_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.

86  :
87  theGeometry(0),
88  theRecNumber(0),
90  theShapes(new HcalShapes()),
91  theHBHEResponse(0),
93  theHOResponse(0),
98  theHFAmplifier(0),
99  theHOAmplifier(0),
100  theZDCAmplifier(0),
101  theIonFeedback(0),
102  theCoderFactory(0),
111  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
112  theHOHitFilter(),
114  theZDCHitFilter(),
115  theHitCorrection(0),
118  theHBHEDigitizer(0),
120  theHODigitizer(0),
122  theHFDigitizer(0),
123  theZDCDigitizer(0),
126  theRelabeller(0),
127  isZDC(true),
128  isHCAL(true),
129  zdcgeo(true),
130  hbhegeo(true),
131  hogeo(true),
132  hfgeo(true),
133  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
134  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
135  deliveredLumi(0.),
136  m_HEDarkening(0),
138 {
139  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
140  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
141 
142  bool doNoise = ps.getParameter<bool>("doNoise");
143  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
144  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
145  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
146  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
147  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
148  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
149  bool doEmpty = ps.getParameter<bool>("doEmpty");
150  double HBtp = ps.getParameter<double>("HBTuningParameter");
151  double HEtp = ps.getParameter<double>("HETuningParameter");
152  double HFtp = ps.getParameter<double>("HFTuningParameter");
153  double HOtp = ps.getParameter<double>("HOTuningParameter");
154  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
155  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
156  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
157  bool agingFlagHE = ps.getParameter<bool>("HEDarkening");
158  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
159  double minFCToDelay= ps.getParameter<double>("minFCToDelay");
160 
161  if(PreMix1 && PreMix2) {
162  throw cms::Exception("Configuration")
163  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
164  "digi combination modes at the same time. Please set one mode to False\n"
165  "in the configuration file.";
166  }
167 
168  // need to make copies, because they might get different noise generators
169  theHBHEAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
170  theHFAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
171  theHOAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
172  theZDCAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
177  theHBHEAmplifier->setUseOldHB(useOldNoiseHB);
178  theHBHEAmplifier->setUseOldHE(useOldNoiseHE);
179  theHFAmplifier->setUseOldHF(useOldNoiseHF);
180  theHOAmplifier->setUseOldHO(useOldNoiseHO);
181 
184 
185 // std::cout << "HcalDigitizer: theUpgradeCoderFactory created" << std::endl;
186 
193 
194 // std::cout << "HcalDigitizer: theUpgradeElectronicsSim created" << std::endl;
195 
196  // a code of 1 means make all cells SiPM
197  std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells"));
198  //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells"));
199  // 0 means none, 1 means all, and 2 means use hardcoded
200 
201 // std::cout << std::endl << " hbSiPMCells = " << hbSiPMCells.size() << std::endl;
202 
203  bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1);
204  bool doHOHPD = (theHOSiPMCode != 1);
205  bool doHBHESiPM = !hbSiPMCells.empty();
206  bool doHOSiPM = (theHOSiPMCode != 0);
207  if(doHBHEHPD) {
209  edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers";
211 
214  bool changeResponse = ps.getParameter<bool>("ChangeResponse");
215  edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile");
216  if (changeResponse) {
217  std::string corrFileName = fname.fullPath();
218  edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName;
219  theHBHEResponse->setHBHEScale(corrFileName); //GMA
220  }
221  }
222  if(doHOHPD) {
226  }
227 
228  if(doHBHESiPM) {
231  if (doHBHEUpgrade) {
233 
234 // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer created" << std::endl;
235 
236  } else {
238  }
239  }
240  if(doHOSiPM) {
244  }
245 
246  // if both are present, fill the SiPM cells now
247  if(doHBHEHPD && doHBHESiPM) {
248 
249 // std::cout << "HcalDigitizer: fill the SiPM cells now" << std::endl;
250 
252  }
253 
256 
257  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
258  //initialize: they won't be called later if flag is set
259  theTimeSlewSim = 0;
260  if(doTimeSlew) {
261  // no time slewing for HF
262  theTimeSlewSim = new HcalTimeSlewSim(theParameterMap,minFCToDelay);
263  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim);
264  theHOAmplifier->setTimeSlewSim(theTimeSlewSim);
265  theZDCAmplifier->setTimeSlewSim(theTimeSlewSim);
266  }
267 
268  if (doHFUpgrade) {
270 
271 // std::cout << "HcalDigitizer: theHFUpgradeDigitizer created" << std::endl;
272 
273  } else {
275  }
277 
278  edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
279  relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
280 // std::cout << "Flag to see if Hit Relabeller to be initiated " << relabel_ << std::endl;
281  if (relabel_) {
283  }
284 
285  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
286  if(doHPDNoise) {
287  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
291  }
292 
293  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
296  if(ps.getParameter<bool>("doThermalNoise")) {
298  }
299  }
300 
301  if(ps.getParameter<bool>("injectTestHits") ) {
309 
310 // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise" << std::endl;
311  }
313  if(theHFUpgradeDigitizer) {
315 
316 // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise" << std::endl;
317  }
319  }
320 
321  if(agingFlagHE) m_HEDarkening = new HEDarkening();
322  if(agingFlagHF) m_HFRecalibration = new HFRecalibration();
323 }
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 326 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.

326  {
329  if(theHODigitizer) delete theHODigitizer;
331  if(theHFDigitizer) delete theHFDigitizer;
332  delete theZDCDigitizer;
335  delete theParameterMap;
336  delete theHBHEResponse;
337  delete theHBHESiPMResponse;
338  delete theHOResponse;
339  delete theHOSiPMResponse;
340  delete theHFResponse;
341  delete theZDCResponse;
342  delete theHBHEElectronicsSim;
343  delete theHFElectronicsSim;
344  delete theHOElectronicsSim;
345  delete theZDCElectronicsSim;
348  delete theHBHEAmplifier;
349  delete theHFAmplifier;
350  delete theHOAmplifier;
351  delete theZDCAmplifier;
352  delete theCoderFactory;
353  delete theUpgradeCoderFactory;
354  delete theHitCorrection;
355  delete theNoiseGenerator;
356  if (theRelabeller) delete theRelabeller;
357 }
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 507 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().

507  {
508  // Step A: Get Inputs
509  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
511  e.getByLabel(zdcTag, zdcHandle);
512  isZDC = zdcHandle.isValid();
513 
514  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
516  e.getByLabel(hcalTag, hcalHandle);
517  isHCAL = hcalHandle.isValid();
518 
520  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
521  const HcalTopology *htopoP=htopo.product();
522 
523  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine, htopoP);
524 }
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 526 of file HcalDigitizer.cc.

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

526  {
527  // Step A: Get Inputs
528  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
530  e.getByLabel(zdcTag, zdcHandle);
531  isZDC = zdcHandle.isValid();
532 
533  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
535  e.getByLabel(hcalTag, hcalHandle);
536  isHCAL = hcalHandle.isValid();
537 
539  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
540  const HcalTopology *htopoP=htopo.product();
541 
542  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine, htopoP);
543 }
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 437 of file HcalDigitizer.cc.

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

Referenced by accumulate().

437  {
438 
439  // Step A: pass in inputs, and accumulate digirs
440  if(isHCAL) {
441  std::vector<PCaloHit> hcalHitsOrig = *hcalHandle.product();
442  std::vector<PCaloHit> hcalHits;
443  hcalHits.reserve(hcalHitsOrig.size());
444 
445  //evaluate darkening before relabeling
447  darkening(hcalHitsOrig);
448  }
449  // Relabel PCaloHits if necessary
450  if (relabel_) {
451  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
452  theRelabeller->process(hcalHitsOrig);
453  }
454 
455  //eliminate bad hits
456  for (unsigned int i=0; i< hcalHitsOrig.size(); i++) {
457  DetId id(hcalHitsOrig[i].id());
458  HcalDetId hid(id);
459  if (!htopoP->validHcal(hid)) {
460  edm::LogError("HcalDigitizer") << "bad hcal id found in digitizer. Skipping " << id.rawId() << std::endl;
461  } else {
462 #ifdef DebugLog
463  std::cout << "HcalDigitizer format " << hid.oldFormat() << " for " << hid << std::endl;
464 #endif
465  DetId newid = DetId(hid.newForm());
466 #ifdef DebugLog
467  std::cout << "Hit " << i << " out of " << hcalHits.size() << " " << std::hex << id.rawId() << " --> " << newid.rawId() << std::dec << " " << HcalDetId(newid.rawId()) << '\n';
468 #endif
469  hcalHitsOrig[i].setID(newid.rawId());
470  hcalHits.push_back(hcalHitsOrig[i]);
471  }
472  }
473 
474  if(theHitCorrection != 0) {
475  theHitCorrection->fillChargeSums(hcalHits);
476  }
477  if(hbhegeo) {
478  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
479  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing, engine);
481  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
482  }
483  }
484 
485  if(hogeo) {
486  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing, engine);
487  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
488  }
489 
490  if(hfgeo) {
491  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing, engine);
492  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
493  }
494  } else {
495  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
496  }
497 
498  if(isZDC) {
499  if(zdcgeo) {
500  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
501  }
502  } else {
503  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
504  }
505 }
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
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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
tuple cout
Definition: gather_cfg.py:145
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 613 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::beginRun().

613  {
614  checkGeometry(es);
615  theShapes->beginRun(es);
616 }
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 682 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().

682  {
683  // all HPD
684 
685  if(theHOSiPMCode == 0) {
686  theHODigitizer->setDetIds(allCells);
687  } else if(theHOSiPMCode == 1) {
688  theHOSiPMDigitizer->setDetIds(allCells);
689  // FIXME pick Zecotek or hamamatsu?
690  } else if(theHOSiPMCode == 2) {
691  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
693  eventSetup.get<HcalMCParamsRcd>().get(p);
695  eventSetup.get<HcalRecNumberingRecord>().get(htopo);
696 
697  HcalMCParams mcParams(*p.product());
698  if (mcParams.topo()==0) {
699  mcParams.setTopo(htopo.product());
700  }
701 
702  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
703  detItr != allCells.end(); ++detItr) {
704  int shapeType = mcParams.getValues(*detItr)->signalShape();
705  if(shapeType == HcalShapes::ZECOTEK) {
706  zecotekDetIds.emplace_back(*detItr);
707  theHOSiPMDetIds.push_back(*detItr);
708  } else if(shapeType == HcalShapes::HAMAMATSU) {
709  hamamatsuDetIds.emplace_back(*detItr);
710  theHOSiPMDetIds.push_back(*detItr);
711  } else {
712  theHOHPDDetIds.push_back(*detItr);
713  }
714  }
715 
721  // FIXME not applying a HitFilter to the HPDs, for now
722  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
723  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
724 
725  // make sure we don't got through this exercise again
726  theHOSiPMCode = -2;
727  }
728 }
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 624 of file HcalDigitizer.cc.

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

Referenced by beginRun().

624  {
625  // TODO find a way to avoid doing this every event
627  eventSetup.get<CaloGeometryRecord>().get(geometry);
629  eventSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
630 
631  // See if it's been updated
632  if (&*geometry != theGeometry) {
633  theGeometry = &*geometry;
634  theRecNumber= &*pHRNDC;
635  updateGeometry(eventSetup);
636  }
637 }
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 730 of file HcalDigitizer.cc.

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

Referenced by accumulateCaloHits().

730  {
731 
732  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
733  uint32_t tmpId = hcalHits[ii].id();
734  int det, z, depth, ieta, phi, lay;
735  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
736 
737  bool darkened = false;
738  float dweight = 1.;
739 
740  if(det==int(HcalEndcap) && m_HEDarkening){
741  //HE darkening
742  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
743  darkened = true;
744  } else if(det==int(HcalForward) && m_HFRecalibration){
745  //HF darkening - approximate: invert recalibration factor
746  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
747  darkened = true;
748  }
749 
750  //create new hit with darkened energy
751  //if(darkened) hcalHits[ii] = PCaloHit(hcalHits[ii].energyEM()*dweight,hcalHits[ii].energyHad()*dweight,hcalHits[ii].time(),hcalHits[ii].geantTrackId(),hcalHits[ii].id());
752 
753  //reset hit energy
754  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
755  }
756 
757 }
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 619 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

619  {
620  theShapes->endRun();
621 }
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 545 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), gather_cfg::cout, 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().

545  {
546 
547  // Step B: Create empty output
548  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
549  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
550  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
551  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
552  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
553  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
554 
555  // Step C: Invoke the algorithm, getting back outputs.
556  if(isHCAL&&hbhegeo){
557  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult, engine);
558  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->run(*hbheResult, engine);
560  theHBHEUpgradeDigitizer->run(*hbheupgradeResult, engine);
561 #ifdef DebugLog
562  std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
563 #endif
564  }
565  }
566  if(isHCAL&&hogeo) {
567  if(theHODigitizer) theHODigitizer->run(*hoResult, engine);
568  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult, engine);
569  }
570  if(isHCAL&&hfgeo) {
571  if(theHFDigitizer) theHFDigitizer->run(*hfResult, engine);
572  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult, engine);
573  }
574  if(isZDC&&zdcgeo) {
575  theZDCDigitizer->run(*zdcResult, engine);
576  }
577 
578  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
579  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
580  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
581  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
582  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
583  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
584 
585 #ifdef DebugLog
586  std::cout << std::endl;
587  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
588  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
589  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
590 
591  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
592  << std::endl;
593  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
594  << std::endl;
595 #endif
596 
597  // Step D: Put outputs into event
598  e.put(hbheResult);
599  e.put(hoResult);
600  e.put(hfResult);
601  e.put(zdcResult);
602  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
603  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
604 #ifdef DebugLog
605  std::cout << std::endl << "========> HcalDigitizer e.put " << std::endl << std::endl;
606 #endif
607  if(theHitCorrection) {
609  }
610 }
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:121
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
tuple cout
Definition: gather_cfg.py:145
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)

Produces the EDM products,

Definition at line 390 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().

390  {
391  // get the appropriate gains, noises, & widths for this event
392  edm::ESHandle<HcalDbService> conditions;
393  eventSetup.get<HcalDbRecord>().get(conditions);
394  theHBHEAmplifier->setDbService(conditions.product());
395  theHFAmplifier->setDbService(conditions.product());
396  theHOAmplifier->setDbService(conditions.product());
397  theZDCAmplifier->setDbService(conditions.product());
400 
401  theCoderFactory->setDbService(conditions.product());
403  theParameterMap->setDbService(conditions.product());
404 
406  if (eventSetup.find(edm::eventsetup::EventSetupRecordKey::makeKey<HcalCholeskyMatricesRcd>())) {
407  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
408  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
409  theHBHEAmplifier->setCholesky(myCholesky);
410  theHFAmplifier->setCholesky(myCholesky);
411  theHOAmplifier->setCholesky(myCholesky);
412  }
413  edm::ESHandle<HcalPedestals> pedshandle;
414  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
415  const HcalPedestals * myADCPedestals = pedshandle.product();
416 
417  theHBHEAmplifier->setADCPeds(myADCPedestals);
418  theHFAmplifier->setADCPeds(myADCPedestals);
419  theHOAmplifier->setADCPeds(myADCPedestals);
420 
421  if(theHitCorrection != 0) {
423  }
424 
425  //initialize hits
434 
435 }
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 360 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHBHENoiseSignalGenerator().

360  {
361  noiseGenerator->setParameterMap(theParameterMap);
362  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
364  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
365 }
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 367 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHFNoiseSignalGenerator().

367  {
368  noiseGenerator->setParameterMap(theParameterMap);
369  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
372  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
373 }
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 375 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHONoiseSignalGenerator().

375  {
376  noiseGenerator->setParameterMap(theParameterMap);
377  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
380  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
381 }
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 383 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setZDCNoiseSignalGenerator().

383  {
384  noiseGenerator->setParameterMap(theParameterMap);
385  noiseGenerator->setElectronicsSim(theZDCElectronicsSim);
386  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
387  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
388 }
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 640 of file HcalDigitizer.cc.

References buildHOSiPMCells(), DetId::Calo, gather_cfg::cout, 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().

640  {
648 
649  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
650  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
651  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
652  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
653  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
654  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
655  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
656 // std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
657  if(zdcCells.empty()) zdcgeo = false;
658  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
659  if(hoCells.empty()) hogeo = false;
660  if(hfCells.empty()) hfgeo = false;
661  // combine HB & HE
662 
663  theHBHEDetIds = hbCells;
664  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
665 
667  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
668  buildHOSiPMCells(hoCells, eventSetup);
671  theZDCDigitizer->setDetIds(zdcCells);
674 #ifdef DebugLog
675  std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
676 #endif
677  }
678 
679 }
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
tuple cout
Definition: gather_cfg.py:145
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().