|
|
#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 186 of file PuppiContainer.cc.
190 for (
int j0 = 0; j0 <
fNAlgos; j0++) {
191 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
194 bool pCharged =
fPuppiAlgo[j0].isCharged(iOpt);
197 double const pVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
200 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt <<
" -- "
201 << iConstits[i0].eta << endl;
References edm::isFinite(), and LogDebug.
◆ getRMSAvg()
Definition at line 130 of file PuppiContainer.cc.
134 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
137 if (pPupId == -1 ||
fPuppiAlgo[pPupId].numAlgos() <= iOpt) {
143 bool pCharged =
fPuppiAlgo[pPupId].isCharged(iOpt);
144 double pCone =
fPuppiAlgo[pPupId].coneSize(iOpt);
149 bool const getsDefaultWgtIfApplyCHS = iConstits[i0].id == 1
or iConstits[i0].id == 2;
150 if (not((
fApplyCHS and getsDefaultWgtIfApplyCHS)
or iConstits[i0].
id == 3)
or
152 pVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
154 fVals.push_back(pVal);
157 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt <<
" -- " << iConstits[i0].eta
174 curVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
181 for (
int i0 = 0; i0 <
fNAlgos; i0++)
References funct::abs(), PVValHelper::eta, testProducerWithPsetDescEmpty_cfi::i1, edm::isFinite(), LogDebug, or, 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 240 of file PuppiContainer.cc.
246 fVals.reserve(lNParticles);
247 for (
int i0 = 0; i0 <
fNAlgos; i0++)
251 for (
int i0 = 0; i0 <
fNAlgos; i0++)
254 for (
int i0 = 0; i0 < lNMaxAlgo; i0++) {
260 std::vector<double> pVals;
261 pVals.reserve(lNParticles);
262 for (
int i0 = 0; i0 < lNParticles; i0++) {
267 const auto &rParticle = (*fRecoParticles)[i0];
268 int pPupId =
getPuppiId(rParticle.pt, rParticle.eta);
282 if ((
std::abs(rParticle.pdgId) == 22) || (
std::abs(rParticle.pdgId) == 130))
287 for (
int i1 = 0;
i1 < lNAlgos;
i1++)
288 pVals.push_back(
fVals[lNParticles *
i1 + i0]);
290 pWeight =
fPuppiAlgo[pPupId].compute(pVals, pChi2);
297 if (rParticle.id == 3)
302 LogDebug(
"PuppiWeightError") <<
"====> Weight is nan : " << pWeight <<
" : pt " << rParticle.pt
303 <<
" -- eta : " << rParticle.eta <<
" -- Value" <<
fVals[i0]
304 <<
" -- id : " << rParticle.id <<
" -- NAlgos: " << lNAlgos << std::endl;
315 pWeight = std::clamp(
320 pWeight = 1. - pWeight;
References funct::abs(), testProducerWithPsetDescEmpty_cfi::i1, edm::isFinite(), LogDebug, SiStripPI::max, pfDeepBoostedJetPreprocessParams_cfi::median, DiDispStaMuonMonitor_cfi::pt, reset(), and SiStripPI::rms.
◆ 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 |
Definition at line 87 of file PuppiContainer.cc.
94 double const r2 =
R *
R;
121 if ((
var != 0.) and ((iId == 0)
or (iId == 3)
or (iId == 5)))
References funct::abs(), reco::deltaR2(), PuppiCandidate::eta, dqm-mbProfile::log, or, ecalTrigSettings_cff::particles, PuppiCandidate::phi, PuppiCandidate::pt, DiDispStaMuonMonitor_cfi::pt, dttmaxenums::R, diffTwoXMLs::r2, PuppiCandidate::rapidity, and trigObjTnPSource_cfi::var.
◆ fAlphaMed
std::vector<double> PuppiContainer::fAlphaMed |
|
protected |
◆ fAlphaRMS
std::vector<double> PuppiContainer::fAlphaRMS |
|
protected |
◆ fApplyCHS
bool PuppiContainer::fApplyCHS |
|
protected |
◆ 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
◆ fPFParticlesForVar
◆ fPFParticlesForVarChargedPV
std::vector<PuppiCandidate> PuppiContainer::fPFParticlesForVarChargedPV |
|
protected |
◆ 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 |
◆ 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
std::vector< PuppiCandidate > fPFParticlesForVarChargedPV
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< 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
std::vector< PuppiCandidate > fPFParticlesForVar
std::vector< PuppiCandidate > fPFParticles
double fPtMaxNeutralsStartSlope
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
T getParameter(std::string const &) const
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)