28 produces<edm::ValueMap<unsigned int> >().setBranchAlias(
"cosmicsVeto");
29 produces<edm::ValueMap<reco::MuonCosmicCompatibility> >().setBranchAlias(
"cosmicCompatibility");
46 std::vector<edm::EDGetTokenT<reco::TrackCollection> >
trackTokens_;
58 std::vector<unsigned int>
values;
59 values.reserve(muons->size());
61 std::vector<reco::MuonCosmicCompatibility> compValues;
62 compValues.reserve(muons->size());
64 for(reco::MuonCollection::const_iterator
muon = muons->begin();
67 unsigned int foundPartner(0);
68 if (
muon->innerTrack().isNonnull() ){
79 values.push_back(foundPartner);
87 filler.
insert(muons, values.begin(), values.end());
93 fillerC.
insert(muons, compValues.begin(), compValues.end());
virtual void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
std::vector< edm::EDGetTokenT< reco::TrackCollection > > trackTokens_
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)
void insert(const H &h, I begin, I end)
std::vector< edm::InputTag > inputTrackCollections_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
MuonCosmicCompatibilityFiller * compatibilityFiller_
edm::InputTag inputMuonCollection_
virtual ~CosmicsMuonIdProducer()
reco::MuonCosmicCompatibility fillCompatibility(const reco::Muon &muon, edm::Event &, const edm::EventSetup &)
fill cosmic compatibility variables
edm::EDGetTokenT< reco::MuonCollection > muonToken_
CosmicsMuonIdProducer(const edm::ParameterSet &iConfig)