src/L1TMuonLegacyConverter/src/L1TMuonLegacyConverter.cc
L1Trigger/L1TCommon/interface/L1TMuonLegacyConverter.h
Description: conver L1T muons legacy format to stage2 format
Definition at line 45 of file L1TMuonLegacyConverter.h.
Definition at line 87 of file L1TMuonLegacyConverter.cc.
References gather_cfg::cout, DEFINE_FWK_MODULE, MillePedeFileConverter_cfg::e, PVValHelper::eta, edm::EventSetup::get(), edm::Event::getByToken(), L1MuScale::getCenter(), L1MuGMTReadoutRecord::getGMTCands(), L1MuTriggerScales::getGMTEtaScale(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), L1MuTriggerPtScale::getPtScale(), L1MuGMTReadoutCollection::getRecord(), L1MuGMTReadoutCollection::getRecords(), mps_fire::i, createfilelist::int, edm::HandleBase::isValid(), LogDebug, eostools::move(), p4, DiDispStaMuonMonitor_cfi::pt, and edm::Event::put().
99 <<
"\nrequested in configuration, but not found in the event." << std::endl;
111 vector<L1MuGMTExtendedCand> simMuCands;
113 if (!simMuCollection.
isValid()) {
115 <<
"\nrequested in configuration, but not found in the event." << std::endl;
122 vector<L1MuGMTReadoutRecord> records = simMuCollection->
getRecords();
123 vector<L1MuGMTReadoutRecord>::const_iterator rItr = records.begin();
124 vector<L1MuGMTReadoutRecord>::const_iterator rEnd = records.end();
126 for (; rItr != rEnd; ++rItr) {
127 vector<L1MuGMTExtendedCand> tmpCands = rItr->getGMTCands();
129 simMuCands.insert(simMuCands.end(), tmpCands.begin(), tmpCands.end());
133 vector<L1MuGMTExtendedCand>::const_iterator muItr = simMuCands.begin();
134 vector<L1MuGMTExtendedCand>::const_iterator muEnd = simMuCands.end();
135 for (
int i = 0; muItr != muEnd; ++muItr, ++
i) {
136 if (!muItr->empty()) {
139 std::cout <<
"pt from muPtScale = " << pt << std::endl;
149 (
int)muItr->quality(),
150 (
int)muItr->charge(),
151 (
int)muItr->charge_valid(),
160 imdMuonsLegacy->push_back(muItr->bx(), outMu);
166 iEvent.
put(
std::move(imdMuonsLegacy),
"imdMuonsLegacy");
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< L1MuGMTExtendedCand > getGMTCands() const
get GMT candidates vector
const L1MuScale * getPtScale() const
get the Pt scale
bool produceMuonParticles_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
edm::EDGetTokenT< L1MuGMTReadoutCollection > muonSource_InputToken
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
const L1MuScale * getPhiScale() const
get the phi scale
edm::InputTag muonSource_InputTag
BXVector< Muon > MuonBxCollection
static const double muonMassGeV_
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
const L1MuScale * getGMTEtaScale() const
get the GMT eta scale
L1MuGMTReadoutRecord const & getRecord(int bx=0) const