#include <GEMDigitizer.h>
Public Types | |
typedef edm::DetSetVector < StripDigiSimLink > | StripDigiSimLinks |
Public Member Functions | |
void | digitize (MixCollection< PSimHit > &simHits, GEMDigiCollection &rpcDigis, StripDigiSimLinks &digiSimLinks) |
const GEMEtaPartition * | findDet (int detId) const |
finds the GEM det unit in the geometry associated with this det ID | |
GEMDigitizer (const edm::ParameterSet &config, CLHEP::HepRandomEngine &) | |
GEMSimSetUp * | getGEMSimSetUp () |
void | setGEMSimSetUp (GEMSimSetUp *simsetup) |
void | setGeometry (const GEMGeometry *geom) |
sets geometry | |
~GEMDigitizer () | |
Private Attributes | |
GEMSim * | gemSim_ |
const GEMGeometry * | geometry_ |
std::string | modelName_ |
GEMSimSetUp * | simSetUp_ |
Digitizer for GEM
Definition at line 28 of file GEMDigitizer.h.
Definition at line 32 of file GEMDigitizer.h.
GEMDigitizer::GEMDigitizer | ( | const edm::ParameterSet & | config, |
CLHEP::HepRandomEngine & | eng | ||
) |
Definition at line 11 of file GEMDigitizer.cc.
References gemSim_, reco::get(), edm::ParameterSet::getParameter(), modelName_, and AlCaHLTBitMon_QueryRunRegistry::string.
{ modelName_ = config.getParameter<std::string>("digiModel"); gemSim_ = GEMSimFactory::get()->create(modelName_, config.getParameter<edm::ParameterSet>("digiModelConfig")); gemSim_->setRandomEngine(eng); }
GEMDigitizer::~GEMDigitizer | ( | ) |
void GEMDigitizer::digitize | ( | MixCollection< PSimHit > & | simHits, |
GEMDigiCollection & | rpcDigis, | ||
StripDigiSimLinks & | digiSimLinks | ||
) |
Definition at line 25 of file GEMDigitizer.cc.
References GEMGeometry::etaPartitions(), Exception, GEMSim::fillDigis(), gemSim_, geometry_, edm::DetSetVector< T >::insert(), AlCaHLTBitMon_ParallelJobs::p, GEMSim::setGEMSimSetUp(), simSetUp_, GEMSim::simulate(), GEMSim::simulateNoise(), and GEMSim::stripDigiSimLinks().
Referenced by GEMDigiProducer::produce().
{ gemSim_->setGEMSimSetUp(simSetUp_); // arrange the hits by roll std::map<int, edm::PSimHitContainer> hitMap; for(auto &hit: simHits) { hitMap[hit.detUnitId()].push_back(hit); } if ( ! geometry_) { throw cms::Exception("Configuration") << "GEMDigitizer::digitize() - No GEMGeometry present in the configuration file." << "Add the service in the configuration file or remove the modules that require it."; } auto etaPartitions = geometry_->etaPartitions() ; for(auto &p: etaPartitions) { const auto & partSimHits = hitMap[p->id()]; //LogDebug("GEMDigitizer") << "GEMDigitizer: found " << partSimHits.size() <<" hit(s) in the eta partition"; gemSim_->simulate(p, partSimHits); gemSim_->simulateNoise(p); gemSim_->fillDigis(p->id(), digis); digiSimLinks.insert(gemSim_->stripDigiSimLinks()); } }
const GEMEtaPartition * GEMDigitizer::findDet | ( | int | detId | ) | const |
finds the GEM det unit in the geometry associated with this det ID
Definition at line 60 of file GEMDigitizer.cc.
References geometry_, and GEMGeometry::idToDetUnit().
{ assert(geometry_ != 0); return dynamic_cast<const GEMEtaPartition *>(geometry_->idToDetUnit(GEMDetId(detId))); }
GEMSimSetUp* GEMDigitizer::getGEMSimSetUp | ( | ) | [inline] |
void GEMDigitizer::setGEMSimSetUp | ( | GEMSimSetUp * | simsetup | ) | [inline] |
Definition at line 45 of file GEMDigitizer.h.
References simSetUp_.
Referenced by GEMDigiProducer::beginRun().
{simSetUp_ = simsetup;}
void GEMDigitizer::setGeometry | ( | const GEMGeometry * | geom | ) | [inline] |
sets geometry
Definition at line 43 of file GEMDigitizer.h.
References relativeConstraints::geom, and geometry_.
Referenced by GEMDigiProducer::beginRun().
GEMSim* GEMDigitizer::gemSim_ [private] |
Definition at line 55 of file GEMDigitizer.h.
Referenced by digitize(), GEMDigitizer(), and ~GEMDigitizer().
const GEMGeometry* GEMDigitizer::geometry_ [private] |
Definition at line 54 of file GEMDigitizer.h.
Referenced by digitize(), findDet(), and setGeometry().
std::string GEMDigitizer::modelName_ [private] |
Definition at line 57 of file GEMDigitizer.h.
Referenced by GEMDigitizer().
GEMSimSetUp* GEMDigitizer::simSetUp_ [private] |
Definition at line 56 of file GEMDigitizer.h.
Referenced by digitize(), getGEMSimSetUp(), and setGEMSimSetUp().