#include <FixedGridEnergyDensity.h>
Definition at line 6 of file FixedGridEnergyDensity.h.
◆ EtaRegion
◆ FixedGridEnergyDensity()
◆ ~FixedGridEnergyDensity()
FixedGridEnergyDensity::~FixedGridEnergyDensity |
( |
| ) |
|
|
inline |
◆ fixedGridRho() [1/2]
◆ fixedGridRho() [2/2]
float FixedGridEnergyDensity::fixedGridRho |
( |
std::vector< float > & |
etabins, |
|
|
std::vector< float > & |
phibins |
|
) |
| |
Definition at line 35 of file FixedGridEnergyDensity.cc.
37 float phidist = phibins[1] - phibins[0];
39 float phihalfdist = (phibins[1] - phibins[0]) / 2.;
40 vector<float> sumPFNallSMDQ;
41 sumPFNallSMDQ.reserve(
etabins.size() * phibins.size());
43 for (
unsigned int iphi = 0;
iphi < phibins.size(); ++
iphi) {
44 float pfniso_ieta_iphi = 0;
46 if (fabs(
etabins[
ieta] - pf_it->eta()) > etahalfdist)
50 pfniso_ieta_iphi += pf_it->pt();
52 sumPFNallSMDQ.push_back(pfniso_ieta_iphi);
56 sort(sumPFNallSMDQ.begin(), sumPFNallSMDQ.end());
57 if (sumPFNallSMDQ.size() % 2)
58 evt_smdq = sumPFNallSMDQ[(sumPFNallSMDQ.size() - 1) / 2];
60 evt_smdq = (sumPFNallSMDQ[sumPFNallSMDQ.size() / 2] + sumPFNallSMDQ[(sumPFNallSMDQ.size() - 2) / 2]) / 2.;
61 return evt_smdq / (etadist * phidist);
References reco::deltaPhi(), defaults_cfi::etabins, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and zmumugammaAnalyzer_cfi::pfCandidates.
◆ pfCandidates