src/L1TMuonLegacyConverter/src/L1TMuonLegacyConverter.cc
L1Trigger/L1TCommon/interface/L1TMuonLegacyConverter.h
Description: conver L1T muons legacy format to stage2 format
Definition at line 49 of file L1TMuonLegacyConverter.h.
Definition at line 92 of file L1TMuonLegacyConverter.cc.
References gather_cfg::cout, MillePedeFileConverter_cfg::e, PVValHelper::eta, L1MuScale::getCenter(), L1MuGMTReadoutRecord::getGMTCands(), L1MuTriggerScales::getGMTEtaScale(), edm::EventSetup::getHandle(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), L1MuTriggerPtScale::getPtScale(), L1MuGMTReadoutCollection::getRecord(), L1MuGMTReadoutCollection::getRecords(), mps_fire::i, iEvent, createfilelist::int, edm::HandleBase::isValid(), LogDebug, eostools::move(), and DiDispStaMuonMonitor_cfi::pt.
104 <<
"\nrequested in configuration, but not found in the event." << std::endl;
114 vector<L1MuGMTExtendedCand> simMuCands;
116 if (!simMuCollection.
isValid()) {
118 <<
"\nrequested in configuration, but not found in the event." << std::endl;
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
bool produceMuonParticles_
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
edm::EDGetTokenT< L1MuGMTReadoutCollection > muonSource_InputToken
const L1MuScale * getPtScale() const
get the Pt scale
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
edm::InputTag muonSource_InputTag
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
BXVector< Muon > MuonBxCollection
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
static const double muonMassGeV_
edm::ESGetToken< L1MuTriggerPtScale, L1MuTriggerPtScaleRcd > muPtScaleToken_
L1MuGMTReadoutRecord const & getRecord(int bx=0) const
std::vector< L1MuGMTExtendedCand > getGMTCands() const
get GMT candidates vector
edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > muScalesToken_