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 class SiStripQuality;
21 class GeometricDet;
22 
24 public:
27 
28  SiStripTrackerMapCreator(const SiStripDetCabling* detCabling, const TkDetMap* tkDetMap, const TrackerTopology* tTopo);
29  bool readConfiguration();
30 
31  void create(edm::ParameterSet const& tkmapPset, DQMStore& dqm_store, std::string const& htype);
32  void createForOffline(edm::ParameterSet const& tkmapPset,
33  DQMStore& dqm_store,
34  std::string& htype,
35  const SiStripQuality*);
36  void createInfoFile(std::vector<std::string> const& map_names,
37  TTree* tkinfo_tree,
38  DQMStore& dqm_store,
39  const GeometricDet* geomDet);
40 
41 private:
42  void paintTkMapFromAlarm(uint32_t det_id,
43  DQMStore& dqm_store,
44  bool isBad,
45  std::map<unsigned int, std::string>& badmodmap);
46  void setTkMapFromHistogram(DQMStore& dqm_store, std::string const& htype);
47  void setTkMapFromAlarm(DQMStore& dqm_store, const SiStripQuality* stripQuality);
48  uint16_t getDetectorFlagAndComment(DQMStore* dqm_store, uint32_t det_id, std::ostringstream& comment);
49 
51  std::string const& map_type,
52  std::vector<std::pair<float, uint32_t>>* topNmodVec);
53  void setTkMapRange(std::string const& map_type);
54  void setTkMapRangeOffline();
55  uint16_t getDetectorFlag(uint32_t const det_id) {
56  return detFlag_.find(det_id) != detFlag_.end() ? detFlag_[det_id] : 0;
57  }
58  void printBadModuleList(std::map<unsigned int, std::string> const& badmodmap);
59  void printTopModules(std::vector<std::pair<float, uint32_t>>& topNmodVec);
60 
61  std::unique_ptr<TrackerMap> trackerMap_{nullptr};
65 
66  float tkMapMax_;
67  float tkMapMin_;
68  float meanToMaxFactor_{2.5};
70  int nDet_;
75  int16_t cachedLayer_{};
76  std::map<uint32_t, uint16_t> detFlag_;
79  uint32_t numTopModules_;
81 };
82 #endif
void paintTkMapFromAlarm(uint32_t det_id, DQMStore &dqm_store, bool isBad, std::map< unsigned int, std::string > &badmodmap)
std::unique_ptr< TrackerMap > trackerMap_
void printBadModuleList(std::map< unsigned int, std::string > const &badmodmap)
uint16_t getDetectorFlag(uint32_t const det_id)
void printTopModules(std::vector< std::pair< float, uint32_t >> &topNmodVec)
void paintTkMapFromHistogram(MonitorElement const *me, std::string const &map_type, std::vector< std::pair< float, uint32_t >> *topNmodVec)
const SiStripDetCabling * detCabling_
void createForOffline(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string &htype, const SiStripQuality *)
void create(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string const &htype)
void createInfoFile(std::vector< std::string > const &map_names, TTree *tkinfo_tree, DQMStore &dqm_store, const GeometricDet *geomDet)
SiStripTrackerMapCreator(const SiStripDetCabling *detCabling, const TkDetMap *tkDetMap, const TrackerTopology *tTopo)
Definition: DetId.h:17
void setTkMapRange(std::string const &map_type)
std::map< uint32_t, uint16_t > detFlag_
void setTkMapFromHistogram(DQMStore &dqm_store, std::string const &htype)
dqm::harvesting::DQMStore DQMStore
const TrackerTopology * tTopo_
void setTkMapFromAlarm(DQMStore &dqm_store, const SiStripQuality *stripQuality)
dqm::harvesting::MonitorElement MonitorElement
uint16_t getDetectorFlagAndComment(DQMStore *dqm_store, uint32_t det_id, std::ostringstream &comment)