88 : firstInitializeEvent_(
true),
89 firstFinalizeEvent_(
true),
92 trackerContainers(iConfig.getParameter<
std::vector<
std::
string> >(
"RoutList")),
94 pilotBlades(iConfig.exists(
"enablePilotBlades") ? iConfig.getParameter<
bool>(
"enablePilotBlades") :
false),
96 edm::LogInfo(
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
110 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
111 "which is not present in the configuration file. You must add the service\n"
112 "in the configuration file or remove the modules that require it.";
127 size_t globalSimHitIndex,
128 const unsigned int tofBin,
130 if (hSimHits.isValid()) {
131 std::set<unsigned int> detIds;
132 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
136 for (std::vector<PSimHit>::const_iterator it =
simHits.begin(), itEnd =
simHits.end(); it != itEnd;
137 ++it, ++globalSimHitIndex) {
138 unsigned int detId = (*it).detUnitId();
139 if (detIds.insert(detId).second) {
146 std::map<unsigned int, PixelGeomDetUnit const*>::iterator itDet =
detectorUnits.find(detId);
149 auto pixdet = itDet->second;
150 assert(pixdet !=
nullptr);
153 LogDebug(
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position()
154 <<
"(cm): " <<
pSetup->
inTesla(pixdet->surface().position());
156 it, itEnd, globalSimHitIndex, tofBin, pixdet, bfield, tTopo,
randomEngine_);
190 unsigned int detId = iu->geographicalId().rawId();
191 if (iu->type().isTrackerPixel()) {
192 auto pixdet = dynamic_cast<const PixelGeomDetUnit*>(iu);
193 assert(pixdet !=
nullptr);
194 if (iu->subDetector() ==
196 unsigned int disk = tTopo->
layer(detId);
215 if ((*i).find(
std::string(
"HighTof")) != std::string::npos)
238 if ((*i).find(
std::string(
"HighTof")) != std::string::npos)
257 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
258 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
268 std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ =
270 if (PixelFEDChannelCollection_ ==
nullptr) {
271 throw cms::Exception(
"NullPointerError") <<
"PixelFEDChannelCollection not set in chooseScenario function.\n";
277 if (iu->type().isTrackerPixel()) {
284 dynamic_cast<const PixelGeomDetUnit*>(iu), collector.data, linkcollector.data, tTopo,
randomEngine_);
285 if (!collector.data.empty()) {
286 theDigiVector.push_back(
std::move(collector));
288 if (!linkcollector.data.empty()) {
289 theDigiLinkVector.push_back(
std::move(linkcollector));
296 std::unique_ptr<edm::DetSetVector<PixelDigiSimLink> > outputlink(