CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PileupJetIdAlgo.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------------------------------
2 //
3 // PileupJetIdAlgo
4 //
5 // Author: P. Musella, P. Harris
6 //--------------------------------------------------------------------------------------------------
7 
8 #ifndef RecoJets_JetProducers_plugins_PileupJetIdAlgo_h
9 #define RecoJets_JetProducers_plugins_PileupJetIdAlgo_h
10 
17 
18 #include "TMVA/Tools.h"
19 #include "TMVA/Reader.h"
20 #include "TMVA/Tools.h"
21 #include "TMVA/Reader.h"
22 
24 
25 
26 // ----------------------------------------------------------------------------------------------------
28 public:
29  enum version_t { USER=-1, PHILv0=0 };
30 
31  PileupJetIdAlgo(int version=PHILv0, const std::string & tmvaWeight="", const std::string & tmvaMethod="",
32  Float_t impactParTkThreshod_=1., const std::vector<std::string> & tmvaVariables= std::vector<std::string>(), bool runMvas=true);
33  PileupJetIdAlgo(const edm::ParameterSet & ps, bool runMvas);
35 
37  float jec, const reco::Vertex *, const reco::VertexCollection &, double rho);
38 
39  void set(const PileupJetIdentifier &);
41  const std::string method() const { return tmvaMethod_; }
42 
43  std::string dumpVariables() const;
44 
45  typedef std::map<std::string,std::pair<float *,float> > variables_list_t;
46 
47  std::pair<int,int> getJetIdKey(float jetPt, float jetEta);
48  int computeCutIDflag(float betaStarClassic,float dR2Mean,float nvtx, float jetPt, float jetEta);
49  int computeIDflag (float mva, float jetPt, float jetEta);
50  int computeIDflag (float mva,int ptId,int etaId);
51 
53  const variables_list_t & getVariables() const { return variables_; };
54 
55 protected:
56 
57  void setup();
58  void runMva();
59  void bookReader();
60  void resetVariables();
61  void initVariables();
62 
63 
66 
70  std::vector<std::string> tmvaSpectators_;
71  std::map<std::string,std::string> tmvaNames_;
72 
73  Int_t version_;
75  bool cutBased_;
77  bool runMvas_;
78  Float_t mvacut_ [3][4][4]; //Keep the array fixed
79  Float_t rmsCut_ [3][4][4]; //Keep the array fixed
80  Float_t betaStarCut_[3][4][4]; //Keep the array fixed
81 };
82 
83 #endif
void set(const PileupJetIdentifier &)
std::string tmvaWeights_jteta_2p5_3_
Float_t impactParTkThreshod_
std::vector< std::string > tmvaVariables_
Float_t mvacut_[3][4][4]
std::string tmvaWeights_jteta_2_2p5_
Base class for all types of Jets.
Definition: Jet.h:20
std::unique_ptr< TMVA::Reader > reader_jteta_2p5_3_
std::pair< int, int > getJetIdKey(float jetPt, float jetEta)
std::map< std::string, std::string > tmvaNames_
std::string tmvaMethod_
std::unique_ptr< TMVA::Reader > reader_jteta_0_2_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const std::string method() const
int computeCutIDflag(float betaStarClassic, float dR2Mean, float nvtx, float jetPt, float jetEta)
Float_t betaStarCut_[3][4][4]
const variables_list_t & getVariables() const
const PileupJetIdentifier::variables_list_t &amp; getVariables() const { return variables_; }; ...
std::unique_ptr< TMVA::Reader > reader_jteta_3_5_
std::vector< std::string > tmvaVariables_jteta_0_3_
PileupJetIdentifier internalId_
std::string dumpVariables() const
std::vector< std::string > tmvaVariables_jteta_3_5_
PileupJetIdAlgo(int version=PHILv0, const std::string &tmvaWeight="", const std::string &tmvaMethod="", Float_t impactParTkThreshod_=1., const std::vector< std::string > &tmvaVariables=std::vector< std::string >(), bool runMvas=true)
int computeIDflag(float mva, float jetPt, float jetEta)
std::string tmvaWeights_jteta_3_5_
PileupJetIdentifier computeIdVariables(const reco::Jet *jet, float jec, const reco::Vertex *, const reco::VertexCollection &, double rho)
Float_t rmsCut_[3][4][4]
PileupJetIdentifier computeMva()
std::vector< std::string > tmvaSpectators_
std::unique_ptr< TMVA::Reader > reader_
std::string tmvaWeights_
std::map< std::string, std::pair< float *, float > > variables_list_t
variables_list_t variables_
std::unique_ptr< TMVA::Reader > reader_jteta_2_2p5_
std::string tmvaWeights_jteta_0_2_