71 #include "CLHEP/Random/RandomEngine.h"
92 hitsProducer(iConfig.getParameter<std::
string>(
"hitsProducer")),
93 trackerContainers(iConfig.getParameter<std::vector<std::
string> >(
"ROUList")),
94 geometryType(iConfig.getParameter<std::
string>(
"GeometryType"))
96 edm::LogInfo (
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
109 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
110 "which is not present in the configuration file. You must add the service\n"
111 "in the configuration file or remove the modules that require it.";
120 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
130 if(hSimHits.isValid()) {
131 std::set<unsigned int> detIds;
132 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
133 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it) {
134 unsigned int detId = (*it).detUnitId();
135 if(detIds.insert(detId).second) {
164 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); ++iu) {
165 unsigned int detId = (*iu)->geographicalId().rawId();
209 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
210 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
212 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); iu ++){
213 DetId idet=
DetId((*iu)->geographicalId().rawId());
228 if(collector.data.size() > 0) {
229 theDigiVector.push_back(std::move(collector));
231 if(linkcollector.data.size() > 0) {
232 theDigiLinkVector.push_back(std::move(linkcollector));
238 std::auto_ptr<edm::DetSetVector<PixelDigi> >
240 std::auto_ptr<edm::DetSetVector<PixelDigiSimLink> >
245 iEvent.
put(outputlink);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
CLHEP::HepRandomEngine * rndEngine
edm::ESHandle< MagneticField > pSetup
void accumulatePixelHits(edm::Handle< std::vector< PSimHit > >)
std::map< unsigned int, PixelGeomDetUnit * > detectorUnits
const Plane & surface() const
The nominal surface of the GeomDet.
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
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
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
T const * product() const
const std::string geometryType
const vstring trackerContainers
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
const PositionType & position() const
virtual ~SiPixelDigitizer()