38 ,
maxDZ_( iConfig.getParameter< double >(
"maxDZ" ) )
41 produces< std::vector< pat::Muon > >();
55 std::vector< pat::Muon > *
selectedMuons(
new std::vector< pat::Muon > );
57 if ( !vertices->empty() ) {
59 for (
unsigned iMuon = 0; iMuon < muons->size(); ++iMuon ) {
60 if ( std::fabs( muons->at( iMuon ).vertex().z() - vertices->at( 0 ).z() ) <
maxDZ_ ) {
61 selectedMuons->push_back( muons->at( iMuon ) );
66 std::unique_ptr< std::vector< pat::Muon > > selectedMuonsPtr( selectedMuons );
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< std::vector< pat::Muon > > muonSource_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
selectedMuons
====================================== Muons
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexSource_
~MuonSelectorVertex() override
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
MuonSelectorVertex(const edm::ParameterSet &iConfig)