CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PuppiContainer.h
Go to the documentation of this file.
1 #ifndef COMMONTOOLS_PUPPI_PUPPICONTAINER_H_
2 #define COMMONTOOLS_PUPPI_PUPPICONTAINER_H_
3 
6 #include "fastjet/internal/base.hh"
7 #include "fastjet/PseudoJet.hh"
8 
9 //FASTJET_BEGIN_NAMESPACE // defined in fastjet/internal/base.hh
10 
11 
12 //......................
14 public:
15 
16 
17  // Helper class designed to store Puppi information inside of fastjet pseudojets.
18  // In CMSSW we use the user_index to refer to the index of the input collection,
19  // but Puppi uses it to decide between NHs, PV CHs, and PU CHs. Instead,
20  // make that a register.
21  class PuppiUserInfo : public fastjet::PseudoJet::UserInfoBase {
22  public :
24  virtual ~PuppiUserInfo(){}
25 
27 
28  inline int puppi_register() const { return puppi_register_; }
29 
30  protected :
32  };
33 
34 
35 
36 
37  PuppiContainer(const edm::ParameterSet &iConfig);
38  ~PuppiContainer();
39  void initialize(const std::vector<RecoObj> &iRecoObjects);
40  void setNPV(int iNPV){ fNPV = iNPV; }
41 
42  std::vector<fastjet::PseudoJet> const & pfParticles() const { return fPFParticles; }
43  std::vector<fastjet::PseudoJet> const & pvParticles() const { return fChargedPV; }
44  std::vector<double> const & puppiWeights();
45  const std::vector<double> & puppiRawAlphas(){ return fRawAlphas; }
46  const std::vector<double> & puppiAlphas(){ return fVals; }
47  // const std::vector<double> puppiAlpha () {return fAlpha;}
48  const std::vector<double> & puppiAlphasMed() {return fAlphaMed;}
49  const std::vector<double> & puppiAlphasRMS() {return fAlphaRMS;}
50 
51  int puppiNAlgos(){ return fNAlgos; }
52  std::vector<fastjet::PseudoJet> const & puppiParticles() const { return fPupParticles;}
53 
54 protected:
55  double goodVar (fastjet::PseudoJet const &iPart,std::vector<fastjet::PseudoJet> const &iParts, int iOpt,double iRCone);
56  void getRMSAvg (int iOpt,std::vector<fastjet::PseudoJet> const &iConstits,std::vector<fastjet::PseudoJet> const &iParticles,std::vector<fastjet::PseudoJet> const &iChargeParticles);
57  void getRawAlphas (int iOpt,std::vector<fastjet::PseudoJet> const &iConstits,std::vector<fastjet::PseudoJet> const &iParticles,std::vector<fastjet::PseudoJet> const &iChargeParticles);
58  double getChi2FromdZ(double iDZ);
59  int getPuppiId ( float iPt, float iEta);
60  double var_within_R (int iId, const std::vector<fastjet::PseudoJet> & particles, const fastjet::PseudoJet& centre, double R);
61 
63  std::vector<RecoObj> fRecoParticles;
64  std::vector<fastjet::PseudoJet> fPFParticles;
65  std::vector<fastjet::PseudoJet> fChargedPV;
66  std::vector<fastjet::PseudoJet> fPupParticles;
67  std::vector<double> fWeights;
68  std::vector<double> fVals;
69  std::vector<double> fRawAlphas;
70  std::vector<double> fAlphaMed;
71  std::vector<double> fAlphaRMS;
72 
73  bool fApplyCHS;
74  bool fInvert;
75  bool fUseExp;
76  double fNeutralMinPt;
77  double fNeutralSlope;
79  int fNAlgos;
80  int fNPV;
81  double fPVFrac;
82  std::vector<PuppiAlgo> fPuppiAlgo;
83 };
84 #endif
85 
std::vector< double > const & puppiWeights()
int i
Definition: DBlmapReader.cc:9
std::vector< fastjet::PseudoJet > fPupParticles
double getChi2FromdZ(double iDZ)
std::vector< fastjet::PseudoJet > fChargedPV
double var_within_R(int iId, const std::vector< fastjet::PseudoJet > &particles, const fastjet::PseudoJet &centre, double R)
const std::vector< double > & puppiAlphasMed()
const std::vector< double > & puppiAlphas()
std::vector< fastjet::PseudoJet > const & pfParticles() const
std::vector< fastjet::PseudoJet > const & pvParticles() const
std::vector< double > fVals
std::vector< fastjet::PseudoJet > fPFParticles
std::vector< fastjet::PseudoJet > const & puppiParticles() const
double fNeutralSlope
void getRMSAvg(int iOpt, std::vector< fastjet::PseudoJet > const &iConstits, std::vector< fastjet::PseudoJet > const &iParticles, std::vector< fastjet::PseudoJet > const &iChargeParticles)
std::vector< double > fRawAlphas
PuppiContainer(const edm::ParameterSet &iConfig)
void getRawAlphas(int iOpt, std::vector< fastjet::PseudoJet > const &iConstits, std::vector< fastjet::PseudoJet > const &iParticles, std::vector< fastjet::PseudoJet > const &iChargeParticles)
PuppiUserInfo(int puppi_register=-1)
std::vector< double > fAlphaMed
double goodVar(fastjet::PseudoJet const &iPart, std::vector< fastjet::PseudoJet > const &iParts, int iOpt, double iRCone)
double fPuppiWeightCut
int getPuppiId(float iPt, float iEta)
const std::vector< double > & puppiAlphasRMS()
std::vector< double > fWeights
std::vector< RecoObj > fRecoParticles
std::vector< double > fAlphaRMS
std::vector< PuppiAlgo > fPuppiAlgo
void initialize(const std::vector< RecoObj > &iRecoObjects)
double fNeutralMinPt
void setNPV(int iNPV)
const std::vector< double > & puppiRawAlphas()