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;
272 vector<reco::CandidatePtr>::const_iterator itParticle;
273 for (itParticle=particles.begin();itParticle!=particles.end();++itParticle){
274 if ( itParticle->isNull() || !itParticle->isAvailable() ) {
275 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: PF Particle is invalid\n";
282 chargedHadronEnergy += pfCand->
energy();
283 chargedHadronMultiplicity++;
284 chargedMultiplicity++;
288 neutralHadronEnergy += pfCand->
energy();
289 neutralHadronMultiplicity++;
290 neutralMultiplicity++;
294 photonEnergy += pfCand->
energy();
295 photonMultiplicity++;
296 neutralEmEnergy += pfCand->
energy();
297 neutralMultiplicity++;
301 electronEnergy += pfCand->
energy();
302 electronMultiplicity++;
303 chargedEmEnergy += pfCand->
energy();
304 chargedMultiplicity++;
308 muonEnergy += pfCand->
energy();
310 chargedMuEnergy += pfCand->
energy();
311 chargedMultiplicity++;
315 HFHadronEnergy += pfCand->
energy();
316 HFHadronMultiplicity++;
317 neutralMultiplicity++;
321 HFEMEnergy += pfCand->
energy();
323 neutralEmEnergy += pfCand->
energy();
324 neutralMultiplicity++;
329 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: "
330 <<pfCand->
pdgId()<<
" is ignored\n";
335 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Referred constituent is not "
370 if (0==genJetSpecific)
return false;
372 vector<reco::CandidatePtr>::const_iterator itMcParticle=mcparticles.begin();
373 for (;itMcParticle!=mcparticles.end();++itMcParticle) {
374 if ( itMcParticle->isNull() || !itMcParticle->isAvailable() ) {
375 edm::LogWarning(
"DataNotFound") <<
" JetSpecific: MC Particle is invalid\n";
382 double e = candidate->
energy();
383 switch (
abs (candidate->
pdgId ())) {
407 edm::LogWarning(
"DataNotFound") <<
"reco::makeGenJetSpecific: Referred GenParticleCandidate "
408 <<
"is not available in the event\n";
float mMaxEInEmTowers
Maximum energy in EM towers.
virtual void setCharge(Charge q) GCC11_FINAL
set electric charge
virtual double energy() const =0
energy
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 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.
float mHadEnergyInHF
Hadronic energy in HF.
float m_InvisibleEnergy
Invisible energy (mu, nu, ...)
float mMaxEInHadTowers
Maximum energy in HCAL towers.
int mElectronMultiplicity
virtual int pdgId() const =0
PDG identifier.
CaloTowerDetId id() const
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
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.
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
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