28 produces<edm::ValueMap<unsigned int>>().setBranchAlias(
"cosmicsVeto");
29 produces<edm::ValueMap<reco::MuonCosmicCompatibility>>().setBranchAlias(
"cosmicCompatibility");
54 std::vector<unsigned int>
values;
55 values.reserve(muons->size());
57 std::vector<reco::MuonCosmicCompatibility> compValues;
58 compValues.reserve(muons->size());
60 for (reco::MuonCollection::const_iterator
muon = muons->begin();
muon != muons->end(); ++
muon) {
61 unsigned int foundPartner(0);
62 if (
muon->innerTrack().isNonnull()) {
72 values.push_back(foundPartner);
78 auto out = std::make_unique<edm::ValueMap<unsigned int>>();
80 filler.insert(muons, values.begin(), values.end());
83 auto outC = std::make_unique<edm::ValueMap<reco::MuonCosmicCompatibility>>();
85 fillerC.insert(muons, compValues.begin(), compValues.end());
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
reco::TrackRef findOppositeTrack(const edm::Handle< reco::TrackCollection > &collection, const reco::Track &muon, double angleMatch=0.01, double momentumMatch=0.05)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
~CosmicsMuonIdProducer() override
std::vector< edm::InputTag > inputTrackCollections_
auto const & tracks
cannot be loose
MuonCosmicCompatibilityFiller * compatibilityFiller_
edm::InputTag inputMuonCollection_
reco::MuonCosmicCompatibility fillCompatibility(const reco::Muon &muon, edm::Event &, const edm::EventSetup &)
fill cosmic compatibility variables
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::MuonCollection > muonToken_
CosmicsMuonIdProducer(const edm::ParameterSet &iConfig)