CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PuppiAlgo.h
Go to the documentation of this file.
1 #ifndef CommonTools_PileupAlgos_PuppiAlgo_h
2 #define CommonTools_PileupAlgos_PuppiAlgo_h
3 
6 #include "fastjet/PseudoJet.hh"
7 #include <vector>
8 
9 class PuppiAlgo{
10 public:
11  PuppiAlgo(edm::ParameterSet &iConfig);
12  ~PuppiAlgo();
13  //Computing Mean and RMS
14  void reset();
15  void add(const fastjet::PseudoJet &iParticle,const double &iVal,const unsigned int iAlgo);
16  void computeMedRMS(const unsigned int &iAlgo,const double &iPVFrac);
17  //Get the Weight
18  double compute(std::vector<double> const &iVals,double iChi2) const;
19  //Helpers
20  inline double ptMin() const { return fPtMin; }
21  inline double etaMin() const { return fEtaMin; }
22  inline double etaMax() const { return fEtaMax; }
23  inline int numAlgos () const { return fNAlgos;}
24  inline int algoId ( unsigned int iAlgo) const { return fAlgoId.at(iAlgo); }
25  inline bool isCharged ( unsigned int iAlgo) const { return fCharged.at(iAlgo); }
26  inline double coneSize ( unsigned int iAlgo) const { return fConeSize.at(iAlgo); }
27  inline double neutralPt (int iNPV) const { return fNeutralPtMin + iNPV * fNeutralPtSlope; }
28 
29 private:
30  unsigned int fNAlgos;
31  float fEtaMax;
32  float fEtaMin;
33  float fPtMin ;
34  double fNeutralPtMin;
36  std::vector<float> fPups;
37  std::vector<float> fPupsPV;
38  std::vector<int> fAlgoId;
39  std::vector<bool> fCharged;
40  std::vector<bool> fAdjust;
41  std::vector<int> fCombId;
42  std::vector<double> fConeSize;
43  std::vector<double> fRMSPtMin;
44  std::vector<double> fRMSScaleFactor;
45  std::vector<double> fRMS;
46  std::vector<double> fMedian;
47  std::vector<double> fMean;
48  std::vector<int> fNCount;
49 };
50 
51 
52 #endif
double neutralPt(int iNPV) const
Definition: PuppiAlgo.h:27
bool isCharged(unsigned int iAlgo) const
Definition: PuppiAlgo.h:25
double ptMin() const
Definition: PuppiAlgo.h:20
void add(const fastjet::PseudoJet &iParticle, const double &iVal, const unsigned int iAlgo)
Definition: PuppiAlgo.cc:60
double fNeutralPtMin
Definition: PuppiAlgo.h:34
float fPtMin
Definition: PuppiAlgo.h:33
std::vector< bool > fAdjust
Definition: PuppiAlgo.h:40
PuppiAlgo(edm::ParameterSet &iConfig)
Definition: PuppiAlgo.cc:11
float fEtaMin
Definition: PuppiAlgo.h:32
std::vector< double > fConeSize
Definition: PuppiAlgo.h:42
void reset()
Definition: PuppiAlgo.cc:50
~PuppiAlgo()
Definition: PuppiAlgo.cc:46
std::vector< double > fRMS
Definition: PuppiAlgo.h:45
int algoId(unsigned int iAlgo) const
Definition: PuppiAlgo.h:24
std::vector< float > fPupsPV
Definition: PuppiAlgo.h:37
double compute(std::vector< double > const &iVals, double iChi2) const
Definition: PuppiAlgo.cc:124
std::vector< float > fPups
Definition: PuppiAlgo.h:36
std::vector< double > fMean
Definition: PuppiAlgo.h:47
std::vector< int > fAlgoId
Definition: PuppiAlgo.h:38
double coneSize(unsigned int iAlgo) const
Definition: PuppiAlgo.h:26
std::vector< double > fRMSPtMin
Definition: PuppiAlgo.h:43
std::vector< int > fCombId
Definition: PuppiAlgo.h:41
std::vector< double > fRMSScaleFactor
Definition: PuppiAlgo.h:44
void computeMedRMS(const unsigned int &iAlgo, const double &iPVFrac)
Definition: PuppiAlgo.cc:82
double fNeutralPtSlope
Definition: PuppiAlgo.h:35
double etaMax() const
Definition: PuppiAlgo.h:22
int numAlgos() const
Definition: PuppiAlgo.h:23
std::vector< bool > fCharged
Definition: PuppiAlgo.h:39
unsigned int fNAlgos
Definition: PuppiAlgo.h:30
double etaMin() const
Definition: PuppiAlgo.h:21
float fEtaMax
Definition: PuppiAlgo.h:31
std::vector< int > fNCount
Definition: PuppiAlgo.h:48
std::vector< double > fMedian
Definition: PuppiAlgo.h:46