#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 36 of file FixedGridEnergyDensity.cc.
38 float phidist = phibins[1] - phibins[0];
40 float phihalfdist = (phibins[1] - phibins[0]) / 2.;
41 vector<float> sumPFNallSMDQ;
42 sumPFNallSMDQ.reserve(
etabins.size() * phibins.size());
44 for (
unsigned int iphi = 0;
iphi < phibins.size(); ++
iphi) {
45 float pfniso_ieta_iphi = 0;
47 if (fabs(
etabins[
ieta] - pf_it->eta()) > etahalfdist)
51 pfniso_ieta_iphi += pf_it->pt();
53 sumPFNallSMDQ.push_back(pfniso_ieta_iphi);
57 sort(sumPFNallSMDQ.begin(), sumPFNallSMDQ.end());
58 if (sumPFNallSMDQ.size() % 2)
59 evt_smdq = sumPFNallSMDQ[(sumPFNallSMDQ.size() - 1) / 2];
61 evt_smdq = (sumPFNallSMDQ[sumPFNallSMDQ.size() / 2] + sumPFNallSMDQ[(sumPFNallSMDQ.size() - 2) / 2]) / 2.;
62 return evt_smdq / (etadist * phidist);
References reco::deltaPhi(), defaults_cfi::etabins, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, and zmumugammaAnalyzer_cfi::pfCandidates.
◆ pfCandidates