Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-21 03:54:27

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 
0012   struct Weights {
0013     std::vector<double> weights;
0014     std::vector<double> puppiRawAlphas;
0015     std::vector<double> puppiAlphas;
0016     std::vector<double> puppiAlphasMed;
0017     std::vector<double> puppiAlphasRMS;
0018   };
0019 
0020   Weights calculatePuppiWeights(const std::vector<RecoObj> &iRecoObjects, double iPUProxy);
0021 
0022   int puppiNAlgos() const { return fPuppiAlgo.size(); }
0023 
0024 private:
0025   void initialize(const std::vector<RecoObj> &iRecoObjects,
0026                   std::vector<PuppiCandidate> &fPFParticles,
0027                   std::vector<PuppiCandidate> &fPFParticlesForVar,
0028                   std::vector<PuppiCandidate> &fPFParticlesForVarChargedPV) const;
0029 
0030   double goodVar(PuppiCandidate const &iPart,
0031                  std::vector<PuppiCandidate> const &iParts,
0032                  int iOpt,
0033                  const double iRCone) const;
0034   void getRMSAvg(int iOpt,
0035                  std::vector<PuppiCandidate> const &iConstits,
0036                  std::vector<PuppiCandidate> const &iParticles,
0037                  std::vector<PuppiCandidate> const &iChargeParticles,
0038                  std::vector<double> &oVals);
0039   std::vector<double> getRawAlphas(int iOpt,
0040                                    std::vector<PuppiCandidate> const &iConstits,
0041                                    std::vector<PuppiCandidate> const &iParticles,
0042                                    std::vector<PuppiCandidate> const &iChargeParticles) const;
0043   double getChi2FromdZ(double iDZ) const;
0044   int getPuppiId(float iPt, float iEta);
0045   double var_within_R(int iId,
0046                       const std::vector<PuppiCandidate> &particles,
0047                       const PuppiCandidate &centre,
0048                       const double R) const;
0049 
0050   double fNeutralMinPt;
0051   double fNeutralSlope;
0052   double fPuppiWeightCut;
0053   double fPtMaxPhotons;
0054   double fEtaMaxPhotons;
0055   double fPtMaxNeutrals;
0056   double fPtMaxNeutralsStartSlope;
0057   std::vector<PuppiAlgo> fPuppiAlgo;
0058 
0059   bool fPuppiDiagnostics;
0060   bool fApplyCHS;
0061   bool fInvert;
0062   bool fUseExp;
0063 };
0064 #endif