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 *)
 
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
 
HcalHitRelabellertheRelabeller
 
HcalShapestheShapes
 
HcalTimeSlewSimtheTimeSlewSim
 
HcalCoderFactorytheUpgradeCoderFactory
 
HcalElectronicsSimtheUpgradeHBHEElectronicsSim
 
HcalElectronicsSimtheUpgradeHFElectronicsSim
 
HcalAmplifiertheZDCAmplifier
 
ZDCDigitizertheZDCDigitizer
 
HcalElectronicsSimtheZDCElectronicsSim
 
ZDCHitFilter theZDCHitFilter
 
CaloHitResponsetheZDCResponse
 
bool zdcgeo
 

Detailed Description

Definition at line 42 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 79 of file HcalDigitizer.h.

Definition at line 81 of file HcalDigitizer.h.

Definition at line 80 of file HcalDigitizer.h.

Definition at line 83 of file HcalDigitizer.h.

Definition at line 82 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, edm::hlt::Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitsProducer_, CaloHitResponse::initHBHEScale(), 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),
87  theShapes(new HcalShapes()),
88  theHBHEResponse(0),
90  theHOResponse(0),
95  theHFAmplifier(0),
96  theHOAmplifier(0),
97  theZDCAmplifier(0),
98  theIonFeedback(0),
99  theCoderFactory(0),
108  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
109  theHOHitFilter(),
111  theZDCHitFilter(),
112  theHitCorrection(0),
115  theHBHEDigitizer(0),
117  theHODigitizer(0),
119  theHFDigitizer(0),
120  theZDCDigitizer(0),
123  theRelabeller(0),
124  isZDC(true),
125  isHCAL(true),
126  zdcgeo(true),
127  hbhegeo(true),
128  hogeo(true),
129  hfgeo(true),
130  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
131  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
132  deliveredLumi(0.),
133  m_HEDarkening(0),
135 {
136  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
137  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
138 
139  bool doNoise = ps.getParameter<bool>("doNoise");
140  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
141  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
142  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
143  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
144  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
145  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
146  bool doEmpty = ps.getParameter<bool>("doEmpty");
147  double HBtp = ps.getParameter<double>("HBTuningParameter");
148  double HEtp = ps.getParameter<double>("HETuningParameter");
149  double HFtp = ps.getParameter<double>("HFTuningParameter");
150  double HOtp = ps.getParameter<double>("HOTuningParameter");
151  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
152  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
153  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
154  bool agingFlagHE = ps.getParameter<bool>("HEDarkening");
155  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
156 
157 
158  if(PreMix1 && PreMix2) {
159  throw cms::Exception("Configuration")
160  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
161  "digi combination modes at the same time. Please set one mode to False\n"
162  "in the configuration file.";
163  }
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[0] << 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);
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"
308  // << std::endl;
309  }
311  if(theHFUpgradeDigitizer) {
313 
314  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise"
315  // << std::endl;
316  }
318  }
319 
320  if(agingFlagHE) m_HEDarkening = new HEDarkening();
321  if(agingFlagHF) m_HFRecalibration = new HFRecalibration();
322 }
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
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HOHitFilter theHOHitFilter
CaloTDigitizer< HcalUpgradeDigitizerTraits > UpgradeDigitizer
Definition: HcalDigitizer.h:83
void setUseOldHF(bool useOld)
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
void setHFtuningParameter(double tp)
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
HcalElectronicsSim * theUpgradeHFElectronicsSim
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:30
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:81
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
void setUseOldHO(bool useOld)
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:82
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:86
Creates electronics signals from hits.
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
void setHBHEScale(std::string &)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:80
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:37
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HFRecalibration * m_HFRecalibration
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHODigitizer
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
string fname
main script
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
void setHBtuningParameter(double tp)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:79
CaloVNoiseSignalGenerator * theNoiseGenerator
HcalDigitizer::~HcalDigitizer ( )
virtual

Definition at line 325 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.

325  {
328  if(theHODigitizer) delete theHODigitizer;
330  if(theHFDigitizer) delete theHFDigitizer;
331  delete theZDCDigitizer;
334  delete theParameterMap;
335  delete theHBHEResponse;
336  delete theHBHESiPMResponse;
337  delete theHOResponse;
338  delete theHOSiPMResponse;
339  delete theHFResponse;
340  delete theZDCResponse;
341  delete theHBHEElectronicsSim;
342  delete theHFElectronicsSim;
343  delete theHOElectronicsSim;
344  delete theZDCElectronicsSim;
347  delete theHBHEAmplifier;
348  delete theHFAmplifier;
349  delete theHOAmplifier;
350  delete theZDCAmplifier;
351  delete theCoderFactory;
352  delete theUpgradeCoderFactory;
353  delete theHitCorrection;
354  delete theNoiseGenerator;
355  if (theRelabeller) delete theRelabeller;
356 }
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
HcalElectronicsSim * theHOElectronicsSim
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHODigitizer
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
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 482 of file HcalDigitizer.cc.

References accumulateCaloHits(), edm::Event::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.

Referenced by HcalDigiProducer::accumulate().

482  {
483  // Step A: Get Inputs
484  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
486  e.getByLabel(zdcTag, zdcHandle);
487  isZDC = zdcHandle.isValid();
488 
489  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
491  e.getByLabel(hcalTag, hcalHandle);
492  isHCAL = hcalHandle.isValid();
493 
494  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine);
495 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:76
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *)
void HcalDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 497 of file HcalDigitizer.cc.

References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), PileUpEventPrincipal::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.

497  {
498  // Step A: Get Inputs
499  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
501  e.getByLabel(zdcTag, zdcHandle);
502  isZDC = zdcHandle.isValid();
503 
504  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
506  e.getByLabel(hcalTag, hcalHandle);
507  isHCAL = hcalHandle.isValid();
508 
509  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine);
510 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:76
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *)
void HcalDigitizer::accumulateCaloHits ( edm::Handle< std::vector< PCaloHit > > const &  hcalHits,
edm::Handle< std::vector< PCaloHit > > const &  zdcHits,
int  bunchCrossing,
CLHEP::HepRandomEngine *  engine 
)
private

Definition at line 435 of file HcalDigitizer.cc.

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

Referenced by accumulate().

435  {
436  // Step A: pass in inputs, and accumulate digirs
437  if(isHCAL) {
438  std::vector<PCaloHit> hcalHits = *hcalHandle.product();
439  //evaluate darkening before relabeling
441  darkening(hcalHits);
442  }
443  if (relabel_) {
444  // Relabel PCaloHits
445  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
446  theRelabeller->process(hcalHits);
447  }
448  if(theHitCorrection != 0) {
449  theHitCorrection->fillChargeSums(hcalHits);
450  }
451  if(hbhegeo) {
452  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
453  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing, engine);
455  // std::cout << "HcalDigitizer::accumulateCaloHits theHBHEUpgradeDigitizer->add" << std::endl;
456  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
457  }
458  }
459 
460  if(hogeo) {
461  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing, engine);
462  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
463  }
464 
465  if(hfgeo) {
466  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing, engine);
467  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
468  }
469  } else {
470  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
471  }
472 
473  if(isZDC) {
474  if(zdcgeo) {
475  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
476  }
477  } else {
478  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
479  }
480 }
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
void process(std::vector< PCaloHit > &hcalHits)
T const * product() const
Definition: Handle.h:81
HFRecalibration * m_HFRecalibration
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 580 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::beginRun().

580  {
581  checkGeometry(es);
582  theShapes->beginRun(es);
583 }
void checkGeometry(const edm::EventSetup &eventSetup)
HcalShapes * theShapes
Definition: HcalDigitizer.h:86
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 645 of file HcalDigitizer.cc.

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

645  {
646  // all HPD
647  if(theHOSiPMCode == 0) {
648  theHODigitizer->setDetIds(allCells);
649  } else if(theHOSiPMCode == 1) {
650  theHOSiPMDigitizer->setDetIds(allCells);
651  // FIXME pick Zecotek or hamamatsu?
652  } else if(theHOSiPMCode == 2) {
653  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
655  eventSetup.get<HcalMCParamsRcd>().get(p);
657  eventSetup.get<IdealGeometryRecord>().get(htopo);
658 
659  HcalMCParams mcParams(*p.product());
660  if (mcParams.topo()==0) {
661  mcParams.setTopo(htopo.product());
662  }
663 
664  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
665  detItr != allCells.end(); ++detItr) {
666  int shapeType = mcParams.getValues(*detItr)->signalShape();
667  if(shapeType == HcalShapes::ZECOTEK) {
668  zecotekDetIds.emplace_back(*detItr);
669  theHOSiPMDetIds.push_back(*detItr);
670  } else if(shapeType == HcalShapes::HAMAMATSU) {
671  hamamatsuDetIds.emplace_back(*detItr);
672  theHOSiPMDetIds.push_back(*detItr);
673  } else {
674  theHOHPDDetIds.push_back(*detItr);
675  }
676  }
677 
678  assert(theHODigitizer);
679  assert(theHOSiPMDigitizer);
683  // FIXME not applying a HitFilter to the HPDs, for now
684  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
685  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
686 
687  // make sure we don't got through this exercise again
688  theHOSiPMCode = -2;
689  }
690 }
void setDetIds(const std::vector< DetId > &detIds)
void setTopo(const HcalTopology *topo) const
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
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:55
T const * product() const
Definition: ESHandle.h:86
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
HODigitizer * theHOSiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
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 591 of file HcalDigitizer.cc.

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

Referenced by beginRun().

591  {
592  // TODO find a way to avoid doing this every event
594  eventSetup.get<CaloGeometryRecord>().get(geometry);
595  // See if it's been updated
596  if(&*geometry != theGeometry)
597  {
598  theGeometry = &*geometry;
599  updateGeometry(eventSetup);
600  }
601 }
const T & get() const
Definition: EventSetup.h:55
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
ESHandle< TrackerGeometry > geometry
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::darkening ( std::vector< PCaloHit > &  hcalHits)
private

Definition at line 692 of file HcalDigitizer.cc.

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

Referenced by accumulateCaloHits().

692  {
693 
694  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
695  uint32_t tmpId = hcalHits[ii].id();
696  int det, z, depth, ieta, phi, lay;
697  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
698 
699  bool darkened = false;
700  float dweight = 1.;
701 
702  //HE darkening
703  if(det==int(HcalEndcap) && m_HEDarkening){
704  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
705  darkened = true;
706  }
707 
708  //HF darkening - approximate: invert recalibration factor
709  else if(det==int(HcalForward) && m_HFRecalibration){
710  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
711  darkened = true;
712  }
713 
714  //create new hit with darkened energy
715  //if(darkened) hcalHits[ii] = PCaloHit(hcalHits[ii].energyEM()*dweight,hcalHits[ii].energyHad()*dweight,hcalHits[ii].time(),hcalHits[ii].geantTrackId(),hcalHits[ii].id());
716 
717  //reset hit energy
718  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
719  }
720 
721 }
int ii
Definition: cuy.py:588
float float float z
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
Definition: DDAxes.h:10
void HcalDigitizer::endRun ( void  )

Definition at line 586 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

586  {
587  theShapes->endRun();
588 }
HcalShapes * theShapes
Definition: HcalDigitizer.h:86
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 512 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().

512  {
513 
514  // Step B: Create empty output
515  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
516  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
517  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
518  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
519  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
520  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
521 
522  // Step C: Invoke the algorithm, getting back outputs.
523  if(isHCAL&&hbhegeo){
524  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult, engine);
525  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->run(*hbheResult, engine);
527  theHBHEUpgradeDigitizer->run(*hbheupgradeResult, engine);
528 
529  // std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
530  }
531  }
532  if(isHCAL&&hogeo) {
533  if(theHODigitizer) theHODigitizer->run(*hoResult, engine);
534  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult, engine);
535  }
536  if(isHCAL&&hfgeo) {
537  if(theHFDigitizer) theHFDigitizer->run(*hfResult, engine);
538  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult, engine);
539  }
540  if(isZDC&&zdcgeo) {
541  theZDCDigitizer->run(*zdcResult, engine);
542  }
543 
544  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
545  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
546  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
547  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
548  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
549  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
550 
551  /*
552  std::cout << std::endl;
553  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
554  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
555  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
556 
557  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
558  << std::endl;
559  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
560  << std::endl;
561  */
562 
563  // Step D: Put outputs into event
564  e.put(hbheResult);
565  e.put(hoResult);
566  e.put(hfResult);
567  e.put(zdcResult);
568  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
569  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
570 
571  // std::cout << std::endl << "========> HcalDigitizer e.put "
572  // << std::endl << std::endl;
573 
574  if(theHitCorrection) {
576  }
577 }
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:113
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 388 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), edm::EventSetup::get(), CaloTDigitizer< Traits >::initializeHits(), edm::ESHandle< class >::product(), HcalAmplifier::setADCPeds(), HcalAmplifier::setCholesky(), HcalCoderFactory::setDbService(), HcalAmplifier::setDbService(), HcalElectronicsSim::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().

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

Definition at line 359 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHBHENoiseSignalGenerator().

359  {
360  noiseGenerator->setParameterMap(theParameterMap);
361  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
363  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
364 }
void setParameterMap(HcalSimParameterMap *map)
HBHEDigitizer * theHBHEDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:34
HcalElectronicsSim * theHBHEElectronicsSim
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 366 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHFNoiseSignalGenerator().

366  {
367  noiseGenerator->setParameterMap(theParameterMap);
368  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
371  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
372 }
void setParameterMap(HcalSimParameterMap *map)
HcalElectronicsSim * theHFElectronicsSim
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
UpgradeDigitizer * theHFUpgradeDigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:34
void HcalDigitizer::setHONoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 374 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setHONoiseSignalGenerator().

374  {
375  noiseGenerator->setParameterMap(theParameterMap);
376  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
377  theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
378  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
379 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theHOElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:34
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HODigitizer * theHODigitizer
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 381 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::setZDCNoiseSignalGenerator().

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

Definition at line 604 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, theRelabeller, theZDCDigitizer, theZDCResponse, and zdcgeo.

Referenced by checkGeometry().

604  {
612 
613  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
614  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
615  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
616  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
617  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
618  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
619  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
620  //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
621  if(zdcCells.empty()) zdcgeo = false;
622  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
623  if(hoCells.empty()) hogeo = false;
624  if(hfCells.empty()) hfgeo = false;
625  // combine HB & HE
626 
627  theHBHEDetIds = hbCells;
628  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
629 
631  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
632  buildHOSiPMCells(hoCells, eventSetup);
635  theZDCDigitizer->setDetIds(zdcCells);
638 
639  // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
640  }
641 
642 }
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
void setGeometry(const CaloGeometry *&theGeometry)
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
std::vector< DetId > theHBHEDetIds
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
ZDCDigitizer * theZDCDigitizer
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HBHEDigitizer * theHBHESiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
UpgradeDigitizer * theHBHEUpgradeDigitizer

Member Data Documentation

double HcalDigitizer::deliveredLumi
private

Definition at line 147 of file HcalDigitizer.h.

Referenced by darkening(), and HcalDigitizer().

bool HcalDigitizer::hbhegeo
private

Definition at line 140 of file HcalDigitizer.h.

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

bool HcalDigitizer::hfgeo
private

Definition at line 140 of file HcalDigitizer.h.

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

std::string HcalDigitizer::hitsProducer_
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 140 of file HcalDigitizer.h.

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

bool HcalDigitizer::isHCAL
private

Definition at line 140 of file HcalDigitizer.h.

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

bool HcalDigitizer::isZDC
private

Definition at line 140 of file HcalDigitizer.h.

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

HEDarkening* HcalDigitizer::m_HEDarkening
private

Definition at line 148 of file HcalDigitizer.h.

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

HFRecalibration* HcalDigitizer::m_HFRecalibration
private

Definition at line 149 of file HcalDigitizer.h.

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

bool HcalDigitizer::relabel_
private

Definition at line 141 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theCoderFactory
private

Definition at line 103 of file HcalDigitizer.h.

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

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 70 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

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

Definition at line 136 of file HcalDigitizer.h.

Referenced by updateGeometry().

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

Definition at line 106 of file HcalDigitizer.h.

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

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 113 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHBHEResponse
private

Definition at line 88 of file HcalDigitizer.h.

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

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

Definition at line 89 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 107 of file HcalDigitizer.h.

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

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 114 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHFResponse
private

Definition at line 92 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 108 of file HcalDigitizer.h.

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

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 115 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

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

Definition at line 137 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

CaloHitResponse* HcalDigitizer::theHOResponse
private

Definition at line 90 of file HcalDigitizer.h.

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

int HcalDigitizer::theHOSiPMCode
private

Definition at line 145 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

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

Definition at line 138 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

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

Definition at line 116 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHOSiPMResponse
private

Definition at line 91 of file HcalDigitizer.h.

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

HPDIonFeedbackSim* HcalDigitizer::theIonFeedback
private

Definition at line 102 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloVNoiseSignalGenerator* HcalDigitizer::theNoiseGenerator
private

Definition at line 121 of file HcalDigitizer.h.

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

CaloVNoiseHitGenerator* HcalDigitizer::theNoiseHitGenerator
private

Definition at line 122 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalSimParameterMap* HcalDigitizer::theParameterMap
private
HcalHitRelabeller* HcalDigitizer::theRelabeller
private

Definition at line 132 of file HcalDigitizer.h.

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

HcalShapes* HcalDigitizer::theShapes
private

Definition at line 86 of file HcalDigitizer.h.

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

HcalTimeSlewSim* HcalDigitizer::theTimeSlewSim
private

Definition at line 120 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theUpgradeCoderFactory
private

Definition at line 104 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHBHEElectronicsSim
private

Definition at line 110 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHFElectronicsSim
private

Definition at line 111 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 109 of file HcalDigitizer.h.

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

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 117 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theZDCResponse
private

Definition at line 93 of file HcalDigitizer.h.

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

bool HcalDigitizer::zdcgeo
private

Definition at line 140 of file HcalDigitizer.h.

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