68 #include "CLHEP/Random/RandomEngine.h"
89 edm::LogInfo (
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
91 std::string alias ( iConfig.
getParameter<std::string>(
"@module_label") );
93 produces<edm::DetSetVector<PixelDigi> >().setBranchAlias( alias );
94 produces<edm::DetSetVector<PixelDigiSimLink> >().setBranchAlias ( alias +
"siPixelDigiSimLink");
99 if ( ! rng.isAvailable()) {
101 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n"
102 "which is not present in the configuration file. You must add the service\n"
103 "in the configuration file or remove the modules that require it.";
112 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
133 std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
136 cf_simhitvec.push_back(cf_simhit.
product());
152 for (isim=allPixelTrackerHits->
begin(); isim!= allPixelTrackerHits->
end();isim++) {
154 unsigned int subid=detid.
subdetId();
156 SimHitMap[(*isim).detUnitId()].push_back((*isim));
161 for(TrackingGeometry::DetUnitContainer::const_iterator iu = pDD->detUnits().begin(); iu != pDD->detUnits().end(); iu ++){
162 DetId idet=
DetId((*iu)->geographicalId().rawId());
170 GlobalVector bfield=pSetup->inTesla((*iu)->surface().position());
171 LogDebug (
"PixelDigitizer ") <<
"B-field(T) at "<<(*iu)->surface().position()<<
"(cm): "
172 << pSetup->inTesla((*iu)->surface().position());
183 if (collector.data.size()>0){
187 if(
SimHitMap[(*iu)->geographicalId().rawId()].size()>0){
198 std::auto_ptr<edm::DetSetVector<PixelDigi> >
200 std::auto_ptr<edm::DetSetVector<PixelDigiSimLink> >
205 iEvent.
put(outputlink);
void init(const edm::EventSetup &es)
T getParameter(std::string const &) const
std::vector< PixelDigiSimLink > make_link()
vstring trackerContainers
CLHEP::HepRandomEngine * rndEngine
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< edm::DetSet< PixelDigiSimLink > > theDigiLinkVector
edm::DetSet< PixelDigi >::collection_type run(const std::vector< PSimHit > &input, PixelGeomDetUnit *pixdet, GlobalVector)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
SiPixelDigitizerAlgorithm * _pixeldigialgo
T const * product() const
virtual void produce(edm::Event &e, const edm::EventSetup &c)
SiPixelDigitizer(const edm::ParameterSet &conf)
std::vector< edm::DetSet< PixelDigi > > theDigiVector
virtual ~SiPixelDigitizer()