|
|
#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 185 of file PuppiContainer.cc.
189 for (
int j0 = 0; j0 <
fNAlgos; j0++) {
190 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
193 bool pCharged =
fPuppiAlgo[j0].isCharged(iOpt);
196 double const pVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
199 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt <<
" -- "
200 << iConstits[i0].eta << endl;
References edm::isFinite(), and LogDebug.
◆ getRMSAvg()
Definition at line 129 of file PuppiContainer.cc.
133 for (
unsigned int i0 = 0; i0 < iConstits.size(); i0++) {
136 if (pPupId == -1 ||
fPuppiAlgo[pPupId].numAlgos() <= iOpt) {
142 bool pCharged =
fPuppiAlgo[pPupId].isCharged(iOpt);
143 double pCone =
fPuppiAlgo[pPupId].coneSize(iOpt);
148 bool const getsDefaultWgtIfApplyCHS = iConstits[i0].id == 1
or iConstits[i0].id == 2;
149 if (not((
fApplyCHS and getsDefaultWgtIfApplyCHS)
or iConstits[i0].
id == 3)
or
151 pVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
153 fVals.push_back(pVal);
156 LogDebug(
"NotFound") <<
"====> Value is Nan " << pVal <<
" == " << iConstits[i0].pt <<
" -- " << iConstits[i0].eta
173 curVal =
goodVar(iConstits[i0], pCharged ? iChargedParticles : iParticles, pAlgo, pCone);
180 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 | ) |
|
Definition at line 32 of file PuppiContainer.cc.
49 fastjet::PseudoJet curPseudoJet;
51 curPseudoJet.reset_PtYPhiM(rParticle.pt, rParticle.rapidity, rParticle.phi, rParticle.m);
53 curPseudoJet.reset_PtYPhiM(0, 99., 0, 0);
56 pCand.
pt = curPseudoJet.pt();
57 pCand.
eta = curPseudoJet.eta();
59 pCand.
phi = curPseudoJet.phi();
60 pCand.
m = curPseudoJet.m();
61 pCand.
id = rParticle.id;
References funct::abs(), PuppiCandidate::eta, PuppiCandidate::id, edm::isFinite(), PuppiCandidate::m, PuppiCandidate::phi, PuppiCandidate::pt, and PuppiCandidate::rapidity.
◆ 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 239 of file PuppiContainer.cc.
245 fVals.reserve(lNParticles);
246 for (
int i0 = 0; i0 <
fNAlgos; i0++)
250 for (
int i0 = 0; i0 <
fNAlgos; i0++)
253 for (
int i0 = 0; i0 < lNMaxAlgo; i0++) {
259 std::vector<double> pVals;
260 pVals.reserve(lNParticles);
261 for (
int i0 = 0; i0 < lNParticles; i0++) {
266 const auto &rParticle = (*fRecoParticles)[i0];
267 int pPupId =
getPuppiId(rParticle.pt, rParticle.eta);
281 if ((
std::abs(rParticle.pdgId) == 22) || (
std::abs(rParticle.pdgId) == 130))
286 for (
int i1 = 0;
i1 < lNAlgos;
i1++)
287 pVals.push_back(
fVals[lNParticles *
i1 + i0]);
289 pWeight =
fPuppiAlgo[pPupId].compute(pVals, pChi2);
296 if (rParticle.id == 3)
301 LogDebug(
"PuppiWeightError") <<
"====> Weight is nan : " << pWeight <<
" : pt " << rParticle.pt
302 <<
" -- eta : " << rParticle.eta <<
" -- Value" <<
fVals[i0]
303 <<
" -- id : " << rParticle.id <<
" -- NAlgos: " << lNAlgos << std::endl;
314 pWeight = std::clamp(
319 pWeight = 1. - pWeight;
References funct::abs(), testProducerWithPsetDescEmpty_cfi::i1, edm::isFinite(), LogDebug, SiStripPI::max, pfParticleNetPreprocessParams_cfi::median, DiDispStaMuonMonitor_cfi::pt, reset(), and SiStripPI::rms.
◆ setPUProxy()
void PuppiContainer::setPUProxy |
( |
double const |
iPUProxy | ) |
|
|
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 86 of file PuppiContainer.cc.
93 double const r2 =
R *
R;
120 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 |
◆ 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 |
◆ fPUProxy
double PuppiContainer::fPUProxy |
|
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
T getParameter(std::string const &) const
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
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)