File indexing completed on 2023-03-17 10:45:23
0001 #ifndef COMMONTOOLS_PUPPI_PUPPICONTAINER_H_
0002 #define COMMONTOOLS_PUPPI_PUPPICONTAINER_H_
0003
0004 #include "CommonTools/PileupAlgos/interface/PuppiAlgo.h"
0005 #include "CommonTools/PileupAlgos/interface/PuppiCandidate.h"
0006 #include "CommonTools/PileupAlgos/interface/RecoObj.h"
0007
0008 class PuppiContainer {
0009 public:
0010 PuppiContainer(const edm::ParameterSet &iConfig);
0011 ~PuppiContainer();
0012 void initialize(const std::vector<RecoObj> &iRecoObjects);
0013 void setPUProxy(double const iPUProxy) { fPUProxy = iPUProxy; }
0014
0015 std::vector<PuppiCandidate> const &pfParticles() const { return fPFParticles; }
0016 std::vector<double> const &puppiWeights();
0017 const std::vector<double> &puppiRawAlphas() { return fRawAlphas; }
0018 const std::vector<double> &puppiAlphas() { return fVals; }
0019
0020 const std::vector<double> &puppiAlphasMed() { return fAlphaMed; }
0021 const std::vector<double> &puppiAlphasRMS() { return fAlphaRMS; }
0022
0023 int puppiNAlgos() { return fNAlgos; }
0024
0025 protected:
0026 double goodVar(PuppiCandidate const &iPart, std::vector<PuppiCandidate> const &iParts, int iOpt, const double iRCone);
0027 void getRMSAvg(int iOpt,
0028 std::vector<PuppiCandidate> const &iConstits,
0029 std::vector<PuppiCandidate> const &iParticles,
0030 std::vector<PuppiCandidate> const &iChargeParticles);
0031 void getRawAlphas(int iOpt,
0032 std::vector<PuppiCandidate> const &iConstits,
0033 std::vector<PuppiCandidate> const &iParticles,
0034 std::vector<PuppiCandidate> const &iChargeParticles);
0035 double getChi2FromdZ(double iDZ);
0036 int getPuppiId(float iPt, float iEta);
0037 double var_within_R(int iId,
0038 const std::vector<PuppiCandidate> &particles,
0039 const PuppiCandidate ¢re,
0040 const double R);
0041
0042 bool fPuppiDiagnostics;
0043 const std::vector<RecoObj> *fRecoParticles;
0044 std::vector<PuppiCandidate> fPFParticles;
0045 std::vector<PuppiCandidate> fPFParticlesForVar;
0046 std::vector<PuppiCandidate> fPFParticlesForVarChargedPV;
0047 std::vector<double> fWeights;
0048 std::vector<double> fVals;
0049 std::vector<double> fRawAlphas;
0050 std::vector<double> fAlphaMed;
0051 std::vector<double> fAlphaRMS;
0052
0053 bool fApplyCHS;
0054 bool fInvert;
0055 bool fUseExp;
0056 double fNeutralMinPt;
0057 double fNeutralSlope;
0058 double fPuppiWeightCut;
0059 double fPtMaxPhotons;
0060 double fEtaMaxPhotons;
0061 double fPtMaxNeutrals;
0062 double fPtMaxNeutralsStartSlope;
0063 int fNAlgos;
0064 double fPUProxy;
0065 std::vector<PuppiAlgo> fPuppiAlgo;
0066 };
0067 #endif