59 : gainLabel(conf.getParameter<
std::
string>(
"Gain")),
61 trackerContainers(conf.getParameter<
std::vector<
std::
string>>(
"ROUList")),
67 useConfFromDB(conf.getParameter<
bool>(
"TrackerConfigurationFromDB")),
68 zeroSuppression(conf.getParameter<
bool>(
"ZeroSuppression")),
69 makeDigiSimLinks_(conf.getUntrackedParameter<
bool>(
"makeDigiSimLinks",
false)) {
77 mixMod.
produces<std::vector<std::pair<int, std::bitset<6>>>>(
"AffectedAPVList").setBranchAlias(alias +
"AffectedAPV");
83 if (!rng.isAvailable()) {
85 <<
"SiStripDigitizer requires the RandomNumberGeneratorService\n" 86 "which is not present in the configuration file. You must add the service\n" 87 "in the configuration file or remove the modules that require it.";
97 size_t globalSimHitIndex,
98 const unsigned int tofBin) {
103 if (hSimHits.isValid()) {
104 std::set<unsigned int> detIds;
105 std::vector<PSimHit>
const&
simHits = *hSimHits.product();
106 for (std::vector<PSimHit>::const_iterator it = simHits.begin(), itEnd = simHits.end(); it != itEnd;
107 ++it, ++globalSimHitIndex) {
108 unsigned int detId = (*it).detUnitId();
109 if (detIds.insert(detId).second) {
116 LogDebug(
"Digitizer ") <<
"B-field(T) at " << stripdet->surface().position()
117 <<
"(cm): " <<
pSetup->
inTesla(stripdet->surface().position());
137 if (trackerContainer.find(
std::string(
"HighTof")) != std::string::npos)
166 if (trackerContainer.find(
std::string(
"HighTof")) != std::string::npos)
210 unsigned int detId = iu->geographicalId().rawId();
211 if (iu->type().isTrackerStrip()) {
213 assert(stripdet !=
nullptr);
232 std::vector<edm::DetSet<SiStripDigi>> theDigiVector;
233 std::vector<edm::DetSet<SiStripRawDigi>> theRawDigiVector;
237 theDigiVector.reserve(10000);
238 theDigiVector.clear();
247 if (sgd !=
nullptr) {
262 if (!collectorZS.data.empty()) {
263 theDigiVector.push_back(collectorZS);
264 if (!collectorLink.data.empty())
265 pOutputDigiSimLink->insert(collectorLink);
268 if (!collectorRaw.data.empty()) {
269 theRawDigiVector.push_back(collectorRaw);
270 if (!collectorLink.data.empty())
271 pOutputDigiSimLink->insert(collectorLink);
282 std::unique_ptr<std::vector<std::pair<int, std::bitset<6>>>> AffectedAPVList(
289 iEvent.
put(
std::move(AffectedAPVList),
"AffectedAPVList");
295 std::unique_ptr<edm::DetSetVector<SiStripRawDigi>> output_virginraw(
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
const vstring trackerContainers
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::ESHandle< TrackerGeometry > pDD
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
const bool zeroSuppression
void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
const std::string hitsProducer
void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
void accumulate(edm::Event const &e, edm::EventSetup const &c) override
std::map< unsigned int, StripGeomDetUnit const * > detectorUnits
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::map< uint32_t, std::vector< int > > theDetIdList
CLHEP::HepRandomEngine * randomEngine_
void accumulateStripHits(edm::Handle< std::vector< PSimHit >>, const TrackerTopology *tTopo, size_t globalSimHitIndex, const unsigned int tofBin)
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.
bool isTrackerStrip(GeomDetEnumerators::SubDetector m)
~SiStripDigitizer() override
std::unique_ptr< SiStripDigitizerAlgorithm > theDigiAlgo
edm::ESHandle< MagneticField > pSetup
const std::string geometryType
std::vector< std::pair< int, std::bitset< 6 > > > theAffectedAPVvector
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
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. ...
SiStripDigitizer(const edm::ParameterSet &conf, edm::ProducerBase &mixMod, edm::ConsumesCollector &iC)
void addConnected(std::map< uint32_t, std::vector< int >> &) const
const bool makeDigiSimLinks_
Whether or not to create the association to sim truth collection. Set in configuration.
T const * product() const
const std::string gainLabel
std::unique_ptr< PileupMixingContent > PileupInfo_