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
SiStripTrackerMapCreator::nDet_
int nDet_
Definition: SiStripTrackerMapCreator.h:70
SiStripTrackerMapCreator::tkMapMax_
float tkMapMax_
Definition: SiStripTrackerMapCreator.h:66
SiStripTrackerMapCreator::stripTopLevelDir_
std::string stripTopLevelDir_
Definition: SiStripTrackerMapCreator.h:64
ESHandle.h
SiStripTrackerMapCreator::SiStripTrackerMapCreator
SiStripTrackerMapCreator(const SiStripDetCabling *detCabling, const TkDetMap *tkDetMap, const TrackerTopology *tTopo)
Definition: SiStripTrackerMapCreator.cc:22
TrackerTopology
Definition: TrackerTopology.h:16
SiStripTrackerMapCreator::tkMapMin_
float tkMapMin_
Definition: SiStripTrackerMapCreator.h:67
DQMStore.h
SiStripTrackerMapCreator::cachedDetId_
DetId cachedDetId_
Definition: SiStripTrackerMapCreator.h:74
SiStripTrackerMapCreator::ResidualsRMS_
bool ResidualsRMS_
Definition: SiStripTrackerMapCreator.h:69
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiStripTrackerMapCreator::printBadModuleList
void printBadModuleList(std::map< unsigned int, std::string > const &badmodmap)
Definition: SiStripTrackerMapCreator.cc:478
SiStripTrackerMapCreator::DQMStore
dqm::harvesting::DQMStore DQMStore
Definition: SiStripTrackerMapCreator.h:26
SiStripTrackerMapCreator::createInfoFile
void createInfoFile(std::vector< std::string > const &map_names, TTree *tkinfo_tree, DQMStore &dqm_store, const GeometricDet *geomDet)
Definition: SiStripTrackerMapCreator.cc:409
SiStripTrackerMapCreator::create
void create(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string const &htype)
Definition: SiStripTrackerMapCreator.cc:30
DetId
Definition: DetId.h:17
SiStripTrackerMapCreator::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripTrackerMapCreator.h:73
SiStripDetCabling.h
dqm::legacy::DQMStore
Definition: DQMStore.h:728
SiStripDetCabling
Definition: SiStripDetCabling.h:21
GeometricDet
Definition: GeometricDet.h:31
SiStripTrackerMapCreator::paintTkMapFromAlarm
void paintTkMapFromAlarm(uint32_t det_id, DQMStore &dqm_store, bool isBad, std::map< unsigned int, std::string > &badmodmap)
Definition: SiStripTrackerMapCreator.cc:211
TkDetMap
Definition: TkDetMap.h:175
SiStripTrackerMapCreator::sRunNumber
std::string sRunNumber
Definition: SiStripTrackerMapCreator.h:62
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripTrackerMapCreator::readConfiguration
bool readConfiguration()
SiStripTrackerMapCreator
Definition: SiStripTrackerMapCreator.h:23
SiStripTrackerMapCreator::cachedXYbin_
TkLayerMap::XYbin cachedXYbin_
Definition: SiStripTrackerMapCreator.h:77
SiStripTrackerMapCreator::meanToMaxFactor_
float meanToMaxFactor_
Definition: SiStripTrackerMapCreator.h:68
SiStripTrackerMapCreator::getDetectorFlag
uint16_t getDetectorFlag(uint32_t const det_id)
Definition: SiStripTrackerMapCreator.h:55
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
SiStripTrackerMapCreator::tkMapName_
std::string tkMapName_
Definition: SiStripTrackerMapCreator.h:63
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripTrackerMapCreator::setTkMapFromHistogram
void setTkMapFromHistogram(DQMStore &dqm_store, std::string const &htype)
Definition: SiStripTrackerMapCreator.cc:241
TrackerMap.h
SiStripTrackerMapCreator::tkDetMap_
TkDetMap const * tkDetMap_
Definition: SiStripTrackerMapCreator.h:72
SiStripTrackerMapCreator::setTkMapFromAlarm
void setTkMapFromAlarm(DQMStore &dqm_store, const SiStripQuality *stripQuality)
Definition: SiStripTrackerMapCreator.cc:180
SiStripTrackerMapCreator::MonitorElement
dqm::harvesting::MonitorElement MonitorElement
Definition: SiStripTrackerMapCreator.h:25
SiStripTrackerMapCreator::numTopModules_
uint32_t numTopModules_
Definition: SiStripTrackerMapCreator.h:79
SiStripTrackerMapCreator::cachedLayer_
int16_t cachedLayer_
Definition: SiStripTrackerMapCreator.h:75
SiStripTrackerMapCreator::getDetectorFlagAndComment
uint16_t getDetectorFlagAndComment(DQMStore *dqm_store, uint32_t det_id, std::ostringstream &comment)
Definition: SiStripTrackerMapCreator.cc:342
SiStripTrackerMapCreator::paintTkMapFromHistogram
void paintTkMapFromHistogram(MonitorElement const *me, std::string const &map_type, std::vector< std::pair< float, uint32_t >> *topNmodVec)
Definition: SiStripTrackerMapCreator.cc:298
SiStripTrackerMapCreator::detCabling_
const SiStripDetCabling * detCabling_
Definition: SiStripTrackerMapCreator.h:71
SiStripTrackerMapCreator::trackerMap_
std::unique_ptr< TrackerMap > trackerMap_
Definition: SiStripTrackerMapCreator.h:61
SiStripTrackerMapCreator::createForOffline
void createForOffline(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string &htype, const SiStripQuality *)
Definition: SiStripTrackerMapCreator.cc:59
TkDetMap.h
SiStripTrackerMapCreator::setTkMapRange
void setTkMapRange(std::string const &map_type)
Definition: SiStripTrackerMapCreator.cc:603
SiStripTrackerMapCreator::topModules_
bool topModules_
Definition: SiStripTrackerMapCreator.h:78
ParameterSet.h
SiStripTrackerMapCreator::printTopModules
void printTopModules(std::vector< std::pair< float, uint32_t >> &topNmodVec)
Definition: SiStripTrackerMapCreator.cc:561
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
TkLayerMap::XYbin
Definition: TkDetMap.h:12
SiStripTrackerMapCreator::topModLabel_
std::string topModLabel_
Definition: SiStripTrackerMapCreator.h:80
SiStripTrackerMapCreator::detFlag_
std::map< uint32_t, uint16_t > detFlag_
Definition: SiStripTrackerMapCreator.h:76
SiStripTrackerMapCreator::setTkMapRangeOffline
void setTkMapRangeOffline()
Definition: SiStripTrackerMapCreator.cc:625
SiStripQuality
Definition: SiStripQuality.h:32