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 109 of file L1TMuonShowerProducer.cc.

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

109  {
111  desc.add<edm::InputTag>("showerInput", edm::InputTag("simEmtfShowers", "EMTF"));
112  desc.add<int32_t>("bxMin", 0);
113  desc.add<int32_t>("bxMax", 0);
114  descriptions.add("simGmtShowerDigisDef", desc);
115 }
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  bool isTwoLooseDifferentSectorsInTime{false};
68 
69  bool foundOneLoose{false};
70  for (size_t i = 0; i < emtfShowers->size(0); ++i) {
71  auto shower = emtfShowers->at(0, i);
72  if (shower.isValid()) {
73  // nominal
74  if (shower.isOneNominalInTime()) {
75  isOneNominalInTime = true;
76  }
77  // two loose
78  if (shower.isTwoLooseInTime()) {
79  isTwoLooseInTime = true;
80  }
81  // tight
82  if (shower.isOneTightInTime()) {
83  isOneTightInTime = true;
84  }
85  // two loos in different sectors
86  if (shower.isOneLooseInTime()) {
87  if (foundOneLoose) {
88  isTwoLooseDifferentSectorsInTime = true;
89  } else {
90  foundOneLoose = true;
91  }
92  }
93  }
94  }
95 
96  // Check for at least one nominal shower
97  const bool acceptCondition{isOneNominalInTime or isTwoLooseInTime or isOneTightInTime or
98  isTwoLooseDifferentSectorsInTime};
99 
100  if (acceptCondition) {
101  MuonShower outShower(
102  isOneNominalInTime, false, isTwoLooseInTime, false, isOneTightInTime, false, isTwoLooseDifferentSectorsInTime);
103  outShowers->push_back(0, outShower);
104  }
105  iEvent.put(std::move(outShowers));
106 }
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().