41 std::vector<reco::CandidatePtr>
const & constituents,
55 makeSpecific (constituents, towerGeometry, &specific, *topology);
66 std::vector<reco::CandidatePtr>
const & constituents,
76 std::vector<reco::CandidatePtr>
const & constituents,
91 std::vector<reco::CandidatePtr>
const & constituents,
99 for ( std::vector<reco::CandidatePtr>::const_iterator ic = constituents.begin(),
100 icend = constituents.end();
101 ic != icend; ++ic ) {
102 charge += (*ic)->charge();
104 jet =
reco::PFJet( p4, point, specific, constituents);
113 std::vector<reco::CandidatePtr>
const & constituents,
123 std::vector<reco::CandidatePtr>
const & constituents,
137 if (
nullptr==caloJetSpecific)
return false;
142 std::vector<double> eECal_i;
143 std::vector<double> eHCal_i;
149 double eHadInHF = 0.;
155 std::vector<reco::CandidatePtr>::const_iterator itTower;
156 for (itTower=towers.begin();itTower!=towers.end();++itTower) {
157 if ( itTower->isNull() || !itTower->isAvailable() ) {
164 eECal_i.push_back(tower->
emEnergy());
194 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell " 195 <<tower->
id()<<
" can not be found. Ignoring cell\n";
199 edm::LogWarning(
"DataNotFound")<<
"reco::makeCaloJetSpecific: Constituent is not of " 200 <<
"CaloTower type\n";
204 double towerEnergy = eInHad + eInEm;
212 if (towerEnergy > 0) {
225 sort(eECal_i.begin(), eECal_i.end(), std::greater<double>());
226 sort(eHCal_i.begin(), eHCal_i.end(), std::greater<double>());
228 if (!towers.empty()) {
242 if (
nullptr==pfJetSpecific)
return false;
248 float chargedHadronEnergy=0.;
249 float neutralHadronEnergy=0.;
250 float photonEnergy=0.;
251 float electronEnergy=0.;
253 float HFHadronEnergy=0.;
260 int HFHadronMultiplicity=0;
261 int HFEMMultiplicity=0;
263 float chargedEmEnergy=0.;
264 float neutralEmEnergy=0.;
265 float chargedMuEnergy=0.;
266 int chargedMultiplicity=0;
267 int neutralMultiplicity=0;
271 std::vector<reco::CandidatePtr>::const_iterator itParticle;
272 for (itParticle=particles.begin();itParticle!=particles.end();++itParticle){
273 if ( itParticle->isNull() || !itParticle->isAvailable() ) {
274 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
286 chargedHadronEnergy += pfCand->
energy();
287 chargedHadronMultiplicity++;
288 chargedMultiplicity++;
292 neutralHadronEnergy += pfCand->
energy();
293 neutralHadronMultiplicity++;
294 neutralMultiplicity++;
298 photonEnergy += pfCand->
energy();
299 photonMultiplicity++;
300 neutralEmEnergy += pfCand->
energy();
301 neutralMultiplicity++;
305 electronEnergy += pfCand->
energy();
306 electronMultiplicity++;
307 chargedEmEnergy += pfCand->
energy();
308 chargedMultiplicity++;
312 muonEnergy += pfCand->
energy();
314 chargedMuEnergy += pfCand->
energy();
315 chargedMultiplicity++;
319 HFHadronEnergy += pfCand->
energy();
320 HFHadronMultiplicity++;
321 neutralHadronEnergy += pfCand->
energy();
322 neutralMultiplicity++;
326 HFEMEnergy += pfCand->
energy();
328 neutralEmEnergy += pfCand->
energy();
329 neutralMultiplicity++;
334 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: " 335 <<pfCand->
pdgId()<<
" is ignored\n";
340 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not " 377 if (
nullptr==genJetSpecific)
return false;
379 std::vector<reco::CandidatePtr>::const_iterator itMcParticle=mcparticles.begin();
380 for (;itMcParticle!=mcparticles.end();++itMcParticle) {
381 if ( itMcParticle->isNull() || !itMcParticle->isAvailable() ) {
382 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
393 double e = candidate->
energy();
453 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate " 454 <<
"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)