Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:33

0001 // File: DataMixingMuonWorker.cc
0002 // Description:  see DataMixingMuonWorker.h
0003 // Author:  Mike Hildreth, University of Notre Dame
0004 //
0005 //--------------------------------------------
0006 
0007 #include "DataFormats/Common/interface/Handle.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include <map>
0010 #include <memory>
0011 //
0012 //
0013 #include "DataMixingMuonWorker.h"
0014 
0015 using namespace std;
0016 
0017 namespace edm {
0018 
0019   // Virtual constructor
0020 
0021   DataMixingMuonWorker::DataMixingMuonWorker() {}
0022 
0023   // Constructor
0024   DataMixingMuonWorker::DataMixingMuonWorker(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
0025       : label_(ps.getParameter<std::string>("Label"))
0026 
0027   {
0028     // get the subdetector names
0029     //    this->getSubdetectorNames();  //something like this may be useful to
0030     //    check what we are supposed to do...
0031 
0032     // Declare the products to produce
0033 
0034     DTDigiTagSig_ = ps.getParameter<edm::InputTag>("DTDigiTagSig");
0035     RPCDigiTagSig_ = ps.getParameter<edm::InputTag>("RPCDigiTagSig");
0036 
0037     CSCstripdigi_collectionSig_ = ps.getParameter<edm::InputTag>("CSCstripdigiCollectionSig");
0038     CSCwiredigi_collectionSig_ = ps.getParameter<edm::InputTag>("CSCwiredigiCollectionSig");
0039     CSCCompdigi_collectionSig_ = ps.getParameter<edm::InputTag>("CSCCompdigiCollectionSig");
0040 
0041     DTDigiToken_ = iC.consumes<DTDigiCollection>(DTDigiTagSig_);
0042     CSCStripDigiToken_ = iC.consumes<CSCStripDigiCollection>(CSCstripdigi_collectionSig_);
0043     CSCWireDigiToken_ = iC.consumes<CSCWireDigiCollection>(CSCwiredigi_collectionSig_);
0044     CSCCompDigiToken_ = iC.consumes<CSCComparatorDigiCollection>(CSCCompdigi_collectionSig_);
0045     RPCDigiToken_ = iC.consumes<RPCDigiCollection>(RPCDigiTagSig_);
0046 
0047     DTPileInputTag_ = ps.getParameter<edm::InputTag>("DTPileInputTag");
0048     RPCPileInputTag_ = ps.getParameter<edm::InputTag>("RPCPileInputTag");
0049     CSCWirePileInputTag_ = ps.getParameter<edm::InputTag>("CSCWirePileInputTag");
0050     CSCStripPileInputTag_ = ps.getParameter<edm::InputTag>("CSCStripPileInputTag");
0051     CSCCompPileInputTag_ = ps.getParameter<edm::InputTag>("CSCCompPileInputTag");
0052 
0053     DTDigiPToken_ = iC.consumes<DTDigiCollection>(DTPileInputTag_);
0054     CSCStripDigiPToken_ = iC.consumes<CSCStripDigiCollection>(CSCStripPileInputTag_);
0055     CSCWireDigiPToken_ = iC.consumes<CSCWireDigiCollection>(CSCWirePileInputTag_);
0056     CSCCompDigiPToken_ = iC.consumes<CSCComparatorDigiCollection>(CSCCompPileInputTag_);
0057     RPCDigiPToken_ = iC.consumes<RPCDigiCollection>(RPCPileInputTag_);
0058 
0059     // outputs:
0060 
0061     DTDigiCollectionDM_ = ps.getParameter<std::string>("DTDigiCollectionDM");
0062     RPCDigiCollectionDM_ = ps.getParameter<std::string>("RPCDigiCollectionDM");
0063     CSCStripDigiCollectionDM_ = ps.getParameter<std::string>("CSCStripDigiCollectionDM");
0064     CSCWireDigiCollectionDM_ = ps.getParameter<std::string>("CSCWireDigiCollectionDM");
0065     CSCComparatorDigiCollectionDM_ = ps.getParameter<std::string>("CSCComparatorDigiCollectionDM");
0066   }
0067 
0068   // Virtual destructor needed.
0069   DataMixingMuonWorker::~DataMixingMuonWorker() {}
0070 
0071   void DataMixingMuonWorker::addMuonSignals(const edm::Event &e) {
0072     // fill in maps of hits
0073 
0074     LogDebug("DataMixingMuonWorker") << "===============> adding MC signals for " << e.id();
0075 
0076     // DT
0077     //
0078 
0079     OurDTDigis_ = new DTDigiCollection();
0080     Handle<DTDigiCollection> pDTdigis;
0081 
0082     // Get the digis from the event
0083     if (e.getByToken(DTDigiToken_, pDTdigis)) {
0084       //    LogInfo("DataMixingMuonWorker") << "total # DT Digis: " <<
0085       //    DTdigis->size();
0086 
0087       // Loop over digis, copying them to our own local storage
0088       const DTDigiCollection *DTdigis = pDTdigis.product();
0089       DTDigiCollection::DigiRangeIterator DLayerIt;
0090       for (DLayerIt = DTdigis->begin(); DLayerIt != DTdigis->end(); ++DLayerIt) {
0091         // The layerId
0092         const DTLayerId &layerId = (*DLayerIt).first;
0093 
0094         // Get the iterators over the digis associated with this LayerId
0095         const DTDigiCollection::Range &range = (*DLayerIt).second;
0096 
0097         OurDTDigis_->put(range, layerId);
0098       }
0099     }
0100     // RPC
0101     //
0102 
0103     OurRPCDigis_ = new RPCDigiCollection();
0104 
0105     // Get the digis from the event
0106     Handle<RPCDigiCollection> pRPCdigis;
0107 
0108     if (e.getByToken(RPCDigiToken_, pRPCdigis)) {
0109       // Loop over digis, copying them to our own local storage
0110 
0111       const RPCDigiCollection *RPCdigis = pRPCdigis.product();
0112       RPCDigiCollection::DigiRangeIterator RLayerIt;
0113       for (RLayerIt = RPCdigis->begin(); RLayerIt != RPCdigis->end(); ++RLayerIt) {
0114         // The layerId
0115         const RPCDetId &layerId = (*RLayerIt).first;
0116 
0117         // Get the iterators over the digis associated with this LayerId
0118         const RPCDigiCollection::Range &range = (*RLayerIt).second;
0119 
0120         OurRPCDigis_->put(range, layerId);
0121       }
0122     }
0123     // CSCStrip
0124     //
0125 
0126     OurCSCStripDigis_ = new CSCStripDigiCollection();
0127 
0128     // Get the digis from the event
0129     Handle<CSCStripDigiCollection> pCSCStripdigis;
0130 
0131     if (e.getByToken(CSCStripDigiToken_, pCSCStripdigis)) {
0132       // if(pCSCStripdigis.isValid() ) { std::cout << "Signal: have CSCStripDigis"
0133       // << std::endl;} else { std::cout << "Signal: NO CSCStripDigis" <<
0134       // std::endl;}
0135 
0136       // Loop over digis, copying them to our own local storage
0137 
0138       const CSCStripDigiCollection *CSCStripdigis = pCSCStripdigis.product();
0139       CSCStripDigiCollection::DigiRangeIterator CSLayerIt;
0140       for (CSLayerIt = CSCStripdigis->begin(); CSLayerIt != CSCStripdigis->end(); ++CSLayerIt) {
0141         // The layerId
0142         const CSCDetId &layerId = (*CSLayerIt).first;
0143 
0144         // Get the iterators over the digis associated with this LayerId
0145         const CSCStripDigiCollection::Range &range = (*CSLayerIt).second;
0146 
0147         // std::cout << " Signal CSC layer " << (*CSLayerIt).first << std::endl;
0148 
0149         // for(CSCStripDigiCollection::const_iterator dtdigi=range.first;
0150         // dtdigi!=range.second; dtdigi++){
0151         //  std::cout << "Digi " << (*dtdigi) << std::endl;
0152         //}
0153 
0154         OurCSCStripDigis_->put(range, layerId);
0155       }
0156     }
0157     // CSCWire
0158     //
0159 
0160     OurCSCWireDigis_ = new CSCWireDigiCollection();
0161 
0162     // Get the digis from the event
0163     Handle<CSCWireDigiCollection> pCSCWiredigis;
0164 
0165     if (e.getByToken(CSCWireDigiToken_, pCSCWiredigis)) {
0166       // if(pCSCWiredigis.isValid() ) { std::cout << "Signal: have CSCWireDigis"
0167       // << std::endl;} else { std::cout << "Signal: NO CSCWireDigis" <<
0168       // std::endl;}
0169 
0170       // Loop over digis, copying them to our own local storage
0171 
0172       const CSCWireDigiCollection *CSCWiredigis = pCSCWiredigis.product();
0173       CSCWireDigiCollection::DigiRangeIterator CWLayerIt;
0174       for (CWLayerIt = CSCWiredigis->begin(); CWLayerIt != CSCWiredigis->end(); ++CWLayerIt) {
0175         // The layerId
0176         const CSCDetId &layerId = (*CWLayerIt).first;
0177 
0178         // Get the iterators over the digis associated with this LayerId
0179         const CSCWireDigiCollection::Range &range = (*CWLayerIt).second;
0180 
0181         OurCSCWireDigis_->put(range, layerId);
0182       }
0183     }
0184 
0185     // CSCComparators
0186     //
0187 
0188     OurCSCComparatorDigis_ = new CSCComparatorDigiCollection();
0189 
0190     // Get the digis from the event
0191     Handle<CSCComparatorDigiCollection> pCSCComparatordigis;
0192 
0193     // std::cout << "CSCComp label: " << CSCDigiTagSig_.label() << " " <<
0194     // CSCCompdigi_collectionSig_.label() << std::endl;
0195 
0196     if (e.getByToken(CSCCompDigiToken_, pCSCComparatordigis)) {
0197       // if(pCSCComparatordigis.isValid() ) { std::cout << "Signal: have
0198       // CSCComparatorDigis" << std::endl;} else { std::cout << "Signal: NO
0199       // CSCComparatorDigis" << std::endl;}
0200 
0201       // Loop over digis, copying them to our own local storage
0202 
0203       const CSCComparatorDigiCollection *CSCComparatordigis = pCSCComparatordigis.product();
0204       CSCComparatorDigiCollection::DigiRangeIterator CWLayerIt;
0205       for (CWLayerIt = CSCComparatordigis->begin(); CWLayerIt != CSCComparatordigis->end(); ++CWLayerIt) {
0206         // The layerId
0207         const CSCDetId &layerId = (*CWLayerIt).first;
0208 
0209         // Get the iterators over the digis associated with this LayerId
0210         const CSCComparatorDigiCollection::Range &range = (*CWLayerIt).second;
0211 
0212         OurCSCComparatorDigis_->put(range, layerId);
0213       }
0214     }
0215 
0216   }  // end of addMuonSignals
0217 
0218   void DataMixingMuonWorker::addMuonPileups(const int bcr,
0219                                             const EventPrincipal *ep,
0220                                             unsigned int eventNr,
0221                                             ModuleCallingContext const *mcc) {
0222     LogDebug("DataMixingMuonWorker") << "\n===============> adding pileups from event  " << ep->id()
0223                                      << " for bunchcrossing " << bcr;
0224 
0225     // fill in maps of hits; same code as addSignals, except now applied to the
0226     // pileup events
0227 
0228     // DT
0229     //
0230     // Get the digis from the event
0231 
0232     std::shared_ptr<Wrapper<DTDigiCollection> const> DTDigisPTR =
0233         getProductByTag<DTDigiCollection>(*ep, DTPileInputTag_, mcc);
0234 
0235     if (DTDigisPTR) {
0236       const DTDigiCollection *DTDigis = const_cast<DTDigiCollection *>(DTDigisPTR->product());
0237 
0238       DTDigiCollection::DigiRangeIterator DTLayerIt;
0239       for (DTLayerIt = DTDigis->begin(); DTLayerIt != DTDigis->end(); ++DTLayerIt) {
0240         // The layerId
0241         const DTLayerId &layerId = (*DTLayerIt).first;
0242 
0243         // Get the iterators over the Digis associated with this LayerId
0244         const DTDigiCollection::Range &range = (*DTLayerIt).second;
0245 
0246         OurDTDigis_->put(range, layerId);
0247       }
0248     }
0249     // RPC
0250     //
0251 
0252     // Get the digis from the event
0253 
0254     std::shared_ptr<Wrapper<RPCDigiCollection> const> RPCDigisPTR =
0255         getProductByTag<RPCDigiCollection>(*ep, RPCPileInputTag_, mcc);
0256 
0257     if (RPCDigisPTR) {
0258       const RPCDigiCollection *RPCDigis = const_cast<RPCDigiCollection *>(RPCDigisPTR->product());
0259 
0260       RPCDigiCollection::DigiRangeIterator RPCLayerIt;
0261       for (RPCLayerIt = RPCDigis->begin(); RPCLayerIt != RPCDigis->end(); ++RPCLayerIt) {
0262         // The layerId
0263         const RPCDetId &layerId = (*RPCLayerIt).first;
0264 
0265         // Get the iterators over the digis associated with this LayerId
0266         const RPCDigiCollection::Range &range = (*RPCLayerIt).second;
0267 
0268         OurRPCDigis_->put(range, layerId);
0269       }
0270     }
0271 
0272     // CSCStrip
0273     //
0274 
0275     // Get the digis from the event
0276 
0277     std::shared_ptr<Wrapper<CSCStripDigiCollection> const> CSCStripDigisPTR =
0278         getProductByTag<CSCStripDigiCollection>(*ep, CSCStripPileInputTag_, mcc);
0279 
0280     if (CSCStripDigisPTR) {
0281       const CSCStripDigiCollection *CSCStripDigis = const_cast<CSCStripDigiCollection *>(CSCStripDigisPTR->product());
0282 
0283       CSCStripDigiCollection::DigiRangeIterator CSCStripLayerIt;
0284       for (CSCStripLayerIt = CSCStripDigis->begin(); CSCStripLayerIt != CSCStripDigis->end(); ++CSCStripLayerIt) {
0285         // The layerId
0286         const CSCDetId &layerId = (*CSCStripLayerIt).first;
0287 
0288         // Get the iterators over the digis associated with this LayerId
0289         const CSCStripDigiCollection::Range &range = (*CSCStripLayerIt).second;
0290 
0291         // std::cout << " Pileup CSC layer " << (*CSCStripLayerIt).first <<
0292         // std::endl;
0293 
0294         // for(CSCStripDigiCollection::const_iterator dtdigi=range.first;
0295         // dtdigi!=range.second; dtdigi++){
0296         //  std::cout << "Digi " << (*dtdigi) << std::endl;
0297         //  }
0298 
0299         OurCSCStripDigis_->put(range, layerId);
0300       }
0301     }
0302 
0303     // CSCWire
0304     //
0305 
0306     // Get the digis from the event
0307 
0308     std::shared_ptr<Wrapper<CSCWireDigiCollection> const> CSCWireDigisPTR =
0309         getProductByTag<CSCWireDigiCollection>(*ep, CSCWirePileInputTag_, mcc);
0310 
0311     if (CSCWireDigisPTR) {
0312       const CSCWireDigiCollection *CSCWireDigis = const_cast<CSCWireDigiCollection *>(CSCWireDigisPTR->product());
0313 
0314       CSCWireDigiCollection::DigiRangeIterator CSCWireLayerIt;
0315       for (CSCWireLayerIt = CSCWireDigis->begin(); CSCWireLayerIt != CSCWireDigis->end(); ++CSCWireLayerIt) {
0316         // The layerId
0317         const CSCDetId &layerId = (*CSCWireLayerIt).first;
0318 
0319         // Get the iterators over the digis associated with this LayerId
0320         const CSCWireDigiCollection::Range &range = (*CSCWireLayerIt).second;
0321 
0322         OurCSCWireDigis_->put(range, layerId);
0323       }
0324     }
0325 
0326     // CSCComparators
0327     //
0328 
0329     // Get the digis from the event
0330 
0331     std::shared_ptr<Wrapper<CSCComparatorDigiCollection> const> CSCComparatorDigisPTR =
0332         getProductByTag<CSCComparatorDigiCollection>(*ep, CSCCompPileInputTag_, mcc);
0333 
0334     if (CSCComparatorDigisPTR) {
0335       const CSCComparatorDigiCollection *CSCComparatorDigis =
0336           const_cast<CSCComparatorDigiCollection *>(CSCComparatorDigisPTR->product());
0337 
0338       CSCComparatorDigiCollection::DigiRangeIterator CSCComparatorLayerIt;
0339       for (CSCComparatorLayerIt = CSCComparatorDigis->begin(); CSCComparatorLayerIt != CSCComparatorDigis->end();
0340            ++CSCComparatorLayerIt) {
0341         // The layerId
0342         const CSCDetId &layerId = (*CSCComparatorLayerIt).first;
0343 
0344         // Get the iterators over the digis associated with this LayerId
0345         const CSCComparatorDigiCollection::Range &range = (*CSCComparatorLayerIt).second;
0346 
0347         OurCSCComparatorDigis_->put(range, layerId);
0348       }
0349     }
0350   }
0351 
0352   void DataMixingMuonWorker::putMuon(edm::Event &e) {
0353     // collections of digis to put in the event
0354     std::unique_ptr<DTDigiCollection> DTDigiMerge(new DTDigiCollection);
0355     std::unique_ptr<RPCDigiCollection> RPCDigiMerge(new RPCDigiCollection);
0356     std::unique_ptr<CSCStripDigiCollection> CSCStripDigiMerge(new CSCStripDigiCollection);
0357     std::unique_ptr<CSCWireDigiCollection> CSCWireDigiMerge(new CSCWireDigiCollection);
0358     std::unique_ptr<CSCComparatorDigiCollection> CSCComparatorDigiMerge(new CSCComparatorDigiCollection);
0359 
0360     // Loop over DT digis, copying them from our own local storage
0361 
0362     DTDigiCollection::DigiRangeIterator DLayerIt;
0363     for (DLayerIt = OurDTDigis_->begin(); DLayerIt != OurDTDigis_->end(); ++DLayerIt) {
0364       // The layerId
0365       const DTLayerId &layerId = (*DLayerIt).first;
0366 
0367       // Get the iterators over the digis associated with this LayerId
0368       const DTDigiCollection::Range &range = (*DLayerIt).second;
0369 
0370       DTDigiMerge->put(range, layerId);
0371     }
0372 
0373     // Loop over RPC digis, copying them from our own local storage
0374 
0375     RPCDigiCollection::DigiRangeIterator RLayerIt;
0376     for (RLayerIt = OurRPCDigis_->begin(); RLayerIt != OurRPCDigis_->end(); ++RLayerIt) {
0377       // The layerId
0378       const RPCDetId &layerId = (*RLayerIt).first;
0379 
0380       // Get the iterators over the digis associated with this LayerId
0381       const RPCDigiCollection::Range &range = (*RLayerIt).second;
0382 
0383       RPCDigiMerge->put(range, layerId);
0384     }
0385     // Loop over CSCStrip digis, copying them from our own local storage
0386 
0387     CSCStripDigiCollection::DigiRangeIterator CSLayerIt;
0388     for (CSLayerIt = OurCSCStripDigis_->begin(); CSLayerIt != OurCSCStripDigis_->end(); ++CSLayerIt) {
0389       // The layerId
0390       const CSCDetId &layerId = (*CSLayerIt).first;
0391 
0392       // Get the iterators over the digis associated with this LayerId
0393       const CSCStripDigiCollection::Range &range = (*CSLayerIt).second;
0394 
0395       std::vector<CSCStripDigi> NewDigiList;
0396 
0397       std::vector<int> StripList;
0398       std::vector<CSCStripDigiCollection::const_iterator> StripPointer;
0399 
0400       for (CSCStripDigiCollection::const_iterator dtdigi = range.first; dtdigi != range.second; ++dtdigi) {
0401         // std::cout << "Digi " << (*dtdigi).getStrip() << std::endl;
0402         StripList.push_back((*dtdigi).getStrip());
0403         StripPointer.push_back(dtdigi);
0404       }
0405 
0406       int PrevStrip = -1;
0407       std::vector<int> DuplicateList;
0408 
0409       std::vector<CSCStripDigiCollection::const_iterator>::const_iterator StripPtr = StripPointer.begin();
0410 
0411       for (std::vector<int>::const_iterator istrip = StripList.begin(); istrip != StripList.end(); ++istrip) {
0412         const int CurrentStrip = *(istrip);
0413 
0414         if (CurrentStrip > PrevStrip) {
0415           PrevStrip = CurrentStrip;
0416 
0417           int dupl_count;
0418           dupl_count = std::count(StripList.begin(), StripList.end(), CurrentStrip);
0419           if (dupl_count > 1) {
0420             std::vector<int>::const_iterator duplicate = istrip;
0421             ++duplicate;
0422             std::vector<CSCStripDigiCollection::const_iterator>::const_iterator DuplPointer = StripPtr;
0423             ++DuplPointer;
0424             for (; duplicate != StripList.end(); ++duplicate) {
0425               if ((*duplicate) == CurrentStrip) {
0426                 //      std::cout << " Duplicate of current " <<
0427                 // CurrentStrip << " found at " << (duplicate - StripList.begin())
0428                 //<< std::endl;
0429 
0430                 DuplicateList.push_back(CurrentStrip);
0431 
0432                 std::vector<int> pileup_adc = (**DuplPointer).getADCCounts();
0433                 std::vector<int> signal_adc = (**StripPtr).getADCCounts();
0434 
0435                 std::vector<int>::const_iterator minplace;
0436 
0437                 minplace = std::min_element(pileup_adc.begin(), pileup_adc.end());
0438 
0439                 int minvalue = (*minplace);
0440 
0441                 std::vector<int> new_adc;
0442 
0443                 std::vector<int>::const_iterator newsig = signal_adc.begin();
0444 
0445                 for (std::vector<int>::const_iterator ibin = pileup_adc.begin(); ibin != pileup_adc.end(); ++ibin) {
0446                   new_adc.push_back((*newsig) + (*ibin) - minvalue);
0447 
0448                   ++newsig;
0449                 }
0450 
0451                 CSCStripDigi newDigi(CurrentStrip, new_adc);
0452                 NewDigiList.push_back(newDigi);
0453               }
0454               ++DuplPointer;
0455             }
0456           } else {
0457             NewDigiList.push_back(**StripPtr);
0458           }
0459         }                    // if strips monotonically increasing...  Haven't hit duplicates yet
0460         else {               // reached end of signal digis, or there was no overlap
0461           PrevStrip = 1000;  // now into pileup signals, stop looking forward for
0462                              // duplicates
0463 
0464           // check if this digi was in the duplicate list
0465           int check;
0466           check = std::count(DuplicateList.begin(), DuplicateList.end(), CurrentStrip);
0467           if (check == 0)
0468             NewDigiList.push_back(**StripPtr);
0469         }
0470         ++StripPtr;
0471       }
0472 
0473       CSCStripDigiCollection::Range stripRange(NewDigiList.begin(), NewDigiList.end());
0474 
0475       CSCStripDigiMerge->put(stripRange, layerId);
0476     }
0477     // Loop over CSCStrip digis, copying them from our own local storage
0478 
0479     CSCWireDigiCollection::DigiRangeIterator CWLayerIt;
0480     for (CWLayerIt = OurCSCWireDigis_->begin(); CWLayerIt != OurCSCWireDigis_->end(); ++CWLayerIt) {
0481       // The layerId
0482       const CSCDetId &layerId = (*CWLayerIt).first;
0483 
0484       // Get the iterators over the digis associated with this LayerId
0485       const CSCWireDigiCollection::Range &range = (*CWLayerIt).second;
0486 
0487       CSCWireDigiMerge->put(range, layerId);
0488     }
0489 
0490     // Loop over CSCComparator digis, copying them from our own local storage
0491 
0492     CSCComparatorDigiCollection::DigiRangeIterator CCLayerIt;
0493     for (CCLayerIt = OurCSCComparatorDigis_->begin(); CCLayerIt != OurCSCComparatorDigis_->end(); ++CCLayerIt) {
0494       // The layerId
0495       const CSCDetId &layerId = (*CCLayerIt).first;
0496 
0497       // Get the iterators over the digis associated with this LayerId
0498       const CSCComparatorDigiCollection::Range &range = (*CCLayerIt).second;
0499 
0500       CSCComparatorDigiMerge->put(range, layerId);
0501     }
0502 
0503     // put the collection of recunstructed hits in the event
0504     //    LogDebug("DataMixingMuonWorker") << "total # DT Merged Digis: " <<
0505     //    DTDigiMerge->size() ; LogDebug("DataMixingMuonWorker") << "total # RPC
0506     //    Merged Digis: " << RPCDigiMerge->size() ;
0507     //    LogDebug("DataMixingMuonWorker") << "total # CSCStrip Merged Digis: " <<
0508     //    CSCStripDigiMerge->size() ; LogDebug("DataMixingMuonWorker") << "total #
0509     //    CSCWire Merged Digis: " << CSCWireDigiMerge->size() ;
0510 
0511     e.put(std::move(DTDigiMerge));
0512     e.put(std::move(RPCDigiMerge));
0513     e.put(std::move(CSCStripDigiMerge), CSCStripDigiCollectionDM_);
0514     e.put(std::move(CSCWireDigiMerge), CSCWireDigiCollectionDM_);
0515     e.put(std::move(CSCComparatorDigiMerge), CSCComparatorDigiCollectionDM_);
0516 
0517     // clear local storage for this event
0518     delete OurDTDigis_;
0519     delete OurRPCDigis_;
0520     delete OurCSCStripDigis_;
0521     delete OurCSCWireDigis_;
0522     delete OurCSCComparatorDigis_;
0523   }
0524 
0525 }  // namespace edm