Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:00:31

0001 #ifndef RecoLocalMuon_RPCRecHitProducer_h
0002 #define RecoLocalMuon_RPCRecHitProducer_h
0003 
0004 /** \class RPCRecHitProducer
0005  *  Module for RPCRecHit production. 
0006  *  
0007  *  \author M. Maggim -- INFN Bari
0008  */
0009 
0010 #include "FWCore/Framework/interface/stream/EDProducer.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Utilities/interface/InputTag.h"
0014 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
0015 #include "CondFormats/RPCObjects/interface/RPCMaskedStrips.h"
0016 #include "CondFormats/RPCObjects/interface/RPCDeadStrips.h"
0017 #include "CondFormats/DataRecord/interface/RPCMaskedStripsRcd.h"
0018 #include "CondFormats/DataRecord/interface/RPCDeadStripsRcd.h"
0019 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0020 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0021 #include "RPCRecHitBaseAlgo.h"
0022 
0023 class RPCRecHitProducer : public edm::stream::EDProducer<> {
0024 public:
0025   /// Constructor
0026   RPCRecHitProducer(const edm::ParameterSet& config);
0027 
0028   /// Destructor
0029   ~RPCRecHitProducer() override{};
0030 
0031   // Method that access the EventSetup for each run
0032   void beginRun(const edm::Run&, const edm::EventSetup&) override;
0033 
0034   /// The method which produces the rechits
0035   void produce(edm::Event& event, const edm::EventSetup& setup) override;
0036 
0037 private:
0038   // The label to be used to retrieve RPC digis from the event
0039   const edm::EDGetTokenT<RPCDigiCollection> theRPCDigiLabel;
0040   //  edm::InputTag theRPCDigiLabel;
0041   edm::ESGetToken<RPCMaskedStrips, RPCMaskedStripsRcd> theReadoutMaskedStripsToken;
0042   edm::ESGetToken<RPCDeadStrips, RPCDeadStripsRcd> theReadoutDeadStripsToken;
0043   const edm::ESGetToken<RPCGeometry, MuonGeometryRecord> theRPCGeomToken;
0044 
0045   // The reconstruction algorithm
0046   std::unique_ptr<RPCRecHitBaseAlgo> theAlgo;
0047 
0048   std::unique_ptr<RPCMaskedStrips> theRPCMaskedStripsObj;
0049   // Object with mask-strips-vector for all the RPC Detectors
0050 
0051   std::unique_ptr<RPCDeadStrips> theRPCDeadStripsObj;
0052   // Object with dead-strips-vector for all the RPC Detectors
0053 
0054   enum class MaskSource { File, EventSetup } maskSource_, deadSource_;
0055 
0056   std::vector<RPCMaskedStrips::MaskItem> MaskVec;
0057   std::vector<RPCDeadStrips::DeadItem> DeadVec;
0058 };
0059 
0060 #endif