CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EndcapPiZeroDiscriminatorAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_EndcapPiZeroDiscriminatorAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_EndcapPiZeroDiscriminatorAlgo_h
3 
7 
8 
9 // C/C++ headers
10 #include <string>
11 #include <vector>
12 #include <map>
13 
14 // authors A. Kyriakis , D. Maletic
15 
17 
18  public:
19 
20  typedef std::map<DetId, EcalRecHit> RecHitsMap;
21 
24  {}
25 
26  EndcapPiZeroDiscriminatorAlgo(double stripEnergyCut, int nStripCut,
27  const std::string& path);
28 
30 
31  std::vector<float> findPreshVector(ESDetId strip, RecHitsMap *rechits_map,
32  CaloSubdetectorTopology *topology_p);
33 
34  void findPi0Road(ESDetId strip, EcalPreshowerNavigator& theESNav, int plane, std::vector<ESDetId>& vout);
35 
36  bool goodPi0Strip(RecHitsMap::iterator candidate_it, ESDetId lastID);
37 
38  void readWeightFile(const char *WFile);
39 
40  float Activation_fun(float SUM);
41 
42  float getNNoutput(int sel_wfile);
43 
44  bool calculateNNInputVariables(std::vector<float>& vph1, std::vector<float>& vph2,
45  float pS1_max, float pS9_max, float pS25_max, int EScorr);
46 
47  void calculateBarrelNNInputVariables(float et, double s1, double s9, double s25, double m2, double cee, double cep,
48  double cpp, double s4, double s6, double ratio, double xcog, double ycog);
49 
50 
51  float GetNNOutput(float EE_Et);
52 
53  float GetBarrelNNOutput(float EB_Et);
54 
55 
56  float* get_input_vector() {return input_var;};
57 
58  private:
59 
60  double preshStripEnergyCut_;
63 
64  int inp_var;
66 
67  int Nfiles_EB;
68  int Nfiles_EE;
69 
73 
74  float* I_H_Weight;
75  float* H_O_Weight;
76  float* H_Thresh;
77  float* O_Thresh;
78 
79  std::vector<float> I_H_Weight_all;
80  std::vector<float> H_O_Weight_all;
81  std::vector<float> H_Thresh_all;
82  std::vector<float> O_Thresh_all;
83 
84  float* input_var;
85 // float input_var[25]; // array with the 25 variables to be used as input in NN
86 
87 
88  // The map of hits
90 
91  // path to weight files
93 
94 };
95 #endif
96 
CaloNavigator< ESDetId > EcalPreshowerNavigator
void findPi0Road(ESDetId strip, EcalPreshowerNavigator &theESNav, int plane, std::vector< ESDetId > &vout)
void calculateBarrelNNInputVariables(float et, double s1, double s9, double s25, double m2, double cee, double cep, double cpp, double s4, double s6, double ratio, double xcog, double ycog)
std::map< DetId, EcalRecHit > RecHitsMap
std::map< DetId, EcalRecHit > RecHitsMap
Definition: HLTAlCaMonPi0.h:24
tuple path
else: Piece not in the list, fine.
std::vector< float > findPreshVector(ESDetId strip, RecHitsMap *rechits_map, CaloSubdetectorTopology *topology_p)
bool goodPi0Strip(RecHitsMap::iterator candidate_it, ESDetId lastID)
#define SUM(A, B)
bool calculateNNInputVariables(std::vector< float > &vph1, std::vector< float > &vph2, float pS1_max, float pS9_max, float pS25_max, int EScorr)