CMS 3D CMS Logo

MLClient.h
Go to the documentation of this file.
1 #ifndef MLClient_H
2 #define MLClient_H
3 
4 #include "DQWorkerClient.h"
5 #include <vector>
6 #include <valarray>
7 #include <deque>
8 
9 namespace ecaldqm {
10 
11  class MLClient : public DQWorkerClient {
12  public:
13  MLClient();
14  ~MLClient() override {}
15 
16  void producePlots(ProcessType) override;
17 
18  private:
19  void setParams(edm::ParameterSet const&) override;
20 
21  //Occcupancy map is plotted at the tower level
22  //For the EB: 34 towers in the eta and 72 towers in the phi directions
23  static const int nEBEtaTowers = 34;
24  static const int nEBPhiTowers = 72;
25  //For the EE: 20 towers in the eta and 20 towers in the phi directions
26  static const int nEEEtaTowers = 20;
27  static const int nEEPhiTowers = 20;
28  //After padding with two rows above and below to prevent the edge effect
29  //For EB: 36 towers in eta direction
30  //For EE: padding on all four sides, 22 towers in both eta and phi directions.
31  static const int nEBEtaTowersPad = 36;
32  static const int nEETowersPad = 22;
33  float EBThreshold_;
42 
43  size_t nLS = 4; //No.of lumisections to add the occupancy over
44  size_t nLSloss = 6; //No.of lumisections to multiply the loss over
45  int nbadtowerEB; //count the no.of bad towers flagged by the ML model.
47  int LScount = 0; //count no.of lumisections over which the MLquality is made.
48 
49  std::deque<int> NEventQ; //To keep the no.of events in each occupancy plot
50 
51  //To keep the input occupancy plots to be summed
52  std::deque<std::valarray<float>> ebOccMap1dQ;
53  std::deque<std::valarray<float>> eepOccMap1dQ;
54  std::deque<std::valarray<float>> eemOccMap1dQ;
55  //To keep the average occupancy to do response correction
56  std::vector<double> EBavgOcc;
57  std::vector<double> EEpavgOcc;
58  std::vector<double> EEmavgOcc;
59  //To keep the ML losses to be multiplied
60  std::deque<std::valarray<std::valarray<float>>> EBlossMap2dQ;
61  std::deque<std::valarray<std::valarray<float>>> EEplossMap2dQ;
62  std::deque<std::valarray<std::valarray<float>>> EEmlossMap2dQ;
63  };
64 
65 } // namespace ecaldqm
66 
67 #endif
std::deque< std::valarray< std::valarray< float > > > EBlossMap2dQ
Definition: MLClient.h:60
static const int nEEPhiTowers
Definition: MLClient.h:27
float EEm_PUcorr_slope_
Definition: MLClient.h:38
void setParams(edm::ParameterSet const &) override
Definition: MLClient.cc:20
static const int nEBEtaTowers
Definition: MLClient.h:23
std::deque< std::valarray< std::valarray< float > > > EEplossMap2dQ
Definition: MLClient.h:61
~MLClient() override
Definition: MLClient.h:14
void producePlots(ProcessType) override
Definition: MLClient.cc:43
static const int nEBEtaTowersPad
Definition: MLClient.h:31
std::vector< double > EEpavgOcc
Definition: MLClient.h:57
float EEpThreshold_
Definition: MLClient.h:34
std::deque< std::valarray< float > > eemOccMap1dQ
Definition: MLClient.h:54
float EEp_PUcorr_intercept_
Definition: MLClient.h:40
size_t nLSloss
Definition: MLClient.h:44
std::deque< std::valarray< float > > eepOccMap1dQ
Definition: MLClient.h:53
std::deque< std::valarray< std::valarray< float > > > EEmlossMap2dQ
Definition: MLClient.h:62
static const int nEETowersPad
Definition: MLClient.h:32
float EB_PUcorr_slope_
Definition: MLClient.h:36
float EEm_PUcorr_intercept_
Definition: MLClient.h:41
std::vector< double > EEmavgOcc
Definition: MLClient.h:58
float EEmThreshold_
Definition: MLClient.h:35
static const int nEBPhiTowers
Definition: MLClient.h:24
std::deque< int > NEventQ
Definition: MLClient.h:49
float EB_PUcorr_intercept_
Definition: MLClient.h:39
std::vector< double > EBavgOcc
Definition: MLClient.h:56
float EBThreshold_
Definition: MLClient.h:33
float EEp_PUcorr_slope_
Definition: MLClient.h:37
static const int nEEEtaTowers
Definition: MLClient.h:26
std::deque< std::valarray< float > > ebOccMap1dQ
Definition: MLClient.h:52