Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPT_TrackJets seed reco and PAT rereco 11_2_x based #30188

35 changes: 22 additions & 13 deletions RecoJets/JetPlusTracks/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<export>
</export>
<library file="*.cc" name="RecoJetsJetPlusTracks_plugins">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please restore this file formatting as it was in 11_2_X before this PR.

<use name="CondFormats/JetMETObjects"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/EgammaCandidates"/>
<use name="DataFormats/JetReco"/>
<use name="DataFormats/Math"/>
<use name="DataFormats/MuonReco"/>
<use name="DataFormats/TrackReco"/>
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/PluginManager"/>
<use name="boost"/>
<flags EDM_PLUGIN="1"/>
<library file="*.cc" name="RecoJetsJetPlusTracks_plugins">
<use name="CondFormats/JetMETObjects"/>
<use name="DataFormats/CaloTowers"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/EgammaReco"/>
<use name="DataFormats/EgammaCandidates"/>
<use name="EgammaAnalysis/ElectronTools"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<use name="EgammaAnalysis/ElectronTools"/>

not used in this PR => should not be needed

<use name="DataFormats/JetReco"/>
<use name="DataFormats/Math"/>
<use name="DataFormats/MuonReco"/>
<use name="DataFormats/Provenance"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<use name="DataFormats/Provenance"/>

newly added, but apparently not used in this PR => can drop

<use name="DataFormats/TrackReco"/>
<use name="DataFormats/VertexReco"/>
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="Geometry/Records"/>
<use name="Geometry/TrackerGeometryBuilder"/>
<use name="RecoEgamma/EgammaTools"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<use name="RecoEgamma/EgammaTools"/>

newly added, but apparently not used in this PR => can drop

<use name="FWCore/PluginManager"/>
<flags EDM_PLUGIN="1"/>
</library>
204 changes: 204 additions & 0 deletions RecoJets/JetPlusTracks/plugins/JetPlusTrackAddonSeedProducer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
// -*- C++ -*-
//
// Package: JetPlusTracks
// Class: JetPlusTrackProducer
//
/**\class JetPlusTrackProducer JetPlusTrackProducer.cc JetPlusTrackProducer.cc
Comment on lines +4 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not match the actual class name; please update


Description: [one line class summary]

Implementation:
[Notes on implementation]
*/
//
// Original Author: Olga Kodolova,40 R-A12,+41227671273,
// Created: Fri Feb 19 10:14:02 CET 2010
//
//

// system include files
#include <memory>

// user include files

#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "RecoJets/JetPlusTracks/plugins/JetPlusTrackAddonSeedProducer.h"
#include "DataFormats/JetReco/interface/CaloJetCollection.h"
#include "DataFormats/JetReco/interface/CaloJet.h"
#include "DataFormats/JetReco/interface/JPTJetCollection.h"
#include "DataFormats/JetReco/interface/JPTJet.h"
#include "DataFormats/JetReco/interface/TrackJetCollection.h"
#include "DataFormats/JetReco/interface/TrackJet.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/JetReco/interface/Jet.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/Math/interface/deltaPhi.h"
#include "DataFormats/Math/interface/deltaR.h"

#include <string>

using namespace std;

//
// constants, enums and typedefs
//

//
// static data member definitions
//

//
// constructors and destructor
//
JetPlusTrackAddonSeedProducer::JetPlusTrackAddonSeedProducer(const edm::ParameterSet& iConfig) {
//register your products
srcCaloJets = iConfig.getParameter<edm::InputTag>("srcCaloJets");
srcTrackJets = iConfig.getParameter<edm::InputTag>("srcTrackJets");
srcPVs_ = iConfig.getParameter<edm::InputTag>("srcPVs");
ptCUT = iConfig.getParameter<double>("ptCUT");
dRcone = iConfig.getParameter<double>("dRcone");
usePAT = iConfig.getParameter<bool>("UsePAT");

produces<reco::CaloJetCollection>("ak4CaloJetsJPTSeed");

input_jets_token_ = consumes<edm::View<reco::CaloJet> >(srcCaloJets);
input_trackjets_token_ = consumes<edm::View<reco::TrackJet> >(srcTrackJets);
input_vertex_token_ = consumes<reco::VertexCollection>(srcPVs_);
tokenPFCandidates_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("PFCandidates"));
input_ctw_token_ = consumes<CaloTowerCollection>(iConfig.getParameter<edm::InputTag>("towerMaker"));
}
Comment on lines +58 to +74
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JetPlusTrackAddonSeedProducer::JetPlusTrackAddonSeedProducer(const edm::ParameterSet& iConfig) {
//register your products
srcCaloJets = iConfig.getParameter<edm::InputTag>("srcCaloJets");
srcTrackJets = iConfig.getParameter<edm::InputTag>("srcTrackJets");
srcPVs_ = iConfig.getParameter<edm::InputTag>("srcPVs");
ptCUT = iConfig.getParameter<double>("ptCUT");
dRcone = iConfig.getParameter<double>("dRcone");
usePAT = iConfig.getParameter<bool>("UsePAT");
produces<reco::CaloJetCollection>("ak4CaloJetsJPTSeed");
input_jets_token_ = consumes<edm::View<reco::CaloJet> >(srcCaloJets);
input_trackjets_token_ = consumes<edm::View<reco::TrackJet> >(srcTrackJets);
input_vertex_token_ = consumes<reco::VertexCollection>(srcPVs_);
tokenPFCandidates_ = consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("PFCandidates"));
input_ctw_token_ = consumes<CaloTowerCollection>(iConfig.getParameter<edm::InputTag>("towerMaker"));
}
JetPlusTrackAddonSeedProducer::JetPlusTrackAddonSeedProducer(const edm::ParameterSet& iConfig) :
dRcone_(iConfig.getParameter<double>("dRcone")),
usePAT_(iConfig.getParameter<bool>("UsePAT")),
input_jets_token_(consumes<edm::View<reco::CaloJet> >(iConfig.getParameter<edm::InputTag>("srcCaloJets"))),
input_trackjets_token_(consumes<edm::View<reco::TrackJet> >(iConfig.getParameter<edm::InputTag>("srcTrackJets"))),
input_vertex_token_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("srcPVs"))),
tokenPFCandidates_(usePAT_ ? consumes<pat::PackedCandidateCollection>(iConfig.getParameter<edm::InputTag>("PFCandidates")) : edm::EDGetTokenT<pat::PackedCandidateCollection>()),
input_ctw_token_(consumes<CaloTowerCollection>(iConfig.getParameter<edm::InputTag>("towerMaker")))
{
//register your products
produces<reco::CaloJetCollection>();
}
  • "produces" has only one collection; there is no need to add the product instance name in this case


JetPlusTrackAddonSeedProducer::~JetPlusTrackAddonSeedProducer() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}
Comment on lines +76 to +79
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JetPlusTrackAddonSeedProducer::~JetPlusTrackAddonSeedProducer() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}

please remove this empty/unnecessary method


//
// member functions
//

// ------------ method called to produce the data ------------
void JetPlusTrackAddonSeedProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
using namespace edm;
// get stuff from Event
edm::Handle<edm::View<reco::CaloJet> > jets_h;
iEvent.getByToken(input_jets_token_, jets_h);
Comment on lines +89 to +90
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edm::Handle<edm::View<reco::CaloJet> > jets_h;
iEvent.getByToken(input_jets_token_, jets_h);
auto const& jets = iEvent.get(input_jets_token_);


edm::Handle<edm::View<reco::TrackJet> > jetsTrackJets;
iEvent.getByToken(input_trackjets_token_, jetsTrackJets);
Comment on lines +92 to +93
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edm::Handle<edm::View<reco::TrackJet> > jetsTrackJets;
iEvent.getByToken(input_trackjets_token_, jetsTrackJets);
auto const& jetsTrackJets = iEvent.get(input_trackjets_token_);


auto pCaloOut = std::make_unique<reco::CaloJetCollection>();

if (jetsTrackJets.isValid()) {
if (!jetsTrackJets->empty()) {
Comment on lines +97 to +98
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (jetsTrackJets.isValid()) {
if (!jetsTrackJets->empty()) {

remove the checks: the reco setup should be configured properly to not need silent skips of unavailable collections.

for (unsigned ijet = 0; ijet < jetsTrackJets->size(); ++ijet) {
const reco::TrackJet* jet = &(*(jetsTrackJets->refAt(ijet)));
Comment on lines +99 to +100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (unsigned ijet = 0; ijet < jetsTrackJets->size(); ++ijet) {
const reco::TrackJet* jet = &(*(jetsTrackJets->refAt(ijet)));
for (auto const& jet : jetsTrackJets) {

then change jet -> with jet.
I'd also switch to a more explicit trackJet here and caloJet below to be more clear which is which instead of relying on some historical precedent that calo is "old"

int iflag = 0;
for (unsigned i = 0; i < jets_h->size(); ++i) {
const reco::CaloJet* oldjet = &(*(jets_h->refAt(i)));
Comment on lines +102 to +103
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (unsigned i = 0; i < jets_h->size(); ++i) {
const reco::CaloJet* oldjet = &(*(jets_h->refAt(i)));
for (auto const& jet : jets) {

then use jet. below

double dr = deltaR(jet->eta(), jet->phi(), oldjet->eta(), oldjet->phi());
if (dr < dRcone)
Comment on lines +104 to +105
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double dr = deltaR(jet->eta(), jet->phi(), oldjet->eta(), oldjet->phi());
if (dr < dRcone)
double dr2 = deltaR2(jet, oldjet);
if (dr2 < dRcone_*dRcone_)

iflag = 1;
} // Calojets

if (iflag == 1)
continue;
double caloen = 0.;
double hadinho = 0.;
double hadinhb = 0.;
double hadinhe = 0.;
double hadinhf = 0.;
double emineb = 0.;
double eminee = 0.;
double eminhf = 0.;
double eefraction = 0.;
double hhfraction = 0.;
int ncand = 0;

if (usePAT) {
edm::Handle<pat::PackedCandidateCollection> pfCandidates;
iEvent.getByToken(tokenPFCandidates_, pfCandidates);
if (!pfCandidates.isValid()) {
return;
} else {
Comment on lines +124 to +128
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edm::Handle<pat::PackedCandidateCollection> pfCandidates;
iEvent.getByToken(tokenPFCandidates_, pfCandidates);
if (!pfCandidates.isValid()) {
return;
} else {
auto const& pfCandidates = iEvent.getByToken(tokenPFCandidates_);
  • configure the module properly so that usePAT_ is set only when packed candidates are supposed to be available
  • return in a producer without iEvent.put is not allowed

for (unsigned int i = 0, n = pfCandidates->size(); i < n; ++i) {
const pat::PackedCandidate& pf = (*pfCandidates)[i];
Comment on lines +129 to +130
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (unsigned int i = 0, n = pfCandidates->size(); i < n; ++i) {
const pat::PackedCandidate& pf = (*pfCandidates)[i];
for (auto const& pf : pfCandidates) {

double dr = deltaR(jet->eta(), jet->phi(), pf.eta(), pf.phi());
if (dr > dRcone)
Comment on lines +131 to +132
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double dr = deltaR(jet->eta(), jet->phi(), pf.eta(), pf.phi());
if (dr > dRcone)
double dr2 = deltaR2(jet, pf);
if (dr2 > dRcone_*dRcone_)

this is faster

continue;
// jetconstit
caloen = caloen + pf.energy() * pf.caloFraction();
hadinho += 0.;
if (fabs(pf.eta()) <= 1.4)
hadinhb += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) < 3. && (fabs(pf.eta()) > 3.) > 1.4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like a bug here

hadinhe += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) >= 3.)
hadinhf += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) <= 1.4)
emineb += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
if (fabs(pf.eta()) < 3. && (fabs(pf.eta()) > 3.) > 1.4)
eminee += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
if (fabs(pf.eta()) >= 3.)
eminhf += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
Comment on lines +137 to +148
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (fabs(pf.eta()) <= 1.4)
hadinhb += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) < 3. && (fabs(pf.eta()) > 3.) > 1.4)
hadinhe += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) >= 3.)
hadinhf += pf.energy() * pf.caloFraction() * pf.hcalFraction();
if (fabs(pf.eta()) <= 1.4)
emineb += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
if (fabs(pf.eta()) < 3. && (fabs(pf.eta()) > 3.) > 1.4)
eminee += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
if (fabs(pf.eta()) >= 3.)
eminhf += pf.energy() * pf.caloFraction() * (1. - pf.hcalFraction());
auto pfCaloEnergy = pf.energy() * pf.caloFraction();
if (std::abs(pf.eta()) <= 1.4) {
hadinhb += pfCaloEnergy * pf.hcalFraction();
emineb += pfCaloEnergy* (1. - pf.hcalFraction());
} else if (std::abs(pf.eta()) < 3.) {
hadinhe += pfCaloEnergy * pf.hcalFraction();
eminee += pfCaloEnergy * (1. - pf.hcalFraction());
} else {
hadinhf += pfCaloEnergy * pf.hcalFraction();
eminhf += pfCaloEnergy * (1. - pf.hcalFraction());
}
  • less verbose
  • fixes the bug in HB selection (in fabs(pf.eta()) < 3. && (fabs(pf.eta()) > 3.) > 1.4 the value after && is always false)

ncand++;
} // Calojet
}
} else {
edm::Handle<CaloTowerCollection> ct;
iEvent.getByToken(input_ctw_token_, ct);
if (ct.isValid()) {
for (CaloTowerCollection::const_iterator it = ct->begin(); it != ct->end(); it++) {
Comment on lines +153 to +156
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edm::Handle<CaloTowerCollection> ct;
iEvent.getByToken(input_ctw_token_, ct);
if (ct.isValid()) {
for (CaloTowerCollection::const_iterator it = ct->begin(); it != ct->end(); it++) {
edm::Handle<CaloTowerCollection> ct;
auto const& cts = iEvent.getByToken(input_ctw_token_);
for (auto const& ct : cts) {

and then replace (*it) below with ct.

double dr = deltaR(jet->eta(), jet->phi(), (*it).eta(), (*it).phi());
if (dr > dRcone)
Comment on lines +157 to +158
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double dr = deltaR(jet->eta(), jet->phi(), (*it).eta(), (*it).phi());
if (dr > dRcone)
auto dr2 = deltaR2(jet, ct);
if (dr2 > dRcone_*dRcone_)

continue;
caloen = caloen + (*it).energy();
hadinho += (*it).energyInHO();
hadinhb += (*it).energyInHB();
hadinhe += (*it).energyInHE();
hadinhf += 0.5 * (*it).energyInHF();
emineb += (*it).energy() - (*it).energyInHB();
eminee += (*it).energy() - (*it).energyInHE();
eminhf += 0.5 * (*it).energyInHF();
ncand++;
}
}
}
eefraction = (emineb + eminee) / caloen;
hhfraction = (hadinhb + hadinhe + hadinhf + hadinho) / caloen;

double trackp = sqrt(pow(jet->pt(), 2) + pow(jet->pz(), 2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
double trackp = sqrt(pow(jet->pt(), 2) + pow(jet->pz(), 2));
double trackp = jet->p();

if (caloen <= 0.)
caloen = 0.001;
math::XYZTLorentzVector pcalo4(
caloen * jet->px() / trackp, caloen * jet->py() / trackp, caloen * jet->pz() / trackp, caloen);
Comment on lines +178 to +179
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this work here:

Suggested change
math::XYZTLorentzVector pcalo4(
caloen * jet->px() / trackp, caloen * jet->py() / trackp, caloen * jet->pz() / trackp, caloen);
math::XYZTLorentzVector pcalo4(jet->p4()*caloen/trackp);

my version changes the mass linearly from the original trackjet by caloen/trackp, but your version makes a pcalo4 with zero mass, which seems odd for jets. Is this zeroing of the mass intended?

reco::CaloJet::Specific calospe;
calospe.mTowersArea = -1 * ncand;
calospe.mHadEnergyInHO = hadinho;
calospe.mHadEnergyInHB = hadinhb;
calospe.mHadEnergyInHE = hadinhe;
calospe.mHadEnergyInHF = hadinhf;
calospe.mEmEnergyInEB = emineb;
calospe.mEmEnergyInEE = eminee;
calospe.mEmEnergyInHF = eminhf;
calospe.mEnergyFractionEm = eefraction / caloen;
calospe.mEnergyFractionHadronic = hhfraction / caloen;

reco::CaloJet mycalo(pcalo4, jet->primaryVertex()->position(), calospe);
mycalo.setJetArea(M_PI * dRcone * dRcone);
pCaloOut->push_back(mycalo);

} // trackjets
} // jets
} // There is trackjet collection

iEvent.put(std::move(pCaloOut), "ak4CaloJetsJPTSeed");
}

//define this as a plug-in
DEFINE_FWK_MODULE(JetPlusTrackAddonSeedProducer);
67 changes: 67 additions & 0 deletions RecoJets/JetPlusTracks/plugins/JetPlusTrackAddonSeedProducer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// -*- C++ -*-
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please merge contents of this file in RecoJets/JetPlusTracks/plugins/JetPlusTrackAddonSeedProducer.cc

//
// Package: JetPlusTracks
// Class: JetPlusTrackProducer
//
/**\class JetPlusTrackProducer JetPlusTrackProducer.cc JetPlusTrackProducer.cc

Description: [one line class summary]

Implementation:
[Notes on implementation]
*/
//
// Original Author: Olga Kodolova,40 R-A12,+41227671273,
// Created: Fri Feb 19 10:14:02 CET 2010
//
//

// system include files
#include <memory>

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/JetReco/interface/CaloJet.h"
#include "DataFormats/JetReco/interface/TrackJet.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/JetReco/interface/TrackExtrapolation.h"
#include "DataFormats/PatCandidates/interface/Electron.h"
#include "DataFormats/PatCandidates/interface/Jet.h"
#include "DataFormats/PatCandidates/interface/PackedCandidate.h"
#include "DataFormats/CaloTowers/interface/CaloTowerCollection.h"
#include "DataFormats/PatCandidates/interface/VIDCutFlowResult.h"
#include "DataFormats/PatCandidates/interface/Muon.h"

#include <string>

//
// class declaration
//

class JetPlusTrackAddonSeedProducer : public edm::stream::EDProducer<> {
public:
explicit JetPlusTrackAddonSeedProducer(const edm::ParameterSet&);
~JetPlusTrackAddonSeedProducer() override;
void produce(edm::Event&, const edm::EventSetup&) override;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new modules should have a fillDescriptions method defined https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideConfigurationValidationAndHelp

// ---------- private data members ---------------------------
private:
edm::InputTag srcCaloJets;
edm::InputTag srcTrackJets;
edm::InputTag srcPVs_;

std::string alias;
double ptCUT;
double dRcone;
bool usePAT;
edm::EDGetTokenT<edm::View<reco::CaloJet> > input_jets_token_;
edm::EDGetTokenT<edm::View<reco::TrackJet> > input_trackjets_token_;
edm::EDGetTokenT<reco::VertexCollection> input_vertex_token_;
edm::EDGetTokenT<std::vector<pat::PackedCandidate> > tokenPFCandidates_;
edm::EDGetTokenT<CaloTowerCollection> input_ctw_token_;
Comment on lines +54 to +66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
edm::InputTag srcCaloJets;
edm::InputTag srcTrackJets;
edm::InputTag srcPVs_;
std::string alias;
double ptCUT;
double dRcone;
bool usePAT;
edm::EDGetTokenT<edm::View<reco::CaloJet> > input_jets_token_;
edm::EDGetTokenT<edm::View<reco::TrackJet> > input_trackjets_token_;
edm::EDGetTokenT<reco::VertexCollection> input_vertex_token_;
edm::EDGetTokenT<std::vector<pat::PackedCandidate> > tokenPFCandidates_;
edm::EDGetTokenT<CaloTowerCollection> input_ctw_token_;
const double dRcone_;
const bool usePAT_;
const edm::EDGetTokenT<edm::View<reco::CaloJet> > input_jets_token_;
const edm::EDGetTokenT<edm::View<reco::TrackJet> > input_trackjets_token_;
const edm::EDGetTokenT<reco::VertexCollection> input_vertex_token_;
const edm::EDGetTokenT<std::vector<pat::PackedCandidate> > tokenPFCandidates_;
const edm::EDGetTokenT<CaloTowerCollection> input_ctw_token_;
  • input tags are not needed with GetTokens available
  • alias is not used
  • ptCUT is not used
  • add trailing underscore to data members

};
Loading