Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RPCandIRPCDigiProducer_h
0002 #define RPCandIRPCDigiProducer_h
0003 
0004 #include "FWCore/Framework/interface/stream/EDProducer.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "FWCore/Framework/interface/EventSetup.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include "FWCore/Utilities/interface/ESGetToken.h"
0010 
0011 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
0012 #include "SimMuon/RPCDigitizer/src/RPCDigitizer.h"
0013 #include "SimMuon/RPCDigitizer/src/IRPCDigitizer.h"
0014 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0015 #include "CondFormats/RPCObjects/interface/RPCStripNoises.h"
0016 #include "CondFormats/DataRecord/interface/RPCStripNoisesRcd.h"
0017 #include "CondFormats/RPCObjects/interface/RPCClusterSize.h"
0018 #include "CondFormats/DataRecord/interface/RPCClusterSizeRcd.h"
0019 
0020 class RPCGeometry;
0021 class RPCSimSetUp;
0022 class RPCSynchronizer;
0023 
0024 class RPCandIRPCDigiProducer : public edm::stream::EDProducer<> {
0025 public:
0026   //  typedef edm::DetSetVector<RPCDigiSimLink> RPCDigiSimLinks;
0027   typedef RPCDigitizer::RPCDigiSimLinks RPCDigitizerSimLinks;
0028 
0029   explicit RPCandIRPCDigiProducer(const edm::ParameterSet& ps);
0030   ~RPCandIRPCDigiProducer() override;
0031 
0032   void beginRun(const edm::Run&, const edm::EventSetup&) override;
0033 
0034   /**Produces the EDM products,*/
0035   void produce(edm::Event& e, const edm::EventSetup& c) override;
0036 
0037   void setRPCSetUp(const std::vector<RPCStripNoises::NoiseItem>&, const std::vector<double>&);
0038 
0039 private:
0040   RPCDigitizer* theRPCDigitizer;
0041   IRPCDigitizer* theIRPCDigitizer;
0042   RPCSimSetUp* theRPCSimSetUpRPC;
0043   RPCSimSetUp* theRPCSimSetUpIRPC;
0044   //  RPCSimSetUp* theRPCSimSetUp;
0045 
0046   //Name of Collection used for create the XF
0047   std::string mix_;
0048   std::string collection_for_XF;
0049 
0050   //Token for accessing data
0051   edm::EDGetTokenT<CrossingFrame<PSimHit>> crossingFrameToken;
0052   const RPCGeometry* _pGeom;
0053 
0054   //EventSetup Tokens
0055   edm::ESGetToken<RPCGeometry, MuonGeometryRecord> geomToken;
0056   edm::ESGetToken<RPCStripNoises, RPCStripNoisesRcd> noiseToken;
0057   edm::ESGetToken<RPCClusterSize, RPCClusterSizeRcd> clsToken;
0058 };
0059 
0060 #endif