21 : bx_minTwinMux_(config.getParameter<
int>(
"bxMinTwinMux")),
22 bx_maxTwinMux_(config.getParameter<
int>(
"bxMaxTwinMux")),
23 bx_minOMTF_(config.getParameter<
int>(
"bxMinOMTF")),
24 bx_maxOMTF_(config.getParameter<
int>(
"bxMaxOMTF")),
25 bx_minCPPF_(config.getParameter<
int>(
"bxMinCPPF")),
26 bx_maxCPPF_(config.getParameter<
int>(
"bxMaxCPPF")) {
27 produces<RPCDigiCollection>();
50 desc.
add<
int>(
"bxMinTwinMux", -2);
51 desc.
add<
int>(
"bxMaxTwinMux", 2);
52 desc.
add<
int>(
"bxMinOMTF", -3);
53 desc.
add<
int>(
"bxMaxOMTF", 4);
54 desc.
add<
int>(
"bxMinCPPF", -2);
55 desc.
add<
int>(
"bxMaxCPPF", 2);
57 descs.
add(
"rpcDigiMerger", desc);
74 for (
const auto&& rpcdgIt : (*TwinMux_digis)) {
76 const RPCDetId& rpcId = rpcdgIt.first;
79 rpc_digi_collection->put(range, rpcId);
87 for (
const auto&& rpcdgIt : (*CPPF_digis)) {
89 const RPCDetId& rpcId = rpcdgIt.first;
92 rpc_digi_collection->put(range, rpcId);
100 for (
const auto& rpcdgIt : (*OMTF_digis)) {
102 const RPCDetId& rpcId = rpcdgIt.first;
106 if (((rpcId.
region() == -1 || rpcId.
region() == 1) && (rpcId.
ring() == 3) &&
108 rpc_digi_collection->put(range, rpcId);
118 std::vector<RPCDigi> local_rpc_digis;
121 for (
const auto& rpc_digi : (*SimRPC_digis)) {
123 const RPCDetId& rpcId = rpc_digi.first;
127 if (rpcId != rpc_det_id) {
128 if (!local_rpc_digis.empty()) {
131 local_rpc_digis.clear();
135 for (std::vector<RPCDigi>::const_iterator
id = range.first;
id != range.second;
id++) {
138 if (rpcId.
region() == 0) {
141 local_rpc_digis.push_back(dit);
149 local_rpc_digis.push_back(dit);
154 local_rpc_digis.push_back(dit);
159 if (!local_rpc_digis.empty()) {
164 event.put(
std::move(rpc_digi_collection));
T getParameter(std::string const &) const
RPCDigiMerger(edm::ParameterSet const &config)
~RPCDigiMerger() override
#define DEFINE_FWK_MODULE(type)
void beginRun(edm::Run const &run, edm::EventSetup const &setup) override
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::pair< const_iterator, const_iterator > Range
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< RPCDigiCollection > omtf_token_
bool isUninitialized() const
edm::EDGetTokenT< RPCDigiCollection > twinMux_token_
edm::EDGetTokenT< RPCDigiCollection > simRPC_token_
void produce(edm::Event &event, edm::EventSetup const &setup) override
edm::EDGetTokenT< RPCDigiCollection > cppf_token_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.