CMS 3D CMS Logo

HGC3DClusterEgID.h
Go to the documentation of this file.
1 #ifndef L1Trigger_Phase2L1ParticleFlow_HGC3DClusterEgID_h
2 #define L1Trigger_Phase2L1ParticleFlow_HGC3DClusterEgID_h
8 
13 
14 #include "TMVA/Factory.h"
15 #include "TMVA/Reader.h"
16 
17 #include <vector>
18 #include <cmath>
19 
20 namespace l1tpf {
22  public:
24 
25  void prepareTMVA();
26 
28 
29  std::string method() { return method_; }
30 
31  private:
32  class Var {
33  public:
35  void declare(TMVA::Reader &r) { r.AddVariable(name_, &val_); }
36  void fill(const l1t::HGCalMulticluster &c) { val_ = expr_(c); }
37 
38  private:
41  float val_;
42  };
43 
46  std::vector<Var> variables_;
48  std::unique_ptr<TMVA::Reader> reader_;
50  }; //class
51 }; // namespace l1tpf
52 
53 #endif
HGC3DClusterEgID(const edm::ParameterSet &pset)
StringObjectFunction< l1t::HGCalMulticluster > expr_
Var(const std::string &name, const std::string &expr)
StringCutObjectSelector< l1t::HGCalMulticluster > preselection_
std::vector< Var > variables_
StringObjectFunction< l1t::HGCalMulticluster > wp_
std::unique_ptr< TMVA::Reader > reader_
void declare(TMVA::Reader &r)
void fill(const l1t::HGCalMulticluster &c)
float passID(l1t::HGCalMulticluster c, l1t::PFCluster &cpf)