CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTRunConditionVarClient.h
Go to the documentation of this file.
1 #ifndef DTMonitorClient_DTRunConditionVarClient_H
2 #define DTMonitorClient_DTRunConditionVarClient_H
3 
27 
32 
35 
37 
38 #include <memory>
39 #include <iostream>
40 #include <fstream>
41 #include <string>
42 #include <vector>
43 #include <map>
44 
45 class DTGeometry;
46 class DTChamberId;
47 class DTLayerId;
48 class DTMtime;
49 class DTRecoConditions;
50 
52 public:
55 
57  ~DTRunConditionVarClient() override;
58 
59  void beginRun(const edm::Run& r, const edm::EventSetup& c) override;
60 
61 protected:
63 
65 
67  std::string histoType,
68  std::string subfolder,
69  int wh,
70  int nbins,
71  float min,
72  float max,
73  bool isVDCorr = false,
74  bool makeRings = false);
75 
79  edm::LuminosityBlock const&,
80  edm::EventSetup const&) override;
81 
82  float varQuality(float var, float maxGood, float minBad);
83  void percDevVDrift(DTChamberId indexCh, float meanVD, float sigmaVD, float& devVD, float& errdevVD);
84 
85 private:
87 
88  int nevents;
89 
92  float minRangeT0;
93  float maxRangeT0;
94 
97  float maxGoodT0;
98  float minBadT0;
99 
104 
106  const DTMtime* mTimeMap_; // legacy DB object
107 
109  const DTRecoConditions* vDriftMap_; // DB object in new format
110  bool readLegacyVDriftDB; // which one to use
111 
113 
116 
117  std::map<int, std::map<std::string, MonitorElement*> > wheelHistos;
118  std::map<int, std::map<int, std::map<std::string, MonitorElement*> > > wheelRingHistos;
119  std::map<std::string, MonitorElement*> summaryHistos;
120  std::map<std::string, MonitorElement*> allwheelHistos;
121 };
122 
123 #endif
edm::ESGetToken< DTRecoConditions, DTRecoConditionsVdriftRcd > vDriftToken_
const edm::EventSetup & c
std::map< std::string, MonitorElement * > summaryHistos
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * getChamberHistos(DQMStore::IGetter &, const DTChamberId &, std::string)
std::map< std::string, MonitorElement * > allwheelHistos
float varQuality(float var, float maxGood, float minBad)
std::map< int, std::map< int, std::map< std::string, MonitorElement * > > > wheelRingHistos
void percDevVDrift(DTChamberId indexCh, float meanVD, float sigmaVD, float &devVD, float &errdevVD)
list var
if using global norm cols_to_minmax = [&#39;t_delta&#39;, &#39;t_hmaxNearP&#39;,&#39;t_emaxNearP&#39;, &#39;t_hAnnular&#39;, &#39;t_eAnnular&#39;,&#39;t_pt&#39;,&#39;t_nVtx&#39;,&#39;t_ieta&#39;,&#39;t_eHcal10&#39;, &#39;t_eHcal30&#39;,&#39;t_rhoh&#39;,&#39;t_eHcal&#39;] df[cols_to_minmax] = df[cols_to_minmax].apply(lambda x: (x - x.min()) / (x.max() - x.min()) if (x.max() - x.min() &gt; 0) else 1.0/200.0)
T min(T a, T b)
Definition: MathUtil.h:58
DTRunConditionVarClient(const edm::ParameterSet &ps)
Constructor.
void bookWheelHistos(DQMStore::IBooker &, std::string histoType, std::string subfolder, int wh, int nbins, float min, float max, bool isVDCorr=false, bool makeRings=false)
book the report summary
~DTRunConditionVarClient() override
Destructor.
const DTRecoConditions * vDriftMap_
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
edm::ESGetToken< DTMtime, DTMtimeRcd > mTimeMapToken_
Definition: Run.h:45