Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-11 03:34:04

0001 #ifndef MLClient_H
0002 #define MLClient_H
0003 
0004 #include "DQWorkerClient.h"
0005 #include <vector>
0006 #include <valarray>
0007 #include <deque>
0008 
0009 namespace ecaldqm {
0010 
0011   class MLClient : public DQWorkerClient {
0012   public:
0013     MLClient();
0014     ~MLClient() override {}
0015 
0016     void producePlots(ProcessType) override;
0017 
0018   private:
0019     void setParams(edm::ParameterSet const&) override;
0020 
0021     //Occcupancy map is plotted at the tower level
0022     //For the EB: 34 towers in the eta and 72 towers in the phi directions
0023     static const int nEBEtaTowers = 34;
0024     static const int nEBPhiTowers = 72;
0025     //For the EE: 20 towers in the eta and 20 towers in the phi directions
0026     static const int nEEEtaTowers = 20;
0027     static const int nEEPhiTowers = 20;
0028     //After padding with two rows above and below to prevent the edge effect
0029     //For EB: 36 towers in eta direction
0030     //For EE: padding on all four sides, 22 towers in both eta and phi directions.
0031     static const int nEBEtaTowersPad = 36;
0032     static const int nEETowersPad = 22;
0033     float EBThreshold_;
0034     float EEpThreshold_;
0035     float EEmThreshold_;
0036     float EB_PUcorr_slope_;
0037     float EEp_PUcorr_slope_;
0038     float EEm_PUcorr_slope_;
0039     float EB_PUcorr_intercept_;
0040     float EEp_PUcorr_intercept_;
0041     float EEm_PUcorr_intercept_;
0042 
0043     size_t nLS = 3;      //No.of lumisections to add the occupancy over
0044     size_t nLSloss = 6;  //No.of lumisections to multiply the loss over
0045     int nbadtowerEB;     //count the no.of bad towers flagged by the ML model.
0046     int nbadtowerEE;
0047     int LScount = 0;  //count no.of lumisections over which the MLquality is made.
0048 
0049     std::deque<int> NEventQ;  //To keep the no.of events in each occupancy plot
0050 
0051     //To keep the input occupancy plots to be summed
0052     std::deque<std::valarray<float>> ebOccMap1dQ;
0053     std::deque<std::valarray<float>> eepOccMap1dQ;
0054     std::deque<std::valarray<float>> eemOccMap1dQ;
0055     //To keep the average occupancy to do response correction
0056     std::vector<double> EBavgOcc;
0057     std::vector<double> EEpavgOcc;
0058     std::vector<double> EEmavgOcc;
0059     //To keep the ML losses to be multiplied
0060     std::deque<std::valarray<std::valarray<float>>> EBlossMap2dQ;
0061     std::deque<std::valarray<std::valarray<float>>> EEplossMap2dQ;
0062     std::deque<std::valarray<std::valarray<float>>> EEmlossMap2dQ;
0063   };
0064 
0065 }  // namespace ecaldqm
0066 
0067 #endif