CMS 3D CMS Logo

L1TMuonEndCapShowerProducer.cc
Go to the documentation of this file.
3 
4 namespace {
5  template <typename F>
6  void forEachProcessor(F&& func) {
11  func(endcap, sector, es);
12  }
13  }
14  }
15 } // namespace
16 
18  : tokenCSCShower_(consumes<CSCShowerDigiCollection>(iConfig.getParameter<edm::InputTag>("CSCShowerInput"))),
19  sector_processors_shower_() {
20  // Make output products
21  produces<l1t::RegionalMuonShowerBxCollection>("EMTF");
22 
23  forEachProcessor([&](const int endcap, const int sector, const int es) {
24  sector_processors_shower_.at(es).configure(iConfig, endcap, sector);
25  });
26 }
27 
29 
31  // Create pointers to output products
32  auto out_showers = std::make_unique<l1t::RegionalMuonShowerBxCollection>();
33  out_showers->clear();
34  out_showers->setBXRange(-2, 2);
35 
37  iEvent.getByToken(tokenCSCShower_, showersH);
38  const CSCShowerDigiCollection& showers = *showersH.product();
39 
40  // ___________________________________________________________________________
41  // Run the sector processors
42  forEachProcessor([&](const int endcap, const int sector, const int es) {
43  sector_processors_shower_.at(es).process(showers, *out_showers);
44  });
45 
46  // Fill the output products
47  iEvent.put(std::move(out_showers), "EMTF");
48 }
49 
52  // these are different shower selections that can be enabled
53  desc.add<bool>("enableOneLooseShower", true);
54  desc.add<bool>("enableOneNominalShower", true);
55  desc.add<bool>("enableOneTightShower", true);
56  desc.add<bool>("enableTwoLooseShowers", false);
57  desc.add<edm::InputTag>("CSCShowerInput", edm::InputTag("simCscTriggerPrimitiveDigis"));
58  descriptions.add("simEmtfShowersDef", desc);
59  descriptions.setComment("This is the generic cfi file for the EMTF shower producer");
60 }
61 
62 // Define this as a plug-in
constexpr int MIN_ENDCAP
Definition: Common.h:45
T const * product() const
Definition: Handle.h:70
L1TMuonEndCapShowerProducer(const edm::ParameterSet &)
constexpr int MIN_TRIGSECTOR
Definition: Common.h:49
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setComment(std::string const &value)
emtf::sector_array< SectorProcessorShower > sector_processors_shower_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
HLT enums.
constexpr int MAX_ENDCAP
Definition: Common.h:46
constexpr int MAX_TRIGSECTOR
Definition: Common.h:50
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
def move(src, dest)
Definition: eostools.py:511
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...