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  std::vector<fastjet::PseudoJet> const & puppiParticles() const { return fPupParticles;}
44 
45 protected:
46  double goodVar (fastjet::PseudoJet const &iPart,std::vector<fastjet::PseudoJet> const &iParts, int iOpt,double iRCone);
47  void getRMSAvg (int iOpt,std::vector<fastjet::PseudoJet> const &iConstits,std::vector<fastjet::PseudoJet> const &iParticles,std::vector<fastjet::PseudoJet> const &iChargeParticles);
48  double getChi2FromdZ(double iDZ);
49  int getPuppiId ( float iPt, float iEta);
50  double var_within_R (int iId, const std::vector<fastjet::PseudoJet> & particles, const fastjet::PseudoJet& centre, double R);
51 
52  std::vector<RecoObj> fRecoParticles;
53  std::vector<fastjet::PseudoJet> fPFParticles;
54  std::vector<fastjet::PseudoJet> fChargedPV;
55  std::vector<fastjet::PseudoJet> fPupParticles;
56  std::vector<double> fWeights;
57  std::vector<double> fVals;
58  bool fApplyCHS;
59  bool fUseExp;
60  double fNeutralMinPt;
61  double fNeutralSlope;
63  int fNAlgos;
64  int fNPV;
65  double fPVFrac;
66  std::vector<PuppiAlgo> fPuppiAlgo;
67 };
68 #endif
69 
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)
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)
PuppiContainer(const edm::ParameterSet &iConfig)
PuppiUserInfo(int puppi_register=-1)
double goodVar(fastjet::PseudoJet const &iPart, std::vector< fastjet::PseudoJet > const &iParts, int iOpt, double iRCone)
double fPuppiWeightCut
int getPuppiId(float iPt, float iEta)
std::vector< double > fWeights
std::vector< RecoObj > fRecoParticles
std::vector< PuppiAlgo > fPuppiAlgo
void initialize(const std::vector< RecoObj > &iRecoObjects)
double fNeutralMinPt