72 template<
typename Hand,
typename T>
75 const std::vector<T> &
values,
91 writeExtraInfo_(iConfig.existsAs<bool>(
"writeExtraInfo") ? iConfig.getParameter<bool>(
"writeExtraInfo") :
false)
93 produces<PATPrimitiveCollection>(
"propagatedReco");
94 produces<PATTriggerAssociation>(
"propagatedReco");
95 produces<PATTriggerAssociation>();
97 produces<edm::ValueMap<float> >(
"deltaR");
98 produces<edm::ValueMap<float> >(
"deltaPhi");
114 vector<int> propMatches(reco->size(), -1);
115 vector<int> fullMatches(reco->size(), -1);
116 vector<float> deltaRs(reco->size(), 999), deltaPhis(reco->size(), 999);
118 for (
int i = 0,
n = reco->size();
i <
n; ++
i) {
124 propMatches[
i] = propOut->size();
127 propOut->back().setCharge(mu.
charge());
140 propFiller.
insert(reco, propMatches.begin(), propMatches.end());
146 fullFiller.
insert(reco, fullMatches.begin(), fullMatches.end());
156 template<
typename Hand,
typename T>
160 const std::vector<T> &
values,
162 using namespace edm;
using namespace std;
163 unique_ptr<ValueMap<T> > valMap(
new ValueMap<T>());
165 filler.
insert(handle, values.begin(), values.end());
void init(const edm::EventSetup &iSetup)
Call this method at the beginning of each run, to initialize geometry, magnetic field and propagators...
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Geom::Phi< T > phi() const
void insert(const H &h, I begin, I end)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
GlobalPoint globalPosition() const
L1MuonMatcherAlgo matcher_
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< const pat::TriggerObjectStandAlone * > lockedItems_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::View< reco::Candidate > > recoToken_
Tokens for input collections.
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
pat::TriggerObjectStandAlone PATPrimitive
pat::TriggerObjectStandAloneCollection PATPrimitiveCollection
bool writeExtraInfo_
Write out additional info as ValueMaps.
void storeExtraInfo(edm::Event &iEvent, const Hand &handle, const std::vector< T > &values, const std::string &label) const
Store extra information in a ValueMap.
virtual ~HLTL1MuonMatcher()
virtual double pt() const =0
transverse momentum
virtual double mass() const =0
mass
virtual void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup) override
pat::PATTriggerMatchSelector< bool, PATPrimitive > selector_
int matchGeneric(const reco::Track &tk, const Collection &l1, const Selector &sel, float &deltaR, float &deltaPhi, TrajectoryStateOnSurface &propagated) const
virtual int charge() const =0
electric charge
HLTL1MuonMatcher(const edm::ParameterSet &iConfig)
Matcher of reconstructed objects to L1 Muons.
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::string labelProp_
Labels to set as filter names in the output.
bool operator()(const pat::TriggerObjectStandAlone &l1) const
select L1s with patName_ and filterLabel_ (public, so it can be used by L1MuonMatcherAlgo) ...
edm::EDGetTokenT< PATPrimitiveCollection > l1Token_
pat::TriggerObjectStandAloneMatch PATTriggerAssociation
Analysis-level trigger object class (stand-alone)