1 #ifndef SimPPS_PPSPixelDigiProducer_PPSPixelDigiProducer_h
2 #define SimPPS_PPSPixelDigiProducer_PPSPixelDigiProducer_h
71 #include "CLHEP/Random/RandomEngine.h"
74 class HepRandomEngine;
88 typedef std::map<unsigned int, std::vector<PSimHit>>
simhit_map;
93 std::map<uint32_t, std::unique_ptr<RPixDetDigitizer>>
theAlgoMap;
104 produces<edm::DetSetVector<CTPPSPixelDigi>>();
120 desc.
add<std::vector<std::string>>(
"ROUList", {
"CTPPSPixelHits"});
121 desc.
add<
int>(
"RPixVerbosity", 0);
122 desc.
add<
bool>(
"CTPPSPixelDigiSimHitRelationsPersistence",
126 desc.
add<
double>(
"RPixEquivalentNoiseCharge", 1000.0);
127 desc.
add<
bool>(
"RPixNoNoise",
false);
130 desc.
add<
double>(
"RPixGeVPerElectron", 3.61e-09);
131 desc.
add<std::vector<double>>(
"RPixInterSmearing", {0.011});
132 desc.
add<
bool>(
"RPixLandauFluctuations",
true);
133 desc.
add<
int>(
"RPixChargeDivisions", 20);
134 desc.
add<
double>(
"RPixDeltaProductionCut", 0.120425);
137 desc.
add<
std::string>(
"ChargeMapFile2E",
"SimPPS/PPSPixelDigiProducer/data/PixelChargeMap.txt");
138 desc.
add<
std::string>(
"ChargeMapFile2E_2X",
"SimPPS/PPSPixelDigiProducer/data/PixelChargeMap_2X.txt");
139 desc.
add<
std::string>(
"ChargeMapFile2E_2Y",
"SimPPS/PPSPixelDigiProducer/data/PixelChargeMap_2Y.txt");
140 desc.
add<
std::string>(
"ChargeMapFile2E_2X2Y",
"SimPPS/PPSPixelDigiProducer/data/PixelChargeMap_2X2Y.txt");
146 desc.
add<
double>(
"RPixDummyROCThreshold", 1900.0);
147 desc.
add<
double>(
"RPixDummyROCElectronPerADC", 135.0);
148 desc.
add<
int>(
"VCaltoElectronGain", 50);
149 desc.
add<
int>(
"VCaltoElectronOffset", -411);
150 desc.
add<
bool>(
"doSingleCalibration",
false);
151 desc.
add<
double>(
"RPixDeadPixelProbability", 0.001);
152 desc.
add<
bool>(
"RPixDeadPixelSimulationOn",
true);
155 desc.
add<
double>(
"RPixActiveEdgeSmearing", 0.020);
156 desc.
add<
double>(
"RPixActiveEdgePosition", 0.150);
159 desc.
add<
std::string>(
"InputCollection",
"g4SimHitsCTPPSPixelHits");
160 descriptions.
add(
"RPixDetDigitizer", desc);
174 <<
"This class requires the RandomNumberGeneratorService\n"
175 "which is not present in the configuration file. You must add the service\n"
176 "in the configuration file or remove the modules that require it.";
190 edm::LogInfo(
"PPSPixelDigiProducer") <<
"\n\n=================== Starting SimHit access"
191 <<
" ===================";
197 for (cfi =
col.begin(); cfi !=
col.end(); cfi++) {
199 <<
" Hit " <<
count <<
" has tof " << cfi->timeOfFlight() <<
" trackid " << cfi->trackId() <<
" bunchcr "
201 <<
", from EncodedEventId: " << cfi->eventId().bunchCrossing() <<
" " << cfi->eventId().event()
202 <<
" bcr from MixCol " << cfi.
bunch();
203 edm::LogInfo(
"PPSPixelDigiProducer") <<
" Hit: " << (*cfi) <<
" " << cfi->exitPoint();
211 edm::LogInfo(
"PPSPixelDigiProducer") <<
"Input MixCollection size = " << allRPixHits.size();
218 for (isim = allRPixHits.begin(); isim != allRPixHits.end(); ++isim) {
219 SimHitMap[(*isim).detUnitId()].push_back((*isim));
223 std::vector<edm::DetSet<CTPPSPixelDigi>> theDigiVector;
224 theDigiVector.reserve(400);
225 theDigiVector.clear();
231 theAlgoMap[it->first] = std::unique_ptr<RPixDetDigitizer>(
235 std::vector<int> input_links;
236 std::vector<std::vector<std::pair<int, double>>> output_digi_links;
242 if (!digi_collector.
data.empty()) {
243 theDigiVector.push_back(digi_collector);
250 edm::LogInfo(
"PPSPixelDigiProducer") <<
"digi_output->size()=" << digi_output->size();