Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:59

0001 #ifndef SimDataMixingMuonWorker_h
0002 #define SimDataMixingMuonWorker_h
0003 
0004 /** \class DataMixingMuonWorker
0005  *
0006  * DataMixingModule is the EDProducer subclass
0007  * that overlays rawdata events on top of MC,
0008  * using real data for pileup simulation
0009  * This class takes care of the Muon information
0010  *
0011  * \author Mike Hildreth, University of Notre Dame
0012  *
0013  * \version   1st Version October 2007
0014  *
0015  ************************************************************/
0016 
0017 #include "FWCore/Framework/interface/ConsumesCollector.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/EventPrincipal.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 #include "DataFormats/Common/interface/Handle.h"
0023 #include "DataFormats/Provenance/interface/ProductID.h"
0024 
0025 // DT
0026 #include "DataFormats/DTDigi/interface/DTDigiCollection.h"
0027 // RPC
0028 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0029 // CSC
0030 #include "DataFormats/CSCDigi/interface/CSCComparatorDigiCollection.h"
0031 #include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h"
0032 #include "DataFormats/CSCDigi/interface/CSCWireDigiCollection.h"
0033 
0034 #include <map>
0035 #include <string>
0036 #include <vector>
0037 
0038 namespace edm {
0039   class ModuleCallingContext;
0040 
0041   class DataMixingMuonWorker {
0042   public:
0043     DataMixingMuonWorker();
0044 
0045     /** standard constructor*/
0046     explicit DataMixingMuonWorker(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC);
0047 
0048     /**Default destructor*/
0049     virtual ~DataMixingMuonWorker();
0050 
0051     void putMuon(edm::Event &e);
0052     void addMuonSignals(const edm::Event &e);
0053     void addMuonPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, ModuleCallingContext const *);
0054 
0055   private:
0056     // data specifiers
0057 
0058     edm::InputTag DTdigi_collectionSig_;        // secondary name given to collection of DT digis
0059     edm::InputTag RPCdigi_collectionSig_;       // secondary name given to collection of RPC digis
0060     edm::InputTag CSCDigiTagSig_;               // primary? name given to collection of CSC digis
0061     edm::InputTag DTDigiTagSig_;                // primary? name given to collection of DT digis
0062     edm::InputTag RPCDigiTagSig_;               // primary? name given to collection of RPC digis
0063     edm::InputTag CSCstripdigi_collectionSig_;  // secondary name given to
0064                                                 // collection of CSC Strip digis
0065     edm::InputTag CSCwiredigi_collectionSig_;   // secondary name given to
0066                                                 // collection of CSC wire digis
0067     edm::InputTag CSCCompdigi_collectionSig_;   // secondary name given to
0068                                                 // collection of CSC wire digis
0069 
0070     edm::InputTag DTPileInputTag_;        // InputTag for pileup DTs
0071     edm::InputTag RPCPileInputTag_;       // InputTag for pileup RPCs
0072     edm::InputTag CSCWirePileInputTag_;   // InputTag for pileup CSC Wires
0073     edm::InputTag CSCStripPileInputTag_;  // InputTag for pileup CSC Strips
0074     edm::InputTag CSCCompPileInputTag_;   // InputTag for pileup CSC Comparators
0075 
0076     edm::EDGetTokenT<DTDigiCollection> DTDigiToken_;                  // Token to retrieve information
0077     edm::EDGetTokenT<CSCStripDigiCollection> CSCStripDigiToken_;      // Token to retrieve information
0078     edm::EDGetTokenT<CSCWireDigiCollection> CSCWireDigiToken_;        // Token to retrieve information
0079     edm::EDGetTokenT<CSCComparatorDigiCollection> CSCCompDigiToken_;  // Token to retrieve information
0080     edm::EDGetTokenT<RPCDigiCollection> RPCDigiToken_;                // Token to retrieve information
0081 
0082     edm::EDGetTokenT<DTDigiCollection> DTDigiPToken_;                  // Token to retrieve information
0083     edm::EDGetTokenT<CSCStripDigiCollection> CSCStripDigiPToken_;      // Token to retrieve information
0084     edm::EDGetTokenT<CSCWireDigiCollection> CSCWireDigiPToken_;        // Token to retrieve information
0085     edm::EDGetTokenT<CSCComparatorDigiCollection> CSCCompDigiPToken_;  // Token to retrieve information
0086     edm::EDGetTokenT<RPCDigiCollection> RPCDigiPToken_;                // Token to retrieve information
0087 
0088     std::string DTDigiCollectionDM_;             // secondary name to be given to new DT digis
0089     std::string RPCDigiCollectionDM_;            // secondary name to be given to new RPC digis
0090     std::string CSCStripDigiCollectionDM_;       // secondary name given to new
0091                                                  // collection of CSC Strip digis
0092     std::string CSCWireDigiCollectionDM_;        // secondary name given to new
0093                                                  // collection of CSC wire digis
0094     std::string CSCComparatorDigiCollectionDM_;  // secondary name given to new collection
0095                                                  // of CSC comparator digis
0096 
0097     // just hold our own DigiCollections - order of digis in layer doesn't appear
0098     // to matter... will make a copy and put this back into the event...
0099 
0100     DTDigiCollection *OurDTDigis_;
0101     RPCDigiCollection *OurRPCDigis_;
0102     CSCStripDigiCollection *OurCSCStripDigis_;
0103     CSCWireDigiCollection *OurCSCWireDigis_;
0104     CSCComparatorDigiCollection *OurCSCComparatorDigis_;
0105 
0106     //      unsigned int eventId_; //=0 for signal, from 1-n for pileup events
0107 
0108     std::string label_;
0109   };
0110 }  // namespace edm
0111 
0112 #endif  // SimDataMixingMuonWorker_h