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  std::vector<fastjet::PseudoJet> const & pfParticles() const { return fPFParticles; }
41  std::vector<fastjet::PseudoJet> const & pvParticles() const { return fChargedPV; }
42  std::vector<double> const & puppiWeights();
43  const std::vector<double> & puppiRawAlphas(){ return fRawAlphas; }
44  const std::vector<double> & puppiAlphas(){ return fVals; }
45  // const std::vector<double> puppiAlpha () {return fAlpha;}
46  const std::vector<double> & puppiAlphasMed() {return fAlphaMed;}
47  const std::vector<double> & puppiAlphasRMS() {return fAlphaRMS;}
48 
49  int puppiNAlgos(){ return fNAlgos; }
50  std::vector<fastjet::PseudoJet> const & puppiParticles() const { return fPupParticles;}
51 
52 protected:
53  double goodVar (fastjet::PseudoJet const &iPart,std::vector<fastjet::PseudoJet> const &iParts, int iOpt,double iRCone);
54  void getRMSAvg (int iOpt,std::vector<fastjet::PseudoJet> const &iConstits,std::vector<fastjet::PseudoJet> const &iParticles,std::vector<fastjet::PseudoJet> const &iChargeParticles);
55  void getRawAlphas (int iOpt,std::vector<fastjet::PseudoJet> const &iConstits,std::vector<fastjet::PseudoJet> const &iParticles,std::vector<fastjet::PseudoJet> const &iChargeParticles);
56  double getChi2FromdZ(double iDZ);
57  int getPuppiId ( float iPt, float iEta);
58  double var_within_R (int iId, const std::vector<fastjet::PseudoJet> & particles, const fastjet::PseudoJet& centre, double R);
59 
60  std::vector<RecoObj> fRecoParticles;
61  std::vector<fastjet::PseudoJet> fPFParticles;
62  std::vector<fastjet::PseudoJet> fChargedPV;
63  std::vector<fastjet::PseudoJet> fPupParticles;
64  std::vector<double> fWeights;
65  std::vector<double> fVals;
66  std::vector<double> fRawAlphas;
67  std::vector<double> fAlphaMed;
68  std::vector<double> fAlphaRMS;
69 
70  bool fApplyCHS;
71  bool fUseExp;
72  double fNeutralMinPt;
73  double fNeutralSlope;
75  int fNAlgos;
76  int fNPV;
77  double fPVFrac;
78  std::vector<PuppiAlgo> fPuppiAlgo;
79 };
80 #endif
81 
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
const std::vector< double > & puppiRawAlphas()