23 jetsInput_ = iConfig.template getParameter<edm::InputTag>(
"jetsInput");
24 L1TauJets_ = iConfig.template getParameter<edm::InputTag>(
"L1TauJets");
25 L1CenJets_ = iConfig.template getParameter<edm::InputTag>(
"L1CenJets");
26 L1ForJets_ = iConfig.template getParameter<edm::InputTag>(
"L1ForJets");
27 DeltaR_ = iConfig.template getParameter<double>(
"DeltaR");
29 typedef std::vector<T> TCollection;
30 produces<TCollection> ();
53 desc.
add<
double>(
"DeltaR",0.5);
61 typedef std::vector<T> TCollection;
66 std::auto_ptr<TCollection>
result (
new TCollection);
78 typename TCollection::const_iterator jet_iter;
79 for (jet_iter = jets->begin(); jet_iter != jets->end(); ++jet_iter) {
84 for (
unsigned int jetc=0;jetc<l1TauJets->size();++jetc)
86 const double deltaeta=jet_iter->eta()-(*l1TauJets)[jetc].eta();
87 const double deltaphi=
deltaPhi(jet_iter->phi(),(*l1TauJets)[jetc].phi());
89 if (
sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=
true;
92 for (
unsigned int jetc=0;jetc<l1CenJets->size();++jetc)
94 const double deltaeta=jet_iter->eta()-(*l1CenJets)[jetc].eta();
95 const double deltaphi=
deltaPhi(jet_iter->phi(),(*l1CenJets)[jetc].phi());
96 if (
sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=
true;
99 for (
unsigned int jetc=0;jetc<l1ForJets->size();++jetc)
101 const double deltaeta=jet_iter->eta()-(*l1ForJets)[jetc].eta();
102 const double deltaphi=
deltaPhi(jet_iter->phi(),(*l1ForJets)[jetc].phi());
103 if (
sqrt(deltaeta*deltaeta+deltaphi*deltaphi) < DeltaR_) isMatched=
true;
107 if (isMatched==
true) result->push_back(*jet_iter);
virtual void produce(edm::Event &, const edm::EventSetup &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HLTJetL1MatchProducer(const edm::ParameterSet &)
bool isMatched(TrackingRecHit const &hit)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)