CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1TMuonEndCapShowerProducer.cc
Go to the documentation of this file.
3 
5  : config_(iConfig),
6  tokenCSCShower_(consumes<CSCShowerDigiCollection>(iConfig.getParameter<edm::InputTag>("CSCShowerInput"))),
7  sector_processors_shower_() {
8  // Make output products
9  produces<l1t::RegionalMuonShowerBxCollection>("EMTF");
10 }
11 
13 
15  // Create pointers to output products
16  auto out_showers = std::make_unique<l1t::RegionalMuonShowerBxCollection>();
17  out_showers->clear();
18  out_showers->setBXRange(0, 0);
19 
21  iEvent.getByToken(tokenCSCShower_, showersH);
22  const CSCShowerDigiCollection& showers = *showersH.product();
23 
24  // ___________________________________________________________________________
25  // Run the sector processors
26 
28  for (int sector = emtf::MIN_TRIGSECTOR; sector <= emtf::MAX_TRIGSECTOR; ++sector) {
30  (sector - emtf::MIN_TRIGSECTOR);
31 
32  sector_processors_shower_.at(es).configure(config_, endcap, sector);
33  sector_processors_shower_.at(es).process(showers, *out_showers);
34  }
35  }
36 
37  // Fill the output products
38  iEvent.put(std::move(out_showers), "EMTF");
39 }
40 
43  // these are different shower selections that can be enabled
44  desc.add<bool>("enableOneNominalShowers", true);
45  desc.add<bool>("enableOneTightShowers", true);
46  desc.add<bool>("enableTwoLooseShowers", false);
47  desc.add<unsigned>("nLooseShowers", 2);
48  desc.add<unsigned>("nNominalShowers", 1);
49  desc.add<unsigned>("nTightShowers", 1);
50  desc.add<edm::InputTag>("CSCShowerInput", edm::InputTag("simCscTriggerPrimitiveDigis"));
51  descriptions.add("simEmtfShowersDef", desc);
52  descriptions.setComment("This is the generic cfi file for the EMTF shower producer");
53 }
54 
55 // Define this as a plug-in
constexpr int MIN_ENDCAP
Definition: Common.h:45
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
L1TMuonEndCapShowerProducer(const edm::ParameterSet &)
constexpr int MIN_TRIGSECTOR
Definition: Common.h:49
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void setComment(std::string const &value)
emtf::sector_array< SectorProcessorShower > sector_processors_shower_
T const * product() const
Definition: Handle.h:70
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &, const edm::EventSetup &) override
constexpr int MAX_ENDCAP
Definition: Common.h:46
constexpr int MAX_TRIGSECTOR
Definition: Common.h:50
A container for a generic type of digis indexed by some index, implemented with a map&lt;IndexType...