CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TMuonShowerProducer Class Reference
Inheritance diagram for L1TMuonShowerProducer:
edm::stream::EDProducer<>

Public Member Functions

 L1TMuonShowerProducer (const edm::ParameterSet &)
 
 ~L1TMuonShowerProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

int bxMax_
 
int bxMin_
 
edm::InputTag showerInputTag_
 
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollectionshowerInputToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 22 of file L1TMuonShowerProducer.cc.

Constructor & Destructor Documentation

◆ L1TMuonShowerProducer()

L1TMuonShowerProducer::L1TMuonShowerProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 38 of file L1TMuonShowerProducer.cc.

39  : showerInputTag_(iConfig.getParameter<edm::InputTag>("showerInput")),
40  showerInputToken_(consumes<l1t::RegionalMuonShowerBxCollection>(showerInputTag_)),
41  bxMin_(iConfig.getParameter<int>("bxMin")),
42  bxMax_(iConfig.getParameter<int>("bxMax")) {
43  produces<MuonShowerBxCollection>();
44 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollection > showerInputToken_

◆ ~L1TMuonShowerProducer()

L1TMuonShowerProducer::~L1TMuonShowerProducer ( )
override

Definition at line 46 of file L1TMuonShowerProducer.cc.

46 {}

Member Function Documentation

◆ fillDescriptions()

void L1TMuonShowerProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 94 of file L1TMuonShowerProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_2022v15_cff::InputTag.

94  {
96  desc.add<edm::InputTag>("showerInput", edm::InputTag("simEmtfShowers", "EMTF"));
97  desc.add<int32_t>("bxMin", 0);
98  desc.add<int32_t>("bxMax", 0);
99  descriptions.add("simGmtShowerDigisDef", desc);
100 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void L1TMuonShowerProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 49 of file L1TMuonShowerProducer.cc.

References BXVector< T >::at(), bxMax_, bxMin_, mps_fire::i, iEvent, eostools::move(), or, showerInputToken_, and BXVector< T >::size().

49  {
50  using namespace edm;
51  std::unique_ptr<MuonShowerBxCollection> outShowers(new MuonShowerBxCollection());
52 
54  iEvent.getByToken(showerInputToken_, emtfShowers);
55  outShowers->setBXRange(bxMin_, bxMax_);
56 
57  /*
58  Check each sector for a valid EMTF shower. A valid EMTF shower
59  for startup Run-3 can either be "one nominal shower" or "one tight shower".
60  The case "two loose showers" is under consideration but needs more study.
61  Showers that arrive out-of-time are also under consideration, but are not
62  going be to enabled at startup Run-3. So all showers should be in-time.
63  */
64  bool isOneNominalInTime = false;
65  bool isTwoLooseInTime = false;
66  bool isOneTightInTime = false;
67 
68  for (size_t i = 0; i < emtfShowers->size(0); ++i) {
69  auto shower = emtfShowers->at(0, i);
70  if (shower.isValid()) {
71  // nominal
72  if (shower.isOneNominalInTime())
73  isOneNominalInTime = true;
74  // two loose
75  if (shower.isTwoLooseInTime())
76  isTwoLooseInTime = true;
77  // tight
78  if (shower.isOneTightInTime())
79  isOneTightInTime = true;
80  }
81  }
82 
83  // Check for at least one nominal shower
84  const bool acceptCondition(isOneNominalInTime or isTwoLooseInTime or isOneTightInTime);
85 
86  if (acceptCondition) {
87  MuonShower outShower(isOneNominalInTime, false, isTwoLooseInTime, false, isOneTightInTime, false);
88  outShowers->push_back(0, outShower);
89  }
90  iEvent.put(std::move(outShowers));
91 }
unsigned size(int bx) const
int iEvent
Definition: GenABIO.cc:224
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
BXVector< MuonShower > MuonShowerBxCollection
Definition: MuonShower.h:18
const T & at(int bx, unsigned i) const
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollection > showerInputToken_
HLT enums.
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ bxMax_

int L1TMuonShowerProducer::bxMax_
private

Definition at line 35 of file L1TMuonShowerProducer.cc.

Referenced by produce().

◆ bxMin_

int L1TMuonShowerProducer::bxMin_
private

Definition at line 34 of file L1TMuonShowerProducer.cc.

Referenced by produce().

◆ showerInputTag_

edm::InputTag L1TMuonShowerProducer::showerInputTag_
private

Definition at line 32 of file L1TMuonShowerProducer.cc.

◆ showerInputToken_

edm::EDGetTokenT<l1t::RegionalMuonShowerBxCollection> L1TMuonShowerProducer::showerInputToken_
private

Definition at line 33 of file L1TMuonShowerProducer.cc.

Referenced by produce().