35 std::vector<reco::CandidatePtr>
const& constituents,
42 makeSpecific(constituents, towerGeometry, &specific, topology);
51 std::vector<reco::CandidatePtr>
const& constituents) {
59 std::vector<reco::CandidatePtr>
const& constituents) {
71 std::vector<reco::CandidatePtr>
const& constituents,
78 for (std::vector<reco::CandidatePtr>::const_iterator ic = constituents.begin(), icend = constituents.end();
81 float weight = (weights !=
nullptr) ? (*weights)[*ic] : 1.0;
82 charge += (*ic)->charge() *
weight;
84 jet =
reco::PFJet(p4, point, specific, constituents);
92 std::vector<reco::CandidatePtr>
const& constituents) {
100 std::vector<reco::CandidatePtr>
const& constituents) {
109 if (
nullptr == caloJetSpecific)
115 std::vector<double> eECal_i;
116 std::vector<double> eHCal_i;
122 double eHadInHF = 0.;
128 std::vector<reco::CandidatePtr>::const_iterator itTower;
129 for (itTower = towers.begin(); itTower != towers.end(); ++itTower) {
130 if (itTower->isNull() || !itTower->isAvailable()) {
137 eECal_i.push_back(tower->
emEnergy());
166 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell " << tower->
id()
167 <<
" can not be found. Ignoring cell\n";
170 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Constituent is not of "
171 <<
"CaloTower type\n";
175 double towerEnergy = eInHad + eInEm;
183 if (towerEnergy > 0) {
195 sort(eECal_i.begin(), eECal_i.end(), std::greater<double>());
196 sort(eHCal_i.begin(), eHCal_i.end(), std::greater<double>());
198 if (!towers.empty()) {
211 if (
nullptr == pfJetSpecific)
218 float chargedHadronEnergy = 0.;
219 float neutralHadronEnergy = 0.;
220 float photonEnergy = 0.;
221 float electronEnergy = 0.;
222 float muonEnergy = 0.;
223 float HFHadronEnergy = 0.;
224 float HFEMEnergy = 0.;
230 float HFHadronMultiplicity = 0;
231 float HFEMMultiplicity = 0;
233 float chargedEmEnergy = 0.;
234 float neutralEmEnergy = 0.;
235 float chargedMuEnergy = 0.;
236 float chargedMultiplicity = 0;
237 float neutralMultiplicity = 0;
241 std::vector<reco::CandidatePtr>::const_iterator itParticle;
242 for (itParticle = particles.begin(); itParticle != particles.end(); ++itParticle) {
243 if (itParticle->isNull() || !itParticle->isAvailable()) {
244 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
250 float weight = (weights !=
nullptr) ? (*weights)[*itParticle] : 1.0;
257 chargedHadronMultiplicity +=
weight;
258 chargedMultiplicity +=
weight;
263 neutralHadronMultiplicity +=
weight;
264 neutralMultiplicity +=
weight;
269 photonMultiplicity +=
weight;
271 neutralMultiplicity +=
weight;
276 electronMultiplicity +=
weight;
278 chargedMultiplicity +=
weight;
283 muonMultiplicity +=
weight;
285 chargedMultiplicity +=
weight;
290 HFHadronMultiplicity +=
weight;
292 neutralMultiplicity +=
weight;
297 HFEMMultiplicity +=
weight;
299 neutralMultiplicity +=
weight;
304 <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: " << pfCand->
pdgId() <<
" is ignored\n";
308 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not "
309 <<
"a PFCandidate\n";
342 if (
nullptr == genJetSpecific)
345 std::vector<reco::CandidatePtr>::const_iterator itMcParticle = mcparticles.begin();
346 for (; itMcParticle != mcparticles.end(); ++itMcParticle) {
347 if (itMcParticle->isNull() || !itMcParticle->isAvailable()) {
348 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
358 double e = candidate->
energy();
419 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate "
420 <<
"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
virtual double energy() const =0
energy
Jets made from CaloTowers.
float mEmEnergyInHF
Em energy in HF.
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
void writeSpecific(reco::CaloJet &jet, reco::Particle::LorentzVector const &p4, reco::Particle::Point const &point, std::vector< reco::CandidatePtr > const &constituents, CaloGeometry const &geometry, HcalTopology const &topology)
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 bool hasMasterClone() const =0
Jets made out of PFClusters.
static const int SubdetId
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
virtual int pdgId() const =0
PDG identifier.
double hoEnergy() const
return corrected Hcal energy
CaloTowerDetId id() const
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.
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
Log< level::Warning, false > LogWarning
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 const CandidateBaseRef & masterClone() const =0