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)
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c)
 
void beginRun (const edm::EventSetup &es)
 
void endRun ()
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c)
 
 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)
 
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 38 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 75 of file HcalDigitizer.h.

Definition at line 77 of file HcalDigitizer.h.

Definition at line 76 of file HcalDigitizer.h.

Definition at line 79 of file HcalDigitizer.h.

Definition at line 78 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, edm::hlt::Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, edm::RandomNumberGenerator::getEngine(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitsProducer_, CaloHitResponse::initHBHEScale(), edm::Service< T >::isAvailable(), 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(), HPDIonFeedbackSim::setRandomEngine(), HcalHitCorrection::setRandomEngine(), CaloTDigitizer< Traits >::setRandomEngine(), 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, theHitCorrection, 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),
89  theShapes(new HcalShapes()),
90  theHBHEResponse(0),
92  theHOResponse(0),
97  theHFAmplifier(0),
98  theHOAmplifier(0),
99  theZDCAmplifier(0),
100  theIonFeedback(0),
101  theCoderFactory(0),
110  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
111  theHOHitFilter(),
113  theZDCHitFilter(),
114  theHitCorrection(0),
117  theHBHEDigitizer(0),
119  theHODigitizer(0),
121  theHFDigitizer(0),
122  theZDCDigitizer(0),
125  theRelabeller(0),
126  isZDC(true),
127  isHCAL(true),
128  zdcgeo(true),
129  hbhegeo(true),
130  hogeo(true),
131  hfgeo(true),
132  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
133  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
134  deliveredLumi(0.),
135  m_HEDarkening(0),
137 {
138  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
139  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
140 
141  bool doNoise = ps.getParameter<bool>("doNoise");
142  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
143  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
144  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
145  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
146  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
147  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
148  bool doEmpty = ps.getParameter<bool>("doEmpty");
149  double HBtp = ps.getParameter<double>("HBTuningParameter");
150  double HEtp = ps.getParameter<double>("HETuningParameter");
151  double HFtp = ps.getParameter<double>("HFTuningParameter");
152  double HOtp = ps.getParameter<double>("HOTuningParameter");
153  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
154  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
155  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
156  bool agingFlagHE = ps.getParameter<bool>("HEDarkening");
157  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
158 
159 
160  if(PreMix1 && PreMix2) {
161  throw cms::Exception("Configuration")
162  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
163  "digi combination modes at the same time. Please set one mode to False\n"
164  "in the configuration file.";
165  }
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[0] << 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);
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  if (relabel_) {
282  }
283 
284  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
285  if(doHPDNoise) {
286  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
290  }
291 
292  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
295  if(ps.getParameter<bool>("doThermalNoise")) {
297  }
298  }
299 
300  if(ps.getParameter<bool>("injectTestHits") ) {
308 
309  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise"
310  // << std::endl;
311  }
313  if(theHFUpgradeDigitizer) {
315 
316  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise"
317  // << std::endl;
318  }
320  }
321 
323  if ( ! rng.isAvailable()) {
324  throw cms::Exception("Configuration")
325  << "HcalDigitizer requires the RandomNumberGeneratorService\n"
326  "which is not present in the configuration file. You must add the service\n"
327  "in the configuration file or remove the modules that require it.";
328  }
329 
330  CLHEP::HepRandomEngine& engine = rng->getEngine();
337  if(theTimeSlewSim) theTimeSlewSim->setRandomEngine(engine);
341 
343 
344  if(agingFlagHE) m_HEDarkening = new HEDarkening();
345  if(agingFlagHF) m_HFRecalibration = new HFRecalibration();
346 }
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:79
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void setUseOldHF(bool useOld)
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
void setHFtuningParameter(double tp)
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:94
HcalElectronicsSim * theUpgradeHFElectronicsSim
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:99
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:29
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:77
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:93
void setUseOldHO(bool useOld)
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:78
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:82
Creates electronics signals from hits.
void setRandomEngine(CLHEP::HepRandomEngine &engine)
need a shaper in order to set thermal noise
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
Definition: HcalDigitizer.h:98
bool isAvailable() const
Definition: Service.h:46
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:86
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:87
void setHBHEScale(std::string &)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:89
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:76
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:36
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:95
HFRecalibration * m_HFRecalibration
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:84
HODigitizer * theHODigitizer
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:66
string fname
main script
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:85
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void setHBtuningParameter(double tp)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:96
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:75
CaloVNoiseSignalGenerator * theNoiseGenerator
HcalDigitizer::~HcalDigitizer ( )
virtual

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

349  {
352  if(theHODigitizer) delete theHODigitizer;
354  if(theHFDigitizer) delete theHFDigitizer;
355  delete theZDCDigitizer;
358  delete theParameterMap;
359  delete theHBHEResponse;
360  delete theHBHESiPMResponse;
361  delete theHOResponse;
362  delete theHOSiPMResponse;
363  delete theHFResponse;
364  delete theZDCResponse;
365  delete theHBHEElectronicsSim;
366  delete theHFElectronicsSim;
367  delete theHOElectronicsSim;
368  delete theZDCElectronicsSim;
371  delete theHBHEAmplifier;
372  delete theHFAmplifier;
373  delete theHOAmplifier;
374  delete theZDCAmplifier;
375  delete theCoderFactory;
376  delete theUpgradeCoderFactory;
377  delete theHitCorrection;
378  delete theNoiseGenerator;
379  if (theRelabeller) delete theRelabeller;
380 }
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:94
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:99
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:93
HcalElectronicsSim * theHOElectronicsSim
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:86
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:87
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:89
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:95
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:84
HODigitizer * theHODigitizer
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:85
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:96
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloVNoiseSignalGenerator * theNoiseGenerator

Member Function Documentation

void HcalDigitizer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c 
)

Definition at line 506 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::accumulate(), and edm::DataMixingHcalDigiWorkerProd::addHcalSignals().

506  {
507  // Step A: Get Inputs
508  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
510  e.getByLabel(zdcTag, zdcHandle);
511  isZDC = zdcHandle.isValid();
512 
513  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
515  e.getByLabel(hcalTag, hcalHandle);
516  isHCAL = hcalHandle.isValid();
517 
518  accumulateCaloHits(hcalHandle, zdcHandle, 0);
519 }
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)
void HcalDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c 
)

Definition at line 521 of file HcalDigitizer.cc.

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

521  {
522  // Step A: Get Inputs
523  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
525  e.getByLabel(zdcTag, zdcHandle);
526  isZDC = zdcHandle.isValid();
527 
528  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
530  e.getByLabel(hcalTag, hcalHandle);
531  isHCAL = hcalHandle.isValid();
532 
533  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing());
534 }
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)
void HcalDigitizer::accumulateCaloHits ( edm::Handle< std::vector< PCaloHit > > const &  hcalHits,
edm::Handle< std::vector< PCaloHit > > const &  zdcHits,
int  bunchCrossing 
)
private

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

459  {
460  // Step A: pass in inputs, and accumulate digirs
461  if(isHCAL) {
462  std::vector<PCaloHit> hcalHits = *hcalHandle.product();
463  //evaluate darkening before relabeling
465  darkening(hcalHits);
466  }
467  if (relabel_) {
468  // Relabel PCaloHits
469  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
470  theRelabeller->process(hcalHits);
471  }
472  if(theHitCorrection != 0) {
473  theHitCorrection->fillChargeSums(hcalHits);
474  }
475  if(hbhegeo) {
476  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing);
477  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing);
479  // std::cout << "HcalDigitizer::accumulateCaloHits theHBHEUpgradeDigitizer->add" << std::endl;
480  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing);
481  }
482  }
483 
484  if(hogeo) {
485  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing);
486  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing);
487  }
488 
489  if(hfgeo) {
490  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing);
491  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing);
492  }
493  } else {
494  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
495  }
496 
497  if(isZDC) {
498  if(zdcgeo) {
499  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing);
500  }
501  } else {
502  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
503  }
504 }
HBHEDigitizer * theHBHEDigitizer
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
void darkening(std::vector< PCaloHit > &hcalHits)
HFDigitizer * theHFDigitizer
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
void fillChargeSums(MixCollection< PCaloHit > &hits)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
void process(std::vector< PCaloHit > &hcalHits)
HFRecalibration * m_HFRecalibration
HODigitizer * theHODigitizer
T const * product() const
Definition: Handle.h:81
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 604 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::beginRun(), and edm::DataMixingHcalDigiWorkerProd::beginRun().

604  {
605  checkGeometry(es);
606  theShapes->beginRun(es);
607 }
void checkGeometry(const edm::EventSetup &eventSetup)
HcalShapes * theShapes
Definition: HcalDigitizer.h:82
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 669 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().

669  {
670  // all HPD
671  if(theHOSiPMCode == 0) {
672  theHODigitizer->setDetIds(allCells);
673  } else if(theHOSiPMCode == 1) {
674  theHOSiPMDigitizer->setDetIds(allCells);
675  // FIXME pick Zecotek or hamamatsu?
676  } else if(theHOSiPMCode == 2) {
677  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
679  eventSetup.get<HcalMCParamsRcd>().get(p);
681  eventSetup.get<IdealGeometryRecord>().get(htopo);
682 
683  HcalMCParams mcParams(*p.product());
684  if (mcParams.topo()==0) {
685  mcParams.setTopo(htopo.product());
686  }
687 
688  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
689  detItr != allCells.end(); ++detItr) {
690  int shapeType = mcParams.getValues(*detItr)->signalShape();
691  if(shapeType == HcalShapes::ZECOTEK) {
692  zecotekDetIds.emplace_back(*detItr);
693  theHOSiPMDetIds.push_back(*detItr);
694  } else if(shapeType == HcalShapes::HAMAMATSU) {
695  hamamatsuDetIds.emplace_back(*detItr);
696  theHOSiPMDetIds.push_back(*detItr);
697  } else {
698  theHOHPDDetIds.push_back(*detItr);
699  }
700  }
701 
702  assert(theHODigitizer);
703  assert(theHOSiPMDigitizer);
707  // FIXME not applying a HitFilter to the HPDs, for now
708  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
709  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
710 
711  // make sure we don't got through this exercise again
712  theHOSiPMCode = -2;
713  }
714 }
void setDetIds(const std::vector< DetId > &detIds)
void setTopo(const HcalTopology *topo) const
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
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:62
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 615 of file HcalDigitizer.cc.

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

Referenced by beginRun().

615  {
616  // TODO find a way to avoid doing this every event
618  eventSetup.get<CaloGeometryRecord>().get(geometry);
619  // See if it's been updated
620  if(&*geometry != theGeometry)
621  {
622  theGeometry = &*geometry;
623  updateGeometry(eventSetup);
624  }
625 }
const T & get() const
Definition: EventSetup.h:55
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:66
ESHandle< TrackerGeometry > geometry
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::darkening ( std::vector< PCaloHit > &  hcalHits)
private

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

716  {
717 
718  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
719  uint32_t tmpId = hcalHits[ii].id();
720  int det, z, depth, ieta, phi, lay;
721  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
722 
723  bool darkened = false;
724  float dweight = 1.;
725 
726  //HE darkening
727  if(det==int(HcalEndcap) && m_HEDarkening){
728  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
729  darkened = true;
730  }
731 
732  //HF darkening - approximate: invert recalibration factor
733  else if(det==int(HcalForward) && m_HFRecalibration){
734  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
735  darkened = true;
736  }
737 
738  //create new hit with darkened energy
739  //if(darkened) hcalHits[ii] = PCaloHit(hcalHits[ii].energyEM()*dweight,hcalHits[ii].energyHad()*dweight,hcalHits[ii].time(),hcalHits[ii].geantTrackId(),hcalHits[ii].id());
740 
741  //reset hit energy
742  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
743  }
744 
745 }
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 610 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

610  {
611  theShapes->endRun();
612 }
HcalShapes * theShapes
Definition: HcalDigitizer.h:82
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 
)

Definition at line 536 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(), and edm::DataMixingHcalDigiWorkerProd::putHcal().

536  {
537 
538  // Step B: Create empty output
539  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
540  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
541  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
542  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
543  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
544  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
545 
546  // Step C: Invoke the algorithm, getting back outputs.
547  if(isHCAL&&hbhegeo){
548  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult);
551  theHBHEUpgradeDigitizer->run(*hbheupgradeResult);
552 
553  // std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
554  }
555  }
556  if(isHCAL&&hogeo) {
557  if(theHODigitizer) theHODigitizer->run(*hoResult);
558  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult);
559  }
560  if(isHCAL&&hfgeo) {
561  if(theHFDigitizer) theHFDigitizer->run(*hfResult);
562  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult);
563  }
564  if(isZDC&&zdcgeo) {
565  theZDCDigitizer->run(*zdcResult);
566  }
567 
568  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
569  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
570  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
571  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
572  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
573  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
574 
575  /*
576  std::cout << std::endl;
577  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
578  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
579  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
580 
581  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
582  << std::endl;
583  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
584  << std::endl;
585  */
586 
587  // Step D: Put outputs into event
588  e.put(hbheResult);
589  e.put(hoResult);
590  e.put(hfResult);
591  e.put(zdcResult);
592  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
593  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
594 
595  // std::cout << std::endl << "========> HcalDigitizer e.put "
596  // << std::endl << std::endl;
597 
598  if(theHitCorrection) {
600  }
601 }
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:116
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 412 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(), and edm::DataMixingHcalDigiWorkerProd::initializeEvent().

412  {
413  // get the appropriate gains, noises, & widths for this event
414  edm::ESHandle<HcalDbService> conditions;
415  eventSetup.get<HcalDbRecord>().get(conditions);
416  theHBHEAmplifier->setDbService(conditions.product());
417  theHFAmplifier->setDbService(conditions.product());
418  theHOAmplifier->setDbService(conditions.product());
419  theZDCAmplifier->setDbService(conditions.product());
422 
423  theCoderFactory->setDbService(conditions.product());
425  theParameterMap->setDbService(conditions.product());
426 
428  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
429  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
430 
431  edm::ESHandle<HcalPedestals> pedshandle;
432  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
433  const HcalPedestals * myADCPedestals = pedshandle.product();
434 
435  theHBHEAmplifier->setCholesky(myCholesky);
436  theHFAmplifier->setCholesky(myCholesky);
437  theHOAmplifier->setCholesky(myCholesky);
438 
439  theHBHEAmplifier->setADCPeds(myADCPedestals);
440  theHFAmplifier->setADCPeds(myADCPedestals);
441  theHOAmplifier->setADCPeds(myADCPedestals);
442 
443  if(theHitCorrection != 0) {
445  }
446 
447  //initialize hits
456 
457 }
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
void initializeHits()
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:52
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:94
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:99
HcalCoderFactory * theUpgradeCoderFactory
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:93
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:95
void setDbService(const HcalDbService *service)
T const * product() const
Definition: ESHandle.h:62
HODigitizer * theHODigitizer
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:51
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:96
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::setHBHENoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 383 of file HcalDigitizer.cc.

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

383  {
384  noiseGenerator->setParameterMap(theParameterMap);
385  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
387  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
388 }
void setParameterMap(HcalSimParameterMap *map)
HBHEDigitizer * theHBHEDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:93
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
HcalElectronicsSim * theHBHEElectronicsSim
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 390 of file HcalDigitizer.cc.

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

390  {
391  noiseGenerator->setParameterMap(theParameterMap);
392  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
395  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
396 }
void setParameterMap(HcalSimParameterMap *map)
HcalElectronicsSim * theHFElectronicsSim
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:94
UpgradeDigitizer * theHFUpgradeDigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
void HcalDigitizer::setHONoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 398 of file HcalDigitizer.cc.

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

398  {
399  noiseGenerator->setParameterMap(theParameterMap);
400  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
401  theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
402  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
403 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
HcalElectronicsSim * theHOElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:95
HODigitizer * theHODigitizer
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 405 of file HcalDigitizer.cc.

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

405  {
406  noiseGenerator->setParameterMap(theParameterMap);
407  noiseGenerator->setElectronicsSim(theZDCElectronicsSim);
408  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
409  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
410 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:81
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
HcalElectronicsSim * theZDCElectronicsSim
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:96
void HcalDigitizer::updateGeometry ( const edm::EventSetup eventSetup)
private

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

628  {
636 
637  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
638  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
639  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
640  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
641  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
642  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
643  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
644  //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
645  if(zdcCells.empty()) zdcgeo = false;
646  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
647  if(hoCells.empty()) hogeo = false;
648  if(hfCells.empty()) hfgeo = false;
649  // combine HB & HE
650 
651  theHBHEDetIds = hbCells;
652  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
653 
655  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
656  buildHOSiPMCells(hoCells, eventSetup);
659  theZDCDigitizer->setDetIds(zdcCells);
662 
663  // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
664  }
665 
666 }
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:86
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:87
ZDCDigitizer * theZDCDigitizer
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:89
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:84
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:66
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:88
HBHEDigitizer * theHBHESiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:85
UpgradeDigitizer * theHBHEUpgradeDigitizer

Member Data Documentation

double HcalDigitizer::deliveredLumi
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by darkening(), and HcalDigitizer().

bool HcalDigitizer::hbhegeo
private

Definition at line 136 of file HcalDigitizer.h.

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

bool HcalDigitizer::hfgeo
private

Definition at line 136 of file HcalDigitizer.h.

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

std::string HcalDigitizer::hitsProducer_
private

Definition at line 139 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 136 of file HcalDigitizer.h.

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

bool HcalDigitizer::isHCAL
private

Definition at line 136 of file HcalDigitizer.h.

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

bool HcalDigitizer::isZDC
private

Definition at line 136 of file HcalDigitizer.h.

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

HEDarkening* HcalDigitizer::m_HEDarkening
private

Definition at line 144 of file HcalDigitizer.h.

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

HFRecalibration* HcalDigitizer::m_HFRecalibration
private

Definition at line 145 of file HcalDigitizer.h.

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

bool HcalDigitizer::relabel_
private

Definition at line 137 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theCoderFactory
private

Definition at line 99 of file HcalDigitizer.h.

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

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 66 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

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

Definition at line 132 of file HcalDigitizer.h.

Referenced by updateGeometry().

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

Definition at line 102 of file HcalDigitizer.h.

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

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 109 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHBHEResponse
private

Definition at line 84 of file HcalDigitizer.h.

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

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

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

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

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 110 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHFResponse
private

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

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

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 111 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

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

Definition at line 133 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

CaloHitResponse* HcalDigitizer::theHOResponse
private

Definition at line 86 of file HcalDigitizer.h.

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

int HcalDigitizer::theHOSiPMCode
private

Definition at line 141 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

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

Definition at line 134 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

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

Definition at line 112 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHOSiPMResponse
private

Definition at line 87 of file HcalDigitizer.h.

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

HPDIonFeedbackSim* HcalDigitizer::theIonFeedback
private

Definition at line 98 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloVNoiseSignalGenerator* HcalDigitizer::theNoiseGenerator
private

Definition at line 117 of file HcalDigitizer.h.

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

CaloVNoiseHitGenerator* HcalDigitizer::theNoiseHitGenerator
private

Definition at line 118 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

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

Definition at line 128 of file HcalDigitizer.h.

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

HcalShapes* HcalDigitizer::theShapes
private

Definition at line 82 of file HcalDigitizer.h.

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

HcalTimeSlewSim* HcalDigitizer::theTimeSlewSim
private

Definition at line 116 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theUpgradeCoderFactory
private

Definition at line 100 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHBHEElectronicsSim
private

Definition at line 106 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHFElectronicsSim
private

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

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

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 113 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theZDCResponse
private

Definition at line 89 of file HcalDigitizer.h.

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

bool HcalDigitizer::zdcgeo
private

Definition at line 136 of file HcalDigitizer.h.

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