23 if (!fJetSpecific)
return false;
28 vector<double> eECal_i;
29 vector<double> eHCal_i;
41 for (JetReco::InputCollection::const_iterator towerCand = fTowers.begin(); towerCand != fTowers.end(); ++towerCand) {
47 eECal_i.push_back(tower->
emEnergy());
72 if ( tower->
energy() > 0 ) {
77 jetArea += dEta *
dPhi;
81 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Geometry for cell " << tower->
id() <<
" can not be found. Ignoring cell" << std::endl;
85 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Constituent is not of CaloTower type" << std::endl;
89 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Referred constituent is not available in the event" << std::endl;
92 double towerEnergy = eInHad + eInEm;
100 if (towerEnergy > 0) {
113 sort(eECal_i.begin(), eECal_i.end(), greater<double>());
114 sort(eHCal_i.begin(), eHCal_i.end(), greater<double>());
116 if (!fTowers.empty ()) {
128 if (!fJetSpecific)
return false;
134 float chargedHadronEnergy=0.;
135 float neutralHadronEnergy=0.;
136 float chargedEmEnergy=0.;
137 float neutralEmEnergy=0.;
138 float chargedMuEnergy=0.;
139 int chargedMultiplicity=0;
140 int neutralMultiplicity=0;
143 JetReco::InputCollection::const_iterator constituent = fPFCandidates.begin();
144 for (; constituent != fPFCandidates.end(); ++constituent) {
151 chargedHadronEnergy += pfCand->
energy();
152 chargedMultiplicity++;
156 chargedEmEnergy += pfCand->
energy();
157 chargedMultiplicity++;
161 chargedMuEnergy += pfCand->
energy();
162 chargedMultiplicity++;
166 case PFCandidate::gamma:
167 case PFCandidate::egamma_HF :
168 neutralEmEnergy += pfCand->
energy();
169 neutralMultiplicity++;
172 case PFCandidate::h0 :
173 case PFCandidate::h_HF :
174 neutralHadronEnergy += pfCand->
energy();
175 neutralMultiplicity++;
179 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Unknown PFCandidate::ParticleType: " << pfCand->
particleId() <<
" is ignored" << std::endl;
184 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Referred constituent is not PFCandidate" << std::endl;
188 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Referred constituent is not available in the event" << std::endl;
205 for (JetReco::InputCollection::const_iterator genCand = fMcParticles.begin(); genCand != fMcParticles.end(); ++genCand) {
209 const GenParticle* genParticle = GenJet::genParticle (candidate);
211 double e = genParticle->
energy();
236 std::cerr <<
"JetMaker::makeSpecific (GenJet)-> Referred GenParticleCandidate is not available in the event" << std::endl;
240 std::cerr <<
"JetMaker::makeSpecific (GenJet)-> Referred constituent is not available in the event" << std::endl;
float mMaxEInEmTowers
Maximum energy in EM towers.
virtual double energy() const GCC11_FINAL
energy
ParticleType
particle types
float mEmEnergyInHF
Em energy in HF.
float mEnergyFractionHadronic
Hadronic energy fraction.
virtual int pdgId() const GCC11_FINAL
PDG identifier.
std::vector< InputItem > InputCollection
float mEmEnergyInEB
Em energy in EB.
HcalSubdetector hcalSubdetector(int fEta)
converts eta to the corresponding HCAL subdetector.
float mNeutralHadronEnergy
float mHadEnergyInHB
Hadronic energy in HB.
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
double dPhi(double phi1, double phi2)
Abs< T >::type abs(const T &t)
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.
bool makeSpecific(const JetReco::InputCollection &fConstituents, const CaloSubdetectorGeometry &fTowerGeometry, reco::CaloJet::Specific *fJetSpecific)
Make CaloJet specifics. Assumes ProtoJet is made from CaloTowerCandidates.
CaloTowerDetId id() const
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.
int ieta() const
get the tower ieta
virtual ParticleType particleId() const
float m_EmEnergy
Energy of EM particles.
value_type const * get() const
float mEmEnergyInEE
Em energy in EE.
double outerEnergy() const
virtual const CornersVec & getCorners() const =0
Returns the corner points of this cell's volume.
float mHadEnergyInHE
Hadronic energy in HE.
virtual const CandidateBaseRef & masterClone() const =0