18 template <
typename jetType>
20 : hltLeptonTag(iConfig.getParameter<
edm::
InputTag>(
"HltLeptonTag")),
21 sourceJetTag(iConfig.getParameter<
edm::
InputTag>(
"SourceJetTag")),
22 minDeltaR_(iConfig.getParameter<double>(
"minDeltaR")) {
29 produces<JetCollectionVector>();
32 template <
typename jetType>
38 template <
typename jetType>
43 desc.
add<
double>(
"minDeltaR", 0.5);
53 template <
typename jetType>
69 vector<Ref<reco::RecoEcalCandidateCollection>> clusCands;
72 vector<Ref<reco::ElectronCollection>> eleCands;
78 vector<reco::RecoChargedCandidateRef> muonCands;
84 const JetCollection& theJetCollection = *theJetCollectionHandle;
86 unique_ptr<JetCollectionVector> allSelections(
new JetCollectionVector());
88 if (!clusCands.empty()) {
89 for (
auto& clusCand : clusCands) {
90 JetRefVector refVector;
91 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
92 if (
deltaR(clusCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
93 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
95 allSelections->push_back(refVector);
99 if (!eleCands.empty()) {
100 for (
auto& eleCand : eleCands) {
101 JetRefVector refVector;
102 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
103 if (
deltaR(eleCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
104 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
106 allSelections->push_back(refVector);
110 if (!photonCands.empty()) {
111 for (
auto& photonCand : photonCands) {
112 JetRefVector refVector;
113 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
114 if (
deltaR(photonCand->superCluster()->position(), theJetCollection[
j]) >
minDeltaR_)
115 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
117 allSelections->push_back(refVector);
121 if (!muonCands.empty()) {
122 for (
auto& muonCand : muonCands) {
123 JetRefVector refVector;
124 for (
unsigned int j = 0;
j < theJetCollection.size();
j++) {
126 refVector.push_back(
JetRef(theJetCollectionHandle,
j));
128 allSelections->push_back(refVector);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
std::vector< Jet > JetCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::RefVector< JetBxCollection > JetRefVector
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
~HLTJetCollectionsForLeptonPlusJets() override