90 firstInitializeEvent_(
true),
91 firstFinalizeEvent_(
true),
94 trackerContainers(iConfig.getParameter<
std::vector<
std::
string> >(
"RoutList")),
96 pilotBlades(iConfig.exists(
"enablePilotBlades")?iConfig.getParameter<
bool>(
"enablePilotBlades"):
false),
97 NumberOfEndcapDisks(iConfig.exists(
"NumPixelEndcap")?iConfig.getParameter<
int>(
"NumPixelEndcap"):2)
99 edm::LogInfo (
"PixelDigitizer ") <<
"Enter the Pixel Digitizer";
110 if ( ! rng.isAvailable()) {
112 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n" 113 "which is not present in the configuration file. You must add the service\n" 114 "in the configuration file or remove the modules that require it.";
121 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
131 size_t globalSimHitIndex,
132 const unsigned int tofBin,
134 if(hSimHits.isValid()) {
135 std::set<unsigned int> detIds;
136 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
140 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it, ++globalSimHitIndex) {
141 unsigned int detId = (*it).detUnitId();
142 if(detIds.insert(detId).second) {
146 std::map<unsigned int, PixelGeomDetUnit const *>::iterator itDet =
detectorUnits.find(detId);
148 auto pixdet = itDet->second;
149 assert(pixdet !=
nullptr);
152 LogDebug (
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position() <<
"(cm): " 189 unsigned int detId = iu->geographicalId().rawId();
190 if(iu->type().isTrackerPixel()) {
192 assert(pixdet !=
nullptr);
194 unsigned int disk = tTopo->
layer(detId);
251 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
252 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
264 if(iu->type().isTrackerPixel()) {
272 _pixeldigialgo->digitize(dynamic_cast<const PixelGeomDetUnit*>(iu),
277 if(!collector.data.empty()) {
278 theDigiVector.push_back(
std::move(collector));
280 if(!linkcollector.data.empty()) {
281 theDigiLinkVector.push_back(
std::move(linkcollector));
287 std::unique_ptr<edm::DetSetVector<PixelDigi> >
289 std::unique_ptr<edm::DetSetVector<PixelDigiSimLink> >
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
~SiPixelDigitizer() override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const int NumberOfEndcapDisks
std::map< unsigned int, PixelGeomDetUnit const * > detectorUnits
edm::ESHandle< MagneticField > pSetup
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
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
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, 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.
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
Namespace of DDCMS conversion namespace.
CLHEP::HepRandomEngine * randomEngine_
const std::string geometryType
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
PileupMixingContent * getEventPileupInfo() override
bool firstInitializeEvent_
T const * product() const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
SiPixelDigitizer(const edm::ParameterSet &conf, edm::ProducerBase &mixMod, edm::ConsumesCollector &iC)