File indexing completed on 2024-09-07 04:37:04
0001 #ifndef INTERFACE_RBCPROCESSRPCSIMDIGIS_H
0002 #define INTERFACE_RBCPROCESSRPCSIMDIGIS_H 1
0003
0004
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"
0006 #include "FWCore/Framework/interface/ESHandle.h"
0007
0008 #include "Geometry/RPCGeometry/interface/RPCRoll.h"
0009 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0010 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0011 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
0012
0013 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0014
0015 #include "DataFormats/Common/interface/DetSetVector.h"
0016 #include "SimDataFormats/RPCDigiSimLink/interface/RPCDigiSimLink.h"
0017
0018
0019 #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h"
0020 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h"
0021 #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h"
0022 #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h"
0023
0024 #include <cstdlib>
0025 #include <iostream>
0026 #include <fstream>
0027 #include <ios>
0028 #include <cmath>
0029 #include <map>
0030 #include <vector>
0031 #include <memory>
0032
0033
0034
0035
0036
0037
0038
0039
0040 class RBCProcessRPCSimDigis : public ProcessInputSignal {
0041 public:
0042
0043 RBCProcessRPCSimDigis();
0044
0045 RBCProcessRPCSimDigis(const edm::ESHandle<RPCGeometry> &, const edm::Handle<edm::DetSetVector<RPCDigiSimLink> > &);
0046
0047 int next() override;
0048
0049 void reset();
0050
0051 void builddata();
0052
0053 void print_output();
0054
0055 RPCInputSignal *retrievedata() override { return m_lbin.get(); };
0056
0057 void rewind() {}
0058 void showfirst() {}
0059
0060 ~RBCProcessRPCSimDigis() override;
0061
0062 protected:
0063 private:
0064 int getBarrelLayer(const int &, const int &);
0065
0066 void setDigiAt(int, int, RPCData &);
0067
0068 void setInputBit(std::bitset<15> &, int);
0069
0070 void initialize(std::vector<RPCData> &);
0071
0072 const edm::ESHandle<RPCGeometry> *m_ptr_rpcGeom;
0073 const edm::Handle<edm::DetSetVector<RPCDigiSimLink> > *m_ptr_digiSimLink;
0074
0075 edm::DetSetVector<RPCDigiSimLink>::const_iterator m_linkItr;
0076 edm::DetSet<RPCDigiSimLink>::const_iterator m_digiItr;
0077
0078 std::unique_ptr<RPCInputSignal> m_lbin;
0079
0080 std::map<int, RBCInput *> m_data;
0081
0082 std::map<int, std::vector<RPCData> > m_vecDataperBx;
0083
0084 bool m_debug;
0085 int m_maxBxWindow;
0086 };
0087 #endif