|
|
|
void | fillCentralTOFs () |
|
unsigned int | fillDigiMap (ChamberDigiMap &chDigiMap, unsigned int bx, unsigned int part, unsigned int strip, unsigned int currentIDX) const |
|
int | getCustomStripProperties (const ME0DetId &detId, const ME0DigiPreReco *inDigi, float &tof, int &strip, LocalPoint &digiLocalPoint, LocalError &digiLocalError) const |
|
void | getStripProperties (const ME0EtaPartition *etaPart, const ME0DigiPreReco *inDigi, float &tof, int &strip, LocalPoint &digiLocalPoint, LocalError &digiLocalError) const |
|
Definition at line 41 of file ME0ReDigiProducer.cc.
◆ ChamberDigiMap
◆ DigiIndicies
◆ ME0ReDigiProducer()
Definition at line 268 of file ME0ReDigiProducer.cc.
281 geom_token_(esConsumes<ME0Geometry, MuonGeometryRecord, edm::Transition::BeginRun>()) {
282 produces<ME0DigiPreRecoCollection>();
283 produces<ME0DigiPreRecoMap>();
288 <<
"ME0ReDigiProducer::ME0PreRecoDigiProducer() - RandomNumberGeneratorService is not present in configuration "
290 <<
"Add the service in the configuration file or remove the modules that require it.";
301 <<
"ME0ReDigiProducer::ME0PreRecoDigiProducer() - Must have at least one strip if using custom geometry.";
304 <<
"ME0ReDigiProducer::ME0PreRecoDigiProducer() - Must have at least one partition if using custom geometry.";
308 throw cms::Exception(
"Setup") <<
"ME0ReDigiProducer::ME0PreRecoDigiProducer() - neutronAcceptance must be >= 0.";
References Exception, edm::Service< T >::isAvailable(), neutronAcceptance, numberOfPartitions, numberOfStrips, tempGeo, useBuiltinGeo, useCusGeoFor1PartGeo, and usePads.
◆ ~ME0ReDigiProducer()
ME0ReDigiProducer::~ME0ReDigiProducer |
( |
| ) |
|
|
override |
◆ beginRun()
Definition at line 316 of file ME0ReDigiProducer.cc.
323 throw cms::Exception(
"Setup") <<
"ME0ReDigiProducer::beginRun() - No ME0Chambers in geometry.";
327 throw cms::Exception(
"Setup") <<
"ME0ReDigiProducer::beginRun() - No layers in ME0 geometry.";
329 const unsigned int nPartitions =
chambers.front()->layers()[0]->nEtaPartitions();
338 <<
"ME0ReDigiProducer::beginRun() - The geometry has " <<
nLayers <<
" layers, but the readout of "
339 <<
layerReadout.size() <<
" were specified with the layerReadout parameter.";
342 LogDebug(
"ME0ReDigiProducer") <<
"Building temporary geometry:" << std::endl;
344 LogDebug(
"ME0ReDigiProducer") <<
"Done building temporary geometry!" << std::endl;
348 <<
"ME0ReDigiProducer::beginRun() - The geometry has " <<
tempGeo->
numLayers()
349 <<
" layers, but the readout of " <<
layerReadout.size()
350 <<
" were specified with the layerReadout parameter.";
References chambers, Exception, fillCentralTOFs(), geom_token_, edm::EventSetup::getHandle(), layerReadout, LogDebug, MuonTCMETValueMapProducer_cff::nLayers, numberOfPartitions, numberOfStrips, ME0ReDigiProducer::TemporaryGeometry::numLayers(), tempGeo, useBuiltinGeo, and useCusGeoFor1PartGeo.
◆ buildDigis()
Definition at line 372 of file ME0ReDigiProducer.cc.
390 LogDebug(
"ME0ReDigiProducer::buildDigis") <<
"Begin building digis." << std::endl;
392 for (me0dgIt = input_digis.begin(); me0dgIt != input_digis.end(); ++me0dgIt) {
393 const auto& me0Id = (*me0dgIt).first;
394 LogTrace(
"ME0ReDigiProducer::buildDigis") <<
"Starting with roll: " << me0Id << std::endl;
402 LogTrace(
"ME0ReDigiProducer::buildDigis") << std::endl
403 <<
"(" << digi->x() <<
"," << digi->y() <<
"," << digi->tof() <<
","
404 << digi->pdgid() <<
"," << digi->prompt() <<
")-> ";
423 int mapPartIDX = me0Id.roll() - 1;
434 const int bxIdx = std::round(tof /
bxWidth);
435 LogTrace(
"ME0ReDigiProducer::buildDigis") << tof <<
"(" << bxIdx <<
") ";
447 LogTrace(
"ME0ReDigiProducer::buildDigis") <<
"(" << bxIdx <<
"," << mapPartIDX <<
"," <<
strip <<
") ";
449 int matchIDX =
fillDigiMap(chDigiMap, bxIdx, mapPartIDX,
strip, newDigiIdx);
463 digiLocalPoint.
x(), digiLocalPoint.
y(),
sigmaX,
sigmaY, corrCoef, tof, digi->pdgid(), digi->prompt());
464 output_digis.insertDigi(me0Id, out_digi);
470 LogTrace(
"ME0ReDigiProducer::buildDigis") <<
"(" << digiLocalPoint.
x() <<
"," << digiLocalPoint.
y() <<
","
References bxWidth, fillDigiMap(), getCustomStripProperties(), getStripProperties(), MuonDigiCollection< IndexType, DigiType >::insertDigi(), layerReadout, LogDebug, LogTrace, maxBXReadout, mergeDigis, minBXReadout, neutronAcceptance, FastTimerService_cff::range, BeamSpotPI::sigmaX, BeamSpotPI::sigmaY, mathSSE::sqrt(), digitizers_cfi::strip, timeResolution, useBuiltinGeo, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().
Referenced by produce().
◆ fillCentralTOFs()
void ME0ReDigiProducer::fillCentralTOFs |
( |
| ) |
|
|
private |
Definition at line 478 of file ME0ReDigiProducer.cc.
479 const auto* mainChamber =
geometry->chambers().front();
480 const unsigned int nLayers = mainChamber->nLayers();
484 LogDebug(
"ME0ReDigiProducer::fillCentralTOFs()") <<
"TOF numbers [layer][partition]: ";
485 for (
unsigned int iL = 0; iL <
nLayers; ++iL) {
486 const auto*
layer = mainChamber->layers()[iL];
487 const unsigned int mapLayIDX =
layer->id().layer() - 1;
488 const unsigned int nPartitions =
layer->nEtaPartitions();
490 throw cms::Exception(
"Setup") <<
"ME0ReDigiProducer::fillCentralTOFs() - ME0Layer has no partitions.";
491 tofs[mapLayIDX].resize(nPartitions);
492 for (
unsigned int iP = 0; iP < nPartitions; ++iP) {
493 const unsigned int mapPartIDX =
layer->etaPartitions()[iP]->id().roll() - 1;
495 tofs[mapLayIDX][mapPartIDX] = (centralGP.mag() / (CLHEP::c_light / CLHEP::cm));
496 LogDebug(
"ME0ReDigiProducer::fillCentralTOFs()")
497 <<
"[" << mapLayIDX <<
"][" << mapPartIDX <<
"]=" <<
tofs[mapLayIDX][mapPartIDX] <<
" " << std::endl;
References Exception, phase1PixelTopology::layer, LogDebug, MuonTCMETValueMapProducer_cff::nLayers, and tofs.
Referenced by beginRun().
◆ fillDigiMap()
unsigned int ME0ReDigiProducer::fillDigiMap |
( |
ChamberDigiMap & |
chDigiMap, |
|
|
unsigned int |
bx, |
|
|
unsigned int |
part, |
|
|
unsigned int |
strip, |
|
|
unsigned int |
currentIDX |
|
) |
| const |
|
private |
◆ getCustomStripProperties()
Definition at line 501 of file ME0ReDigiProducer.cc.
519 const LocalPoint partLocalPoint(inDigi->
x(), inDigi->
y() - partCenter, 0.);
520 strip = topo->channel(partLocalPoint);
524 LocalPoint digiPartLocalPoint = topo->localPosition(stripF);
525 digiLocalError = topo->localError(
530 digiLocalPoint =
LocalPoint(digiPartLocalPoint.
x(), digiPartLocalPoint.
y() + partCenter, 0.0);
References ME0ReDigiProducer::TemporaryGeometry::findEtaPartition(), dqmMemoryStats::float, ME0ReDigiProducer::TemporaryGeometry::getCentralTOF(), ME0ReDigiProducer::TemporaryGeometry::getPartCenter(), ME0ReDigiProducer::TemporaryGeometry::getTopo(), LogTrace, partIdx(), mathSSE::sqrt(), digitizers_cfi::strip, tempGeo, ME0DigiPreReco::x(), PV3DBase< T, PVType, FrameType >::x(), ME0DigiPreReco::y(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by buildDigis().
◆ getStripProperties()
Definition at line 533 of file ME0ReDigiProducer.cc.
548 const LocalPoint partLocalPoint(inDigi->
x(), inDigi->
y(), 0.);
549 strip = topo.channel(partLocalPoint);
553 digiLocalPoint = topo.localPosition(stripF);
554 digiLocalError = topo.localError(stripF, 1. /
sqrt(12.));
References dqmMemoryStats::float, ME0EtaPartition::id(), ME0DetId::layer(), TrapezoidalStripTopology::nstrips(), TrapezoidalStripTopology::pitch(), TrapezoidalStripTopology::radius(), ME0DetId::roll(), ME0EtaPartition::specificTopology(), mathSSE::sqrt(), digitizers_cfi::strip, TrapezoidalStripTopology::stripLength(), tofs, usePads, ME0DigiPreReco::x(), and ME0DigiPreReco::y().
Referenced by buildDigis().
◆ produce()
◆ bxWidth
const float ME0ReDigiProducer::bxWidth |
|
private |
◆ geom_token_
◆ geometry
◆ layerReadout
std::vector<int> ME0ReDigiProducer::layerReadout |
|
private |
◆ maxBXReadout
int ME0ReDigiProducer::maxBXReadout |
|
private |
◆ mergeDigis
bool ME0ReDigiProducer::mergeDigis |
|
private |
◆ minBXReadout
int ME0ReDigiProducer::minBXReadout |
|
private |
◆ neutronAcceptance
double ME0ReDigiProducer::neutronAcceptance |
|
private |
◆ numberOfPartitions
unsigned int ME0ReDigiProducer::numberOfPartitions |
|
private |
◆ numberOfStrips
unsigned int ME0ReDigiProducer::numberOfStrips |
|
private |
◆ tempGeo
◆ timeResolution
double ME0ReDigiProducer::timeResolution |
|
private |
◆ tofs
std::vector<std::vector<double> > ME0ReDigiProducer::tofs |
|
private |
◆ token
◆ useBuiltinGeo
bool ME0ReDigiProducer::useBuiltinGeo |
|
private |
◆ useCusGeoFor1PartGeo
bool ME0ReDigiProducer::useCusGeoFor1PartGeo |
|
private |
◆ usePads
bool ME0ReDigiProducer::usePads |
|
private |
edm::EDGetTokenT< ME0DigiPreRecoCollection > token
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
unsigned int findEtaPartition(float locY) const
float stripLength() const override
det heigth (strip length in the middle)
T const * product() const
MuonDigiCollection< ME0DetId, int > ME0DigiPreRecoMap
const TrapezoidalStripTopology * getTopo(const unsigned int partIdx) const
std::vector< DigiType >::const_iterator const_iterator
static unsigned int partIdx(const InputGenJetsParticleSelector::ParticleVector &p, const reco::Candidate *particle)
const StripTopology & specificTopology() const
std::vector< int > layerReadout
class Point3DBase< float, LocalTag > LocalPoint
void buildDigis(const ME0DigiPreRecoCollection &, ME0DigiPreRecoCollection &, ME0DigiPreRecoMap &, CLHEP::HepRandomEngine *engine)
constexpr std::array< uint8_t, layerIndexSize > layer
std::tuple< unsigned int, unsigned int, unsigned int > DigiIndicies
unsigned int numberOfPartitions
float pitch() const override
std::vector< std::vector< double > > tofs
float getPartCenter(const unsigned int partIdx) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
static char chambers[264][20]
edm::ESGetToken< ME0Geometry, MuonGeometryRecord > geom_token_
void getStripProperties(const ME0EtaPartition *etaPart, const ME0DigiPreReco *inDigi, float &tof, int &strip, LocalPoint &digiLocalPoint, LocalError &digiLocalError) const
unsigned int numLayers() const
void insertDigi(const IndexType &index, const DigiType &digi)
insert a digi for a given DetUnit
std::pair< const_iterator, const_iterator > Range
T getParameter(std::string const &) const
int getCustomStripProperties(const ME0DetId &detId, const ME0DigiPreReco *inDigi, float &tof, int &strip, LocalPoint &digiLocalPoint, LocalError &digiLocalError) const
std::map< DigiIndicies, unsigned int > ChamberDigiMap
unsigned int numberOfStrips
bool useCusGeoFor1PartGeo
int nstrips() const override
float getCentralTOF(const ME0DetId &me0Id, unsigned int partIdx) const
TemporaryGeometry * tempGeo
unsigned int fillDigiMap(ChamberDigiMap &chDigiMap, unsigned int bx, unsigned int part, unsigned int strip, unsigned int currentIDX) const
int layer() const
Layer id: each chamber has six layers of chambers: layer 1 is the inner layer and layer 6 is the oute...
MuonDigiCollection< ME0DetId, ME0DigiPreReco > ME0DigiPreRecoCollection