CMS 3D CMS Logo

DTOccupancyTestML.h
Go to the documentation of this file.
1 #ifndef DTOccupancyTestML_H
2 #define DTOccupancyTestML_H
3 
22 
24 
25 #include "TH2F.h"
26 
27 #include <iostream>
28 #include <string>
29 #include <map>
30 
31 class DTGeometry;
32 class DTChamberId;
33 
34 #include "TFile.h"
35 #include "TNtuple.h"
36 
38 public:
41 
43  ~DTOccupancyTestML() override;
44 
45 protected:
47  void beginRun(edm::Run const &run, edm::EventSetup const &context) override;
48 
50  void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override;
51 
53 
56  edm::LuminosityBlock const &,
57  edm::EventSetup const &) override;
58 
59 private:
62 
65 
66  int getIntegral(TH2F *histo, int, int, int, int, bool);
67 
68  // Run the test on the occupancy histos
69  int runOccupancyTest(TH2F *histo,
70  const DTChamberId &chId,
71  float &chamberPercentage,
72  tensorflow::GraphDef *graphDef,
73  tensorflow::Session *session);
74 
75  std::vector<float> interpolateLayers(std::vector<float> const &inputs, int size, int targetSize);
76 
77  std::string topFolder(bool isBooking) const;
78 
79  int nevents;
80 
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 #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.
const DTGeometry * muonGeom
void beginRun(edm::Run const &run, edm::EventSetup const &context) override
BeginRun.
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 topFolder(bool isBooking) const
std::string nameMonitoredHisto
DTOccupancyTestML(const edm::ParameterSet &ps)
Constructor.
Definition: Run.h:45