21 DataMixingSiPixelWorker::DataMixingSiPixelWorker() {}
25 : label_(ps.getParameter<
std::
string>(
"Label"))
51 LogDebug(
"DataMixingSiPixelWorker") <<
"===============> adding MC signals for " <<
e.id();
58 for (; DSViter !=
input->end(); DSViter++) {
60 LogDebug(
"DataMixingSiPixelWorker") <<
"Processing DetID " << DSViter->id;
63 uint32_t detID = DSViter->id;
70 for (icopy = begin; icopy !=
end; icopy++) {
83 LogDebug(
"DataMixingSiPixelWorker") <<
"\n===============> adding pileups from event " <<
ep->id()
84 <<
" for bunchcrossing " << bcr;
89 std::shared_ptr<Wrapper<edm::DetSetVector<PixelDigi>>
const> inputPTR =
101 for (; DSViter !=
input->end(); DSViter++) {
103 LogDebug(
"DataMixingSiPixelWorker") <<
"Pileups: Processing DetID " << DSViter->id;
106 uint32_t detID = DSViter->id;
113 SiGlobalIndex::const_iterator itest;
122 for (icopy = begin; icopy !=
end; icopy++) {
133 for (icopy = begin; icopy !=
end; icopy++) {
146 std::vector<edm::DetSet<PixelDigi>> vPixelDigi;
159 int formerPixel = -1;
163 OneDetectorMap::const_iterator iLocalchk;
165 for (OneDetectorMap::const_iterator iLocal = LocalMap.begin(); iLocal != LocalMap.end(); ++iLocal) {
166 currentPixel = iLocal->first;
168 if (currentPixel == formerPixel) {
169 ADCSum += (iLocal->second).
adc();
171 if (formerPixel != -1) {
174 else if (ADCSum > 253 && ADCSum < 512)
180 formerPixel = currentPixel;
181 ADCSum = (iLocal->second).
adc();
185 if ((++iLocalchk) == LocalMap.end()) {
188 else if (ADCSum > 253 && ADCSum < 512)
196 vPixelDigi.push_back(SPD);
201 LogInfo(
"DataMixingSiPixelWorker") <<
"total # Merged Pixels: " << vPixelDigi.size();
edm::InputTag pixeldigi_collectionSig_
T getParameter(std::string const &) const
void push_back(const T &t)
edm::InputTag pixeldigi_collectionPile_
std::string PixelDigiCollectionDM_
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > PixelDigiToken_
void addSiPixelPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *)
static std::string const input
Container::value_type value_type
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > PixelDigiPToken_
void putSiPixel(edm::Event &e)
Log< level::Info, false > LogInfo
SiGlobalIndex SiHitStorage_
std::multimap< int, PixelDigi > OneDetectorMap
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
virtual ~DataMixingSiPixelWorker()
void addSiPixelSignals(const edm::Event &e)
uint16_t *__restrict__ uint16_t const *__restrict__ adc