37 std::vector<reco::CandidatePtr>
const& constituents,
50 makeSpecific(constituents, towerGeometry, &specific, *topology);
59 std::vector<reco::CandidatePtr>
const& constituents,
68 std::vector<reco::CandidatePtr>
const& constituents,
81 std::vector<reco::CandidatePtr>
const& constituents,
88 for (std::vector<reco::CandidatePtr>::const_iterator ic = constituents.begin(), icend = constituents.end();
91 charge += (*ic)->charge();
93 jet =
reco::PFJet(p4, point, specific, constituents);
101 std::vector<reco::CandidatePtr>
const& constituents,
110 std::vector<reco::CandidatePtr>
const& constituents,
120 if (
nullptr == caloJetSpecific)
126 std::vector<double> eECal_i;
127 std::vector<double> eHCal_i;
133 double eHadInHF = 0.;
139 std::vector<reco::CandidatePtr>::const_iterator itTower;
140 for (itTower = towers.begin(); itTower != towers.end(); ++itTower) {
141 if (itTower->isNull() || !itTower->isAvailable()) {
148 eECal_i.push_back(tower->
emEnergy());
177 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell " << tower->
id()
178 <<
" can not be found. Ignoring cell\n";
181 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Constituent is not of " 182 <<
"CaloTower type\n";
186 double towerEnergy = eInHad + eInEm;
194 if (towerEnergy > 0) {
206 sort(eECal_i.begin(), eECal_i.end(), std::greater<double>());
207 sort(eHCal_i.begin(), eHCal_i.end(), std::greater<double>());
209 if (!towers.empty()) {
220 if (
nullptr == pfJetSpecific)
227 float chargedHadronEnergy = 0.;
228 float neutralHadronEnergy = 0.;
230 float electronEnergy = 0.;
231 float muonEnergy = 0.;
232 float HFHadronEnergy = 0.;
233 float HFEMEnergy = 0.;
239 int HFHadronMultiplicity = 0;
240 int HFEMMultiplicity = 0;
242 float chargedEmEnergy = 0.;
243 float neutralEmEnergy = 0.;
244 float chargedMuEnergy = 0.;
245 int chargedMultiplicity = 0;
246 int neutralMultiplicity = 0;
250 std::vector<reco::CandidatePtr>::const_iterator itParticle;
251 for (itParticle = particles.begin(); itParticle != particles.end(); ++itParticle) {
252 if (itParticle->isNull() || !itParticle->isAvailable()) {
253 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
264 chargedHadronEnergy += pfCand->
energy();
265 chargedHadronMultiplicity++;
266 chargedMultiplicity++;
270 neutralHadronEnergy += pfCand->
energy();
271 neutralHadronMultiplicity++;
272 neutralMultiplicity++;
276 photonEnergy += pfCand->
energy();
277 photonMultiplicity++;
278 neutralEmEnergy += pfCand->
energy();
279 neutralMultiplicity++;
283 electronEnergy += pfCand->
energy();
284 electronMultiplicity++;
285 chargedEmEnergy += pfCand->
energy();
286 chargedMultiplicity++;
290 muonEnergy += pfCand->
energy();
292 chargedMuEnergy += pfCand->
energy();
293 chargedMultiplicity++;
297 HFHadronEnergy += pfCand->
energy();
298 HFHadronMultiplicity++;
299 neutralHadronEnergy += pfCand->
energy();
300 neutralMultiplicity++;
304 HFEMEnergy += pfCand->
energy();
306 neutralEmEnergy += pfCand->
energy();
307 neutralMultiplicity++;
312 <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: " << pfCand->
pdgId() <<
" is ignored\n";
316 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not " 317 <<
"a PFCandidate\n";
350 if (
nullptr == genJetSpecific)
353 std::vector<reco::CandidatePtr>::const_iterator itMcParticle = mcparticles.begin();
354 for (; itMcParticle != mcparticles.end(); ++itMcParticle) {
355 if (itMcParticle->isNull() || !itMcParticle->isAvailable()) {
356 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
366 double e = candidate->
energy();
427 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate " 428 <<
"is not available in the event\n";
float mMaxEInEmTowers
Maximum energy in EM towers.
value_type const * get() const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Jets made from CaloTowers.
float mEmEnergyInHF
Em energy in HF.
CaloTopology const * topology(0)
float mEnergyFractionHadronic
Hadronic energy fraction.
float m_NeutralHadronEnergy
K0, etc.
float mEmEnergyInEB
Em energy in EB.
HcalSubdetector hcalSubdetector(int iEta, const HcalTopology &topology)
converts eta to the corresponding HCAL subdetector.
int m_ChargedEmMultiplicity
float mNeutralHadronEnergy
float mHadEnergyInHB
Hadronic energy in HB.
Jets made from CaloTowers.
float m_ChargedEmEnergy
Electrons.
Jets made from PFObjects.
float mChargedHadronEnergy
int m_NeutralEmMultiplicity
void setCharge(Charge q) final
set electric charge
virtual double energy() const =0
energy
Jets made out of PFClusters.
static const int SubdetId
virtual int pdgId() const =0
PDG identifier.
int mChargedHadronMultiplicity
math::XYZPoint Point
point in the space
Abs< T >::type abs(const T &t)
Jets made from MC generator particles.
float mEnergyFractionEm
Em energy fraction.
int m_ChargedHadronMultiplicity
Corresponding multiplicities:
float mHadEnergyInHF
Hadronic energy in HF.
float m_InvisibleEnergy
Invisible energy (mu, nu, ...)
float mMaxEInHadTowers
Maximum energy in HCAL towers.
int mElectronMultiplicity
float m_ChargedHadronEnergy
double hoEnergy() const
return corrected Hcal energy
CaloTowerDetId id() const
virtual const CandidateBaseRef & masterClone() const =0
int mNeutralHadronMultiplicity
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
float m_AuxiliaryEnergy
Anything else (undecayed Sigmas etc.)
float mHadEnergyInHO
Hadronic nergy fraction in HO.
ESHandle< TrackerGeometry > geometry
Particle reconstructed by the particle flow algorithm.
float m_NeutralEmEnergy
Photons.
bool makeSpecific(std::vector< reco::CandidatePtr > const &towers, const CaloSubdetectorGeometry *towerGeometry, reco::CaloJet::Specific *caloJetSpecific, const HcalTopology &topology)
Make CaloJet specifics. Assumes PseudoJet is made from CaloTowerCandidates.
int m_NeutralHadronMultiplicity
float m_HadEnergy
Energy of Hadrons.
T get() const
get a component
float mTowersArea
Area of contributing CaloTowers.
int ieta() const
get the tower ieta
int mHFHadronMultiplicity
math::XYZTLorentzVector LorentzVector
Lorentz vector.
float mEmEnergyInEE
Em energy in EE.
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
double outerEnergy() const
float mHadEnergyInHE
Hadronic energy in HE.
virtual bool hasMasterClone() const =0
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, edm::EventSetup const &c)