CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HLTL1MuonNoL2Selector Class Reference

#include <HLTL1MuonNoL2Selector.h>

Inheritance diagram for HLTL1MuonNoL2Selector:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HLTL1MuonNoL2Selector (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
 ~HLTL1MuonNoL2Selector () override
 Destructor. More...
 
- Public Member Functions inherited from edm::global::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
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

bool centralBxOnly_
 
edm::EDGetTokenT< l1t::MuonBxCollectionmuCollToken_
 
edm::InputTag seedMapTag_
 
edm::EDGetTokenT< SeedMapseedMapToken_
 
const double theL1MaxEta_
 
const double theL1MinPt_
 
const unsigned theL1MinQuality_
 
edm::InputTag theL1Source_
 
edm::InputTag theL2CandTag_
 
edm::EDGetTokenT< reco::RecoChargedCandidateCollectiontheL2CandToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

HLTL1MuonNoL2Selector: Simple selector to output a subset of L1 muon collection with no L2 link.

based on RecoMuon/L2MuonSeedGenerator

Author
S. Folgueras

HLTL1MuonNoL2Selector: Simple selector to output a subset of L1 muon collection

based on RecoMuon/L2MuonSeedGenerator

Author
S. Folgueras

Definition at line 41 of file HLTL1MuonNoL2Selector.h.

Constructor & Destructor Documentation

◆ HLTL1MuonNoL2Selector()

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

Constructor.

Definition at line 32 of file HLTL1MuonNoL2Selector.cc.

33  : theL1Source_(iConfig.getParameter<InputTag>("InputObjects")),
34  theL1MinPt_(iConfig.getParameter<double>("L1MinPt")),
35  theL1MaxEta_(iConfig.getParameter<double>("L1MaxEta")),
36  theL1MinQuality_(iConfig.getParameter<unsigned int>("L1MinQuality")),
37  centralBxOnly_(iConfig.getParameter<bool>("CentralBxOnly")),
38  theL2CandTag_(iConfig.getParameter<edm::InputTag>("L2CandTag")),
39  theL2CandToken_(consumes<reco::RecoChargedCandidateCollection>(theL2CandTag_)),
40  seedMapTag_(iConfig.getParameter<InputTag>("SeedMapTag")),
41  seedMapToken_(consumes<SeedMap>(seedMapTag_)) {
42  muCollToken_ = consumes<MuonBxCollection>(theL1Source_);
43 
44  produces<MuonBxCollection>();
45 }

References muCollToken_, and theL1Source_.

◆ ~HLTL1MuonNoL2Selector()

HLTL1MuonNoL2Selector::~HLTL1MuonNoL2Selector ( )
overridedefault

Destructor.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 50 of file HLTL1MuonNoL2Selector.cc.

50  {
52  desc.add<edm::InputTag>("InputObjects", edm::InputTag(""));
53  desc.add<edm::InputTag>("L2CandTag", edm::InputTag("hltL2MuonCandidates"));
54  desc.add<edm::InputTag>("SeedMapTag", edm::InputTag("hltL2Muons"));
55  desc.add<double>("L1MinPt", -1.);
56  desc.add<double>("L1MaxEta", 5.0);
57  desc.add<unsigned int>("L1MinQuality", 0);
58  // # OBSOLETE - these parameters are ignored, they are left only not to break old configurations
59  // they will not be printed in the generated cfi.py file
60  desc.addOptionalNode(edm::ParameterDescription<edm::InputTag>("L1CandTag", edm::InputTag(""), false), false)
61  ->setComment("This parameter is obsolete and will be ignored.");
62  desc.add<bool>("CentralBxOnly", true);
63  descriptions.add("hltL1MuonNoL2Selector", desc);
64 }

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

◆ produce()

void HLTL1MuonNoL2Selector::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overridevirtual

Implements edm::global::EDProducerBase.

Definition at line 66 of file HLTL1MuonNoL2Selector.cc.

66  {
67  using namespace std;
68  using namespace reco;
69  using namespace trigger;
70 
71  const std::string metname = "Muon|RecoMuon|HLTL1MuonNoL2Selector";
72 
73  unique_ptr<MuonBxCollection> output(new MuonBxCollection());
74 
75  // Get hold of L2 trks
77  iEvent.getByToken(theL2CandToken_, L2cands);
78 
79  // Muon particles
81  iEvent.getByToken(muCollToken_, muColl);
82  LogTrace(metname) << "Number of muons " << muColl->size() << endl;
83 
84  edm::Handle<SeedMap> seedMapHandle;
85  iEvent.getByToken(seedMapToken_, seedMapHandle);
86 
87  for (int ibx = muColl->getFirstBX(); ibx <= muColl->getLastBX(); ++ibx) {
88  if (centralBxOnly_ && (ibx != 0))
89  continue;
90  for (auto it = muColl->begin(ibx); it != muColl->end(ibx); it++) {
91  l1t::MuonRef l1muon(muColl, distance(muColl->begin(muColl->getFirstBX()), it));
92 
93  unsigned int quality = it->hwQual();
94  float pt = it->pt();
95  float eta = it->eta();
96 
98  continue;
99 
100  // Loop over L2's to find whether the L1 fired this L2.
101  bool isTriggeredByL1 = false;
102  for (auto const& cand : *L2cands) {
103  TrackRef l2muon = cand.get<TrackRef>();
105  (*seedMapHandle)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()];
106  for (auto const& seed : seeds) {
107  // Check if the L2 was seeded by a triggered L1, in such case skip the loop.
108  if (seed->l1tParticle() == l1muon) {
109  isTriggeredByL1 = true;
110  break;
111  }
112  }
113  if (isTriggeredByL1)
114  break; // if I found a L2 I do not need to loop on the rest.
115  }
116  // Once we loop on all L2 decide:
117  if (!isTriggeredByL1) {
118  output->push_back(ibx, *it);
119  }
120  }
121  } // loop over L1
122 
123  iEvent.put(std::move(output));
124 }

References funct::abs(), BXVector< T >::begin(), centralBxOnly_, HLT_FULL_cff::distance, BXVector< T >::end(), PVValHelper::eta, BXVector< T >::getFirstBX(), BXVector< T >::getLastBX(), iEvent, LogTrace, metname, eostools::move(), muCollToken_, convertSQLitetoXML_cfg::output, DiDispStaMuonMonitor_cfi::pt, qcdUeDQM_cfi::quality, fileCollector::seed, seedMapToken_, InitialStep_cff::seeds, BXVector< T >::size(), AlCaHLTBitMon_QueryRunRegistry::string, theL1MaxEta_, theL1MinPt_, theL1MinQuality_, and theL2CandToken_.

Member Data Documentation

◆ centralBxOnly_

bool HLTL1MuonNoL2Selector::centralBxOnly_
private

Definition at line 57 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

◆ muCollToken_

edm::EDGetTokenT<l1t::MuonBxCollection> HLTL1MuonNoL2Selector::muCollToken_
private

Definition at line 59 of file HLTL1MuonNoL2Selector.h.

Referenced by HLTL1MuonNoL2Selector(), and produce().

◆ seedMapTag_

edm::InputTag HLTL1MuonNoL2Selector::seedMapTag_
private

Definition at line 62 of file HLTL1MuonNoL2Selector.h.

◆ seedMapToken_

edm::EDGetTokenT<SeedMap> HLTL1MuonNoL2Selector::seedMapToken_
private

Definition at line 63 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

◆ theL1MaxEta_

const double HLTL1MuonNoL2Selector::theL1MaxEta_
private

Definition at line 55 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

◆ theL1MinPt_

const double HLTL1MuonNoL2Selector::theL1MinPt_
private

Definition at line 54 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

◆ theL1MinQuality_

const unsigned HLTL1MuonNoL2Selector::theL1MinQuality_
private

Definition at line 56 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

◆ theL1Source_

edm::InputTag HLTL1MuonNoL2Selector::theL1Source_
private

Definition at line 53 of file HLTL1MuonNoL2Selector.h.

Referenced by HLTL1MuonNoL2Selector().

◆ theL2CandTag_

edm::InputTag HLTL1MuonNoL2Selector::theL2CandTag_
private

Definition at line 60 of file HLTL1MuonNoL2Selector.h.

◆ theL2CandToken_

edm::EDGetTokenT<reco::RecoChargedCandidateCollection> HLTL1MuonNoL2Selector::theL2CandToken_
private

Definition at line 61 of file HLTL1MuonNoL2Selector.h.

Referenced by produce().

HLTL1MuonNoL2Selector::theL1Source_
edm::InputTag theL1Source_
Definition: HLTL1MuonNoL2Selector.h:53
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
l1t::MuonBxCollection
BXVector< Muon > MuonBxCollection
Definition: Muon.h:11
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
HLTL1MuonNoL2Selector::theL1MinPt_
const double theL1MinPt_
Definition: HLTL1MuonNoL2Selector.h:54
edm::RefVector
Definition: EDProductfwd.h:27
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
edm::Ref< MuonBxCollection >
fileCollector.seed
seed
Definition: fileCollector.py:127
BXVector::getFirstBX
int getFirstBX() const
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
HLTL1MuonNoL2Selector::theL1MaxEta_
const double theL1MaxEta_
Definition: HLTL1MuonNoL2Selector.h:55
PVValHelper::eta
Definition: PVValidationHelpers.h:69
BXVector::begin
const_iterator begin(int bx) const
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:230
BXVector::end
const_iterator end(int bx) const
HLTL1MuonNoL2Selector::centralBxOnly_
bool centralBxOnly_
Definition: HLTL1MuonNoL2Selector.h:57
cand
Definition: decayParser.h:32
iEvent
int iEvent
Definition: GenABIO.cc:224
HLTL1MuonNoL2Selector::seedMapTag_
edm::InputTag seedMapTag_
Definition: HLTL1MuonNoL2Selector.h:62
HLTL1MuonNoL2Selector::muCollToken_
edm::EDGetTokenT< l1t::MuonBxCollection > muCollToken_
Definition: HLTL1MuonNoL2Selector.h:59
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
HLTL1MuonNoL2Selector::theL1MinQuality_
const unsigned theL1MinQuality_
Definition: HLTL1MuonNoL2Selector.h:56
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
HLTL1MuonNoL2Selector::seedMapToken_
edm::EDGetTokenT< SeedMap > seedMapToken_
Definition: HLTL1MuonNoL2Selector.h:63
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HLTL1MuonNoL2Selector::theL2CandToken_
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > theL2CandToken_
Definition: HLTL1MuonNoL2Selector.h:61
trigger
Definition: HLTPrescaleTableCond.h:8
BXVector::size
unsigned size(int bx) const
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7733
BXVector::getLastBX
int getLastBX() const
edm::ParameterDescription
Definition: ParameterDescription.h:110
edm::InputTag
Definition: InputTag.h:15
HLTL1MuonNoL2Selector::theL2CandTag_
edm::InputTag theL2CandTag_
Definition: HLTL1MuonNoL2Selector.h:60
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40