65 : dRcone_(iConfig.getParameter<double>(
"dRcone")),
66 usePAT_(iConfig.getParameter<
bool>(
"UsePAT")),
68 input_trackjets_token_(consumes<
edm::
View<
reco::TrackJet> >(iConfig.getParameter<
edm::
InputTag>(
"srcTrackJets"))),
73 produces<reco::CaloJetCollection>();
78 desc.add<
double>(
"dRcone", 0.4);
79 desc.add<
bool>(
"UsePAT",
false);
94 auto pCaloOut = std::make_unique<reco::CaloJetCollection>();
96 for (
auto const&
jet : jetsTrackJets) {
98 for (
auto const& oldjet :
jets) {
115 double eefraction = 0.;
116 double hhfraction = 0.;
126 caloen = caloen +
pf.energy() *
pf.caloFraction();
129 hadinhb +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
130 emineb +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
132 hadinhe +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
133 eminee +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
135 hadinhf +=
pf.energy() *
pf.caloFraction() *
pf.hcalFraction();
136 eminhf +=
pf.energy() *
pf.caloFraction() * (1. -
pf.hcalFraction());
142 for (
auto const& ct : cts) {
146 caloen = caloen + ct.energy();
147 hadinho += ct.energyInHO();
148 hadinhb += ct.energyInHB();
149 hadinhe += ct.energyInHE();
150 hadinhf += 0.5 * ct.energyInHF();
151 emineb += ct.energy() - ct.energyInHB() - ct.energyInHO();
152 eminee += ct.energy() - ct.energyInHE();
153 eminhf += 0.5 * ct.energyInHF();
157 eefraction = (emineb + eminee) / caloen;
158 hhfraction = (hadinhb + hadinhe + hadinhf + hadinho) / caloen;
160 double trackp =
jet.p();
166 calospe.mHadEnergyInHO = hadinho;
167 calospe.mHadEnergyInHB = hadinhb;
168 calospe.mHadEnergyInHE = hadinhe;
169 calospe.mHadEnergyInHF = hadinhf;
170 calospe.mEmEnergyInEB = emineb;
171 calospe.mEmEnergyInEE = eminee;
172 calospe.mEmEnergyInHF = eminhf;
173 calospe.mEnergyFractionEm = eefraction / caloen;
174 calospe.mEnergyFractionHadronic = hhfraction / caloen;
178 pCaloOut->push_back(mycalo);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Jets made from CaloTowers.
#define DEFINE_FWK_MODULE(type)
std::vector< pat::PackedCandidate > PackedCandidateCollection
JetPlusTrackAddonSeedProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< Vertex > VertexCollection
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual void setJetArea(float fArea)
set jet area
const edm::EDGetTokenT< reco::VertexCollection > input_vertex_token_
const edm::EDGetTokenT< edm::View< reco::CaloJet > > input_jets_token_
Abs< T >::type abs(const T &t)
const edm::EDGetTokenT< CaloTowerCollection > input_ctw_token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< std::vector< pat::PackedCandidate > > tokenPFCandidates_
const edm::EDGetTokenT< edm::View< reco::TrackJet > > input_trackjets_token_
float mTowersArea
Area of contributing CaloTowers.