#include <HcalDigitizer.h>
Definition at line 32 of file HcalDigitizer.h.
typedef CaloTDigitizer<HBHEDigitizerTraits> HcalDigitizer::HBHEDigitizer [private] |
Reconstruction algorithm
Definition at line 66 of file HcalDigitizer.h.
typedef CaloTDigitizer<HFDigitizerTraits> HcalDigitizer::HFDigitizer [private] |
Definition at line 68 of file HcalDigitizer.h.
typedef CaloTDigitizer<HODigitizerTraits> HcalDigitizer::HODigitizer [private] |
Definition at line 67 of file HcalDigitizer.h.
typedef CaloTDigitizer<HcalUpgradeDigitizerTraits> HcalDigitizer::UpgradeDigitizer [private] |
Definition at line 70 of file HcalDigitizer.h.
typedef CaloTDigitizer<ZDCDigitizerTraits> HcalDigitizer::ZDCDigitizer [private] |
Definition at line 69 of file HcalDigitizer.h.
HcalDigitizer::HcalDigitizer | ( | const edm::ParameterSet & | ps | ) | [explicit] |
Definition at line 83 of file HcalDigitizer.cc.
References HcalCoderFactory::DB, Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, 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(), HPDIonFeedbackSim::setRandomEngine(), HcalTimeSlewSim::setRandomEngine(), CaloTDigitizer< Traits >::setRandomEngine(), HcalHitCorrection::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, theUpgradeElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, theZDCHitFilter, theZDCResponse, and HcalCoderFactory::UPGRADE.
: theGeometry(0), theParameterMap(new HcalSimParameterMap(ps)), theShapes(new HcalShapes()), theHBHEResponse(0), theHBHESiPMResponse(0), theHOResponse(0), theHOSiPMResponse(0), theHFResponse(new CaloHitResponse(theParameterMap, theShapes)), theZDCResponse(new CaloHitResponse(theParameterMap, theShapes)), theHBHEAmplifier(0), theHFAmplifier(0), theHOAmplifier(0), theZDCAmplifier(0), theIonFeedback(0), theCoderFactory(0), theUpgradeCoderFactory(0), theHBHEElectronicsSim(0), theHFElectronicsSim(0), theHOElectronicsSim(0), theZDCElectronicsSim(0), theUpgradeElectronicsSim(0), theHBHEHitFilter(), theHFHitFilter(ps.getParameter<bool>("doHFWindow")), theHOHitFilter(), theHOSiPMHitFilter(HcalOuter), theZDCHitFilter(), theHitCorrection(0), theNoiseGenerator(0), theNoiseHitGenerator(0), theHBHEDigitizer(0), theHBHESiPMDigitizer(0), theHODigitizer(0), theHOSiPMDigitizer(0), theHFDigitizer(0), theZDCDigitizer(0), theHBHEUpgradeDigitizer(0), theHFUpgradeDigitizer(0), theRelabeller(0), isZDC(true), isHCAL(true), zdcgeo(true), hbhegeo(true), hogeo(true), hfgeo(true), theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")) { bool doNoise = ps.getParameter<bool>("doNoise"); bool useOldNoiseHB = ps.getParameter<bool>("useOldHB"); bool useOldNoiseHE = ps.getParameter<bool>("useOldHE"); bool useOldNoiseHF = ps.getParameter<bool>("useOldHF"); bool useOldNoiseHO = ps.getParameter<bool>("useOldHO"); bool doEmpty = ps.getParameter<bool>("doEmpty"); double HBtp = ps.getParameter<double>("HBTuningParameter"); double HEtp = ps.getParameter<double>("HETuningParameter"); double HFtp = ps.getParameter<double>("HFTuningParameter"); double HOtp = ps.getParameter<double>("HOTuningParameter"); bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE"); bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE"); // need to make copies, because they might get different noise generators theHBHEAmplifier = new HcalAmplifier(theParameterMap, doNoise); theHFAmplifier = new HcalAmplifier(theParameterMap, doNoise); theHOAmplifier = new HcalAmplifier(theParameterMap, doNoise); theZDCAmplifier = new HcalAmplifier(theParameterMap, doNoise); theHBHEAmplifier->setHBtuningParameter(HBtp); theHBHEAmplifier->setHEtuningParameter(HEtp); theHFAmplifier->setHFtuningParameter(HFtp); theHOAmplifier->setHOtuningParameter(HOtp); theHBHEAmplifier->setUseOldHB(useOldNoiseHB); theHBHEAmplifier->setUseOldHE(useOldNoiseHE); theHFAmplifier->setUseOldHF(useOldNoiseHF); theHOAmplifier->setUseOldHO(useOldNoiseHO); theCoderFactory = new HcalCoderFactory(HcalCoderFactory::DB); theUpgradeCoderFactory = new HcalCoderFactory(HcalCoderFactory::UPGRADE); theHBHEElectronicsSim = new HcalElectronicsSim(theHBHEAmplifier, theCoderFactory); theHFElectronicsSim = new HcalElectronicsSim(theHFAmplifier, theCoderFactory); theHOElectronicsSim = new HcalElectronicsSim(theHOAmplifier, theCoderFactory); theZDCElectronicsSim = new HcalElectronicsSim(theZDCAmplifier, theCoderFactory); theUpgradeElectronicsSim = new HcalElectronicsSim(theHBHEAmplifier, theUpgradeCoderFactory); // a code of 1 means make all cells SiPM std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells")); //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells")); // 0 means none, 1 means all, and 2 means use hardcoded bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1); bool doHOHPD = (theHOSiPMCode != 1); bool doHBHESiPM = !hbSiPMCells.empty(); bool doHOSiPM = (theHOSiPMCode != 0); if(doHBHEHPD) { theHBHEResponse = new CaloHitResponse(theParameterMap, theShapes); edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers"; theHBHEResponse->initHBHEScale(); theHBHEResponse->setHitFilter(&theHBHEHitFilter); theHBHEDigitizer = new HBHEDigitizer(theHBHEResponse, theHBHEElectronicsSim, doEmpty); bool changeResponse = ps.getParameter<bool>("ChangeResponse"); edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile"); if (changeResponse) { std::string corrFileName = fname.fullPath(); edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName; theHBHEResponse->setHBHEScale(corrFileName); //GMA } } if(doHOHPD) { theHOResponse = new CaloHitResponse(theParameterMap, theShapes); theHOResponse->setHitFilter(&theHOHitFilter); theHODigitizer = new HODigitizer(theHOResponse, theHOElectronicsSim, doEmpty); } if(doHBHESiPM) { theHBHESiPMResponse = new HcalSiPMHitResponse(theParameterMap, theShapes); theHBHESiPMResponse->setHitFilter(&theHBHEHitFilter); if (doHBHEUpgrade) { theHBHEUpgradeDigitizer = new UpgradeDigitizer(theHBHESiPMResponse, theUpgradeElectronicsSim, doEmpty); } else { theHBHESiPMDigitizer = new HBHEDigitizer(theHBHESiPMResponse, theHBHEElectronicsSim, doEmpty); } } if(doHOSiPM) { theHOSiPMResponse = new HcalSiPMHitResponse(theParameterMap, theShapes); theHOSiPMResponse->setHitFilter(&theHOSiPMHitFilter); theHOSiPMDigitizer = new HODigitizer(theHOSiPMResponse, theHOElectronicsSim, doEmpty); } // if both are present, fill the SiPM cells now if(doHBHEHPD && doHBHESiPM) { HcalDigitizerImpl::fillSiPMCells(hbSiPMCells, theHBHESiPMDigitizer); } theHFResponse->setHitFilter(&theHFHitFilter); theZDCResponse->setHitFilter(&theZDCHitFilter); bool doTimeSlew = ps.getParameter<bool>("doTimeSlew"); if(doTimeSlew) { // no time slewing for HF theTimeSlewSim = new HcalTimeSlewSim(theParameterMap); theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim); theHOAmplifier->setTimeSlewSim(theTimeSlewSim); theZDCAmplifier->setTimeSlewSim(theTimeSlewSim); } if (doHFUpgrade) { theHFUpgradeDigitizer = new UpgradeDigitizer(theHFResponse, theUpgradeElectronicsSim, doEmpty); } else { theHFDigitizer = new HFDigitizer(theHFResponse, theHFElectronicsSim, doEmpty); } theZDCDigitizer = new ZDCDigitizer(theZDCResponse, theZDCElectronicsSim, doEmpty); edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel"); relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits"); if (relabel_) { theRelabeller=new HcalHitRelabeller(ps0.getUntrackedParameter<edm::ParameterSet>("RelabelRules")); } bool doHPDNoise = ps.getParameter<bool>("doHPDNoise"); if(doHPDNoise) { //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary"); theNoiseGenerator = new HPDNoiseGenerator(ps); if(theHBHEDigitizer) theHBHEDigitizer->setNoiseSignalGenerator(theNoiseGenerator); if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->setNoiseSignalGenerator(theNoiseGenerator); } if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) { theIonFeedback = new HPDIonFeedbackSim(ps, theShapes); theHBHEResponse->setPECorrection(theIonFeedback); if(ps.getParameter<bool>("doThermalNoise")) { theHBHEAmplifier->setIonFeedbackSim(theIonFeedback); } } if(ps.getParameter<bool>("injectTestHits") ) { theNoiseHitGenerator = new HcalTestHitGenerator(ps); if(theHBHEDigitizer) theHBHEDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHODigitizer) theHODigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHOSiPMDigitizer) theHOSiPMDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHBHEUpgradeDigitizer) theHBHEUpgradeDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHFDigitizer) theHFDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); theZDCDigitizer->setNoiseHitGenerator(theNoiseHitGenerator); } edm::Service<edm::RandomNumberGenerator> rng; if ( ! rng.isAvailable()) { throw cms::Exception("Configuration") << "HcalDigitizer requires the RandomNumberGeneratorService\n" "which is not present in the configuration file. You must add the service\n" "in the configuration file or remove the modules that require it."; } CLHEP::HepRandomEngine& engine = rng->getEngine(); if(theHBHEDigitizer) theHBHEDigitizer->setRandomEngine(engine); if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->setRandomEngine(engine); if(theHODigitizer) theHODigitizer->setRandomEngine(engine); if(theHOSiPMDigitizer) theHOSiPMDigitizer->setRandomEngine(engine); if(theHBHEUpgradeDigitizer) theHBHEUpgradeDigitizer->setRandomEngine(engine); if(theIonFeedback) theIonFeedback->setRandomEngine(engine); if(theTimeSlewSim) theTimeSlewSim->setRandomEngine(engine); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->setRandomEngine(engine); if(theHFDigitizer) theHFDigitizer->setRandomEngine(engine); theZDCDigitizer->setRandomEngine(engine); if (theHitCorrection!=0) theHitCorrection->setRandomEngine(engine); hitsProducer_ = ps.getParameter<std::string>("hitsProducer"); }
HcalDigitizer::~HcalDigitizer | ( | ) | [virtual] |
Definition at line 294 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, theUpgradeElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, and theZDCResponse.
{ if(theHBHEDigitizer) delete theHBHEDigitizer; if(theHBHESiPMDigitizer) delete theHBHESiPMDigitizer; if(theHODigitizer) delete theHODigitizer; if(theHOSiPMDigitizer) delete theHOSiPMDigitizer; if(theHFDigitizer) delete theHFDigitizer; delete theZDCDigitizer; if(theHBHEUpgradeDigitizer) delete theHBHEUpgradeDigitizer; if(theHFUpgradeDigitizer) delete theHFUpgradeDigitizer; delete theParameterMap; delete theHBHEResponse; delete theHBHESiPMResponse; delete theHOResponse; delete theHOSiPMResponse; delete theHFResponse; delete theZDCResponse; delete theHBHEElectronicsSim; delete theHFElectronicsSim; delete theHOElectronicsSim; delete theZDCElectronicsSim; delete theUpgradeElectronicsSim; delete theHBHEAmplifier; delete theHFAmplifier; delete theHOAmplifier; delete theZDCAmplifier; delete theCoderFactory; delete theUpgradeCoderFactory; delete theHitCorrection; delete theNoiseGenerator; if (theRelabeller) delete theRelabeller; }
void HcalDigitizer::accumulate | ( | edm::Event const & | e, |
edm::EventSetup const & | c | ||
) |
Definition at line 431 of file HcalDigitizer.cc.
References accumulateCaloHits(), edm::Event::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.
Referenced by HcalDigiProducer::accumulate().
{ // Step A: Get Inputs edm::InputTag zdcTag(hitsProducer_, "ZDCHITS"); edm::Handle<std::vector<PCaloHit> > zdcHandle; e.getByLabel(zdcTag, zdcHandle); isZDC = zdcHandle.isValid(); edm::InputTag hcalTag(hitsProducer_, "HcalHits"); edm::Handle<std::vector<PCaloHit> > hcalHandle; e.getByLabel(hcalTag, hcalHandle); isHCAL = hcalHandle.isValid(); accumulateCaloHits(hcalHandle, zdcHandle, 0); }
void HcalDigitizer::accumulate | ( | PileUpEventPrincipal const & | e, |
edm::EventSetup const & | c | ||
) |
Definition at line 446 of file HcalDigitizer.cc.
References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), PileUpEventPrincipal::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.
{ // Step A: Get Inputs edm::InputTag zdcTag(hitsProducer_, "ZDCHITS"); edm::Handle<std::vector<PCaloHit> > zdcHandle; e.getByLabel(zdcTag, zdcHandle); isZDC = zdcHandle.isValid(); edm::InputTag hcalTag(hitsProducer_, "HcalHits"); edm::Handle<std::vector<PCaloHit> > hcalHandle; e.getByLabel(hcalTag, hcalHandle); isHCAL = hcalHandle.isValid(); accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing()); }
void HcalDigitizer::accumulateCaloHits | ( | edm::Handle< std::vector< PCaloHit > > const & | hcalHits, |
edm::Handle< std::vector< PCaloHit > > const & | zdcHits, | ||
int | bunchCrossing | ||
) | [private] |
Definition at line 391 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().
{ // Step A: pass in inputs, and accumulate digirs if(isHCAL) { std::vector<PCaloHit> hcalHits = *hcalHandle.product(); if (relabel_) { // Relabel PCaloHits edm::LogInfo("HcalDigitizer") << "Calling Relabller"; theRelabeller->process(hcalHits); } if(theHitCorrection != 0) { theHitCorrection->fillChargeSums(hcalHits); } if(hbhegeo) { if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing); if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing); if(theHBHEUpgradeDigitizer) theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing); } if(hogeo) { if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing); if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing); } if(hfgeo) { if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing); } } else { edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available "; } if(isZDC) { if(zdcgeo) { theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing); } } else { edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available "; } }
void HcalDigitizer::beginRun | ( | const edm::EventSetup & | es | ) |
Definition at line 510 of file HcalDigitizer.cc.
References HcalShapes::beginRun(), checkGeometry(), and theShapes.
Referenced by HcalDigiProducer::beginRun().
{ checkGeometry(es); theShapes->beginRun(es); }
void HcalDigitizer::buildHOSiPMCells | ( | const std::vector< DetId > & | allCells, |
const edm::EventSetup & | eventSetup | ||
) | [private] |
Definition at line 570 of file HcalDigitizer.cc.
References edm::EventSetup::get(), HcalShapes::HAMAMATSU, AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< T >::product(), CaloTDigitizer< Traits >::setDetIds(), HcalHitFilter::setDetIds(), HcalSimParameterMap::setHOHamamatsuDetIds(), HcalSimParameterMap::setHOZecotekDetIds(), HcalCondObjectContainerBase::setTopo(), theHODigitizer, theHOHPDDetIds, theHOSiPMCode, theHOSiPMDetIds, theHOSiPMDigitizer, theHOSiPMHitFilter, theParameterMap, and HcalShapes::ZECOTEK.
Referenced by updateGeometry().
{ // all HPD if(theHOSiPMCode == 0) { theHODigitizer->setDetIds(allCells); } else if(theHOSiPMCode == 1) { theHOSiPMDigitizer->setDetIds(allCells); // FIXME pick Zecotek or hamamatsu? } else if(theHOSiPMCode == 2) { std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds; edm::ESHandle<HcalMCParams> p; eventSetup.get<HcalMCParamsRcd>().get(p); edm::ESHandle<HcalTopology> htopo; eventSetup.get<IdealGeometryRecord>().get(htopo); HcalMCParams mcParams(*p.product()); if (mcParams.topo()==0) { mcParams.setTopo(htopo.product()); } for(std::vector<DetId>::const_iterator detItr = allCells.begin(); detItr != allCells.end(); ++detItr) { int shapeType = mcParams.getValues(*detItr)->signalShape(); if(shapeType == HcalShapes::ZECOTEK) { zecotekDetIds.emplace_back(*detItr); theHOSiPMDetIds.push_back(*detItr); } else if(shapeType == HcalShapes::HAMAMATSU) { hamamatsuDetIds.emplace_back(*detItr); theHOSiPMDetIds.push_back(*detItr); } else { theHOHPDDetIds.push_back(*detItr); } } assert(theHODigitizer); assert(theHOSiPMDigitizer); theHODigitizer->setDetIds(theHOHPDDetIds); theHOSiPMDigitizer->setDetIds(theHOSiPMDetIds); theHOSiPMHitFilter.setDetIds(theHOSiPMDetIds); // FIXME not applying a HitFilter to the HPDs, for now theParameterMap->setHOZecotekDetIds(zecotekDetIds); theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds); // make sure we don't got through this exercise again theHOSiPMCode = -2; } }
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 521 of file HcalDigitizer.cc.
References geometry, edm::EventSetup::get(), theGeometry, and updateGeometry().
Referenced by beginRun().
{ // TODO find a way to avoid doing this every event edm::ESHandle<CaloGeometry> geometry; eventSetup.get<CaloGeometryRecord>().get(geometry); // See if it's been updated if(&*geometry != theGeometry) { theGeometry = &*geometry; updateGeometry(eventSetup); } }
void HcalDigitizer::endRun | ( | void | ) |
Definition at line 516 of file HcalDigitizer.cc.
References HcalShapes::endRun(), and theShapes.
Referenced by HcalDigiProducer::endRun().
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 461 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().
{ // Step B: Create empty output std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection()); std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection()); std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection()); std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection()); std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection()); std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection()); // Step C: Invoke the algorithm, getting back outputs. if(isHCAL&&hbhegeo){ if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult); if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->run(*hbheResult); if(theHBHEUpgradeDigitizer) theHBHEUpgradeDigitizer->run(*hbheupgradeResult); } if(isHCAL&&hogeo) { if(theHODigitizer) theHODigitizer->run(*hoResult); if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult); } if(isHCAL&&hfgeo) { if(theHFDigitizer) theHFDigitizer->run(*hfResult); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult); } if(isZDC&&zdcgeo) { theZDCDigitizer->run(*zdcResult); } edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size(); edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size(); edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size(); edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size(); edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size(); edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size(); // Step D: Put outputs into event e.put(hbheResult); e.put(hoResult); e.put(hfResult); e.put(zdcResult); e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection"); e.put(hfupgradeResult, "HFUpgradeDigiCollection"); if(theHitCorrection) { theHitCorrection->clear(); } }
void HcalDigitizer::initializeEvent | ( | edm::Event const & | e, |
edm::EventSetup const & | c | ||
) |
Produces the EDM products,
Definition at line 356 of file HcalDigitizer.cc.
References HcalHitCorrection::clear(), edm::EventSetup::get(), edm::ESHandle< T >::product(), HcalAmplifier::setADCPeds(), HcalAmplifier::setCholesky(), HcalElectronicsSim::setDbService(), HcalSimParameterMap::setDbService(), HcalCoderFactory::setDbService(), HcalAmplifier::setDbService(), theCoderFactory, theHBHEAmplifier, theHFAmplifier, theHitCorrection, theHOAmplifier, theParameterMap, theUpgradeCoderFactory, theUpgradeElectronicsSim, and theZDCAmplifier.
Referenced by HcalDigiProducer::initializeEvent(), and edm::DataMixingHcalDigiWorkerProd::putHcal().
{ // get the appropriate gains, noises, & widths for this event edm::ESHandle<HcalDbService> conditions; eventSetup.get<HcalDbRecord>().get(conditions); theHBHEAmplifier->setDbService(conditions.product()); theHFAmplifier->setDbService(conditions.product()); theHOAmplifier->setDbService(conditions.product()); theZDCAmplifier->setDbService(conditions.product()); theUpgradeElectronicsSim->setDbService(conditions.product()); theCoderFactory->setDbService(conditions.product()); theUpgradeCoderFactory->setDbService(conditions.product()); theParameterMap->setDbService(conditions.product()); edm::ESHandle<HcalCholeskyMatrices> refCholesky; eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky); const HcalCholeskyMatrices * myCholesky = refCholesky.product(); edm::ESHandle<HcalPedestals> pedshandle; eventSetup.get<HcalPedestalsRcd>().get(pedshandle); const HcalPedestals * myADCPedestals = pedshandle.product(); theHBHEAmplifier->setCholesky(myCholesky); theHFAmplifier->setCholesky(myCholesky); theHOAmplifier->setCholesky(myCholesky); theHBHEAmplifier->setADCPeds(myADCPedestals); theHFAmplifier->setADCPeds(myADCPedestals); theHOAmplifier->setADCPeds(myADCPedestals); if(theHitCorrection != 0) { theHitCorrection->clear(); } }
void HcalDigitizer::setHBHENoiseSignalGenerator | ( | HcalBaseSignalGenerator * | noiseGenerator | ) |
Definition at line 327 of file HcalDigitizer.cc.
References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, and theParameterMap.
{ noiseGenerator->setParameterMap(theParameterMap); noiseGenerator->setElectronicsSim(theHBHEElectronicsSim); if (theHBHEDigitizer) theHBHEDigitizer->setNoiseSignalGenerator(noiseGenerator); theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator); }
void HcalDigitizer::setHFNoiseSignalGenerator | ( | HcalBaseSignalGenerator * | noiseGenerator | ) |
Definition at line 334 of file HcalDigitizer.cc.
References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFUpgradeDigitizer, and theParameterMap.
{ noiseGenerator->setParameterMap(theParameterMap); noiseGenerator->setElectronicsSim(theHFElectronicsSim); if(theHFDigitizer) theHFDigitizer->setNoiseSignalGenerator(noiseGenerator); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->setNoiseSignalGenerator(noiseGenerator); theHFAmplifier->setNoiseSignalGenerator(noiseGenerator); }
void HcalDigitizer::setHONoiseSignalGenerator | ( | HcalBaseSignalGenerator * | noiseGenerator | ) |
Definition at line 342 of file HcalDigitizer.cc.
References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHOAmplifier, theHODigitizer, theHOElectronicsSim, and theParameterMap.
{ noiseGenerator->setParameterMap(theParameterMap); noiseGenerator->setElectronicsSim(theHOElectronicsSim); theHODigitizer->setNoiseSignalGenerator(noiseGenerator); theHOAmplifier->setNoiseSignalGenerator(noiseGenerator); }
void HcalDigitizer::setZDCNoiseSignalGenerator | ( | HcalBaseSignalGenerator * | noiseGenerator | ) |
Definition at line 349 of file HcalDigitizer.cc.
References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theParameterMap, theZDCAmplifier, theZDCDigitizer, and theZDCElectronicsSim.
{ noiseGenerator->setParameterMap(theParameterMap); noiseGenerator->setElectronicsSim(theZDCElectronicsSim); theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator); theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator); }
void HcalDigitizer::updateGeometry | ( | const edm::EventSetup & | eventSetup | ) | [private] |
Definition at line 534 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().
{ if(theHBHEResponse) theHBHEResponse->setGeometry(theGeometry); if(theHBHESiPMResponse) theHBHESiPMResponse->setGeometry(theGeometry); if(theHOResponse) theHOResponse->setGeometry(theGeometry); if(theHOSiPMResponse) theHOSiPMResponse->setGeometry(theGeometry); theHFResponse->setGeometry(theGeometry); theZDCResponse->setGeometry(theGeometry); if(theRelabeller) theRelabeller->setGeometry(theGeometry); const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel); const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap); const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter); const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward); const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId); //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower); //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId); //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl; if(zdcCells.empty()) zdcgeo = false; if(hbCells.empty() && heCells.empty()) hbhegeo = false; if(hoCells.empty()) hogeo = false; if(hfCells.empty()) hfgeo = false; // combine HB & HE theHBHEDetIds = hbCells; theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end()); HcalDigitizerImpl::fillCells(theHBHEDetIds, theHBHEDigitizer, theHBHESiPMDigitizer); //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer); buildHOSiPMCells(hoCells, eventSetup); if(theHFDigitizer) theHFDigitizer->setDetIds(hfCells); if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->setDetIds(hfCells); theZDCDigitizer->setDetIds(zdcCells); if(theHBHEUpgradeDigitizer) theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds); }
bool HcalDigitizer::hbhegeo [private] |
Definition at line 126 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().
bool HcalDigitizer::hfgeo [private] |
Definition at line 126 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().
std::string HcalDigitizer::hitsProducer_ [private] |
Definition at line 129 of file HcalDigitizer.h.
Referenced by accumulate(), and HcalDigitizer().
bool HcalDigitizer::hogeo [private] |
Definition at line 126 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().
bool HcalDigitizer::isHCAL [private] |
Definition at line 126 of file HcalDigitizer.h.
Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().
bool HcalDigitizer::isZDC [private] |
Definition at line 126 of file HcalDigitizer.h.
Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().
bool HcalDigitizer::relabel_ [private] |
Definition at line 127 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] |
Definition at line 84 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), setHBHENoiseSignalGenerator(), and ~HcalDigitizer().
std::vector<DetId> HcalDigitizer::theHBHEDetIds [private] |
Definition at line 122 of file HcalDigitizer.h.
Referenced by updateGeometry().
HBHEDigitizer* HcalDigitizer::theHBHEDigitizer [private] |
Definition at line 110 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), setHBHENoiseSignalGenerator(), updateGeometry(), and ~HcalDigitizer().
Definition at line 93 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), setHBHENoiseSignalGenerator(), and ~HcalDigitizer().
HBHEHitFilter HcalDigitizer::theHBHEHitFilter [private] |
Definition at line 99 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] |
Definition at line 111 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().
Definition at line 76 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().
Definition at line 116 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().
HcalAmplifier* HcalDigitizer::theHFAmplifier [private] |
Definition at line 85 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), setHFNoiseSignalGenerator(), and ~HcalDigitizer().
HFDigitizer* HcalDigitizer::theHFDigitizer [private] |
Definition at line 114 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), setHFNoiseSignalGenerator(), updateGeometry(), and ~HcalDigitizer().
Definition at line 94 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), setHFNoiseSignalGenerator(), and ~HcalDigitizer().
HFHitFilter HcalDigitizer::theHFHitFilter [private] |
Definition at line 100 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().
Definition at line 117 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), setHFNoiseSignalGenerator(), updateGeometry(), and ~HcalDigitizer().
HcalHitCorrection* HcalDigitizer::theHitCorrection [private] |
Definition at line 105 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().
HcalAmplifier* HcalDigitizer::theHOAmplifier [private] |
Definition at line 86 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), setHONoiseSignalGenerator(), and ~HcalDigitizer().
HODigitizer* HcalDigitizer::theHODigitizer [private] |
Definition at line 112 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), buildHOSiPMCells(), finalizeEvent(), HcalDigitizer(), setHONoiseSignalGenerator(), and ~HcalDigitizer().
Definition at line 95 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), setHONoiseSignalGenerator(), and ~HcalDigitizer().
HOHitFilter HcalDigitizer::theHOHitFilter [private] |
Definition at line 101 of file HcalDigitizer.h.
Referenced by HcalDigitizer().
std::vector<DetId> HcalDigitizer::theHOHPDDetIds [private] |
Definition at line 123 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 131 of file HcalDigitizer.h.
Referenced by buildHOSiPMCells(), and HcalDigitizer().
std::vector<DetId> HcalDigitizer::theHOSiPMDetIds [private] |
Definition at line 124 of file HcalDigitizer.h.
Referenced by buildHOSiPMCells().
HODigitizer* HcalDigitizer::theHOSiPMDigitizer [private] |
Definition at line 113 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), buildHOSiPMCells(), finalizeEvent(), HcalDigitizer(), and ~HcalDigitizer().
Definition at line 102 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().
Definition at line 107 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), and ~HcalDigitizer().
Definition at line 108 of file HcalDigitizer.h.
Referenced by HcalDigitizer().
Definition at line 72 of file HcalDigitizer.h.
Referenced by buildHOSiPMCells(), HcalDigitizer(), initializeEvent(), setHBHENoiseSignalGenerator(), setHFNoiseSignalGenerator(), setHONoiseSignalGenerator(), setZDCNoiseSignalGenerator(), and ~HcalDigitizer().
HcalHitRelabeller* HcalDigitizer::theRelabeller [private] |
Definition at line 118 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 106 of file HcalDigitizer.h.
Referenced by HcalDigitizer().
Definition at line 91 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().
Definition at line 97 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().
HcalAmplifier* HcalDigitizer::theZDCAmplifier [private] |
Definition at line 87 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), initializeEvent(), setZDCNoiseSignalGenerator(), and ~HcalDigitizer().
ZDCDigitizer* HcalDigitizer::theZDCDigitizer [private] |
Definition at line 115 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), HcalDigitizer(), setZDCNoiseSignalGenerator(), updateGeometry(), and ~HcalDigitizer().
Definition at line 96 of file HcalDigitizer.h.
Referenced by HcalDigitizer(), setZDCNoiseSignalGenerator(), and ~HcalDigitizer().
ZDCHitFilter HcalDigitizer::theZDCHitFilter [private] |
Definition at line 103 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 126 of file HcalDigitizer.h.
Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().