17 template <
typename jetType>
19 : hltLeptonTag(iConfig.getParameter<
edm::
InputTag>(
"HltLeptonTag")),
20 sourceJetTag(iConfig.getParameter<
edm::
InputTag>(
"SourceJetTag")),
22 minDeltaR2_(iConfig.getParameter<double>(
"minDeltaR") *
std::
abs(iConfig.getParameter<double>(
"minDeltaR"))) {
29 produces<JetCollectionVector>();
32 template <
typename jetType>
37 desc.add<
double>(
"minDeltaR", 0.5);
47 template <
typename jetType>
63 vector<Ref<reco::RecoEcalCandidateCollection>> clusCands;
66 vector<Ref<reco::ElectronCollection>> eleCands;
72 vector<reco::RecoChargedCandidateRef> muonCands;
78 const JetCollection& theJetCollection = *theJetCollectionHandle;
80 unique_ptr<JetCollectionVector> allSelections(
new JetCollectionVector());
82 if (!clusCands.empty()) {
83 for (
auto const& clusCand : clusCands) {
85 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
87 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
89 allSelections->push_back(refVector);
93 if (!eleCands.empty()) {
94 for (
auto const& eleCand : eleCands) {
96 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
98 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
100 allSelections->push_back(refVector);
104 if (!photonCands.empty()) {
105 for (
auto const& photonCand : photonCands) {
107 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
109 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
111 allSelections->push_back(refVector);
115 if (!muonCands.empty()) {
116 for (
auto const& muonCand : muonCands) {
118 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
120 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
122 allSelections->push_back(refVector);
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< Jet > JetCollection
edm::Ref< JetBxCollection > JetRef
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_theLeptonToken
std::string defaultModuleLabel()
edm::InputTag hltLeptonTag
void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag sourceJetTag
Abs< T >::type abs(const T &t)
edm::RefVector< JetBxCollection > JetRefVector
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
HLTJetCollectionsForLeptonPlusJets(const edm::ParameterSet &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< std::vector< jetType > > m_theJetToken
std::vector< reco::RecoEcalCandidateRef > VRphoton