78 produces<MuonBxCollection>(
"imdMuonsLegacy");
79 muonSource_InputToken = consumes<L1MuGMTReadoutCollection>(muonSource_InputTag);
101 using namespace edm ;
103 using namespace std ;
109 std::unique_ptr< MuonBxCollection > imdMuonsLegacy(
new MuonBxCollection() );
112 <<
"\nWarning: L1MuGMTReadoutCollection with " << muonSource_InputTag
113 <<
"\nrequested in configuration, but not found in the event." 116 if( produceMuonParticles_ )
125 iEvent.
getByToken( muonSource_InputToken, simMuCollection ) ;
127 vector< L1MuGMTExtendedCand > simMuCands ;
130 if( !simMuCollection.
isValid() )
134 <<
"\nWarning: L1MuGMTReadoutCollection with " << muonSource_InputTag
135 <<
"\nrequested in configuration, but not found in the event." 148 vector< L1MuGMTReadoutRecord > records = simMuCollection->
getRecords();
149 vector< L1MuGMTReadoutRecord >::const_iterator rItr = records.begin();
150 vector< L1MuGMTReadoutRecord >::const_iterator rEnd = records.end();
152 for( ; rItr != rEnd ; ++rItr )
154 vector< L1MuGMTExtendedCand > tmpCands = rItr->getGMTCands() ;
156 simMuCands.insert( simMuCands.end(),
162 vector< L1MuGMTExtendedCand >::const_iterator muItr = simMuCands.begin() ;
163 vector< L1MuGMTExtendedCand >::const_iterator muEnd = simMuCands.end() ;
164 for(
int i = 0 ; muItr != muEnd ; ++muItr, ++
i )
167 if( !muItr->empty() ){
170 std::cout <<
"pt from muPtScale = " << pt << std::endl;
179 Muon outMu{
p4, (
int)0, (
int)0, (
int)0, (
int)muItr->quality(), (
int)muItr->charge(), (
int)muItr->charge_valid() , (
int)muItr->isol(), (
int)0 , (
int)0,
true, (
int)0, (
int)0, (
int)0 , (
int)muItr->rank() };
180 imdMuonsLegacy->push_back( muItr->bx(), outMu ) ;
186 iEvent.
put(
std::move(imdMuonsLegacy),
"imdMuonsLegacy" );
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
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 getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
const L1MuScale * getPhiScale() const
get the phi scale
~L1TMuonLegacyConverter()
BXVector< Muon > MuonBxCollection
L1TMuonLegacyConverter(const edm::ParameterSet &)
static const double muonMassGeV_
virtual void produce(edm::Event &, const edm::EventSetup &) override
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