28 produces<edm::ValueMap<unsigned int>>().setBranchAlias(
"cosmicsVeto");
29 produces<edm::ValueMap<reco::MuonCosmicCompatibility>>().setBranchAlias(
"cosmicCompatibility");
54 std::vector<unsigned int>
values;
57 std::vector<reco::MuonCosmicCompatibility> compValues;
58 compValues.reserve(
muons->size());
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>>();
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_
T getParameter(std::string const &) const
reco::TrackRef findOppositeTrack(const edm::Handle< reco::TrackCollection > &collection, const reco::Track &muon, double angleMatch=0.01, double momentumMatch=0.05)
~CosmicsMuonIdProducer() override
std::vector< edm::InputTag > inputTrackCollections_
MuonCosmicCompatibilityFiller * compatibilityFiller_
edm::InputTag inputMuonCollection_
#define DEFINE_FWK_MODULE(type)
reco::MuonCosmicCompatibility fillCompatibility(const reco::Muon &muon, edm::Event &, const edm::EventSetup &)
fill cosmic compatibility variables
auto const & tracks
cannot be loose
edm::EDGetTokenT< reco::MuonCollection > muonToken_
CosmicsMuonIdProducer(const edm::ParameterSet &iConfig)