73 produces<MuonBxCollection>(
"imdMuonsLegacy");
74 muonSource_InputToken = consumes<L1MuGMTReadoutCollection>(muonSource_InputTag);
76 if (produceMuonParticles_) {
103 LogDebug(
"L1TMuonLegacyConverter") <<
"\nWarning: L1MuGMTReadoutCollection with " << muonSource_InputTag
104 <<
"\nrequested in configuration, but not found in the event." << std::endl;
106 if (produceMuonParticles_) {
112 iEvent.getByToken(muonSource_InputToken, simMuCollection);
114 vector<L1MuGMTExtendedCand> simMuCands;
116 if (!simMuCollection.
isValid()) {
117 LogDebug(
"L1TMuonLegacyConverter") <<
"\nWarning: L1MuGMTReadoutCollection with " << muonSource_InputTag
118 <<
"\nrequested in configuration, but not found in the event." << std::endl;
120 if (centralBxOnly_) {
125 vector<L1MuGMTReadoutRecord> records = simMuCollection->
getRecords();
126 vector<L1MuGMTReadoutRecord>::const_iterator rItr = records.begin();
127 vector<L1MuGMTReadoutRecord>::const_iterator rEnd = records.end();
129 for (; rItr != rEnd; ++rItr) {
130 vector<L1MuGMTExtendedCand> tmpCands = rItr->getGMTCands();
132 simMuCands.insert(simMuCands.end(), tmpCands.begin(), tmpCands.end());
136 vector<L1MuGMTExtendedCand>::const_iterator muItr = simMuCands.begin();
137 vector<L1MuGMTExtendedCand>::const_iterator muEnd = simMuCands.end();
138 for (
int i = 0; muItr != muEnd; ++muItr, ++
i) {
139 if (!muItr->empty()) {
142 std::cout <<
"pt from muPtScale = " <<
pt << std::endl;
152 (
int)muItr->quality(),
153 (
int)muItr->charge(),
154 (
int)muItr->charge_valid(),
163 imdMuonsLegacy->push_back(muItr->bx(), outMu);
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuScale * getPhiScale() const
get the phi scale
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
const L1MuScale * getPtScale() const
get the Pt scale
T getUntrackedParameter(std::string const &, T const &) const
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
~L1TMuonLegacyConverter() override
BXVector< Muon > MuonBxCollection
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
L1TMuonLegacyConverter(const edm::ParameterSet &)
static const double muonMassGeV_
void produce(edm::Event &, const edm::EventSetup &) override
L1MuGMTReadoutRecord const & getRecord(int bx=0) const
std::vector< L1MuGMTExtendedCand > getGMTCands() const
get GMT candidates vector