74 class HepRandomEngine;
95 firstInitializeEvent_(
true),
96 firstFinalizeEvent_(
true),
99 trackerContainers(iConfig.getParameter<
std::vector<
std::
string> >(
"RoutList")),
100 geometryType(iConfig.getParameter<
std::
string>(
"PixGeometryType")),
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";
115 if ( ! rng.isAvailable()) {
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 size_t globalSimHitIndex,
137 const unsigned int tofBin,
138 CLHEP::HepRandomEngine* engine,
140 if(hSimHits.isValid()) {
141 std::set<unsigned int> detIds;
142 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
146 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it, ++globalSimHitIndex) {
147 unsigned int detId = (*it).detUnitId();
148 if(detIds.insert(detId).second) {
152 std::map<unsigned int, PixelGeomDetUnit const *>::iterator itDet =
detectorUnits.find(detId);
154 auto pixdet = itDet->second;
158 LogDebug (
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position() <<
"(cm): " 160 _pixeldigialgo->accumulateSimHits(it, itEnd, globalSimHitIndex, tofBin, pixdet, bfield, tTopo, engine);
190 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->
detUnits().begin(); iu !=
pDD->
detUnits().end(); ++iu) {
191 unsigned int detId = (*iu)->geographicalId().rawId();
192 if((*iu)->type().isTrackerPixel()) {
196 unsigned int disk = tTopo->
layer(detId);
257 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
258 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
268 for(TrackingGeometry::DetUnitContainer::const_iterator iu =
pDD->
detUnits().begin(); iu !=
pDD->
detUnits().end(); iu ++){
270 if((*iu)->type().isTrackerPixel()) {
278 _pixeldigialgo->digitize(dynamic_cast<const PixelGeomDetUnit*>((*iu)),
283 if(collector.data.size() > 0) {
284 theDigiVector.push_back(
std::move(collector));
286 if(linkcollector.data.size() > 0) {
287 theDigiLinkVector.push_back(
std::move(linkcollector));
293 std::unique_ptr<edm::DetSetVector<PixelDigi> >
295 std::unique_ptr<edm::DetSetVector<PixelDigiSimLink> >
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
const int NumberOfEndcapDisks
std::vector< CLHEP::HepRandomEngine * > randomEngines_
std::map< unsigned int, PixelGeomDetUnit const * > detectorUnits
edm::ESHandle< MagneticField > pSetup
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
virtual PileupMixingContent * getEventPileupInfo() override
const std::string hitsProducer
std::map< std::string, size_t > crossingSimHitIndexOffset_
Offset to add to the index of each sim hit to account for which crossing it's in. ...
bunchspace
in terms of 25 ns
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
void accumulatePixelHits(edm::Handle< std::vector< PSimHit > >, size_t globalSimHitIndex, const unsigned int tofBin, CLHEP::HepRandomEngine *, edm::EventSetup const &c)
edm::ESHandle< TrackerGeometry > pDD
std::unique_ptr< SiPixelDigitizerAlgorithm > _pixeldigialgo
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c) override
unsigned int value() const
const std::string geometryType
bool isTrackerPixel(const GeomDetEnumerators::SubDetector m)
PileupMixingContent * PileupInfo_
unsigned int layer(const DetId &id) const
const vstring trackerContainers
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
const int & getMix_bunchSpacing() const
bool firstInitializeEvent_
T const * product() const
virtual ~SiPixelDigitizer()
const DetUnitContainer & detUnits() const
Returm a vector of all GeomDetUnit.