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";
112 if ( ! rng.isAvailable()) {
114 <<
"SiPixelDigitizer requires the RandomNumberGeneratorService\n" 115 "which is not present in the configuration file. You must add the service\n" 116 "in the configuration file or remove the modules that require it.";
125 edm::LogInfo (
"PixelDigitizer ") <<
"Destruct the Pixel Digitizer";
135 size_t globalSimHitIndex,
136 const unsigned int tofBin,
138 if(hSimHits.isValid()) {
139 std::set<unsigned int> detIds;
140 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
144 for(std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd; ++it, ++globalSimHitIndex) {
145 unsigned int detId = (*it).detUnitId();
146 if(detIds.insert(detId).second) {
150 std::map<unsigned int, PixelGeomDetUnit const *>::iterator itDet =
detectorUnits.find(detId);
152 auto pixdet = itDet->second;
153 assert(pixdet !=
nullptr);
156 LogDebug (
"PixelDigitizer ") <<
"B-field(T) at " << pixdet->surface().position() <<
"(cm): " 193 unsigned int detId = iu->geographicalId().rawId();
194 if(iu->type().isTrackerPixel()) {
196 assert(pixdet !=
nullptr);
198 unsigned int disk = tTopo->
layer(detId);
255 std::vector<edm::DetSet<PixelDigi> > theDigiVector;
256 std::vector<edm::DetSet<PixelDigiSimLink> > theDigiLinkVector;
267 if (PixelFEDChannelCollection_ ==
nullptr){
268 throw cms::Exception(
"NullPointerError") <<
"PixelFEDChannelCollection not set in chooseScenario function.\n";
276 if(iu->type().isTrackerPixel()) {
284 _pixeldigialgo->digitize(dynamic_cast<const PixelGeomDetUnit*>(iu),
289 if(!collector.data.empty()) {
290 theDigiVector.push_back(
std::move(collector));
292 if(!linkcollector.data.empty()) {
293 theDigiLinkVector.push_back(
std::move(linkcollector));
299 std::unique_ptr<edm::DetSetVector<PixelDigi> >
301 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.
std::unique_ptr< PileupMixingContent > PileupInfo_
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
unsigned int layer(const DetId &id) const
const vstring trackerContainers
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
bool firstInitializeEvent_
T const * product() const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
SiPixelDigitizer(const edm::ParameterSet &conf, edm::ProducerBase &mixMod, edm::ConsumesCollector &iC)