44 std::vector<reco::CandidatePtr>
const & constituents,
58 makeSpecific (constituents, *towerGeometry, &specific, *topology);
69 std::vector<reco::CandidatePtr>
const & constituents,
79 std::vector<reco::CandidatePtr>
const & constituents,
94 std::vector<reco::CandidatePtr>
const & constituents,
102 for ( std::vector<reco::CandidatePtr>::const_iterator ic = constituents.begin(),
103 icend = constituents.end();
104 ic != icend; ++ic ) {
105 charge += (*ic)->charge();
107 jet =
reco::PFJet( p4, point, specific, constituents);
116 std::vector<reco::CandidatePtr>
const & constituents,
126 std::vector<reco::CandidatePtr>
const & constituents,
140 if (0==caloJetSpecific)
return false;
145 vector<double> eECal_i;
146 vector<double> eHCal_i;
152 double eHadInHF = 0.;
158 vector<reco::CandidatePtr>::const_iterator itTower;
159 for (itTower=towers.begin();itTower!=towers.end();++itTower) {
160 if ( itTower->isNull() || !itTower->isAvailable() ) {
167 eECal_i.push_back(tower->
emEnergy());
197 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell " 198 <<tower->
id()<<
" can not be found. Ignoring cell\n";
202 edm::LogWarning(
"DataNotFound")<<
"reco::makeCaloJetSpecific: Constituent is not of " 203 <<
"CaloTower type\n";
207 double towerEnergy = eInHad + eInEm;
215 if (towerEnergy > 0) {
228 sort(eECal_i.begin(), eECal_i.end(), greater<double>());
229 sort(eHCal_i.begin(), eHCal_i.end(), greater<double>());
231 if (!towers.empty()) {
245 if (0==pfJetSpecific)
return false;
251 float chargedHadronEnergy=0.;
252 float neutralHadronEnergy=0.;
253 float photonEnergy=0.;
254 float electronEnergy=0.;
256 float HFHadronEnergy=0.;
263 int HFHadronMultiplicity=0;
264 int HFEMMultiplicity=0;
266 float chargedEmEnergy=0.;
267 float neutralEmEnergy=0.;
268 float chargedMuEnergy=0.;
269 int chargedMultiplicity=0;
270 int neutralMultiplicity=0;
274 vector<reco::CandidatePtr>::const_iterator itParticle;
275 for (itParticle=particles.begin();itParticle!=particles.end();++itParticle){
276 if ( itParticle->isNull() || !itParticle->isAvailable() ) {
277 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
289 chargedHadronEnergy += pfCand->
energy();
290 chargedHadronMultiplicity++;
291 chargedMultiplicity++;
295 neutralHadronEnergy += pfCand->
energy();
296 neutralHadronMultiplicity++;
297 neutralMultiplicity++;
301 photonEnergy += pfCand->
energy();
302 photonMultiplicity++;
303 neutralEmEnergy += pfCand->
energy();
304 neutralMultiplicity++;
308 electronEnergy += pfCand->
energy();
309 electronMultiplicity++;
310 chargedEmEnergy += pfCand->
energy();
311 chargedMultiplicity++;
315 muonEnergy += pfCand->
energy();
317 chargedMuEnergy += pfCand->
energy();
318 chargedMultiplicity++;
322 HFHadronEnergy += pfCand->
energy();
323 HFHadronMultiplicity++;
324 neutralHadronEnergy += pfCand->
energy();
325 neutralMultiplicity++;
329 HFEMEnergy += pfCand->
energy();
331 neutralEmEnergy += pfCand->
energy();
332 neutralMultiplicity++;
337 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: " 338 <<pfCand->
pdgId()<<
" is ignored\n";
343 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not " 380 if (0==genJetSpecific)
return false;
382 vector<reco::CandidatePtr>::const_iterator itMcParticle=mcparticles.begin();
383 for (;itMcParticle!=mcparticles.end();++itMcParticle) {
384 if ( itMcParticle->isNull() || !itMcParticle->isAvailable() ) {
385 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
392 double e = candidate->
energy();
393 switch (
abs (candidate->
pdgId ())) {
417 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate " 418 <<
"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 mEmEnergyInEB
Em energy in EB.
HcalSubdetector hcalSubdetector(int iEta, const HcalTopology &topology)
converts eta to the corresponding HCAL subdetector.
float mNeutralHadronEnergy
float mHadEnergyInHB
Hadronic energy in HB.
Jets made from CaloTowers.
Jets made from PFObjects.
float mChargedHadronEnergy
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
virtual double energy() const =0
energy
Jets made out of PFClusters.
static const int SubdetId
virtual int pdgId() const =0
PDG identifier.
int mChargedHadronMultiplicity
virtual void setCharge(Charge q) final
set electric charge
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.
float mHadEnergyInHF
Hadronic energy in HF.
float m_InvisibleEnergy
Invisible energy (mu, nu, ...)
float mMaxEInHadTowers
Maximum energy in HCAL towers.
int mElectronMultiplicity
double hoEnergy() const
return corrected Hcal energy
CaloTowerDetId id() const
virtual const CandidateBaseRef & masterClone() const =0
int mNeutralHadronMultiplicity
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.
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_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
float m_EmEnergy
Energy of EM particles.
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)