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)
 
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 fillFakeHits ()
 some hits in each subdetector, just for testing purposes More...
 
void updateGeometry (const edm::EventSetup &eventSetup)
 

Private Attributes

bool hbhegeo
 
bool hfgeo
 
std::string hitsProducer_
 
bool hogeo
 
bool isHCAL
 
bool isZDC
 
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 32 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 66 of file HcalDigitizer.h.

Definition at line 68 of file HcalDigitizer.h.

Definition at line 67 of file HcalDigitizer.h.

Definition at line 70 of file HcalDigitizer.h.

Definition at line 69 of file HcalDigitizer.h.

Constructor & Destructor Documentation

HcalDigitizer::HcalDigitizer ( const edm::ParameterSet ps)
explicit

Definition at line 83 of file HcalDigitizer.cc.

References HcalCoderFactory::DB, edm::hlt::Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, edm::RandomNumberGenerator::getEngine(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitsProducer_, CaloHitResponse::initHBHEScale(), edm::Service< T >::isAvailable(), relabel_, CaloHitResponse::setHBHEScale(), HcalAmplifier::setHFtuningParameter(), CaloHitResponse::setHitFilter(), HcalAmplifier::setHOtuningParameter(), CaloTDigitizer< Traits >::setNoiseHitGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), CaloHitResponse::setPECorrection(), HcalTimeSlewSim::setRandomEngine(), HPDIonFeedbackSim::setRandomEngine(), HcalHitCorrection::setRandomEngine(), CaloTDigitizer< Traits >::setRandomEngine(), HcalAmplifier::setTimeSlewSim(), 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.

83  :
84  theGeometry(0),
86  theShapes(new HcalShapes()),
87  theHBHEResponse(0),
89  theHOResponse(0),
94  theHFAmplifier(0),
95  theHOAmplifier(0),
96  theZDCAmplifier(0),
97  theIonFeedback(0),
98  theCoderFactory(0),
107  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
108  theHOHitFilter(),
110  theZDCHitFilter(),
111  theHitCorrection(0),
114  theHBHEDigitizer(0),
116  theHODigitizer(0),
118  theHFDigitizer(0),
119  theZDCDigitizer(0),
122  theRelabeller(0),
123  isZDC(true),
124  isHCAL(true),
125  zdcgeo(true),
126  hbhegeo(true),
127  hogeo(true),
128  hfgeo(true),
129  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode"))
130 {
131  bool doNoise = ps.getParameter<bool>("doNoise");
132  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
133  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
134  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
135  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
136  bool doEmpty = ps.getParameter<bool>("doEmpty");
137  double HBtp = ps.getParameter<double>("HBTuningParameter");
138  double HEtp = ps.getParameter<double>("HETuningParameter");
139  double HFtp = ps.getParameter<double>("HFTuningParameter");
140  double HOtp = ps.getParameter<double>("HOTuningParameter");
141  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
142  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
143 
144  // need to make copies, because they might get different noise generators
149  theHBHEAmplifier->setHBtuningParameter(HBtp);
150  theHBHEAmplifier->setHEtuningParameter(HEtp);
153  theHBHEAmplifier->setUseOldHB(useOldNoiseHB);
154  theHBHEAmplifier->setUseOldHE(useOldNoiseHE);
155  theHFAmplifier->setUseOldHF(useOldNoiseHF);
156  theHOAmplifier->setUseOldHO(useOldNoiseHO);
157 
160 
161  // std::cout << "HcalDigitizer: theUpgradeCoderFactory created" << std::endl;
162 
169 
170  // std::cout << "HcalDigitizer: theUpgradeElectronicsSim created" << std::endl;
171 
172  // a code of 1 means make all cells SiPM
173  std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells"));
174  //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells"));
175  // 0 means none, 1 means all, and 2 means use hardcoded
176 
177  // std::cout << std::endl << " hbSiPMCells = " << hbSiPMCells[0] << std::endl;
178 
179  bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1);
180  bool doHOHPD = (theHOSiPMCode != 1);
181  bool doHBHESiPM = !hbSiPMCells.empty();
182  bool doHOSiPM = (theHOSiPMCode != 0);
183  if(doHBHEHPD) {
185  edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers";
187 
190  bool changeResponse = ps.getParameter<bool>("ChangeResponse");
191  edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile");
192  if (changeResponse) {
193  std::string corrFileName = fname.fullPath();
194  edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName;
195  theHBHEResponse->setHBHEScale(corrFileName); //GMA
196  }
197  }
198  if(doHOHPD) {
202  }
203 
204  if(doHBHESiPM) {
207  if (doHBHEUpgrade) {
209 
210  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer created" << std::endl;
211 
212  } else {
214  }
215  }
216  if(doHOSiPM) {
220  }
221 
222  // if both are present, fill the SiPM cells now
223  if(doHBHEHPD && doHBHESiPM) {
224 
225  // std::cout << "HcalDigitizer: fill the SiPM cells now" << std::endl;
226 
228  }
229 
232 
233  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
234  if(doTimeSlew) {
235  // no time slewing for HF
237  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim);
240  }
241 
242  if (doHFUpgrade) {
244 
245  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer created" << std::endl;
246 
247  } else {
249  }
251 
252  edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
253  relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
254  if (relabel_) {
256  }
257 
258  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
259  if(doHPDNoise) {
260  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
264  }
265 
266  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
269  if(ps.getParameter<bool>("doThermalNoise")) {
270  theHBHEAmplifier->setIonFeedbackSim(theIonFeedback);
271  }
272  }
273 
274  if(ps.getParameter<bool>("injectTestHits") ) {
282 
283  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise"
284  // << std::endl;
285  }
287  if(theHFUpgradeDigitizer) {
289 
290  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise"
291  // << std::endl;
292  }
294  }
295 
297  if ( ! rng.isAvailable()) {
298  throw cms::Exception("Configuration")
299  << "HcalDigitizer requires the RandomNumberGeneratorService\n"
300  "which is not present in the configuration file. You must add the service\n"
301  "in the configuration file or remove the modules that require it.";
302  }
303 
304  CLHEP::HepRandomEngine& engine = rng->getEngine();
315 
317 
318  hitsProducer_ = ps.getParameter<std::string>("hitsProducer");
319 }
void setNoiseHitGenerator(CaloVNoiseHitGenerator *generator)
void setHOtuningParameter(double tp)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HBHEHitFilter theHBHEHitFilter
HcalElectronicsSim * theHFElectronicsSim
Definition: HcalDigitizer.h:94
HBHEDigitizer * theHBHEDigitizer
HOHitFilter theHOHitFilter
CaloTDigitizer< HcalUpgradeDigitizerTraits > UpgradeDigitizer
Definition: HcalDigitizer.h:70
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void setUseOldHF(bool useOld)
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
void setHFtuningParameter(double tp)
void setTimeSlewSim(const HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:36
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theUpgradeHFElectronicsSim
Definition: HcalDigitizer.h:98
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:90
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
Definition: HcalDigitizer.h:91
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:68
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:84
void setUseOldHO(bool useOld)
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:69
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
Definition: HcalDigitizer.h:95
void setHitFilter(const CaloVHitFilter *filter)
if you want to reject hits, for example, from a certain subdetector, set this
HcalShapes * theShapes
Definition: HcalDigitizer.h:73
Creates electronics signals from hits.
void setRandomEngine(CLHEP::HepRandomEngine &engine)
need a shaper in order to set thermal noise
void setRandomEngine(CLHEP::HepRandomEngine &engine)
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
Definition: HcalDigitizer.h:89
bool isAvailable() const
Definition: Service.h:47
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:77
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:78
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:80
HcalElectronicsSim * theZDCElectronicsSim
Definition: HcalDigitizer.h:96
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
Definition: HcalDigitizer.h:97
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:67
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:86
HcalElectronicsSim * theHBHEElectronicsSim
Definition: HcalDigitizer.h:93
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:75
HODigitizer * theHODigitizer
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:60
string fname
main script
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:79
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:76
void setRandomEngine(CLHEP::HepRandomEngine &engine)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:87
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:66
CaloVNoiseSignalGenerator * theNoiseGenerator
HcalDigitizer::~HcalDigitizer ( )
virtual

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

322  {
325  if(theHODigitizer) delete theHODigitizer;
327  if(theHFDigitizer) delete theHFDigitizer;
328  delete theZDCDigitizer;
331  delete theParameterMap;
332  delete theHBHEResponse;
333  delete theHBHESiPMResponse;
334  delete theHOResponse;
335  delete theHOSiPMResponse;
336  delete theHFResponse;
337  delete theZDCResponse;
338  delete theHBHEElectronicsSim;
339  delete theHFElectronicsSim;
340  delete theHOElectronicsSim;
341  delete theZDCElectronicsSim;
344  delete theHBHEAmplifier;
345  delete theHFAmplifier;
346  delete theHOAmplifier;
347  delete theZDCAmplifier;
348  delete theCoderFactory;
349  delete theUpgradeCoderFactory;
350  delete theHitCorrection;
351  delete theNoiseGenerator;
352  if (theRelabeller) delete theRelabeller;
353 }
HcalElectronicsSim * theHFElectronicsSim
Definition: HcalDigitizer.h:94
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theUpgradeHFElectronicsSim
Definition: HcalDigitizer.h:98
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:90
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
Definition: HcalDigitizer.h:91
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:84
HcalElectronicsSim * theHOElectronicsSim
Definition: HcalDigitizer.h:95
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:77
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:78
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:80
HcalElectronicsSim * theZDCElectronicsSim
Definition: HcalDigitizer.h:96
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
Definition: HcalDigitizer.h:97
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:86
HcalElectronicsSim * theHBHEElectronicsSim
Definition: HcalDigitizer.h:93
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:75
HODigitizer * theHODigitizer
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:79
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:76
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:87
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloVNoiseSignalGenerator * theNoiseGenerator

Member Function Documentation

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

Definition at line 475 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::accumulate().

475  {
476  // Step A: Get Inputs
477  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
479  e.getByLabel(zdcTag, zdcHandle);
480  isZDC = zdcHandle.isValid();
481 
482  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
484  e.getByLabel(hcalTag, hcalHandle);
485  isHCAL = hcalHandle.isValid();
486 
487  accumulateCaloHits(hcalHandle, zdcHandle, 0);
488 }
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 490 of file HcalDigitizer.cc.

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

490  {
491  // Step A: Get Inputs
492  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
494  e.getByLabel(zdcTag, zdcHandle);
495  isZDC = zdcHandle.isValid();
496 
497  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
499  e.getByLabel(hcalTag, hcalHandle);
500  isHCAL = hcalHandle.isValid();
501 
502  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing());
503 }
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 432 of file HcalDigitizer.cc.

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

Referenced by accumulate().

432  {
433  // Step A: pass in inputs, and accumulate digirs
434  if(isHCAL) {
435  std::vector<PCaloHit> hcalHits = *hcalHandle.product();
436  if (relabel_) {
437  // Relabel PCaloHits
438  edm::LogInfo("HcalDigitizer") << "Calling Relabller";
439  theRelabeller->process(hcalHits);
440  }
441  if(theHitCorrection != 0) {
442  theHitCorrection->fillChargeSums(hcalHits);
443  }
444  if(hbhegeo) {
445  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing);
446  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing);
448  // std::cout << "HcalDigitizer::accumulateCaloHits theHBHEUpgradeDigitizer->add" << std::endl;
449  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing);
450  }
451  }
452 
453  if(hogeo) {
454  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing);
455  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing);
456  }
457 
458  if(hfgeo) {
459  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing);
460  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing);
461  }
462  } else {
463  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
464  }
465 
466  if(isZDC) {
467  if(zdcgeo) {
468  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing);
469  }
470  } else {
471  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
472  }
473 }
HBHEDigitizer * theHBHEDigitizer
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
HFDigitizer * theHFDigitizer
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
void fillChargeSums(MixCollection< PCaloHit > &hits)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
void process(std::vector< PCaloHit > &hcalHits)
HODigitizer * theHODigitizer
T const * product() const
Definition: Handle.h:74
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 573 of file HcalDigitizer.cc.

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

Referenced by HcalDigiProducer::beginRun().

573  {
574  checkGeometry(es);
575  theShapes->beginRun(es);
576 }
void checkGeometry(const edm::EventSetup &eventSetup)
HcalShapes * theShapes
Definition: HcalDigitizer.h:73
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 638 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().

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

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

Referenced by beginRun().

584  {
585  // TODO find a way to avoid doing this every event
587  eventSetup.get<CaloGeometryRecord>().get(geometry);
588  // See if it's been updated
589  if(&*geometry != theGeometry)
590  {
591  theGeometry = &*geometry;
592  updateGeometry(eventSetup);
593  }
594 }
const T & get() const
Definition: EventSetup.h:55
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:60
ESHandle< TrackerGeometry > geometry
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::endRun ( void  )

Definition at line 579 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

579  {
580  theShapes->endRun();
581 }
HcalShapes * theShapes
Definition: HcalDigitizer.h:73
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 505 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().

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

385  {
386  // get the appropriate gains, noises, & widths for this event
387  edm::ESHandle<HcalDbService> conditions;
388  eventSetup.get<HcalDbRecord>().get(conditions);
389  theHBHEAmplifier->setDbService(conditions.product());
390  theHFAmplifier->setDbService(conditions.product());
391  theHOAmplifier->setDbService(conditions.product());
392  theZDCAmplifier->setDbService(conditions.product());
395 
396  theCoderFactory->setDbService(conditions.product());
398  theParameterMap->setDbService(conditions.product());
399 
401  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
402  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
403 
404  edm::ESHandle<HcalPedestals> pedshandle;
405  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
406  const HcalPedestals * myADCPedestals = pedshandle.product();
407 
408  theHBHEAmplifier->setCholesky(myCholesky);
409  theHFAmplifier->setCholesky(myCholesky);
410  theHOAmplifier->setCholesky(myCholesky);
411 
412  theHBHEAmplifier->setADCPeds(myADCPedestals);
413  theHFAmplifier->setADCPeds(myADCPedestals);
414  theHOAmplifier->setADCPeds(myADCPedestals);
415 
416  if(theHitCorrection != 0) {
418  }
419 
420  //initialize hits
429 
430 }
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
void initializeHits()
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:52
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theUpgradeHFElectronicsSim
Definition: HcalDigitizer.h:98
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:90
HcalCoderFactory * theUpgradeCoderFactory
Definition: HcalDigitizer.h:91
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:84
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
Definition: HcalDigitizer.h:97
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:86
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:87
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::setHBHENoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 356 of file HcalDigitizer.cc.

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

356  {
357  noiseGenerator->setParameterMap(theParameterMap);
358  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
360  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
361 }
void setParameterMap(HcalSimParameterMap *map)
HBHEDigitizer * theHBHEDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:84
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
HcalElectronicsSim * theHBHEElectronicsSim
Definition: HcalDigitizer.h:93
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 363 of file HcalDigitizer.cc.

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

363  {
364  noiseGenerator->setParameterMap(theParameterMap);
365  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
368  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
369 }
void setParameterMap(HcalSimParameterMap *map)
HcalElectronicsSim * theHFElectronicsSim
Definition: HcalDigitizer.h:94
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:85
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 371 of file HcalDigitizer.cc.

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

371  {
372  noiseGenerator->setParameterMap(theParameterMap);
373  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
374  theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
375  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
376 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
HcalElectronicsSim * theHOElectronicsSim
Definition: HcalDigitizer.h:95
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:86
HODigitizer * theHODigitizer
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 378 of file HcalDigitizer.cc.

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

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

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

597  {
605 
606  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
607  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
608  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
609  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
610  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
611  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
612  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
613  //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
614  if(zdcCells.empty()) zdcgeo = false;
615  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
616  if(hoCells.empty()) hogeo = false;
617  if(hfCells.empty()) hfgeo = false;
618  // combine HB & HE
619 
620  theHBHEDetIds = hbCells;
621  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
622 
624  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
625  buildHOSiPMCells(hoCells, eventSetup);
628  theZDCDigitizer->setDetIds(zdcCells);
631 
632  // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
633  }
634 
635 }
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:77
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:78
ZDCDigitizer * theZDCDigitizer
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:80
static const int SubdetectorId
Definition: HcalZDCDetId.h:22
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:75
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:60
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:79
HBHEDigitizer * theHBHESiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:76
UpgradeDigitizer * theHBHEUpgradeDigitizer

Member Data Documentation

bool HcalDigitizer::hbhegeo
private

Definition at line 127 of file HcalDigitizer.h.

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

bool HcalDigitizer::hfgeo
private

Definition at line 127 of file HcalDigitizer.h.

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

std::string HcalDigitizer::hitsProducer_
private

Definition at line 130 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 127 of file HcalDigitizer.h.

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

bool HcalDigitizer::isHCAL
private

Definition at line 127 of file HcalDigitizer.h.

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

bool HcalDigitizer::isZDC
private

Definition at line 127 of file HcalDigitizer.h.

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

bool HcalDigitizer::relabel_
private

Definition at line 128 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theCoderFactory
private

Definition at line 90 of file HcalDigitizer.h.

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

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 60 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

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

Definition at line 123 of file HcalDigitizer.h.

Referenced by updateGeometry().

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

Definition at line 93 of file HcalDigitizer.h.

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

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 100 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHBHEResponse
private

Definition at line 75 of file HcalDigitizer.h.

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

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

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

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

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 101 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHFResponse
private

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

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

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 102 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

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

Definition at line 124 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

CaloHitResponse* HcalDigitizer::theHOResponse
private

Definition at line 77 of file HcalDigitizer.h.

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

int HcalDigitizer::theHOSiPMCode
private

Definition at line 132 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

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

Definition at line 125 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

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

Definition at line 103 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHOSiPMResponse
private

Definition at line 78 of file HcalDigitizer.h.

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

HPDIonFeedbackSim* HcalDigitizer::theIonFeedback
private

Definition at line 89 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloVNoiseSignalGenerator* HcalDigitizer::theNoiseGenerator
private

Definition at line 108 of file HcalDigitizer.h.

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

CaloVNoiseHitGenerator* HcalDigitizer::theNoiseHitGenerator
private

Definition at line 109 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

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

Definition at line 119 of file HcalDigitizer.h.

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

HcalShapes* HcalDigitizer::theShapes
private

Definition at line 73 of file HcalDigitizer.h.

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

HcalTimeSlewSim* HcalDigitizer::theTimeSlewSim
private

Definition at line 107 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theUpgradeCoderFactory
private

Definition at line 91 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHBHEElectronicsSim
private

Definition at line 97 of file HcalDigitizer.h.

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

HcalElectronicsSim* HcalDigitizer::theUpgradeHFElectronicsSim
private

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

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

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 104 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theZDCResponse
private

Definition at line 80 of file HcalDigitizer.h.

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

bool HcalDigitizer::zdcgeo
private

Definition at line 127 of file HcalDigitizer.h.

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