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 
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};
70 
71  float tkMapMax_;
72  float tkMapMin_;
73  float meanToMaxFactor_{2.5};
77  int nDet_;
82  int16_t cachedLayer_{};
83  std::map<uint32_t, uint16_t> detFlag_;
86  uint32_t numTopModules_;
88 };
89 #endif
SiStripTrackerMapCreator::nDet_
int nDet_
Definition: SiStripTrackerMapCreator.h:77
SiStripTrackerMapCreator::tkMapMax_
float tkMapMax_
Definition: SiStripTrackerMapCreator.h:71
SiStripTrackerMapCreator::printBadModuleList
void printBadModuleList(std::map< unsigned int, std::string > const &badmodmap, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:507
SiStripTrackerMapCreator::stripTopLevelDir_
std::string stripTopLevelDir_
Definition: SiStripTrackerMapCreator.h:69
ESHandle.h
SiStripTrackerMapCreator::detCabling_
edm::ESHandle< SiStripDetCabling > detCabling_
Definition: SiStripTrackerMapCreator.h:80
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
SiStripTrackerMapCreator::create
void create(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string const &htype, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:33
SiStripTrackerMapCreator::tkMapMin_
float tkMapMin_
Definition: SiStripTrackerMapCreator.h:72
SiStripTrackerMapCreator::getDetectorFlagAndComment
uint16_t getDetectorFlagAndComment(DQMStore *dqm_store, uint32_t det_id, TrackerTopology const *tTopo, std::ostringstream &comment)
Definition: SiStripTrackerMapCreator.cc:369
DQMStore.h
SiStripTrackerMapCreator::cachedDetId_
DetId cachedDetId_
Definition: SiStripTrackerMapCreator.h:81
SiStripTrackerMapCreator::ResidualsRMS_
bool ResidualsRMS_
Definition: SiStripTrackerMapCreator.h:75
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiStripTrackerMapCreator::DQMStore
dqm::harvesting::DQMStore DQMStore
Definition: SiStripTrackerMapCreator.h:27
DetId
Definition: DetId.h:17
SiStripTrackerMapCreator::paintTkMapFromAlarm
void paintTkMapFromAlarm(uint32_t det_id, const TrackerTopology *tTopo, DQMStore &dqm_store, bool isBad, std::map< unsigned int, std::string > &badmodmap)
Definition: SiStripTrackerMapCreator.cc:235
SiStripDetCabling.h
SiStripTrackerMapCreator::SiStripTrackerMapCreator
SiStripTrackerMapCreator(edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:23
dqm::legacy::DQMStore
Definition: DQMStore.h:727
edm::ESHandle< SiStripDetCabling >
TkDetMap
Definition: TkDetMap.h:175
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripTrackerMapCreator::printTopModules
void printTopModules(std::vector< std::pair< float, uint32_t >> &topNmodVec, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:595
SiStripTrackerMapCreator::sRunNumber
std::string sRunNumber
Definition: SiStripTrackerMapCreator.h:67
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripTrackerMapCreator::eSetup_
edm::EventSetup const & eSetup_
Definition: SiStripTrackerMapCreator.h:79
SiStripTrackerMapCreator::readConfiguration
bool readConfiguration()
SiStripTrackerMapCreator::createForOffline
void createForOffline(edm::ParameterSet const &tkmapPset, DQMStore &dqm_store, std::string &htype, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:69
SiStripTrackerMapCreator
Definition: SiStripTrackerMapCreator.h:24
SiStripTrackerMapCreator::cachedXYbin_
TkLayerMap::XYbin cachedXYbin_
Definition: SiStripTrackerMapCreator.h:84
SiStripTrackerMapCreator::setTkMapFromHistogram
void setTkMapFromHistogram(DQMStore &dqm_store, std::string const &htype, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:266
SiStripTrackerMapCreator::meanToMaxFactor_
float meanToMaxFactor_
Definition: SiStripTrackerMapCreator.h:73
SiStripTrackerMapCreator::getDetectorFlag
uint16_t getDetectorFlag(uint32_t const det_id)
Definition: SiStripTrackerMapCreator.h:60
SiStripTrackerMapCreator::setTkMapFromAlarm
void setTkMapFromAlarm(DQMStore &dqm_store, edm::EventSetup const &eSetup)
Definition: SiStripTrackerMapCreator.cc:193
edm::EventSetup
Definition: EventSetup.h:57
SiStripTrackerMapCreator::tkMapName_
std::string tkMapName_
Definition: SiStripTrackerMapCreator.h:68
TrackerMap.h
SiStripTrackerMapCreator::tkDetMap_
TkDetMap const * tkDetMap_
Definition: SiStripTrackerMapCreator.h:78
SiStripTrackerMapCreator::MonitorElement
dqm::harvesting::MonitorElement MonitorElement
Definition: SiStripTrackerMapCreator.h:26
SiStripTrackerMapCreator::numTopModules_
uint32_t numTopModules_
Definition: SiStripTrackerMapCreator.h:86
comment
#define comment(par)
Definition: vmac.h:163
SiStripTrackerMapCreator::cachedLayer_
int16_t cachedLayer_
Definition: SiStripTrackerMapCreator.h:82
SiStripTrackerMapCreator::paintTkMapFromHistogram
void paintTkMapFromHistogram(MonitorElement const *me, std::string const &map_type, std::vector< std::pair< float, uint32_t >> *topNmodVec)
Definition: SiStripTrackerMapCreator.cc:325
SiStripTrackerMapCreator::createInfoFile
void createInfoFile(std::vector< std::string > const &map_names, TTree *tkinfo_tree, DQMStore &dqm_store)
Definition: SiStripTrackerMapCreator.cc:437
SiStripTrackerMapCreator::trackerMap_
std::unique_ptr< TrackerMap > trackerMap_
Definition: SiStripTrackerMapCreator.h:66
TkDetMap.h
SiStripTrackerMapCreator::useSSQuality_
bool useSSQuality_
Definition: SiStripTrackerMapCreator.h:74
SiStripTrackerMapCreator::setTkMapRange
void setTkMapRange(std::string const &map_type)
Definition: SiStripTrackerMapCreator.cc:643
SiStripTrackerMapCreator::topModules_
bool topModules_
Definition: SiStripTrackerMapCreator.h:85
SiStripTrackerMapCreator::ssqLabel_
std::string ssqLabel_
Definition: SiStripTrackerMapCreator.h:76
EventSetup
ParameterSet.h
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
TkLayerMap::XYbin
Definition: TkDetMap.h:12
SiStripTrackerMapCreator::topModLabel_
std::string topModLabel_
Definition: SiStripTrackerMapCreator.h:87
SiStripTrackerMapCreator::detFlag_
std::map< uint32_t, uint16_t > detFlag_
Definition: SiStripTrackerMapCreator.h:83
SiStripTrackerMapCreator::setTkMapRangeOffline
void setTkMapRangeOffline()
Definition: SiStripTrackerMapCreator.cc:665