Description: [one line class summary]
Implementation: [Notes on implementation]
Definition at line 26 of file HiFJRhoProducer.h.
Definition at line 78 of file HiFJRhoProducer.cc.
References custom_jme_cff::area, calcMd(), calcMedian(), MillePedeFileConverter_cfg::e, PVValHelper::eta, ALCARECOTkAlBeamHalo_cff::etaMax, etaMaxExcl2_, etaMaxExcl_, ALCARECOTkAlBeamHalo_cff::etaMin, etaRanges, edm::Event::getByToken(), mps_fire::i, LEDCalibrationChannels::ieta, createfilelist::int, metsig::jet, singleTopDQM_cfi::jets, jetsToken_, eostools::move(), nExcl2_, nExcl_, BTaggingMonitoring_cff::njets, DiDispStaMuonMonitor_cfi::pt, ptMinExcl2_, ptMinExcl_, edm::Event::put(), and CosmicsPD_Skims::radius.
84 auto mapEtaRangesOut = std::make_unique<std::vector<double>>(neta, -999.);
89 auto mapToRhoOut = std::make_unique<std::vector<double>>(neta - 1, 1
e-6);
90 auto mapToRhoMOut = std::make_unique<std::vector<double>>(neta - 1, 1
e-6);
92 int njets = jets->size();
94 auto ptJetsOut = std::make_unique<std::vector<double>>(
njets, 1
e-6);
95 auto areaJetsOut = std::make_unique<std::vector<double>>(
njets, 1
e-6);
96 auto etaJetsOut = std::make_unique<std::vector<double>>(
njets, 1
e-6);
104 unsigned int njetsEx = 0;
105 unsigned int njetsEx2 = 0;
106 for (
auto jet = jets->begin();
jet != jets->end(); ++
jet) {
116 float pt =
jet->pt();
120 if (eta < mapEtaRangesOut->at(0) || eta > mapEtaRangesOut->at(neta - 1))
123 rhoVec[nacc] = pt /
area;
126 ptJetsOut->at(nacc) =
pt;
127 areaJetsOut->at(nacc) =
area;
128 etaJetsOut->at(nacc) =
eta;
133 ptJetsOut->resize(nacc);
134 areaJetsOut->resize(nacc);
135 etaJetsOut->resize(nacc);
139 std::vector<double> rhoVecCur;
140 std::vector<double> rhomVecCur;
146 double rhoCurSum = 0.;
147 double rhomCurSum = 0.;
148 for (
int i = 0;
i < nacc;
i++) {
149 if (etaVec[
i] >= etaMin && etaVec[
i] < etaMax) {
150 rhoVecCur.push_back(rhoVec[
i]);
151 rhomVecCur.push_back(rhomVec[i]);
153 rhoCurSum += rhoVec[
i];
154 rhomCurSum += rhomVec[
i];
162 mapToRhoOut->at(
ieta) = rhoCur;
163 mapToRhoMOut->at(
ieta) = rhomCur;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
double calcMedian(std::vector< double > &v)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > etaRanges
double calcMd(const reco::Jet *jet)
edm::EDGetTokenT< edm::View< reco::Jet > > jetsToken_