52 class HepRandomEngine;
70 typedef std::map<unsigned int, std::vector<PSimHit>>
simhit_map;
74 std::map<RPDetId, std::unique_ptr<RPDetDigitizer>>
theAlgoMap;
97 produces<edm::DetSetVector<TotemRPDigi>>();
107 "simulateDeadChannels")) {
130 <<
"This class requires the RandomNumberGeneratorService\n" 131 "which is not present in the configuration file. You must add the service\n" 132 "in the configuration file or remove the modules that require it.";
139 iEvent.getByLabel(
"mix",
"g4SimHitsTotemHitsRP", cf);
142 edm::LogInfo(
"RPDigiProducer") <<
"\n\n=================== Starting SimHit access" 143 <<
" ===================" 149 for (cfi =
col.begin(); cfi !=
col.end(); cfi++) {
150 edm::LogInfo(
"RPDigiProducer") <<
" Hit " <<
count <<
" has tof " << cfi->timeOfFlight() <<
" trackid " 151 << cfi->trackId() <<
" bunchcr " << cfi.
bunch() <<
" trigger " << cfi.
getTrigger()
152 <<
", from EncodedEventId: " << cfi->eventId().bunchCrossing() <<
" " 153 << cfi->eventId().event() <<
" bcr from MixCol " << cfi.
bunch() <<
"\n";
154 edm::LogInfo(
"RPDigiProducer") <<
" Hit: " << (*cfi) <<
"\n";
162 edm::LogInfo(
"RPDigiProducer") <<
"Input MixCollection size = " << allRPHits.size() <<
"\n";
169 for (isim = allRPHits.begin(); isim != allRPHits.end(); ++isim) {
170 simHitMap_[(*isim).detUnitId()].push_back((*isim));
174 std::vector<edm::DetSet<TotemRPDigi>> DigiVector;
175 DigiVector.reserve(400);
191 std::vector<int> input_links;
195 ->
run(simHitMap_[
it->first], input_links, digi_collector.
data, output_digi_links);
197 if (!digi_collector.
data.empty()) {
206 edm::LogInfo(
"RPDigiProducer") <<
"digi_output->size()=" << digi_output->size() <<
"\n";
225 for (std::vector<TotemRPDigi>::const_iterator stripIterator = rpstrip_detset.
data.begin();
226 stripIterator < rpstrip_detset.
data.end();
228 rpdigi_detset.push_back(
TotemRPDigi(stripIterator->stripNumber()));
231 return rpdigi_detset;
238 desc.add<
bool>(
"RPLandauFluctuations",
true);
239 desc.add<
bool>(
"RPDisplacementOn",
false);
240 desc.add<
int>(
"RPVerbosity", 0);
241 desc.add<
double>(
"RPVFATThreshold", 9000.0);
242 desc.add<
double>(
"RPTopEdgePosition", 1.5);
243 desc.add<
double>(
"RPActiveEdgeSmearing", 0.013);
244 desc.add<
double>(
"RPEquivalentNoiseCharge300um", 1000.0);
245 desc.add<
int>(
"RPVFATTriggerMode", 2);
246 desc.add<std::vector<double>>(
"RPInterStripSmearing",
250 desc.add<
double>(
"RPSharingSigmas", 5.0);
251 desc.add<
double>(
"RPGeVPerElectron", 3.61e-09);
252 desc.add<
double>(
"RPActiveEdgePosition", 0.034);
253 desc.add<
bool>(
"RPDeadStripSimulationOn",
false);
254 desc.add<std::vector<std::string>>(
"ROUList",
258 desc.add<
bool>(
"RPNoNoise",
false);
259 desc.add<
bool>(
"RPDigiSimHitRelationsPresistence",
false);
261 desc.add<
int>(
"RPChargeDivisionsPerThickness", 5);
262 desc.add<
double>(
"RPDeltaProductionCut", 0.120425);
263 desc.add<
double>(
"RPBottomEdgePosition", 1.5);
264 desc.add<
double>(
"RPBottomEdgeSmearing", 0.011);
265 desc.add<
double>(
"RPTopEdgeSmearing", 0.011);
267 desc.add<
double>(
"RPInterStripCoupling",
269 desc.add<
double>(
"RPDeadStripProbability", 0.001);
270 desc.add<
int>(
"RPChargeDivisionsPerStrip", 15);
271 descriptions.
add(
"RPSiDetDigitizer",
desc);
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, VeryForwardMisalignedGeometryRecord > alignmentToken
T getParameter(std::string const &) const
std::map< unsigned int, std::vector< PSimHit > > simhit_map
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > geomToken
edm::DetSet< TotemRPDigi > convertRPStripDetSet(const edm::DetSet< TotemRPDigi > &)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
T const * product() const
std::optional< T > tryToGet() const
simhit_map::iterator simhit_map_iterator
std::vector< std::vector< std::pair< int, double > > > DigiPrimaryMapType
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
det_id_type detId() const
edm::ESGetToken< TotemAnalysisMask, TotemReadoutRcd > tokenAnalysisMask
std::map< RPDetId, std::unique_ptr< RPDetDigitizer > > theAlgoMap
~RPDigiProducer() override=default
bool simulateDeadChannels
#define DEFINE_FWK_MODULE(type)
RPDigiProducer(const edm::ParameterSet &)
edm::EDGetTokenT< CrossingFrame< PSimHit > > tokenCrossingFrameTotemRP
std::vector< std::string > RP_hit_containers_
Log< level::Info, false > LogInfo
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
void produce(edm::Event &, const edm::EventSetup &) override
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
DeadChannelsManager deadChannelsManager
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(const edm::Run &, const edm::EventSetup &) override
CLHEP::HepRandomEngine * rndEngine_