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";
105 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
106 "which is not present in the configuration file. You must add the service\n"
107 "in the configuration file or remove the modules that require it.";
116 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
126 if(hSimHits.isValid()) {
127 std::set<unsigned int> detIds;
128 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
129 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it) {
130 unsigned int detId = (*it).detUnitId();
131 if(detIds.insert(detId).second) {
160 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); ++iu) {
161 unsigned int detId = (*iu)->geographicalId().rawId();
205 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
206 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
208 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->detUnits().begin(); iu !=
pDD->detUnits().end(); iu ++){
209 DetId idet=
DetId((*iu)->geographicalId().rawId());
224 if(collector.data.size() > 0) {
225 theDigiVector.push_back(std::move(collector));
227 if(linkcollector.data.size() > 0) {
228 theDigiLinkVector.push_back(std::move(linkcollector));
234 std::auto_ptr<edm::DetSetVector<PixelDigi> >
236 std::auto_ptr<edm::DetSetVector<PixelDigiSimLink> >
241 iEvent.
put(outputlink);
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.
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
SiPixelDigitizer(const edm::ParameterSet &conf, edm::EDProducer &mixMod)
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()