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());
194 float dEta = fabs(geometry->
getCorners()[0].eta()-
198 jetArea += dEta *
dPhi;
201 edm::LogWarning(
"DataNotFound") <<
"reco::makeCaloJetSpecific: Geometry for cell "
202 <<tower->
id()<<
" can not be found. Ignoring cell\n";
206 edm::LogWarning(
"DataNotFound")<<
"reco::makeCaloJetSpecific: Constituent is not of "
207 <<
"CaloTower type\n";
211 double towerEnergy = eInHad + eInEm;
219 if (towerEnergy > 0) {
232 sort(eECal_i.begin(), eECal_i.end(), greater<double>());
233 sort(eHCal_i.begin(), eHCal_i.end(), greater<double>());
235 if (!towers.empty()) {
249 if (0==pfJetSpecific)
return false;
255 float chargedHadronEnergy=0.;
256 float neutralHadronEnergy=0.;
257 float photonEnergy=0.;
258 float electronEnergy=0.;
260 float HFHadronEnergy=0.;
262 int chargedHadronMultiplicity=0;
263 int neutralHadronMultiplicity=0;
264 int photonMultiplicity=0;
265 int electronMultiplicity=0;
266 int muonMultiplicity=0;
267 int HFHadronMultiplicity=0;
268 int HFEMMultiplicity=0;
270 float chargedEmEnergy=0.;
271 float neutralEmEnergy=0.;
272 float chargedMuEnergy=0.;
273 int chargedMultiplicity=0;
274 int neutralMultiplicity=0;
276 vector<reco::CandidatePtr>::const_iterator itParticle;
277 for (itParticle=particles.begin();itParticle!=particles.end();++itParticle){
278 if ( itParticle->isNull() || !itParticle->isAvailable() ) {
279 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
286 chargedHadronEnergy += pfCand->
energy();
287 chargedHadronMultiplicity++;
288 chargedMultiplicity++;
291 case PFCandidate::h0 :
292 neutralHadronEnergy += pfCand->
energy();
293 neutralHadronMultiplicity++;
294 neutralMultiplicity++;
297 case PFCandidate::gamma:
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++;
318 case PFCandidate::h_HF :
319 HFHadronEnergy += pfCand->
energy();
320 HFHadronMultiplicity++;
321 neutralMultiplicity++;
324 case PFCandidate::egamma_HF :
325 HFEMEnergy += pfCand->
energy();
327 neutralEmEnergy += pfCand->
energy();
328 neutralMultiplicity++;
333 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: "
339 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not "
374 if (0==genJetSpecific)
return false;
376 vector<reco::CandidatePtr>::const_iterator itMcParticle=mcparticles.begin();
377 for (;itMcParticle!=mcparticles.end();++itMcParticle) {
378 if ( itMcParticle->isNull() || !itMcParticle->isAvailable() ) {
379 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
384 const GenParticle* genParticle = GenJet::genParticle(candidate);
386 double e = genParticle->
energy();
387 switch (
abs (genParticle->
pdgId ())) {
411 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate "
412 <<
"is not available in the event\n";
float mMaxEInEmTowers
Maximum energy in EM towers.
virtual double energy() const GCC11_FINAL
energy
virtual void setCharge(Charge q) GCC11_FINAL
set electric charge
ParticleType
particle types
Jets made from CaloTowers.
float mEmEnergyInHF
Em energy in HF.
float mEnergyFractionHadronic
Hadronic energy fraction.
virtual int pdgId() const GCC11_FINAL
PDG identifier.
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 bool hasMasterClone() const =0
Jets made out of PFClusters.
double dPhi(double phi1, double phi2)
static const int SubdetId
int mChargedHadronMultiplicity
math::XYZPoint Point
point in the space
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
CaloTowerDetId id() const
int mNeutralHadronMultiplicity
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
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
virtual ParticleType particleId() const
int mHFHadronMultiplicity
float m_EmEnergy
Energy of EM particles.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
value_type const * get() const
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
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell's volume.
float mHadEnergyInHE
Hadronic energy in HE.
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)
virtual const CandidateBaseRef & masterClone() const =0