|
|
#include <PuppiContainer.h>
|
double | getChi2FromdZ (double iDZ) |
|
int | getPuppiId (float iPt, float iEta) |
|
void | getRawAlphas (int iOpt, std::vector< PuppiCandidate > const &iConstits, std::vector< PuppiCandidate > const &iParticles, std::vector< PuppiCandidate > const &iChargeParticles) |
|
void | getRMSAvg (int iOpt, std::vector< PuppiCandidate > const &iConstits, std::vector< PuppiCandidate > const &iParticles, std::vector< PuppiCandidate > const &iChargeParticles) |
|
double | goodVar (PuppiCandidate const &iPart, std::vector< PuppiCandidate > const &iParts, int iOpt, const double iRCone) |
|
double | var_within_R (int iId, const std::vector< PuppiCandidate > &particles, const PuppiCandidate ¢re, const double R) |
|
Definition at line 8 of file PuppiContainer.h.
◆ PuppiContainer()
◆ ~PuppiContainer()
PuppiContainer::~PuppiContainer |
( |
| ) |
|
◆ getChi2FromdZ()
double PuppiContainer::getChi2FromdZ |
( |
double |
iDZ | ) |
|
|
protected |
◆ getPuppiId()
int PuppiContainer::getPuppiId |
( |
float |
iPt, |
|
|
float |
iEta |
|
) |
| |
|
protected |
◆ getRawAlphas()
Definition at line 188 of file PuppiContainer.cc.
192 for (
int j0 = 0; j0 <
fNAlgos; j0++) {
193 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
197 bool pCharged =
fPuppiAlgo[j0].isCharged(iOpt);
201 pVal =
goodVar(iConstits[i0], iParticles, pAlgo, pCone);
203 pVal =
goodVar(iConstits[i0], iChargedParticles, pAlgo, pCone);
206 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt() <<
" -- "
207 << iConstits[i0].eta() << endl;
References edm::isFinite(), and LogDebug.
◆ getRMSAvg()
Definition at line 136 of file PuppiContainer.cc.
140 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
144 if (pPupId == -1 ||
fPuppiAlgo[pPupId].numAlgos() <= iOpt) {
150 bool pCharged =
fPuppiAlgo[pPupId].isCharged(iOpt);
151 double pCone =
fPuppiAlgo[pPupId].coneSize(iOpt);
154 pVal =
goodVar(iConstits[i0], iParticles, pAlgo, pCone);
156 pVal =
goodVar(iConstits[i0], iChargedParticles, pAlgo, pCone);
157 fVals.push_back(pVal);
160 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt() <<
" -- "
161 << iConstits[i0].eta() << endl;
174 curVal =
goodVar(iConstits[i0], iParticles, pAlgo, pCone);
176 curVal =
goodVar(iConstits[i0], iChargedParticles, pAlgo, pCone);
184 for (
int i0 = 0; i0 <
fNAlgos; i0++)
References PVValHelper::eta, testProducerWithPsetDescEmpty_cfi::i1, edm::isFinite(), LogDebug, and DiDispStaMuonMonitor_cfi::pt.
◆ goodVar()
double PuppiContainer::goodVar |
( |
PuppiCandidate const & |
iPart, |
|
|
std::vector< PuppiCandidate > const & |
iParts, |
|
|
int |
iOpt, |
|
|
const double |
iRCone |
|
) |
| |
|
protected |
◆ initialize()
void PuppiContainer::initialize |
( |
const std::vector< RecoObj > & |
iRecoObjects | ) |
|
◆ pfParticles()
const std::vector<PuppiCandidate>& PuppiContainer::pfParticles |
( |
| ) |
const |
|
inline |
◆ puppiAlphas()
const std::vector<double>& PuppiContainer::puppiAlphas |
( |
| ) |
|
|
inline |
◆ puppiAlphasMed()
const std::vector<double>& PuppiContainer::puppiAlphasMed |
( |
| ) |
|
|
inline |
◆ puppiAlphasRMS()
const std::vector<double>& PuppiContainer::puppiAlphasRMS |
( |
| ) |
|
|
inline |
◆ puppiNAlgos()
int PuppiContainer::puppiNAlgos |
( |
| ) |
|
|
inline |
◆ puppiRawAlphas()
const std::vector<double>& PuppiContainer::puppiRawAlphas |
( |
| ) |
|
|
inline |
◆ puppiWeights()
const std::vector< double > & PuppiContainer::puppiWeights |
( |
| ) |
|
Definition at line 245 of file PuppiContainer.cc.
251 fVals.reserve(lNParticles);
252 for (
int i0 = 0; i0 <
fNAlgos; i0++)
256 for (
int i0 = 0; i0 <
fNAlgos; i0++)
259 for (
int i0 = 0; i0 < lNMaxAlgo; i0++) {
265 std::vector<double> pVals;
266 pVals.reserve(lNParticles);
267 for (
int i0 = 0; i0 < lNParticles; i0++) {
272 const auto &rParticle = (*fRecoParticles)[i0];
273 int pPupId =
getPuppiId(rParticle.pt, rParticle.eta);
287 if ((
std::abs(rParticle.pdgId) == 22) || (
std::abs(rParticle.pdgId) == 130))
292 for (
int i1 = 0;
i1 < lNAlgos;
i1++)
293 pVals.push_back(
fVals[lNParticles *
i1 + i0]);
295 pWeight =
fPuppiAlgo[pPupId].compute(pVals, pChi2);
302 if (rParticle.id == 3)
307 LogDebug(
"PuppiWeightError") <<
"====> Weight is nan : " << pWeight <<
" : pt " << rParticle.pt
308 <<
" -- eta : " << rParticle.eta <<
" -- Value" <<
fVals[i0]
309 <<
" -- id : " << rParticle.id <<
" -- NAlgos: " << lNAlgos << std::endl;
327 pWeight = 1. - pWeight;
References funct::abs(), testProducerWithPsetDescEmpty_cfi::i1, edm::isFinite(), LogDebug, SiStripPI::max, pfParticleNetPreprocessParams_cfi::median, DiDispStaMuonMonitor_cfi::pt, reset(), and SiStripPI::rms.
◆ pvParticles()
const std::vector<PuppiCandidate>& PuppiContainer::pvParticles |
( |
| ) |
const |
|
inline |
◆ setNPV()
void PuppiContainer::setNPV |
( |
int |
iNPV | ) |
|
|
inline |
◆ var_within_R()
double PuppiContainer::var_within_R |
( |
int |
iId, |
|
|
const std::vector< PuppiCandidate > & |
particles, |
|
|
const PuppiCandidate & |
centre, |
|
|
const double |
R |
|
) |
| |
|
protected |
◆ fAlphaMed
std::vector<double> PuppiContainer::fAlphaMed |
|
protected |
◆ fAlphaRMS
std::vector<double> PuppiContainer::fAlphaRMS |
|
protected |
◆ fApplyCHS
bool PuppiContainer::fApplyCHS |
|
protected |
◆ fChargedPV
◆ fEtaMaxPhotons
double PuppiContainer::fEtaMaxPhotons |
|
protected |
◆ fInvert
bool PuppiContainer::fInvert |
|
protected |
◆ fNAlgos
int PuppiContainer::fNAlgos |
|
protected |
◆ fNeutralMinPt
double PuppiContainer::fNeutralMinPt |
|
protected |
◆ fNeutralSlope
double PuppiContainer::fNeutralSlope |
|
protected |
◆ fNPV
◆ fPFParticles
◆ fPtMaxNeutrals
double PuppiContainer::fPtMaxNeutrals |
|
protected |
◆ fPtMaxNeutralsStartSlope
double PuppiContainer::fPtMaxNeutralsStartSlope |
|
protected |
◆ fPtMaxPhotons
double PuppiContainer::fPtMaxPhotons |
|
protected |
◆ fPuppiAlgo
std::vector<PuppiAlgo> PuppiContainer::fPuppiAlgo |
|
protected |
◆ fPuppiDiagnostics
bool PuppiContainer::fPuppiDiagnostics |
|
protected |
◆ fPuppiWeightCut
double PuppiContainer::fPuppiWeightCut |
|
protected |
◆ fPVFrac
double PuppiContainer::fPVFrac |
|
protected |
◆ fRawAlphas
std::vector<double> PuppiContainer::fRawAlphas |
|
protected |
◆ fRecoParticles
const std::vector<RecoObj>* PuppiContainer::fRecoParticles |
|
protected |
◆ fUseExp
bool PuppiContainer::fUseExp |
|
protected |
◆ fVals
std::vector<double> PuppiContainer::fVals |
|
protected |
◆ fWeights
std::vector<double> PuppiContainer::fWeights |
|
protected |
double getChi2FromdZ(double iDZ)
const std::vector< RecoObj > * fRecoParticles
std::vector< double > fRawAlphas
int getPuppiId(float iPt, float iEta)
double goodVar(PuppiCandidate const &iPart, std::vector< PuppiCandidate > const &iParts, int iOpt, const double iRCone)
std::vector< double > fVals
std::vector< PuppiCandidate > fChargedPV
std::vector< PuppiAlgo > fPuppiAlgo
void getRawAlphas(int iOpt, std::vector< PuppiCandidate > const &iConstits, std::vector< PuppiCandidate > const &iParticles, std::vector< PuppiCandidate > const &iChargeParticles)
double var_within_R(int iId, const std::vector< PuppiCandidate > &particles, const PuppiCandidate ¢re, const double R)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
std::vector< double > fAlphaRMS
std::vector< double > fAlphaMed
T getParameter(std::string const &) const
std::vector< PuppiCandidate > fPFParticles
void set_info(int puppi_register)
double fPtMaxNeutralsStartSlope
std::vector< double > fWeights
void getRMSAvg(int iOpt, std::vector< PuppiCandidate > const &iConstits, std::vector< PuppiCandidate > const &iParticles, std::vector< PuppiCandidate > const &iChargeParticles)
void reset(double vett[256])
Abs< T >::type abs(const T &t)
constexpr bool isFinite(T x)