49 class HepRandomEngine;
67 typedef std::map<unsigned int, std::vector<PSimHit>>
simhit_map;
71 std::map<RPDetId, std::unique_ptr<RPDetDigitizer>>
theAlgoMap;
92 produces<edm::DetSetVector<TotemRPDigi>>();
102 "simulateDeadChannels")) {
103 simulateDeadChannels = conf.
getParameter<
bool>(
"simulateDeadChannels");
105 if (simulateDeadChannels) {
123 <<
"This class requires the RandomNumberGeneratorService\n"
124 "which is not present in the configuration file. You must add the service\n"
125 "in the configuration file or remove the modules that require it.";
132 iEvent.
getByLabel(
"mix",
"g4SimHitsTotemHitsRP", cf);
135 edm::LogInfo(
"RPDigiProducer") <<
"\n\n=================== Starting SimHit access"
136 <<
" ==================="
142 for (cfi =
col.begin(); cfi !=
col.end(); cfi++) {
143 edm::LogInfo(
"RPDigiProducer") <<
" Hit " << count <<
" has tof " << cfi->timeOfFlight() <<
" trackid "
144 << cfi->trackId() <<
" bunchcr " << cfi.
bunch() <<
" trigger " << cfi.
getTrigger()
145 <<
", from EncodedEventId: " << cfi->eventId().bunchCrossing() <<
" "
146 << cfi->eventId().event() <<
" bcr from MixCol " << cfi.
bunch() <<
"\n";
147 edm::LogInfo(
"RPDigiProducer") <<
" Hit: " << (*cfi) <<
"\n";
155 edm::LogInfo(
"RPDigiProducer") <<
"Input MixCollection size = " << allRPHits.size() <<
"\n";
162 for (isim = allRPHits.begin(); isim != allRPHits.end(); ++isim) {
163 simHitMap_[(*isim).detUnitId()].push_back((*isim));
167 std::vector<edm::DetSet<TotemRPDigi>> DigiVector;
168 DigiVector.reserve(400);
178 std::vector<int> input_links;
182 ->
run(simHitMap_[it->first], input_links, digi_collector.
data, output_digi_links);
184 if (!digi_collector.
data.empty()) {
193 edm::LogInfo(
"RPDigiProducer") <<
"digi_output->size()=" << digi_output->size() <<
"\n";
212 for (std::vector<TotemRPDigi>::const_iterator stripIterator = rpstrip_detset.
data.begin();
213 stripIterator < rpstrip_detset.
data.end();
215 rpdigi_detset.push_back(
TotemRPDigi(stripIterator->stripNumber()));
218 return rpdigi_detset;
225 desc.
add<
bool>(
"RPLandauFluctuations",
true);
226 desc.
add<
bool>(
"RPDisplacementOn",
false);
227 desc.
add<
int>(
"RPVerbosity", 0);
228 desc.
add<
double>(
"RPVFATThreshold", 9000.0);
229 desc.
add<
double>(
"RPTopEdgePosition", 1.5);
230 desc.
add<
double>(
"RPActiveEdgeSmearing", 0.013);
231 desc.
add<
double>(
"RPEquivalentNoiseCharge300um", 1000.0);
232 desc.
add<
int>(
"RPVFATTriggerMode", 2);
233 desc.
add<std::vector<double>>(
"RPInterStripSmearing",
237 desc.
add<
double>(
"RPSharingSigmas", 5.0);
238 desc.
add<
double>(
"RPGeVPerElectron", 3.61e-09);
239 desc.
add<
double>(
"RPActiveEdgePosition", 0.034);
240 desc.
add<
bool>(
"RPDeadStripSimulationOn",
false);
241 desc.
add<std::vector<std::string>>(
"ROUList",
245 desc.
add<
bool>(
"RPNoNoise",
false);
246 desc.
add<
bool>(
"RPDigiSimHitRelationsPresistence",
false);
248 desc.
add<
int>(
"RPChargeDivisionsPerThickness", 5);
249 desc.
add<
double>(
"RPDeltaProductionCut", 0.120425);
250 desc.
add<
double>(
"RPBottomEdgePosition", 1.5);
251 desc.
add<
double>(
"RPBottomEdgeSmearing", 0.011);
252 desc.
add<
double>(
"RPTopEdgeSmearing", 0.011);
254 desc.
add<
double>(
"RPInterStripCoupling",
256 desc.
add<
double>(
"RPDeadStripProbability", 0.001);
257 desc.
add<
int>(
"RPChargeDivisionsPerStrip", 15);
258 descriptions.
add(
"RPSiDetDigitizer", desc);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::map< unsigned int, std::vector< PSimHit > > simhit_map
det_id_type detId() const
edm::DetSet< TotemRPDigi > convertRPStripDetSet(const edm::DetSet< TotemRPDigi > &)
#define DEFINE_FWK_MODULE(type)
simhit_map::iterator simhit_map_iterator
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< std::vector< std::pair< int, double > > > DigiPrimaryMapType
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
bool getData(T &iHolder) const
edm::ESGetToken< TotemAnalysisMask, TotemReadoutRcd > tokenAnalysisMask
std::map< RPDetId, std::unique_ptr< RPDetDigitizer > > theAlgoMap
~RPDigiProducer() override=default
bool simulateDeadChannels
RPDigiProducer(const edm::ParameterSet &)
edm::EDGetTokenT< CrossingFrame< PSimHit > > tokenCrossingFrameTotemRP
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< std::string > RP_hit_containers_
Log< level::Info, false > LogInfo
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
DeadChannelsManager deadChannelsManager
StreamID streamID() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(const edm::Run &, const edm::EventSetup &) override
CLHEP::HepRandomEngine * rndEngine_