75 class HepRandomEngine;
98 hitsProducer(iConfig.getParameter<std::
string>(
"hitsProducer")),
99 trackerContainers(iConfig.getParameter<std::vector<std::
string> >(
"ROUList")),
100 geometryType(iConfig.getParameter<std::
string>(
"GeometryType")),
101 pilotBlades(iConfig.exists(
"enablePilotBlades")?iConfig.getParameter<bool>(
"enablePilotBlades"):
false),
102 NumberOfEndcapDisks(iConfig.exists(
"NumPixelEndcap")?iConfig.getParameter<int>(
"NumPixelEndcap"):2)
104 edm::LogInfo (
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
117 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
118 "which is not present in the configuration file. You must add the service\n"
119 "in the configuration file or remove the modules that require it.";
126 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
136 if(hSimHits.isValid()) {
137 std::set<unsigned int> detIds;
138 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
139 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it) {
140 unsigned int detId = (*it).detUnitId();
141 if(detIds.insert(detId).second) {
145 std::map<unsigned int, PixelGeomDetUnit const *>::iterator itDet =
detectorUnits.find(detId);
147 auto pixdet = itDet->second;
150 LogDebug (
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position() <<
"(cm): "
151 <<
pSetup->inTesla(pixdet->surface().position());
152 _pixeldigialgo->accumulateSimHits(it, itEnd, pixdet, bfield, engine);
175 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); ++iu) {
176 unsigned int detId = (*iu)->geographicalId().rawId();
183 unsigned int disk = tTopo->
pxfDisk(detId);
228 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
229 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
234 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); iu ++){
235 DetId idet=
DetId((*iu)->geographicalId().rawId());
246 _pixeldigialgo->digitize(dynamic_cast<const PixelGeomDetUnit*>((*iu)),
251 if(collector.data.size() > 0) {
252 theDigiVector.push_back(std::move(collector));
254 if(linkcollector.data.size() > 0) {
255 theDigiLinkVector.push_back(std::move(linkcollector));
261 std::auto_ptr<edm::DetSetVector<PixelDigi> >
263 std::auto_ptr<edm::DetSetVector<PixelDigiSimLink> >
268 iEvent.
put(outputlink);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
const int NumberOfEndcapDisks
std::vector< CLHEP::HepRandomEngine * > randomEngines_
unsigned int pxfDisk(const DetId &id) const
std::map< unsigned int, PixelGeomDetUnit const * > detectorUnits
edm::ESHandle< MagneticField > pSetup
SiPixelDigitizer(const edm::ParameterSet &conf, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
const std::string hitsProducer
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
edm::ESHandle< TrackerGeometry > pDD
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::unique_ptr< SiPixelDigitizerAlgorithm > _pixeldigialgo
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c) override
unsigned int value() const
void accumulatePixelHits(edm::Handle< std::vector< PSimHit > >, CLHEP::HepRandomEngine *)
T const * product() const
const std::string geometryType
PileupMixingContent * PileupInfo_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const =0
Use this engine in event methods.
virtual PileupMixingContent * getEventPileupInfo()
const vstring trackerContainers
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
volatile std::atomic< bool > shutdown_flag false
virtual ~SiPixelDigitizer()