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 }

◆ ~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 92 of file L1TMuonShowerProducer.cc.

92  {
94  desc.add<edm::InputTag>("showerInput", edm::InputTag("simEmtfShowers", "EMTF"));
95  desc.add<int32_t>("bxMin", 0);
96  desc.add<int32_t>("bxMax", 0);
97  desc.add<uint32_t>("minNominalShowers", 1);
98  desc.add<uint32_t>("minTwoLooseShowers", 0);
99  descriptions.add("simGmtShowerDigisDef", desc);
100 }

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

◆ produce()

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

Definition at line 49 of file L1TMuonShowerProducer.cc.

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  can either be in-time or out-of-time. The minimal implementation
60  only considers the "at least 1-nominal shower" case.
61  */
62  bool isOneNominalInTime = false;
63  bool isOneNominalOutOfTime = false;
64  bool isTwoLooseInTime = false;
65  bool isTwoLooseOutOfTime = false;
66  for (size_t i = 0; i < emtfShowers->size(0); ++i) {
67  auto shower = emtfShowers->at(0, i);
68  if (shower.isValid()) {
69  // nominal
70  if (shower.isOneNominalInTime())
71  isOneNominalInTime = true;
72  if (shower.isOneNominalOutOfTime())
73  isOneNominalOutOfTime = true;
74  // two loose
75  if (shower.isTwoLooseInTime())
76  isTwoLooseInTime = true;
77  if (shower.isTwoLooseOutOfTime())
78  isTwoLooseOutOfTime = true;
79  }
80  }
81 
82  // Check for at least one nominal shower
83  const bool acceptCondition(isOneNominalInTime or isOneNominalOutOfTime or isTwoLooseInTime or isTwoLooseOutOfTime);
84  if (acceptCondition) {
85  MuonShower outShower(isOneNominalInTime, isOneNominalOutOfTime, isTwoLooseInTime, isTwoLooseOutOfTime);
86  outShowers->push_back(0, outShower);
87  }
88  iEvent.put(std::move(outShowers));
89 }

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

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().

mps_fire.i
i
Definition: mps_fire.py:428
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
l1t::MuonShowerBxCollection
BXVector< MuonShower > MuonShowerBxCollection
Definition: MuonShower.h:18
edm::Handle
Definition: AssociativeIterator.h:50
L1TMuonShowerProducer::showerInputToken_
edm::EDGetTokenT< l1t::RegionalMuonShowerBxCollection > showerInputToken_
Definition: L1TMuonShowerProducer.cc:33
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
L1TMuonShowerProducer::bxMax_
int bxMax_
Definition: L1TMuonShowerProducer.cc:35
BXVector::at
const T & at(int bx, unsigned i) const
iEvent
int iEvent
Definition: GenABIO.cc:224
L1TMuonShowerProducer::showerInputTag_
edm::InputTag showerInputTag_
Definition: L1TMuonShowerProducer.cc:32
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1TMuonShowerProducer::bxMin_
int bxMin_
Definition: L1TMuonShowerProducer.cc:34
or
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BXVector::size
unsigned size(int bx) const
edm::InputTag
Definition: InputTag.h:15
l1t::MuonShower
Definition: MuonShower.h:28