CMS 3D CMS Logo

SiStripTrackerMapCreator.h
Go to the documentation of this file.
1 #ifndef _SiStripTrackerMapCreator_h_
2 #define _SiStripTrackerMapCreator_h_
3 
10 
11 #include <TTree.h>
12 #include <fstream>
13 #include <map>
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 class TkDetMap;
19 class TrackerTopology;
20 namespace edm {
21  class EventSetup;
22 }
23 
25 public:
28 
30  bool readConfiguration();
31 
32  void create(edm::ParameterSet const& tkmapPset,
33  DQMStore& dqm_store,
34  std::string const& htype,
35  edm::EventSetup const& eSetup);
36  void createForOffline(edm::ParameterSet const& tkmapPset,
37  DQMStore& dqm_store,
38  std::string& htype,
39  edm::EventSetup const& eSetup);
40  void createInfoFile(std::vector<std::string> const& map_names, TTree* tkinfo_tree, DQMStore& dqm_store);
41 
42 private:
43  void paintTkMapFromAlarm(uint32_t det_id,
44  const TrackerTopology* tTopo,
45  DQMStore& dqm_store,
46  bool isBad,
47  std::map<unsigned int, std::string>& badmodmap);
48  void setTkMapFromHistogram(DQMStore& dqm_store, std::string const& htype, edm::EventSetup const& eSetup);
49  void setTkMapFromAlarm(DQMStore& dqm_store, edm::EventSetup const& eSetup);
50  uint16_t getDetectorFlagAndComment(DQMStore* dqm_store,
51  uint32_t det_id,
52  TrackerTopology const* tTopo,
53  std::ostringstream& comment);
54 
55  void paintTkMapFromHistogram(MonitorElement const* me,
56  std::string const& map_type,
57  std::vector<std::pair<float, uint32_t>>* topNmodVec);
58  void setTkMapRange(std::string const& map_type);
59  void setTkMapRangeOffline();
60  uint16_t getDetectorFlag(uint32_t const det_id) {
61  return detFlag_.find(det_id) != detFlag_.end() ? detFlag_[det_id] : 0;
62  }
63  void printBadModuleList(std::map<unsigned int, std::string> const& badmodmap, edm::EventSetup const& eSetup);
64  void printTopModules(std::vector<std::pair<float, uint32_t>>& topNmodVec, edm::EventSetup const& eSetup);
65 
66  std::unique_ptr<TrackerMap> trackerMap_{nullptr};
69  std::string stripTopLevelDir_{};
70 
71  float tkMapMax_;
72  float tkMapMin_;
73  float meanToMaxFactor_{2.5};
77  int nDet_;
81  DetId cachedDetId_{};
82  int16_t cachedLayer_{};
83  std::map<uint32_t, uint16_t> detFlag_;
86  uint32_t numTopModules_;
88 };
89 #endif
uint16_t getDetectorFlag(uint32_t const det_id)
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: DetId.h:17
edm::ESHandle< SiStripDetCabling > detCabling_
HLT enums.
std::map< uint32_t, uint16_t > detFlag_
dqm::harvesting::DQMStore DQMStore
dqm::harvesting::MonitorElement MonitorElement
edm::EventSetup const & eSetup_
#define comment(par)
Definition: vmac.h:163