44 std::vector<reco::CandidatePtr>
const & constituents,
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,
136 if (0==caloJetSpecific)
return false;
141 vector<double> eECal_i;
142 vector<double> eHCal_i;
148 double eHadInHF = 0.;
154 vector<reco::CandidatePtr>::const_iterator itTower;
155 for (itTower=towers.begin();itTower!=towers.end();++itTower) {
156 if ( itTower->isNull() || !itTower->isAvailable() ) {
163 eECal_i.push_back(tower->
emEnergy());
190 float dEta = fabs(geometry->
getCorners()[0].eta()-
194 jetArea += dEta *
dPhi;
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++;
287 case PFCandidate::h0 :
288 neutralHadronEnergy += pfCand->
energy();
289 neutralHadronMultiplicity++;
290 neutralMultiplicity++;
293 case PFCandidate::gamma:
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++;
314 case PFCandidate::h_HF :
315 HFHadronEnergy += pfCand->
energy();
316 HFHadronMultiplicity++;
317 neutralMultiplicity++;
320 case PFCandidate::egamma_HF :
321 HFEMEnergy += pfCand->
energy();
323 neutralEmEnergy += pfCand->
energy();
324 neutralMultiplicity++;
329 edm::LogWarning(
"DataNotFound") <<
"reco::makePFJetSpecific: Unknown PFCandidate::ParticleType: "
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";
380 const GenParticle* genParticle = GenJet::genParticle(candidate);
382 double e = genParticle->
energy();
383 switch (
abs (genParticle->
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 int pdgId() const
PDG identifier.
ParticleType
particle types
Jets made from CaloTowers.
float mEmEnergyInHF
Em energy in HF.
float mEnergyFractionHadronic
Hadronic energy fraction.
virtual void setCharge(Charge q)
set electric charge
float mEmEnergyInEB
Em energy in EB.
bool makeSpecific(std::vector< reco::CandidatePtr > const &towers, const CaloSubdetectorGeometry &towerGeometry, reco::CaloJet::Specific *caloJetSpecific)
Make CaloJet specifics. Assumes PseudoJet is made from CaloTowerCandidates.
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
energy
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.
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.
HcalSubdetector hcalSubdetector(int iEta)
converts eta to the corresponding HCAL subdetector.
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