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);
72 for (
const auto&& rpcdgIt : (*TwinMux_digis)) {
74 const RPCDetId& rpcId = rpcdgIt.first;
77 rpc_digi_collection->put(
range, rpcId);
85 for (
const auto&& rpcdgIt : (*CPPF_digis)) {
87 const RPCDetId& rpcId = rpcdgIt.first;
90 rpc_digi_collection->put(
range, rpcId);
98 for (
const auto& rpcdgIt : (*OMTF_digis)) {
100 const RPCDetId& rpcId = rpcdgIt.first;
104 if (((rpcId.
region() == -1 || rpcId.
region() == 1) && (rpcId.
ring() == 3) &&
106 rpc_digi_collection->put(
range, rpcId);
116 std::vector<RPCDigi> local_rpc_digis;
119 for (
const auto& rpc_digi : (*SimRPC_digis)) {
121 const RPCDetId& rpcId = rpc_digi.first;
125 if (rpcId != rpc_det_id) {
126 if (!local_rpc_digis.empty()) {
129 local_rpc_digis.clear();
133 for (std::vector<RPCDigi>::const_iterator
id =
range.first;
id !=
range.second;
id++) {
136 if (rpcId.
region() == 0) {
139 local_rpc_digis.push_back(dit);
147 local_rpc_digis.push_back(dit);
152 local_rpc_digis.push_back(dit);
157 if (!local_rpc_digis.empty()) {
162 event.put(
std::move(rpc_digi_collection));
RPCDigiMerger(edm::ParameterSet const &config)
constexpr bool isUninitialized() const noexcept
~RPCDigiMerger() override
MuonDigiCollection< RPCDetId, RPCDigi > RPCDigiCollection
static void fillDescriptions(edm::ConfigurationDescriptions &descs)
#define DEFINE_FWK_MODULE(type)
std::pair< const_iterator, const_iterator > Range
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
edm::EDGetTokenT< RPCDigiCollection > omtf_token_
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_