84 : firstInitializeEvent_(
true),
85 firstFinalizeEvent_(
true),
89 pilotBlades(iConfig.exists(
"enablePilotBlades") ? iConfig.getParameter<
bool>(
"enablePilotBlades") :
false),
94 edm::LogInfo(
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
108 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
109 "which is not present in the configuration file. You must add the service\n"
110 "in the configuration file or remove the modules that require it.";
113 _pixeldigialgo = std::make_unique<SiPixelDigitizerAlgorithm>(iConfig, iC);
125 size_t globalSimHitIndex,
126 const unsigned int tofBin,
128 if (hSimHits.isValid()) {
129 std::set<unsigned int> detIds;
130 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
132 for (std::vector<PSimHit>::const_iterator it =
simHits.begin(), itEnd =
simHits.end(); it != itEnd;
133 ++it, ++globalSimHitIndex) {
134 unsigned int detId = (*it).detUnitId();
135 if (detIds.insert(detId).second) {
142 std::map<unsigned int, PixelGeomDetUnit const*>::iterator itDet =
detectorUnits.find(detId);
145 auto pixdet = itDet->second;
146 assert(pixdet !=
nullptr);
149 LogDebug(
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position()
150 <<
"(cm): " <<
pSetup->
inTesla(pixdet->surface().position());
152 it, itEnd, globalSimHitIndex, tofBin, pixdet, bfield, tTopo,
randomEngine_);
184 unsigned int detId = iu->geographicalId().rawId();
185 if (iu->type().isTrackerPixel()) {
186 auto pixdet = dynamic_cast<const PixelGeomDetUnit*>(iu);
187 assert(pixdet !=
nullptr);
188 if (iu->subDetector() ==
190 unsigned int disk = tTopo->
layer(detId);
209 if ((*i).find(
std::string(
"HighTof")) != std::string::npos)
232 if ((*i).find(
std::string(
"HighTof")) != std::string::npos)
249 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
250 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
259 std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ =
261 if (PixelFEDChannelCollection_ ==
nullptr) {
262 throw cms::Exception(
"NullPointerError") <<
"PixelFEDChannelCollection not set in chooseScenario function.\n";
268 if (iu->type().isTrackerPixel()) {
275 dynamic_cast<const PixelGeomDetUnit*>(iu), collector.data, linkcollector.data, tTopo,
randomEngine_);
276 if (!collector.data.empty()) {
277 theDigiVector.push_back(
std::move(collector));
279 if (!linkcollector.data.empty()) {
280 theDigiLinkVector.push_back(
std::move(linkcollector));
287 std::unique_ptr<edm::DetSetVector<PixelDigiSimLink> > outputlink(