Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:59:36

0001 //-------------------------------------------------
0002 //
0003 /**  \class DTTFFEDSim
0004  *
0005  *   L1 DT Track Finder Digi-to-Raw
0006  *
0007  *
0008  *
0009  *   J. Troconiz  UAM Madrid
0010  */
0011 //
0012 //--------------------------------------------------
0013 #ifndef DTTFRawToDigi_DTTFFEDSim_h
0014 #define DTTFRawToDigi_DTTFFEDSim_h
0015 
0016 #include "FWCore/Framework/interface/ConsumesCollector.h"
0017 
0018 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0019 #include <DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h>
0020 #include <DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h>
0021 #include <DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h>
0022 
0023 #include <FWCore/Framework/interface/stream/EDProducer.h>
0024 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0025 #include <FWCore/Utilities/interface/InputTag.h>
0026 
0027 #include <string>
0028 
0029 class DTTFFEDSim : public edm::stream::EDProducer<> {
0030 public:
0031   /// Constructor
0032   DTTFFEDSim(const edm::ParameterSet &pset);
0033 
0034   /// Destructor
0035   ~DTTFFEDSim() override;
0036 
0037   /// Produce digis out of raw data
0038   void produce(edm::Event &e, const edm::EventSetup &c) override;
0039 
0040   /// Generate and fill FED raw data for a full event
0041   bool fillRawData(edm::Event &e, FEDRawDataCollection &data);
0042 
0043 private:
0044   unsigned int eventNum;
0045 
0046   edm::InputTag DTDigiInputTag;
0047   edm::InputTag DTPHTFInputTag;
0048 
0049   // utilities
0050   int channel(int wheel, int sector, int bx);
0051 
0052   int bxNr(int channel);
0053 
0054   int sector(int channel);
0055 
0056   int wheel(int channel);
0057 
0058   edm::InputTag getDTDigiInputTag() { return DTDigiInputTag; }
0059   edm::InputTag getDTPHTFInputTag() { return DTPHTFInputTag; }
0060 
0061   edm::EDGetTokenT<L1MuDTChambPhContainer> ChPh_tok;
0062   edm::EDGetTokenT<L1MuDTChambThContainer> ChTh_tok;
0063   edm::EDGetTokenT<L1MuDTTrackContainer> Trk_tok;
0064 };
0065 #endif