CMS 3D CMS Logo

DTOccupancyTestML.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTestML_H
2 #define DTOccupancyTestML_H
3 
4 
23 
25 
27 
28 #include "TH2F.h"
29 
30 #include <iostream>
31 #include <string>
32 #include <map>
33 
34 class DTGeometry;
35 class DTChamberId;
36 class DQMStore;
37 
38 #include "TFile.h"
39 #include "TNtuple.h"
40 
42 
43 public:
44 
47 
49  ~DTOccupancyTestML() override;
50 
51 protected:
52 
54  void beginRun(edm::Run const& run, edm::EventSetup const& context) override ;
55 
57  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
58 
60 
62 
63 private:
64 
66  void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag);
67 
69  std::string getMEName(std::string histoTag, const DTChamberId& chId);
70 
71  int getIntegral(TH2F *histo, int, int, int, int, bool);
72 
73  // Run the test on the occupancy histos
74  int runOccupancyTest(TH2F *histo, const DTChamberId& chId, float& chamberPercentage, tensorflow::GraphDef *graphDef, tensorflow::Session *session);
75 
76  std::vector<float> interpolateLayers(std::vector<float> const& inputs, int size, int targetSize);
77 
78  std::string topFolder(bool isBooking) const;
79 
80  int nevents;
81 
83 
84  // wheel summary histograms
85  std::map< int, MonitorElement* > wheelHistos;
88 
89  std::set<DTLayerId> monitoredLayers;
90 
91  int lsCounter;
92  int nMinEvts;
95 
97  TFile *rootFile;
98  TNtuple *ntuple;
99  bool tpMode;
100 
105 
107 
110 
111 };
112 
113 #endif
size
Write out results.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
int getIntegral(TH2F *histo, int, int, int, int, bool)
void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
std::vector< float > interpolateLayers(std::vector< float > const &inputs, int size, int targetSize)
MonitorElement * summaryHisto
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
std::map< int, MonitorElement * > wheelHistos
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
std::string topFolder(bool isBooking) const
MonitorElement * glbSummaryHisto
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage, tensorflow::GraphDef *graphDef, tensorflow::Session *session)
std::set< DTLayerId > monitoredLayers
~DTOccupancyTestML() override
Destructor.
edm::ESHandle< DTGeometry > muonGeom
std::string nameMonitoredHisto
DTOccupancyTestML(const edm::ParameterSet &ps)
Constructor.
Definition: Run.h:44