CMS 3D CMS Logo

EndcapPiZeroDiscriminatorAlgo.h
Go to the documentation of this file.
1 #ifndef RecoEcal_EgammaClusterAlgos_EndcapPiZeroDiscriminatorAlgo_h
2 #define RecoEcal_EgammaClusterAlgos_EndcapPiZeroDiscriminatorAlgo_h
3 
7 
8 // C/C++ headers
9 #include <string>
10 #include <vector>
11 #include <map>
12 
13 // authors A. Kyriakis , D. Maletic
14 
16 public:
17  typedef std::map<DetId, EcalRecHit> RecHitsMap;
18 
20 
21  EndcapPiZeroDiscriminatorAlgo(double stripEnergyCut, int nStripCut, const std::string& path);
22 
23  std::vector<float> findPreshVector(ESDetId strip, RecHitsMap* rechits_map, CaloSubdetectorTopology* topology_p);
24 
25  void findPi0Road(ESDetId strip, EcalPreshowerNavigator& theESNav, int plane, std::vector<ESDetId>& vout);
26 
27  bool goodPi0Strip(RecHitsMap::iterator candidate_it, ESDetId lastID);
28 
30  std::vector<float>& vph1, std::vector<float>& vph2, float pS1_max, float pS9_max, float pS25_max, int EScorr);
31 
33  double s1,
34  double s9,
35  double s25,
36  double m2,
37  double cee,
38  double cep,
39  double cpp,
40  double s4,
41  double s6,
42  double ratio,
43  double xcog,
44  double ycog);
45 
46  float GetNNOutput(float EE_Et);
47 
48  float GetBarrelNNOutput(float EB_Et);
49 
50  std::vector<float> const& get_input_vector() const { return input_var; }
51 
52 private:
53  void readWeightFile(const char* WFile, int& Layers, int& Indim, int& Hidden, int& Outdim);
54  float getNNoutput(int sel_wfile, int Layers, int Indim, int Hidden, int Outdim, int barrelstart) const;
55  float Activation_fun(float SUM) const;
56 
60 
63 
64  std::vector<float> I_H_Weight_all;
65  std::vector<float> H_O_Weight_all;
66  std::vector<float> H_Thresh_all;
67  std::vector<float> O_Thresh_all;
68 
69  std::vector<float> input_var;
70  // float input_var[25]; // array with the 25 variables to be used as input in NN
71 };
72 #endif
EndcapPiZeroDiscriminatorAlgo::GetNNOutput
float GetNNOutput(float EE_Et)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:548
SUM
#define SUM(A, B)
Definition: Simplify_begin.h:52
EndcapPiZeroDiscriminatorAlgo::EB_Outdim
int EB_Outdim
Definition: EndcapPiZeroDiscriminatorAlgo.h:62
EndcapPiZeroDiscriminatorAlgo::O_Thresh_all
std::vector< float > O_Thresh_all
Definition: EndcapPiZeroDiscriminatorAlgo.h:67
EndcapPiZeroDiscriminatorAlgo::RecHitsMap
std::map< DetId, EcalRecHit > RecHitsMap
Definition: EndcapPiZeroDiscriminatorAlgo.h:17
EndcapPiZeroDiscriminatorAlgo::EndcapPiZeroDiscriminatorAlgo
EndcapPiZeroDiscriminatorAlgo()
Definition: EndcapPiZeroDiscriminatorAlgo.h:19
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
EndcapPiZeroDiscriminatorAlgo::readWeightFile
void readWeightFile(const char *WFile, int &Layers, int &Indim, int &Hidden, int &Outdim)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:227
EndcapPiZeroDiscriminatorAlgo::EE_Layers
int EE_Layers
Definition: EndcapPiZeroDiscriminatorAlgo.h:61
ESDetId
Definition: ESDetId.h:15
ESDetId.h
EndcapPiZeroDiscriminatorAlgo::EB_Hidden
int EB_Hidden
Definition: EndcapPiZeroDiscriminatorAlgo.h:62
EndcapPiZeroDiscriminatorAlgo::calculateBarrelNNInputVariables
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)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:466
EndcapPiZeroDiscriminatorAlgo
Definition: EndcapPiZeroDiscriminatorAlgo.h:15
EndcapPiZeroDiscriminatorAlgo::findPreshVector
std::vector< float > findPreshVector(ESDetId strip, RecHitsMap *rechits_map, CaloSubdetectorTopology *topology_p)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:40
EndcapPiZeroDiscriminatorAlgo::get_input_vector
std::vector< float > const & get_input_vector() const
Definition: EndcapPiZeroDiscriminatorAlgo.h:50
EndcapPiZeroDiscriminatorAlgo::preshSeededNstr_
int preshSeededNstr_
Definition: EndcapPiZeroDiscriminatorAlgo.h:58
EndcapPiZeroDiscriminatorAlgo::getNNoutput
float getNNoutput(int sel_wfile, int Layers, int Indim, int Hidden, int Outdim, int barrelstart) const
Definition: EndcapPiZeroDiscriminatorAlgo.cc:296
EndcapPiZeroDiscriminatorAlgo::preshStripEnergyCut_
double preshStripEnergyCut_
Definition: EndcapPiZeroDiscriminatorAlgo.h:57
EndcapPiZeroDiscriminatorAlgo::input_var
std::vector< float > input_var
Definition: EndcapPiZeroDiscriminatorAlgo.h:69
EndcapPiZeroDiscriminatorAlgo::debugLevel_
int debugLevel_
Definition: EndcapPiZeroDiscriminatorAlgo.h:59
EndcapPiZeroDiscriminatorAlgo::EE_Hidden
int EE_Hidden
Definition: EndcapPiZeroDiscriminatorAlgo.h:61
EndcapPiZeroDiscriminatorAlgo::EB_Indim
int EB_Indim
Definition: EndcapPiZeroDiscriminatorAlgo.h:62
RecHitsMap
std::map< DetId, EcalRecHit > RecHitsMap
Definition: CosmicClusterAlgo.h:25
particleFlowDisplacedVertex_cfi.ratio
ratio
Definition: particleFlowDisplacedVertex_cfi.py:93
EndcapPiZeroDiscriminatorAlgo::GetBarrelNNOutput
float GetBarrelNNOutput(float EB_Et)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:591
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EndcapPiZeroDiscriminatorAlgo::goodPi0Strip
bool goodPi0Strip(RecHitsMap::iterator candidate_it, ESDetId lastID)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:120
EndcapPiZeroDiscriminatorAlgo::H_O_Weight_all
std::vector< float > H_O_Weight_all
Definition: EndcapPiZeroDiscriminatorAlgo.h:65
EcalPreshowerNavigator.h
EndcapPiZeroDiscriminatorAlgo::I_H_Weight_all
std::vector< float > I_H_Weight_all
Definition: EndcapPiZeroDiscriminatorAlgo.h:64
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
CaloSubdetectorTopology
Definition: CaloSubdetectorTopology.h:17
EndcapPiZeroDiscriminatorAlgo::calculateNNInputVariables
bool calculateNNInputVariables(std::vector< float > &vph1, std::vector< float > &vph2, float pS1_max, float pS9_max, float pS25_max, int EScorr)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:339
EcalRecHit.h
EndcapPiZeroDiscriminatorAlgo::EE_Outdim
int EE_Outdim
Definition: EndcapPiZeroDiscriminatorAlgo.h:61
CaloNavigator
Definition: CaloNavigator.h:7
EndcapPiZeroDiscriminatorAlgo::EE_Indim
int EE_Indim
Definition: EndcapPiZeroDiscriminatorAlgo.h:61
EndcapPiZeroDiscriminatorAlgo::EB_Layers
int EB_Layers
Definition: EndcapPiZeroDiscriminatorAlgo.h:62
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
EndcapPiZeroDiscriminatorAlgo::Activation_fun
float Activation_fun(float SUM) const
Definition: EndcapPiZeroDiscriminatorAlgo.cc:327
EndcapPiZeroDiscriminatorAlgo::H_Thresh_all
std::vector< float > H_Thresh_all
Definition: EndcapPiZeroDiscriminatorAlgo.h:66
EndcapPiZeroDiscriminatorAlgo::findPi0Road
void findPi0Road(ESDetId strip, EcalPreshowerNavigator &theESNav, int plane, std::vector< ESDetId > &vout)
Definition: EndcapPiZeroDiscriminatorAlgo.cc:140