CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripTrackerMapCreator Class Reference

#include <SiStripTrackerMapCreator.h>

Public Member Functions

void create (const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
 
void createForOffline (const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
 
void createInfoFile (std::vector< std::string > map_names, TTree *tkinfo_tree, DQMStore *dqm_store, std::vector< uint32_t > detidList)
 
bool readConfiguration ()
 
 SiStripTrackerMapCreator (const edm::EventSetup &eSetup)
 
 ~SiStripTrackerMapCreator ()
 

Private Member Functions

uint16_t getDetectorFlag (uint32_t det_id)
 
uint16_t getDetectorFlagAndComment (DQMStore *dqm_store, uint32_t det_id, const TrackerTopology *tTopo, std::ostringstream &comment)
 
void paintTkMapFromAlarm (uint32_t det_id, const TrackerTopology *tTopo, DQMStore *dqm_store, bool isBad=false, std::map< unsigned int, std::string > *badmodmap=0)
 
void paintTkMapFromHistogram (DQMStore *dqm_store, MonitorElement *me, std::string &map_type, std::vector< std::pair< float, uint32_t > > *topNmodVec)
 
void printBadModuleList (std::map< unsigned int, std::string > *badmodmap, const edm::EventSetup &eSetup)
 
void printTopModules (std::vector< std::pair< float, uint32_t > > *topNmodVec, const edm::EventSetup &eSetup)
 
void setTkMapFromAlarm (DQMStore *dqm_store, const edm::EventSetup &eSetup)
 
void setTkMapFromHistogram (DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
 
void setTkMapRange (std::string &map_type)
 
void setTkMapRangeOffline ()
 

Private Attributes

uint32_t cached_detid
 
int16_t cached_layer
 
TkLayerMap::XYbin cached_XYbin
 
edm::ESHandle< SiStripDetCablingdetcabling_
 
std::map< uint32_t, uint16_t > detflag_
 
const edm::EventSetupeSetup_
 
float meanToMaxFactor_
 
int nDet
 
uint32_t numTopModules
 
bool ResidualsRMS_
 
std::string sRunNumber
 
std::string ssqLabel_
 
std::string stripTopLevelDir_
 
TkDetMaptkDetMap_
 
float tkMapMax_
 
float tkMapMin_
 
std::string tkMapName_
 
std::string topModLabel
 
bool topModules
 
TrackerMaptrackerMap_
 
bool useSSQuality_
 

Detailed Description

Definition at line 24 of file SiStripTrackerMapCreator.h.

Constructor & Destructor Documentation

SiStripTrackerMapCreator::SiStripTrackerMapCreator ( const edm::EventSetup eSetup)

Definition at line 39 of file SiStripTrackerMapCreator.cc.

References cached_detid, cached_layer, detcabling_, eSetup_, edm::EventSetup::get(), Utilities::operator, stripTopLevelDir_, tkDetMap_, and trackerMap_.

39  : meanToMaxFactor_(2.5),eSetup_(eSetup)
40  //, psumap_()
41 {
42  cached_detid=0;
43  cached_layer=0;
44  trackerMap_ = nullptr;
47  // psumap_.BuildMap("CalibTracker/SiStripDCS/data/StripPSUDetIDMap_FromJan132010.dat",false);
48  if(!edm::Service<TkDetMap>().isAvailable()){
49  edm::LogError("TkHistoMap") <<
50  "\n------------------------------------------"
51  "\nUnAvailable Service TkHistoMap: please insert in the configuration file an instance like"
52  "\n\tprocess.TkDetMap = cms.Service(\"TkDetMap\")"
53  "\n------------------------------------------";
54  }
56 }
edm::ESHandle< SiStripDetCabling > detcabling_
const edm::EventSetup & eSetup_
const T & get() const
Definition: EventSetup.h:55
SiStripTrackerMapCreator::~SiStripTrackerMapCreator ( )

Definition at line 60 of file SiStripTrackerMapCreator.cc.

References trackerMap_.

60  {
61  if (trackerMap_) delete trackerMap_;
62 }

Member Function Documentation

void SiStripTrackerMapCreator::create ( const edm::ParameterSet tkmapPset,
DQMStore dqm_store,
std::string &  htype,
const edm::EventSetup eSetup 
)

Definition at line 66 of file SiStripTrackerMapCreator.cc.

References detcabling_, SiStripDetCabling::fedCabling(), TrackerMap::fill_all_blank(), edm::EventSetup::get(), meanToMaxFactor_, nDet, TrackerMap::printonline(), edm::ESHandle< T >::product(), TrackerMap::setTitle(), setTkMapFromAlarm(), setTkMapFromHistogram(), setTkMapRange(), ssqLabel_, AlCaHLTBitMon_QueryRunRegistry::string, stripTopLevelDir_, tkMapMax_, tkMapMin_, trackerMap_, and useSSQuality_.

Referenced by SiStripActionExecutor::createTkMap().

68  {
69 
70  const SiStripFedCabling* fedcabling = detcabling_->fedCabling();
71 
72  if(!fedcabling) return;
73 
75  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
76  const TrackerTopology* const tTopo = tTopoHandle.product();
77 
78  if (trackerMap_) delete trackerMap_;
79  trackerMap_ = new TrackerMap(tkmapPset, fedcabling,tTopo);
80  std::string tmap_title = " Tracker Map from " + map_type;
81  trackerMap_->setTitle(tmap_title);
82 
83  nDet = 0;
84  tkMapMax_ = 0.0;
85  tkMapMin_ = 0.0;
86  meanToMaxFactor_ = 2.5;
87  useSSQuality_ = false;
88  ssqLabel_ = "";
89  stripTopLevelDir_="SiStrip";
90 
91  if (map_type == "QTestAlarm") {
92  setTkMapFromAlarm(dqm_store, eSetup);
93  /*
94  trackerMap_->fillc_all_blank();
95  const std::vector<uint16_t>& feds = fedcabling->feds();
96  uint32_t detId_save = 0;
97  for(std::vector<unsigned short>::const_iterator ifed = feds.begin();
98  ifed < feds.end(); ifed++){
99  const std::vector<FedChannelConnection> fedChannels = fedcabling->connections( *ifed );
100  for(std::vector<FedChannelConnection>::const_iterator iconn = fedChannels.begin(); iconn < fedChannels.end(); iconn++){
101 
102  uint32_t detId = iconn->detId();
103  if (detId == 0 || detId == 0xFFFFFFFF) continue;
104  if (detId_save != detId) {
105  detId_save = detId;
106  paintTkMapFromAlarm(detId, dqm_store);
107  }
108  }
109  }
110  */
111  } else {
113  setTkMapFromHistogram(dqm_store, map_type, eSetup);
114  setTkMapRange(map_type);
115  }
117  delete trackerMap_;
118  trackerMap_ = nullptr;
119 }
edm::ESHandle< SiStripDetCabling > detcabling_
void setTitle(std::string s)
Definition: TrackerMap.h:132
void fill_all_blank()
Definition: TrackerMap.cc:2749
void setTkMapFromAlarm(DQMStore *dqm_store, const edm::EventSetup &eSetup)
void setTkMapFromHistogram(DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
const SiStripFedCabling * fedCabling() const
const T & get() const
Definition: EventSetup.h:55
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
void printonline()
Definition: TrackerMap.cc:2887
T const * product() const
Definition: ESHandle.h:86
void setTkMapRange(std::string &map_type)
void SiStripTrackerMapCreator::createForOffline ( const edm::ParameterSet tkmapPset,
DQMStore dqm_store,
std::string &  htype,
const edm::EventSetup eSetup 
)

Definition at line 123 of file SiStripTrackerMapCreator.cc.

References DQMStore::cd(), gather_cfg::cout, detcabling_, edm::ParameterSet::exists(), SiStripDetCabling::fedCabling(), edm::EventSetup::get(), edm::ParameterSet::getUntrackedParameter(), SiStripUtility::goToDir(), meanToMaxFactor_, numTopModules, edm::ESHandle< T >::product(), DQMStore::pwd(), ResidualsRMS_, sistrip::runNumber_, TrackerMap::save(), TrackerMap::save_as_fedtrackermap(), TrackerMap::save_as_psutrackermap(), TrackerMap::setTitle(), setTkMapFromAlarm(), setTkMapFromHistogram(), setTkMapRangeOffline(), sRunNumber, ssqLabel_, AlCaHLTBitMon_QueryRunRegistry::string, stripTopLevelDir_, tkMapMax_, tkMapMin_, topModLabel, topModules, trackerMap_, and useSSQuality_.

Referenced by SiStripActionExecutor::createOfflineTkMap().

125  {
126 
127  // Determine the strip top level dirctory in the DQM file: it is the path where MechanicalView is minus one directory
128 
129  std::string mdir = "MechanicalView";
130  dqm_store->cd();
131  if (!SiStripUtility::goToDir(dqm_store, mdir)) {
132  edm::LogError("SiStripTopLevelDirNotFound") << "I cannot find the SiStrip top level directory in the DQM file";
133  }
134  else {
135  const std::string& mechanicalview_dir = dqm_store->pwd();
136  stripTopLevelDir_=mechanicalview_dir.substr(0,mechanicalview_dir.find_last_of("/"));
137  edm::LogInfo("SiStripTopLevelDirFound") << "SiStrip top level directory is " << stripTopLevelDir_;
138  }
139  dqm_store->cd();
140 
141  //
142  const SiStripFedCabling* fedcabling = detcabling_->fedCabling();
143 
144  if(!fedcabling) return;
145 
146  edm::ESHandle<TrackerTopology> tTopoHandle;
147  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
148  const TrackerTopology* const tTopo = tTopoHandle.product();
149 
150  if (trackerMap_) delete trackerMap_;
151  trackerMap_ = new TrackerMap(tkmapPset,fedcabling,tTopo);
152 
153  meanToMaxFactor_ = tkmapPset.getUntrackedParameter<double>("meanToMaxFact",2.5);
154  useSSQuality_ = tkmapPset.getUntrackedParameter<bool>("useSSQuality",false);
155  ssqLabel_ = tkmapPset.getUntrackedParameter<std::string>("ssqLabel","");
156  bool tkMapPSU = tkmapPset.getUntrackedParameter<bool>("psuMap",false);
157  bool tkMapFED = tkmapPset.getUntrackedParameter<bool>("fedMap",false);
158  std::string namesuffix = tkmapPset.getUntrackedParameter<std::string>("mapSuffix","");
159 
160  // std::string tmap_title = " Tracker Map from " + map_type;
161  unsigned int runNumber_ = tkmapPset.getUntrackedParameter<unsigned int>("RunNumber",1); //LG
162  std::stringstream ss; //LG
163  ss << runNumber_; //LG
164  sRunNumber = ss.str(); //LG
165  std::cout << sRunNumber << "\n\n\n\n\n\n";
166  std::string tmap_title; //LG
167  if (runNumber_>0) { tmap_title = " Run: " + sRunNumber + ", Tracker Map from " + map_type; } //LG
168  else { tmap_title = " Tracker Map from " + map_type; } //LG
169  trackerMap_->setTitle(tmap_title);
170 
171  if(tkmapPset.exists("TopModules"))
172  topModules=tkmapPset.getUntrackedParameter<bool>("TopModules");
173  else
174  topModules=false;
175 
176  if(tkmapPset.exists("numberTopModules"))
177  numTopModules=tkmapPset.getUntrackedParameter<uint32_t>("numberTopModules");
178  else
179  numTopModules = 20;
180 
181  if (tkmapPset.exists("topModLabel"))
182  topModLabel=tkmapPset.getUntrackedParameter<int32_t>("topModLabel");
183  else
184  topModLabel = " top Modules " + map_type;
185 
186  if (map_type == "QTestAlarm") {
187  setTkMapFromAlarm(dqm_store, eSetup);
188  }
189  else {
190  setTkMapFromHistogram(dqm_store, map_type, eSetup);
191  }
192  // if not overwitten by manual configuration min=0 and max= mean value * meanToMaxFactor_
194 
195  // check manual setting
196 
197  if(tkmapPset.exists("mapMax")) tkMapMax_ = tkmapPset.getUntrackedParameter<double>("mapMax");
198  if(tkmapPset.exists("mapMin")) tkMapMin_ = tkmapPset.getUntrackedParameter<double>("mapMin");
199 
200  if (map_type == "ResidualsMean"){
201  ResidualsRMS_ = false;
202  setTkMapFromHistogram(dqm_store, map_type, eSetup);
203  edm::LogInfo("TkMapToBeSaved") << "Ready to save TkMap " << map_type << namesuffix << " with range set to " << tkMapMin_ << " - " << tkMapMax_;
204  trackerMap_->save(true, 0.0000000001,0.005, map_type+namesuffix+".svg");
205  trackerMap_->save(true, 0.0000000001,0.005, map_type+namesuffix+".png",4500,2400);
206  ResidualsRMS_ = true;
207  map_type = "ResidualsRMS";
208  if (runNumber_>0) { tmap_title = " Run: " + sRunNumber + ", Tracker Map from " + map_type; } //LG
209  else { tmap_title = " Tracker Map from " + map_type; } //LG
210  trackerMap_->setTitle(tmap_title);
211  setTkMapFromHistogram(dqm_store, map_type, eSetup);
212  edm::LogInfo("TkMapToBeSaved") << "Ready to save TkMap " << map_type << namesuffix << " with range set to 0.0 - 0.5";
213  trackerMap_->save(true, 0.000000001, 0.005, map_type+namesuffix+".svg");
214  trackerMap_->save(true, 0.000000001, 0.005, map_type+namesuffix+".png",4500,2400);
215  } else {
216  edm::LogInfo("TkMapToBeSaved") << "Ready to save TkMap " << map_type << namesuffix << " with range set to " << tkMapMin_ << " - " << tkMapMax_;
217  trackerMap_->save(true, tkMapMin_,tkMapMax_, map_type+namesuffix+".svg");
218  trackerMap_->save(true, tkMapMin_,tkMapMax_, map_type+namesuffix+".png",4500,2400);
219  }
220 
221  if(tkMapPSU) {
222 
223  edm::LogInfo("PSUMapToBeSaved") << "Ready to save PSU TkMap " << map_type << namesuffix << " with range set to " << tkMapMin_ << " - " << tkMapMax_;
224  // trackerMap_->save_as_psutrackermap(true, tkMapMin_,tkMapMax_, map_type+namesuffix+"_psu.svg");
225  trackerMap_->save_as_psutrackermap(true, tkMapMin_,tkMapMax_, map_type+namesuffix+"_psu.png");
226 
227  }
228 
229  if(tkMapFED) {
230 
231  edm::LogInfo("FEDMapToBeSaved") << "Ready to save FED TkMap " << map_type << namesuffix << " with range set to " << tkMapMin_ << " - " << tkMapMax_;
232  // trackerMap_->save_as_fedtrackermap(true, tkMapMin_,tkMapMax_, map_type+"_fed.svg");
233  trackerMap_->save_as_fedtrackermap(true, tkMapMin_,tkMapMax_, map_type+namesuffix+"_fed.png");
234 
235  }
236 
237  delete trackerMap_;
238  trackerMap_ = nullptr;
239 }
static const char runNumber_[]
T getUntrackedParameter(std::string const &, T const &) const
void save_as_psutrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="psu_svgmap.svg", int width=100+(360+100)*5+300, int height=50+(150+50)*6+300)
Definition: TrackerMap.cc:1853
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:718
edm::ESHandle< SiStripDetCabling > detcabling_
bool exists(std::string const &parameterName) const
checks if a parameter exists
void setTitle(std::string s)
Definition: TrackerMap.h:132
void setTkMapFromAlarm(DQMStore *dqm_store, const edm::EventSetup &eSetup)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
Definition: TrackerMap.cc:699
void setTkMapFromHistogram(DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
const SiStripFedCabling * fedCabling() const
void save_as_fedtrackermap(bool print_total=true, float minval=0., float maxval=0., std::string s="fed_svgmap.svg", int width=100+(90+100)*31+300, int height=150+(2940+150)*1+300)
Definition: TrackerMap.cc:2135
const T & get() const
Definition: EventSetup.h:55
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
static bool goToDir(DQMStore *dqm_store, std::string name)
T const * product() const
Definition: ESHandle.h:86
const std::string & pwd(void) const
Definition: DQMStore.cc:713
void SiStripTrackerMapCreator::createInfoFile ( std::vector< std::string >  map_names,
TTree *  tkinfo_tree,
DQMStore dqm_store,
std::vector< uint32_t >  detidList 
)

Definition at line 651 of file SiStripTrackerMapCreator.cc.

References DQMStore::cd(), comment, compare_using_db::dirname, getDetectorFlag(), SiStripUtility::goToDir(), recoMuon::in, DQMStore::pwd(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripActionExecutor::createTkInfoFile().

651  {
652 
653  std::map<std::string, float> tkhmap_value;
654  int qtalarm_flag = 0;
655  uint32_t det_id = 0;
656 
657  if(!tkinfo_tree) {
658  edm::LogError("SiStripTrackerMapCreator::createInfoFile") << "Tree not found!";
659  }
660  else {
661  tkinfo_tree->Branch("DetId",&det_id,"DetId/i");
662  for(std::vector<std::string>::const_iterator in = map_names.begin(); in != map_names.end(); ++in) {
663  std::string mapname = (*in);
664  if(mapname == "QTestAlarm") {
665  qtalarm_flag = 0;
666  tkinfo_tree->Branch(mapname.c_str(),&qtalarm_flag,std::string(mapname+"/I").c_str());
667  } else {
668  tkhmap_value[mapname] = -1.0;
669  tkinfo_tree->Branch(mapname.c_str(),&tkhmap_value[mapname],std::string(mapname+"/F").c_str());
670  }
671  }
672 
673  std::string dirname = "";
674 
675  std::string mdir = "MechanicalView";
676  dqm_store->cd();
677  if (!SiStripUtility::goToDir(dqm_store, mdir)) {
678  edm::LogError("SiStripTrackerMapCreator::createInfoFile") << "I cannot find the SiStrip top level directory in the DQM file";
679  }
680  else {
681  const std::string& mechanicalview_dir = dqm_store->pwd();
682  dirname=mechanicalview_dir.substr(0,mechanicalview_dir.find_last_of("/"));
683  edm::LogInfo("SiStripTrackerMapCreator::createInfoFile") << "SiStrip top level directory is " << dirname;
684  }
685  dqm_store->cd();
686 
687  std::vector<TkHistoMap*> tkHMaps;
688 
689  uint32_t nHists = map_names.size();
690 
691  for(uint32_t ih = 0; ih < nHists; ++ih) {
692  tkHMaps.push_back(new TkHistoMap());
693  if(map_names.at(ih) != "QTestAlarm") {
694  std::string tkhmap_name = "TkHMap_" + map_names.at(ih);
695  tkHMaps.at(ih)->loadTkHistoMap(dirname, tkhmap_name, true);
696  }
697  }
698 
699  for(std::vector<uint32_t>::const_iterator idet = detidList.begin(); idet != detidList.end(); ++idet) {
700  det_id = (*idet);
701  for(uint32_t ih = 0; ih < nHists; ++ih) {
702  if(map_names.at(ih) == "QTestAlarm") {
703  std::ostringstream comment;
704  qtalarm_flag = getDetectorFlag(det_id);
705  } else {
706  tkhmap_value[map_names.at(ih)] = tkHMaps.at(ih)->getValue(det_id);
707  }
708  }
709  if(!tkinfo_tree) {
710  edm::LogError("SiStripTrackerMapCreator::createInfoFile") << "Tree not found!";
711  }
712  else {
713  tkinfo_tree->Fill();
714  }
715  }
716 
717  // delete pointers
718  for(uint32_t ih = 0; ih < nHists; ++ih) {
719  delete tkHMaps.at(ih);
720  }
721 
722  }
723 
724 }
uint16_t getDetectorFlag(uint32_t det_id)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:718
static bool goToDir(DQMStore *dqm_store, std::string name)
const std::string & pwd(void) const
Definition: DQMStore.cc:713
#define comment(par)
Definition: vmac.h:161
uint16_t SiStripTrackerMapCreator::getDetectorFlag ( uint32_t  det_id)
inlineprivate

Definition at line 50 of file SiStripTrackerMapCreator.h.

Referenced by createInfoFile().

50 { return detflag_.find(det_id) != detflag_.end() ? detflag_[det_id] : 0; }
std::map< uint32_t, uint16_t > detflag_
uint16_t SiStripTrackerMapCreator::getDetectorFlagAndComment ( DQMStore dqm_store,
uint32_t  det_id,
const TrackerTopology tTopo,
std::ostringstream &  comment 
)
private

Definition at line 581 of file SiStripTrackerMapCreator.cc.

References DQMStore::cd(), detcabling_, DQMStore::dirExists(), MonitorElement::DQM_KIND_INT, RemoveAddSevLevel::flag, DQMStore::get(), SiStripUtility::getBadModuleStatus(), SiStripDetCabling::getConnections(), MonitorElement::getIntValue(), SiStripFolderOrganizer::getSubDetFolder(), mps_fire::i, MonitorElement::kind(), LogDebug, python.rootplot.argparse::message, SiStripFolderOrganizer::setSiStripFolderName(), AlCaHLTBitMon_QueryRunRegistry::string, and stripTopLevelDir_.

Referenced by paintTkMapFromAlarm(), and printTopModules().

582  {
583  // comment << " DetId " << det_id << " : ";
584  comment << "Module " << det_id;
585  uint16_t flag = 0;
586 
587  // get FED channels corresponding to the det_id
588 
589  // if(detcabling_) {
590  comment << " FEDCHs ";
591  std::vector<const FedChannelConnection*> conns = detcabling_->getConnections(det_id);
592  for(unsigned int i=0; i< conns.size() ;++i) {
593  if(conns[i]) {
594  comment << std::setw(3) << conns[i]->fedId() << "/" << std::setw(2) << conns[i]->fedCh()<< " ";
595  }
596  else {
597  comment << " ";
598  }
599  }
600  if(conns.empty()) { comment << " "; }
601  if(conns.size()==1) { comment << " "; }
602  if(conns.size()==2) { comment << " "; }
603  // }
604  if(!dqm_store) return flag;
605  // get PSU channel corresponding to the det_id
606  /*
607  comment << " PSU: ";
608  comment << psumap_.getPSUName(det_id);
609  */
610  //
611 
612  SiStripFolderOrganizer folder_organizer;
613  std::string subdet_folder, badmodule_folder;
614 
615  dqm_store->cd();
616 
617  folder_organizer.setSiStripFolderName(stripTopLevelDir_);
618  folder_organizer.getSubDetFolder(det_id, tTopo, subdet_folder);
619 
620  LogDebug("SearchBadModule") << det_id << " " << subdet_folder << " " << stripTopLevelDir_;
621 
622  if (dqm_store->dirExists(subdet_folder)){
623  badmodule_folder = subdet_folder + "/BadModuleList";
624  LogDebug("SearchBadModule") << subdet_folder << " exists: " << badmodule_folder;
625  } else {
626  // badmodule_folder = dqm_store->pwd() + "/BadModuleList";
627  edm::LogError("SubDetFolderNotFound") << subdet_folder << " does not exist for detid " << det_id;
628  return flag;
629  }
630  if (!dqm_store->dirExists(badmodule_folder)) {
631  LogDebug("BadModuleFolderNotFound") << badmodule_folder << " does not exist for detid " << det_id;
632  return flag;
633  }
634  std::ostringstream badmodule_path;
635  badmodule_path << badmodule_folder << "/" << det_id;
636  LogDebug("SearchBadModule") << badmodule_folder << " exists: " << badmodule_path;
637 
638  MonitorElement* bad_module_me = dqm_store->get(badmodule_path.str());
639  if (bad_module_me && bad_module_me->kind() == MonitorElement::DQM_KIND_INT) {
640  LogDebug("SearchBadModule") << "Monitor Element found";
641  flag = bad_module_me->getIntValue();
643  SiStripUtility::getBadModuleStatus(flag, message);
644  comment << message.c_str();
645  }
646  return flag;
647 }
#define LogDebug(id)
void setSiStripFolderName(std::string name)
void getSubDetFolder(const uint32_t &detid, const TrackerTopology *tTopo, std::string &folder_name)
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:718
edm::ESHandle< SiStripDetCabling > detcabling_
static void getBadModuleStatus(uint16_t flag, std::string &message)
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
Kind kind(void) const
Get the type of the monitor element.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
Definition: DQMStore.cc:1807
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:806
int64_t getIntValue(void) const
#define comment(par)
Definition: vmac.h:161
void SiStripTrackerMapCreator::paintTkMapFromAlarm ( uint32_t  det_id,
const TrackerTopology tTopo,
DQMStore dqm_store,
bool  isBad = false,
std::map< unsigned int, std::string > *  badmodmap = 0 
)
private

Definition at line 371 of file SiStripTrackerMapCreator.cc.

References comment, detflag_, TrackerMap::fillc(), RemoveAddSevLevel::flag, getDetectorFlagAndComment(), SiStripUtility::getDetectorStatusColor(), TrackerTopology::layer(), TrackerMap::setText(), AlCaHLTBitMon_QueryRunRegistry::string, and trackerMap_.

Referenced by setTkMapFromAlarm().

372  {
373  std::ostringstream comment;
374  uint16_t flag = 0;
375  flag = getDetectorFlagAndComment(dqm_store, det_id, tTopo, comment);
376 
377  int rval, gval, bval;
378  SiStripUtility::getDetectorStatusColor(flag, rval, gval, bval);
379  if(isBad) { rval=255; gval=255; bval = 0; comment << " PCLBadModule ";}
380  trackerMap_->setText(det_id, comment.str());
381  trackerMap_->fillc(det_id, rval, gval, bval);
382 
383  if(badmodmap && (flag!=0 || isBad)){
384  uint lay= tTopo->layer(SiStripDetId(det_id));
385  std::string layer =" Layer "+ std::to_string(lay);
386  (*badmodmap)[det_id] = comment.str() + layer;
387  }
388 
389  detflag_[det_id] = flag;
390 }
static void getDetectorStatusColor(int status, int &rval, int &gval, int &bval)
uint16_t getDetectorFlagAndComment(DQMStore *dqm_store, uint32_t det_id, const TrackerTopology *tTopo, std::ostringstream &comment)
std::map< uint32_t, uint16_t > detflag_
void fillc(int idmod, int RGBcode)
Definition: TrackerMap.h:109
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
unsigned long long int rval
Definition: vlib.h:22
unsigned int layer(const DetId &id) const
void setText(int idmod, std::string s)
Definition: TrackerMap.cc:2797
#define comment(par)
Definition: vmac.h:161
void SiStripTrackerMapCreator::paintTkMapFromHistogram ( DQMStore dqm_store,
MonitorElement me,
std::string &  map_type,
std::vector< std::pair< float, uint32_t > > *  topNmodVec 
)
private

Definition at line 491 of file SiStripTrackerMapCreator.cc.

References funct::abs(), cached_detid, cached_layer, cached_XYbin, MonitorElement::DQM_KIND_TPROFILE2D, TrackerMap::fill_current_val(), TrackerMap::fillc(), MonitorElement::getBinContent(), TkDetMap::getDetsForLayer(), TkDetMap::getLayerNum(), MonitorElement::getName(), MonitorElement::getTProfile2D(), TkDetMap::getXY(), TkLayerMap::XYbin::ix, TkLayerMap::XYbin::iy, MonitorElement::kind(), dataset::name, nDet, ResidualsRMS_, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, tkDetMap_, tkMapMax_, and trackerMap_.

Referenced by setTkMapFromHistogram().

491  {
492 
493  // edm::ESHandle<SiStripQuality> ssq;
494 
495  // if(useSSQuality_) { eSetup_.get<SiStripQualityRcd>().get(ssqLabel_,ssq); }
496 
497  const std::string& name = me->getName();
498  std::string lname = name.substr(name.find("TkHMap_")+7);
499  lname = lname.substr(lname.find("_T")+1);
500  std::vector<uint32_t> layer_detids;
501  tkDetMap_->getDetsForLayer(tkDetMap_->getLayerNum(lname), layer_detids);
502  for (std::vector<uint32_t>::const_iterator idet = layer_detids.begin(); idet != layer_detids.end(); idet++) {
503  uint32_t det_id= (*idet);
504  if (det_id <= 0) continue;
505  nDet++;
507  float fval = 0.0;
508  if ( (name.find("NumberOfOff") != std::string::npos) || //temporary fix
509  (name.find("NumberOfOnTrackCluster") != std::string::npos) ) {
511  TProfile2D* tp = me->getTProfile2D() ;
512  fval = tp->GetBinEntries(tp->GetBin(xyval.ix, xyval.iy)) * tp->GetBinContent(xyval.ix, xyval.iy);
513  }
514  } else if(name.find("Residuals") != std::string::npos){
515  if(ResidualsRMS_==true){
517  TProfile2D* tp = me->getTProfile2D() ;
518  float fval_prov = tp->GetBinError(xyval.ix, xyval.iy) * sqrt(tp->GetBinEntries(tp->GetBin(xyval.ix, xyval.iy)));
519  fval = fval_prov;
520  }
521  } else {
522  float fval_prov = me->getBinContent(xyval.ix, xyval.iy);
523  fval = std::abs (fval_prov);
524  }
525  } else fval = me->getBinContent(xyval.ix, xyval.iy);
526  if (htype == "QTestAlarm") {
527  edm::LogError("ItShouldNotBeHere") << "QTestAlarm map: you should not be here!";
528  /*
529  int rval, gval, bval;
530  std::ostringstream comment;
531  uint32_t flag = 0;
532  flag = getDetectorFlagAndComment(dqm_store, det_id, comment);
533  SiStripUtility::getDetectorStatusColor(flag, rval, gval, bval);
534  if(useSSQuality_ && ssq->IsModuleBad(det_id)) { rval=255; gval=255; bval = 0;}
535  trackerMap_->fillc(det_id, rval, gval, bval);
536  trackerMap_->setText(det_id, comment.str());
537  */
538  } else {
539  if (fval == 0.0) trackerMap_->fillc(det_id,255, 255, 255);
540  else {
541  trackerMap_->fill_current_val(det_id, fval);
542  if(topNmodVec){
543  auto detPair = std::make_pair(fval,det_id);
544  topNmodVec->push_back(detPair);
545  }
546  }
547  tkMapMax_ += fval;
548  }
549  }
550 }
int getLayerNum(const std::string &in) const
Definition: TkDetMap.cc:777
const std::string & getName(void) const
get name of ME
TProfile2D * getTProfile2D(void) const
T sqrt(T t)
Definition: SSEVec.h:18
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Kind kind(void) const
Get the type of the monitor element.
void getDetsForLayer(int layer, std::vector< uint32_t > &output) const
Definition: TkDetMap.cc:695
void fillc(int idmod, int RGBcode)
Definition: TrackerMap.h:109
double getBinContent(int binx) const
get content of bin (1-D)
void fill_current_val(int idmod, float current_val)
Definition: TrackerMap.cc:2759
const TkLayerMap::XYbin & getXY(uint32_t &, uint32_t &cached_detid, int16_t &cached_layer, TkLayerMap::XYbin &cached_XYbin) const
Definition: TkDetMap.cc:652
void SiStripTrackerMapCreator::printBadModuleList ( std::map< unsigned int, std::string > *  badmodmap,
const edm::EventSetup eSetup 
)
private

Definition at line 282 of file SiStripTrackerMapCreator.cc.

References edm::EventSetup::get(), edm::ESHandle< T >::product(), sRunNumber, SiStripDetId::subDetector(), SiStripDetId::TEC, TrackerTopology::tecSide(), SiStripDetId::TIB, SiStripDetId::TID, TrackerTopology::tidSide(), and SiStripDetId::TOB.

Referenced by setTkMapFromAlarm().

282  {
283 
284  //Retrieve tracker topology from geometry
285  edm::ESHandle<TrackerTopology> tTopoHandle;
286  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
287  const TrackerTopology* const tTopo = tTopoHandle.product();
288 
289  bool tibDone=false,tidSide1Done=false,tidSide2Done=false,tobDone=false,tecSide1Done=false,tecSide2Done=false;
290  unsigned int tibFirst=369120277-1,
291  tidSide1First=402664197-1,tidSide2First=402672389-1,
292  tobFirst=436228134-1,
293  tecSide1First=470044965-1,tecSide2First=470307109-1;
294 
295  int ntib=0,ntids1=0,ntids2=0,ntob=0,ntecs1=0,ntecs2=0;
296 
297  for(std::map<unsigned int,std::string>::const_iterator badmod = badmodmap->begin(); badmod!= badmodmap->end(); ++badmod) {
298  SiStripDetId ssdetid(badmod->first);
299  if(ssdetid.subDetector()==SiStripDetId::TIB) ntib++;
300  if(ssdetid.subDetector()==SiStripDetId::TID) {
301 
302  if(tTopo->tidSide(ssdetid)==1) ntids1++;
303  if(tTopo->tidSide(ssdetid)==2) ntids2++;
304  }
305  if(ssdetid.subDetector()==SiStripDetId::TOB) ntob++;
306  if(ssdetid.subDetector()==SiStripDetId::TEC) {
307 
308  if(tTopo->tecSide(ssdetid)==1) ntecs1++;
309  if(tTopo->tecSide(ssdetid)==2) ntecs2++;
310  }
311  }
312 
313  // edm::LogVerbatim("BadModuleList") << "Number of bad modules in total:";
314  edm::LogVerbatim("BadModuleList") << "Run: " << sRunNumber << ", Number of bad modules in total:"; //LG
315  edm::LogVerbatim("BadModuleList") << "--------------------------------------------------------------";
316  edm::LogVerbatim("BadModuleList") << "TIB: " << ntib;
317  edm::LogVerbatim("BadModuleList") << "TID/MINUS: " << ntids1;
318  edm::LogVerbatim("BadModuleList") << "TID/PLUS: " << ntids2;
319  edm::LogVerbatim("BadModuleList") << "TOB: " << ntob;
320  edm::LogVerbatim("BadModuleList") << "TEC/MINUS: " << ntecs1;
321  edm::LogVerbatim("BadModuleList") << "TEC/PLUS: " << ntecs2;
322  edm::LogVerbatim("BadModuleList") << "-------------------------------";
323  edm::LogVerbatim("BadModuleList") ;
324  edm::LogVerbatim("BadModuleList") << "List of bad modules per partition:";
325  edm::LogVerbatim("BadModuleList") << "----------------------------------";
326 
327  for(std::map<unsigned int,std::string>::const_iterator badmod = badmodmap->begin(); badmod!= badmodmap->end(); ++badmod) {
328  if(!tibDone && badmod->first >= tibFirst) {
329  tibDone = true;
330  edm::LogVerbatim("BadModuleList") ;
331  edm::LogVerbatim("BadModuleList") << "SubDetector TIB";
332  edm::LogVerbatim("BadModuleList") ;
333  }
334  if(!tidSide1Done && badmod->first >= tidSide1First) {
335  tidSide1Done = true;
336  edm::LogVerbatim("BadModuleList") ;
337  edm::LogVerbatim("BadModuleList") << "SubDetector TID/MINUS";
338  edm::LogVerbatim("BadModuleList") ;
339  }
340  if(!tidSide2Done && badmod->first >= tidSide2First) {
341  tidSide2Done = true;
342  edm::LogVerbatim("BadModuleList") ;
343  edm::LogVerbatim("BadModuleList") << "SubDetector TID/PLUS";
344  edm::LogVerbatim("BadModuleList") ;
345  }
346  if(!tobDone && badmod->first >= tobFirst) {
347  tobDone = true;
348  edm::LogVerbatim("BadModuleList") ;
349  edm::LogVerbatim("BadModuleList") << "SubDetector TOB";
350  edm::LogVerbatim("BadModuleList") ;
351  }
352  if(!tecSide1Done && badmod->first >= tecSide1First) {
353  tecSide1Done = true;
354  edm::LogVerbatim("BadModuleList") ;
355  edm::LogVerbatim("BadModuleList") << "SubDetector TEC/MINUS";
356  edm::LogVerbatim("BadModuleList") ;
357  }
358  if(!tecSide2Done && badmod->first >= tecSide2First) {
359  tecSide2Done = true;
360  edm::LogVerbatim("BadModuleList") ;
361  edm::LogVerbatim("BadModuleList") << "SubDetector TEC/PLUS";
362  edm::LogVerbatim("BadModuleList") ;
363  }
364  edm::LogVerbatim("BadModuleList") << badmod->second;
365  }
366 }
unsigned int tidSide(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
unsigned int tecSide(const DetId &id) const
void SiStripTrackerMapCreator::printTopModules ( std::vector< std::pair< float, uint32_t > > *  topNmodVec,
const edm::EventSetup eSetup 
)
private

Definition at line 450 of file SiStripTrackerMapCreator.cc.

References comment, RemoveAddSevLevel::flag, edm::EventSetup::get(), getDetectorFlagAndComment(), numTopModules, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::subDetector(), subdetector, SiStripDetId::TEC, TrackerTopology::tecSide(), SiStripDetId::TIB, SiStripDetId::TID, TrackerTopology::tidSide(), SiStripDetId::TOB, and topModLabel.

Referenced by setTkMapFromHistogram().

450  {
451 
453  //edm::ESHandle<TrackerTopology> tTopoHandle;
454  //eSetup.get<TrackerTopologyRecord>().get(tTopoHandle);
455  //const TrackerTopology* const tTopo = tTopoHandle.product();
456  edm::ESHandle<TrackerTopology> tTopoHandle;
457  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
458  const TrackerTopology* const tTopo = tTopoHandle.product();
459 
460  if (topNmodVec->empty()) return;
461 
462  std::sort(topNmodVec->rbegin(), topNmodVec->rend());
463  if (topNmodVec->size() > numTopModules) topNmodVec->resize(numTopModules);
464 
465  edm::LogVerbatim("TopModules") << topModLabel;
466  edm::LogVerbatim("TopModules") << "------------------------------------------------------";
467 
468  for (std::vector<std::pair<float, uint32_t> >::const_iterator itNmod = topNmodVec->begin(); itNmod != topNmodVec->end(); itNmod++){
469  std::pair<float, uint32_t> aPair=(*itNmod);
470  uint32_t det_id = aPair.second;
471  std::ostringstream comment;
473  SiStripDetId ssdetid(aPair.second);
474  if(ssdetid.subDetector()==SiStripDetId::TIB) subdetector = "TIB ";
475  if(ssdetid.subDetector()==SiStripDetId::TID){
476  if(tTopo->tidSide(ssdetid)==1) subdetector = "TID/MINUS ";
477  if(tTopo->tidSide(ssdetid)==2) subdetector = "TID/PLUS ";
478  }
479  if(ssdetid.subDetector()==SiStripDetId::TOB) subdetector = "TOB ";
480  if(ssdetid.subDetector()==SiStripDetId::TEC){
481  if(tTopo->tecSide(ssdetid)==1) subdetector = "TEC/MINUS ";
482  if(tTopo->tecSide(ssdetid)==2) subdetector = "TEC/PLUS ";
483  }
484  uint16_t flag = getDetectorFlagAndComment(nullptr, det_id, tTopo, comment);
485  if (flag == 0) edm::LogVerbatim("TopModules") << subdetector << comment.str() << " value: "<< aPair.first;
486  }
487  edm::LogVerbatim("TopModules") << "------------------------------------------------------";
488 }
TString subdetector
uint16_t getDetectorFlagAndComment(DQMStore *dqm_store, uint32_t det_id, const TrackerTopology *tTopo, std::ostringstream &comment)
unsigned int tidSide(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
unsigned int tecSide(const DetId &id) const
#define comment(par)
Definition: vmac.h:161
bool SiStripTrackerMapCreator::readConfiguration ( )
void SiStripTrackerMapCreator::setTkMapFromAlarm ( DQMStore dqm_store,
const edm::EventSetup eSetup 
)
private

Definition at line 242 of file SiStripTrackerMapCreator.cc.

References detcabling_, eSetup_, TrackerMap::fillc_all_blank(), edm::EventSetup::get(), SiStripDetCabling::getDetCabling(), SiStripQuality::IsModuleBad(), genParticles_cff::map, python.rootplot.argparse::module, nDet, paintTkMapFromAlarm(), printBadModuleList(), edm::ESHandle< T >::product(), ssqLabel_, tkMapMax_, tkMapMin_, trackerMap_, and useSSQuality_.

Referenced by create(), and createForOffline().

242  {
243 
244  //Retrieve tracker topology from geometry
245  edm::ESHandle<TrackerTopology> tTopoHandle;
246  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
247  const TrackerTopology* const tTopo = tTopoHandle.product();
248 
249  nDet = 0;
250  tkMapMax_ = 0.0;
251  tkMapMin_ = 0.0;
252 
254 
256 
258 
259  std::map<unsigned int,std::string>* badmodmap = new std::map<unsigned int,std::string>;
260 
261  // used to avoid multiple checks on the same detid since the loop is done on the FED channels
262  uint32_t detId_save = 0;
263  // example of loop using SiStripDetCabling
264  for(std::map< uint32_t, std::vector<const FedChannelConnection *> >::const_iterator module = detcabling_->getDetCabling().begin();
265  module!=detcabling_->getDetCabling().end();++module) {
266  uint32_t detId = module->first;
267  if (detId == 0 || detId == 0xFFFFFFFF) continue;
268  if (detId_save != detId) {
269  detId_save = detId;
270  bool isBad = useSSQuality_ && ssq->IsModuleBad(detId);
271  paintTkMapFromAlarm(detId, tTopo, dqm_store,isBad,badmodmap);
272  }
273  else {
274  edm::LogWarning("TwiceTheSameDetId") << "The detid " << detId << " was found already in the loop on SiStripDetCabling";
275  }
276  }
277  //
278  printBadModuleList(badmodmap, eSetup);
279  delete badmodmap;
280 }
void fillc_all_blank()
Definition: TrackerMap.cc:2741
edm::ESHandle< SiStripDetCabling > detcabling_
void printBadModuleList(std::map< unsigned int, std::string > *badmodmap, const edm::EventSetup &eSetup)
void paintTkMapFromAlarm(uint32_t det_id, const TrackerTopology *tTopo, DQMStore *dqm_store, bool isBad=false, std::map< unsigned int, std::string > *badmodmap=0)
const edm::EventSetup & eSetup_
bool IsModuleBad(const uint32_t &detid) const
const std::map< uint32_t, std::vector< const FedChannelConnection * > > & getDetCabling() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
Definition: vlib.h:208
void SiStripTrackerMapCreator::setTkMapFromHistogram ( DQMStore dqm_store,
std::string &  htype,
const edm::EventSetup eSetup 
)
private

Definition at line 394 of file SiStripTrackerMapCreator.cc.

References DQMStore::cd(), DQMStore::dirExists(), RefreshWebPage::dname, DQMStore::getContents(), DQMStore::getSubdirs(), SiStripUtility::goToDir(), dataset::name, nDet, paintTkMapFromHistogram(), printTopModules(), DQMStore::pwd(), AlCaHLTBitMon_QueryRunRegistry::string, tkMapMax_, tkMapMin_, and topModules.

Referenced by create(), and createForOffline().

394  {
395  dqm_store->cd();
396 
397  std::string mdir = "MechanicalView";
398  if (!SiStripUtility::goToDir(dqm_store, mdir)) return;
399  std::string mechanicalview_dir = dqm_store->pwd();
400 
401  std::vector<std::string> subdet_folder;
402  subdet_folder.push_back("TIB");
403  subdet_folder.push_back("TOB");
404  subdet_folder.push_back("TEC/MINUS");
405  subdet_folder.push_back("TEC/PLUS");
406  subdet_folder.push_back("TID/MINUS");
407  subdet_folder.push_back("TID/PLUS");
408 
409  nDet = 0;
410  tkMapMax_ = 0.0;
411  tkMapMin_ = 0.0;
412  std::vector<std::pair<float,uint32_t> >* topNmodVec = new std::vector<std::pair<float,uint32_t> >;
413 
414  for (std::vector<std::string>::const_iterator it = subdet_folder.begin(); it != subdet_folder.end(); it++) {
415  std::string dname = mechanicalview_dir + "/" + (*it);
416  if (!dqm_store->dirExists(dname)) continue;
417  dqm_store->cd(dname);
418  std::vector<std::string> layerVec = dqm_store->getSubdirs();
419  for (std::vector<std::string>::const_iterator iLayer = layerVec.begin(); iLayer != layerVec.end(); iLayer++) {
420  if ((*iLayer).find("BadModuleList") !=std::string::npos) continue;
421  std::vector<MonitorElement*> meVec = dqm_store->getContents((*iLayer));
422  MonitorElement* tkhmap_me = nullptr;
424  for (std::vector<MonitorElement*>::const_iterator itkh = meVec.begin(); itkh != meVec.end(); itkh++) {
425  name = (*itkh)->getName();
426  if (name.find("TkHMap") == std::string::npos) continue;
427  if (htype == "QTestAlarm" ){
428  edm::LogError("ItShouldNotBeHere") << "QTestAlarm map: you should not be here!";
429  tkhmap_me = (*itkh);
430  break;
431  } else if (name.find(htype) != std::string::npos) {
432  tkhmap_me = (*itkh);
433  break;
434  }
435  }
436  if (tkhmap_me != nullptr) {
437  if (topModules){
438  paintTkMapFromHistogram(dqm_store,tkhmap_me, htype, topNmodVec);
439  }
440  else paintTkMapFromHistogram(dqm_store,tkhmap_me, htype, nullptr);
441  }
442  }
443  dqm_store->cd(mechanicalview_dir);
444  }
445  dqm_store->cd();
446  if (topModules) printTopModules(topNmodVec, eSetup);
447  delete topNmodVec;
448 }
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1758
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:718
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1836
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:806
void paintTkMapFromHistogram(DQMStore *dqm_store, MonitorElement *me, std::string &map_type, std::vector< std::pair< float, uint32_t > > *topNmodVec)
void printTopModules(std::vector< std::pair< float, uint32_t > > *topNmodVec, const edm::EventSetup &eSetup)
static bool goToDir(DQMStore *dqm_store, std::string name)
const std::string & pwd(void) const
Definition: DQMStore.cc:713
void SiStripTrackerMapCreator::setTkMapRange ( std::string &  map_type)
private

Definition at line 554 of file SiStripTrackerMapCreator.cc.

References meanToMaxFactor_, nDet, TrackerMap::setRange(), tkMapMax_, tkMapMin_, and trackerMap_.

Referenced by create().

554  {
555  tkMapMin_ = 0.0;
556  if (tkMapMax_ == 0.0) {
557  if (map_type.find("FractionOfBadChannels") != std::string::npos) tkMapMax_ = 1.0;
558  else if (map_type.find("NumberOfCluster") != std::string::npos) tkMapMax_ = 0.01;
559  else if (map_type.find("NumberOfDigi") != std::string::npos) tkMapMax_ = 0.6;
560  else if (map_type.find("NumberOfOffTrackCluster") != std::string::npos) tkMapMax_ = 100.0;
561  else if (map_type.find("NumberOfOnTrackCluster") != std::string::npos) tkMapMax_ = 50.0;
562  else if (map_type.find("StoNCorrOnTrack") != std::string::npos) tkMapMax_ = 200.0;
563  } else {
564  tkMapMax_ = tkMapMax_/nDet*1.0;
566  }
568 }
void setRange(float min, float max)
Definition: TrackerMap.cc:671
void SiStripTrackerMapCreator::setTkMapRangeOffline ( )
private

Definition at line 569 of file SiStripTrackerMapCreator.cc.

References meanToMaxFactor_, nDet, tkMapMax_, and tkMapMin_.

Referenced by createForOffline().

569  {
570  tkMapMin_ = 0.0;
571  if (tkMapMax_ != 0.0) {
572  tkMapMax_ = tkMapMax_/(nDet*1.0);
574  }
575  // the following line seems to be useless and misleading: in the offline map creation the range is set with the save... methods
576  // trackerMap_->setRange(tkMapMin_, tkMapMax_);
577 }

Member Data Documentation

uint32_t SiStripTrackerMapCreator::cached_detid
private

Definition at line 71 of file SiStripTrackerMapCreator.h.

Referenced by paintTkMapFromHistogram(), and SiStripTrackerMapCreator().

int16_t SiStripTrackerMapCreator::cached_layer
private

Definition at line 72 of file SiStripTrackerMapCreator.h.

Referenced by paintTkMapFromHistogram(), and SiStripTrackerMapCreator().

TkLayerMap::XYbin SiStripTrackerMapCreator::cached_XYbin
private

Definition at line 74 of file SiStripTrackerMapCreator.h.

Referenced by paintTkMapFromHistogram().

edm::ESHandle< SiStripDetCabling > SiStripTrackerMapCreator::detcabling_
private
std::map<uint32_t, uint16_t> SiStripTrackerMapCreator::detflag_
private

Definition at line 73 of file SiStripTrackerMapCreator.h.

Referenced by paintTkMapFromAlarm().

const edm::EventSetup& SiStripTrackerMapCreator::eSetup_
private

Definition at line 68 of file SiStripTrackerMapCreator.h.

Referenced by setTkMapFromAlarm(), and SiStripTrackerMapCreator().

float SiStripTrackerMapCreator::meanToMaxFactor_
private
int SiStripTrackerMapCreator::nDet
private
uint32_t SiStripTrackerMapCreator::numTopModules
private

Definition at line 76 of file SiStripTrackerMapCreator.h.

Referenced by createForOffline(), and printTopModules().

bool SiStripTrackerMapCreator::ResidualsRMS_
private

Definition at line 64 of file SiStripTrackerMapCreator.h.

Referenced by createForOffline(), and paintTkMapFromHistogram().

std::string SiStripTrackerMapCreator::sRunNumber
private

Definition at line 56 of file SiStripTrackerMapCreator.h.

Referenced by createForOffline(), and printBadModuleList().

std::string SiStripTrackerMapCreator::ssqLabel_
private

Definition at line 65 of file SiStripTrackerMapCreator.h.

Referenced by create(), createForOffline(), and setTkMapFromAlarm().

std::string SiStripTrackerMapCreator::stripTopLevelDir_
private
TkDetMap* SiStripTrackerMapCreator::tkDetMap_
private

Definition at line 67 of file SiStripTrackerMapCreator.h.

Referenced by paintTkMapFromHistogram(), and SiStripTrackerMapCreator().

float SiStripTrackerMapCreator::tkMapMax_
private
float SiStripTrackerMapCreator::tkMapMin_
private
std::string SiStripTrackerMapCreator::tkMapName_
private

Definition at line 57 of file SiStripTrackerMapCreator.h.

std::string SiStripTrackerMapCreator::topModLabel
private

Definition at line 77 of file SiStripTrackerMapCreator.h.

Referenced by createForOffline(), and printTopModules().

bool SiStripTrackerMapCreator::topModules
private

Definition at line 75 of file SiStripTrackerMapCreator.h.

Referenced by createForOffline(), and setTkMapFromHistogram().

TrackerMap* SiStripTrackerMapCreator::trackerMap_
private
bool SiStripTrackerMapCreator::useSSQuality_
private

Definition at line 63 of file SiStripTrackerMapCreator.h.

Referenced by create(), createForOffline(), and setTkMapFromAlarm().