CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTOccupancyTestML.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTestML_H
2 #define DTOccupancyTestML_H
3 
23 
25 
26 #include "TH2F.h"
27 
28 #include <iostream>
29 #include <string>
30 #include <map>
31 
32 class DTGeometry;
33 class DTChamberId;
34 
35 #include "TFile.h"
36 #include "TNtuple.h"
37 
39 public:
42 
44  ~DTOccupancyTestML() override;
45 
46 protected:
48  void beginRun(edm::Run const &run, edm::EventSetup const &context) override;
49 
51  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
52 
54 
57  edm::LuminosityBlock const &,
58  edm::EventSetup const &) override;
59 
60 private:
62  void bookHistos(DQMStore::IBooker &, const int wheelId, std::string folder, std::string histoTag);
63 
65  std::string getMEName(std::string histoTag, const DTChamberId &chId);
66 
67  int getIntegral(TH2F *histo, int, int, int, int, bool);
68 
69  // Run the test on the occupancy histos
70  int runOccupancyTest(TH2F *histo,
71  const DTChamberId &chId,
72  float &chamberPercentage,
73  tensorflow::GraphDef *graphDef,
74  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 
84 
85  // wheel summary histograms
86  std::map<int, MonitorElement *> wheelHistos;
89 
90  std::set<DTLayerId> monitoredLayers;
91 
92  int lsCounter;
93  int nMinEvts;
96 
98  TFile *rootFile;
99  TNtuple *ntuple;
100  bool tpMode;
101 
106 
108 
111 };
112 
113 #endif
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.
const DTGeometry * muonGeom
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::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
std::map< int, MonitorElement * > wheelHistos
std::string nameMonitoredHisto
DTOccupancyTestML(const edm::ParameterSet &ps)
Constructor.
tuple size
Write out results.
Definition: Run.h:45