24 if (!fJetSpecific)
return false;
29 vector<double> eECal_i;
30 vector<double> eHCal_i;
42 for (JetReco::InputCollection::const_iterator towerCand = fTowers.begin(); towerCand != fTowers.end(); ++towerCand) {
48 eECal_i.push_back(tower->
emEnergy());
73 if ( tower->
energy() > 0 ) {
78 jetArea += dEta *
dPhi;
82 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Geometry for cell " << tower->
id() <<
" can not be found. Ignoring cell" << std::endl;
86 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Constituent is not of CaloTower type" << std::endl;
90 std::cerr <<
"JetMaker::makeSpecific (CaloJet)-> Referred constituent is not available in the event" << std::endl;
93 double towerEnergy = eInHad + eInEm;
101 if (towerEnergy > 0) {
114 sort(eECal_i.begin(), eECal_i.end(), greater<double>());
115 sort(eHCal_i.begin(), eHCal_i.end(), greater<double>());
117 if (!fTowers.empty ()) {
129 if (!fJetSpecific)
return false;
135 float chargedHadronEnergy=0.;
136 float neutralHadronEnergy=0.;
137 float chargedEmEnergy=0.;
138 float neutralEmEnergy=0.;
139 float chargedMuEnergy=0.;
140 int chargedMultiplicity=0;
141 int neutralMultiplicity=0;
142 int muonMultiplicity=0;
144 JetReco::InputCollection::const_iterator constituent = fPFCandidates.begin();
145 for (; constituent != fPFCandidates.end(); ++constituent) {
152 chargedHadronEnergy += pfCand->
energy();
153 chargedMultiplicity++;
157 chargedEmEnergy += pfCand->
energy();
158 chargedMultiplicity++;
162 chargedMuEnergy += pfCand->
energy();
163 chargedMultiplicity++;
167 case PFCandidate::gamma:
168 case PFCandidate::egamma_HF :
169 neutralEmEnergy += pfCand->
energy();
170 neutralMultiplicity++;
173 case PFCandidate::h0 :
174 case PFCandidate::h_HF :
175 neutralHadronEnergy += pfCand->
energy();
176 neutralMultiplicity++;
180 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Unknown PFCandidate::ParticleType: " << pfCand->
particleId() <<
" is ignored" << std::endl;
185 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Referred constituent is not PFCandidate" << std::endl;
189 std::cerr <<
"JetMaker::makeSpecific (PFJetJet)-> Referred constituent is not available in the event" << std::endl;
206 for (JetReco::InputCollection::const_iterator genCand = fMcParticles.begin(); genCand != fMcParticles.end(); ++genCand) {
210 const GenParticle* genParticle = GenJet::genParticle (candidate);
212 double e = genParticle->
energy();
237 std::cerr <<
"JetMaker::makeSpecific (GenJet)-> Referred GenParticleCandidate is not available in the event" << std::endl;
241 std::cerr <<
"JetMaker::makeSpecific (GenJet)-> Referred constituent is not available in the event" << std::endl;
float mMaxEInEmTowers
Maximum energy in EM towers.
virtual int pdgId() const
PDG identifier.
ParticleType
particle types
float mEmEnergyInHF
Em energy in HF.
float mEnergyFractionHadronic
Hadronic energy fraction.
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 double energy() const
energy
virtual bool hasMasterClone() const =0
double dPhi(double phi1, double phi2)
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