CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
SiStripBaseCondObjDQM Class Referenceabstract

ADDITON OF TK_HISTO_MAP. More...

#include <SiStripBaseCondObjDQM.h>

Inheritance diagram for SiStripBaseCondObjDQM:
SiStripApvGainsDQM SiStripCablingDQM SiStripLorentzAngleDQM SiStripNoisesDQM SiStripPedestalsDQM SiStripQualityDQM SiStripThresholdDQM

Classes

struct  ModMEs
 

Public Member Functions

void analysis (const edm::EventSetup &eSetup_)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, std::vector< uint32_t > detIdsOnDemand)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
 
virtual void end ()
 
virtual void getActiveDetIds (const edm::EventSetup &eSetup)=0
 
std::vector< uint32_t > getCabledModules ()
 
virtual unsigned long long getCache (const edm::EventSetup &eSetup_)=0
 
virtual void getConditionObject (const edm::EventSetup &eSetup_)=0
 
void selectModules (std::vector< uint32_t > &detIds_)
 
 SiStripBaseCondObjDQM (const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
virtual ~SiStripBaseCondObjDQM ()
 

Protected Member Functions

virtual void fillMEsForDet (ModMEs selModME_, uint32_t selDetId_)=0
 
virtual void fillMEsForLayer (uint32_t selDetId_)=0
 
virtual void fillModMEs (const std::vector< uint32_t > &selectedDetIds)
 
virtual void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds)
 
void fillTkMap (const uint32_t &detid, const float &value)
 
std::pair< std::string, uint32_t > getLayerNameAndId (const uint32_t &detId_)
 
void getModMEs (ModMEs &CondObj_ME, const uint32_t &detId_)
 
std::vector< uint32_t > GetSameLayerDetId (std::vector< uint32_t > activeDetIds, uint32_t selDetId)
 
std::pair< std::string, uint32_t > getStringNameAndId (const uint32_t &detId_)
 
void getSummaryMEs (ModMEs &CondObj_ME, const uint32_t &detId_)
 

Protected Attributes

std::vector< uint32_t > activeDetIds
 
std::vector< uint32_t > all_DetIds
 
unsigned long long cacheID_current
 
unsigned long long cacheID_memory
 
std::string CondObj_fillId_
 
std::string CondObj_name_
 
const edm::EventSetupeSetup_
 
edm::ParameterSet fPSet_
 
bool GrandSummary_On_
 
bool HistoMaps_On_
 
edm::ParameterSet hPSet_
 
double maxValue
 
double minValue
 
bool Mod_On_
 
std::map< uint32_t, ModMEsModMEsMap_
 
SiStripDetInfoFileReaderreader
 
std::map< uint32_t, ModMEsSummaryMEsMap_
 
bool SummaryOnLayerLevel_On_
 
bool SummaryOnStringLevel_On_
 
TkHistoMapTk_HM_
 
TkHistoMapTk_HM_H
 
TkHistoMapTk_HM_L
 
TrackerMaptkMap
 
std::vector< int > tkMapScaler
 

Private Member Functions

void bookCumulMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
 
void bookProfileMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
 
void bookSummaryCumulMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
 
void bookSummaryMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
 
void bookSummaryProfileMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
 
void bookTkMap (const std::string &TkMapname)
 
void saveTkMap (const std::string &TkMapname, double minValue, double maxValue)
 

Private Attributes

std::string condDataMonitoringMode_
 
edm::ESHandle< SiStripDetCablingdetCablingHandle_
 
DQMStoredqmStore_
 
SiStripFolderOrganizer folder_organizer
 
SiStripHistoId hidmanager
 
std::vector< uint32_t > ModulesToBeExcluded_
 
std::vector< uint32_t > ModulesToBeIncluded_
 
std::vector< std::string > SubDetectorsToBeExcluded_
 

Detailed Description

ADDITON OF TK_HISTO_MAP.

Definition at line 41 of file SiStripBaseCondObjDQM.h.

Constructor & Destructor Documentation

SiStripBaseCondObjDQM::SiStripBaseCondObjDQM ( const edm::EventSetup eSetup,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet 
)

Definition at line 9 of file SiStripBaseCondObjDQM.cc.

References bookTkMap(), CondObj_fillId_, CondObj_name_, fPSet_, edm::ParameterSet::getParameter(), GrandSummary_On_, HistoMaps_On_, hPSet_, maxValue, minValue, Mod_On_, reader, OfflineSiStripConfigDb_cff::SiStripDetInfoFileReader, SummaryOnLayerLevel_On_, and SummaryOnStringLevel_On_.

11  :
12  eSetup_(eSetup),
13  hPSet_(hPSet),
14  fPSet_(fPSet),
15  cacheID_memory(0),
17 
18  reader = new SiStripDetInfoFileReader(edm::FileInPath(std::string("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat") ).fullPath());
19 
20  Mod_On_ = fPSet_.getParameter<bool>("Mod_On");
21  HistoMaps_On_ = fPSet_.getParameter<bool>("HistoMaps_On");
22  SummaryOnLayerLevel_On_ = fPSet_.getParameter<bool>("SummaryOnLayerLevel_On");
23  SummaryOnStringLevel_On_ = fPSet_.getParameter<bool>("SummaryOnStringLevel_On");
24 
25  GrandSummary_On_ = fPSet_.getParameter<bool>("GrandSummary_On");
26 
27  CondObj_fillId_ = hPSet_.getParameter<std::string>("CondObj_fillId");
28  CondObj_name_ = hPSet_.getParameter<std::string>("CondObj_name");
29 
30 
31  //Warning message from wrong input:
32  if(SummaryOnLayerLevel_On_ && SummaryOnStringLevel_On_){
33  edm::LogWarning("SiStripBaseCondObjDQM")
34  << "[SiStripBaseCondObjDQM::SiStripBaseCondObjDQMs] PLEASE CHECK : String and layer level options can not be activated together"
35  << std::endl;
36  }
37 
38  //The OR of the two conditions allow to switch on this feature for all the components (if the FillConditions_PSet has the TkMap_On =true) or for single MEs (if the PSet for a ME has the TkMap_On =true)
39  if(fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On")) bookTkMap(hPSet_.getParameter<std::string>("TkMapName"));
40 
41 
42  minValue=hPSet_.getParameter<double>("minValue");
43  maxValue=hPSet_.getParameter<double>("maxValue");
44 
45 }
T getParameter(std::string const &) const
void bookTkMap(const std::string &TkMapname)
SiStripDetInfoFileReader * reader
unsigned long long cacheID_memory
const edm::EventSetup & eSetup_
virtual SiStripBaseCondObjDQM::~SiStripBaseCondObjDQM ( )
inlinevirtual

Definition at line 53 of file SiStripBaseCondObjDQM.h.

53 {};

Member Function Documentation

void SiStripBaseCondObjDQM::analysis ( const edm::EventSetup eSetup_)

Definition at line 51 of file SiStripBaseCondObjDQM.cc.

References activeDetIds, cacheID_current, cacheID_memory, edm::IOVSyncValue::eventID(), lut2db_cfg::filename, fillModMEs(), fillSummaryMEs(), fPSet_, getActiveDetIds(), SiStripDetInfoFileReader::getAllDetIds(), getCache(), getConditionObject(), edm::ParameterSet::getParameter(), hPSet_, edm::EventSetup::iovSyncValue(), maxValue, minValue, Mod_On_, reader, edm::EventID::run(), saveTkMap(), selectModules(), SummaryOnLayerLevel_On_, and SummaryOnStringLevel_On_.

Referenced by SiStripClassToMonitorCondData::analyseCondData(), and SiStripMonitorCondData::analyze().

51  {
52 
53  cacheID_current= getCache(eSetup_);
54 
55  if (cacheID_memory == cacheID_current) return;
56 
57  getConditionObject(eSetup_);
58 
59  //The OR of the two conditions allows to switch on this feature for all the components (if the FillConditions_PSet has the ActiveDetIds_On =true) or for single MEs (if the PSet for a ME has the ActiveDetIds_On =true)
60  if(fPSet_.getParameter<bool>("ActiveDetIds_On") || hPSet_.getParameter<bool>("ActiveDetIds_On"))
61  getActiveDetIds(eSetup_);
62  else
64 
66 
69 
70  std::string filename = hPSet_.getParameter<std::string>("TkMapName");
71  if (filename!=""){
72  char sRun[128];
73  sprintf(sRun,"_Run_%d",eSetup_.iovSyncValue().eventID().run());
74  filename.insert(filename.find("."),sRun);
75 
76  saveTkMap(filename.c_str(), minValue, maxValue);
77  }
78 }
RunNumber_t run() const
Definition: EventID.h:42
T getParameter(std::string const &) const
void selectModules(std::vector< uint32_t > &detIds_)
const EventID & eventID() const
Definition: IOVSyncValue.h:42
virtual void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds)
void saveTkMap(const std::string &TkMapname, double minValue, double maxValue)
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader * reader
unsigned long long cacheID_memory
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
virtual void getActiveDetIds(const edm::EventSetup &eSetup)=0
virtual unsigned long long getCache(const edm::EventSetup &eSetup_)=0
const IOVSyncValue & iovSyncValue() const
Definition: EventSetup.h:89
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds)
tuple filename
Definition: lut2db_cfg.py:20
std::vector< uint32_t > activeDetIds
unsigned long long cacheID_current
void SiStripBaseCondObjDQM::analysisOnDemand ( const edm::EventSetup eSetup_,
uint32_t  detIdOnDemand 
)

Definition at line 117 of file SiStripBaseCondObjDQM.cc.

References cacheID_current, cacheID_memory, fillModMEs(), getCache(), and getConditionObject().

Referenced by analysisOnDemand(), SiStripClassToMonitorCondData::getLayerMEsOnDemand(), and SiStripClassToMonitorCondData::getModMEsOnDemand().

117  {
118 
119  unsigned long long cacheID_current= getCache(eSetup_);
120 
121  if (cacheID_memory == cacheID_current) return;
122 
123  getConditionObject(eSetup_);
124 
125  std::vector<uint32_t> vdetIdsOnDemand_;
126  vdetIdsOnDemand_.push_back(detIdOnDemand); // fillModMEs needs a vector
127 
128  fillModMEs(vdetIdsOnDemand_);
129 
130 }
unsigned long long cacheID_memory
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
virtual unsigned long long getCache(const edm::EventSetup &eSetup_)=0
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds)
unsigned long long cacheID_current
void SiStripBaseCondObjDQM::analysisOnDemand ( const edm::EventSetup eSetup_,
std::vector< uint32_t >  detIdsOnDemand 
)

Definition at line 134 of file SiStripBaseCondObjDQM.cc.

References cacheID_current, cacheID_memory, fillSummaryMEs(), getCache(), and getConditionObject().

134  {
135 
136  unsigned long long cacheID_current= getCache(eSetup_);
137 
138  if (cacheID_memory == cacheID_current) return;
139 
140  getConditionObject(eSetup_);
141 
142 
143  fillSummaryMEs(detIdsOnDemand);
144 
145 }
virtual void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds)
unsigned long long cacheID_memory
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
virtual unsigned long long getCache(const edm::EventSetup &eSetup_)=0
unsigned long long cacheID_current
void SiStripBaseCondObjDQM::analysisOnDemand ( const edm::EventSetup eSetup_,
std::string  requestedSubDetector,
uint32_t  requestedSide,
uint32_t  requestedLayer 
)

Definition at line 84 of file SiStripBaseCondObjDQM.cc.

References activeDetIds, analysisOnDemand(), getActiveDetIds(), getConditionObject(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), and SiStripSubStructure::getTOBDetectors().

87  {
88 
89  getConditionObject(eSetup_);
90  getActiveDetIds(eSetup_);
91 
92  std::vector<uint32_t> requestedDetIds_;
93  requestedDetIds_.clear();
94 
95  SiStripSubStructure substructure_;
96 
97  if(requestedSubDetector=="TIB"){
98  substructure_.getTIBDetectors( activeDetIds, requestedDetIds_, requestedLayer,0,0,0);
99  }
100  else if(requestedSubDetector=="TID"){
101  substructure_.getTIDDetectors( activeDetIds, requestedDetIds_, requestedSide,requestedLayer,0,0);
102  }
103  else if(requestedSubDetector=="TOB"){
104  substructure_.getTOBDetectors( activeDetIds, requestedDetIds_, requestedLayer,0,0);
105  }
106  else if(requestedSubDetector=="TEC"){
107  substructure_.getTECDetectors( activeDetIds, requestedDetIds_, requestedSide,requestedLayer,0,0,0,0);
108  }
109 
110  analysisOnDemand(eSetup_,requestedDetIds_);
111 
112 }
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
void analysisOnDemand(const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
virtual void getConditionObject(const edm::EventSetup &eSetup_)=0
virtual void getActiveDetIds(const edm::EventSetup &eSetup)=0
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
std::vector< uint32_t > activeDetIds
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
void SiStripBaseCondObjDQM::bookCumulMEs ( SiStripBaseCondObjDQM::ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
private

Definition at line 466 of file SiStripBaseCondObjDQM.cc.

References DQMStore::book1D(), SiStripHistoId::createHistoId(), SiStripBaseCondObjDQM::ModMEs::CumulDistr, dqmStore_, folder_organizer, edm::ParameterSet::getParameter(), hidmanager, hPSet_, MonitorElement::setAxisTitle(), SiStripFolderOrganizer::setDetectorFolder(), and DQMStore::tag().

Referenced by getModMEs().

466  {
467 
468  int hCumul_NchX = 0;
469  double hCumul_LowX = 0;
470  double hCumul_HighX = 0;
471 
472  std::string hCumul_description;
473  hCumul_description = hPSet_.getParameter<std::string>("Cumul_description");
474 
475  std::string hCumul_xTitle, hCumul_yTitle;
476  hCumul_xTitle = hPSet_.getParameter<std::string>("Cumul_xTitle");
477  hCumul_yTitle = hPSet_.getParameter<std::string>("Cumul_yTitle");
478 
479  hCumul_NchX = hPSet_.getParameter<int>("Cumul_NchX");
480  hCumul_LowX = hPSet_.getParameter<double>("Cumul_LowX");
481  hCumul_HighX = hPSet_.getParameter<double>("Cumul_HighX");
482 
484 
485  std::string hCumul_name;
486  hCumul_name = hidmanager.createHistoId(hCumul_description , "det", detId_); ;
487 
488  std::string hCumul_title;
489  hCumul_title = hCumul_name ;
490 
491  CondObj_ME.CumulDistr = dqmStore_->book1D(hCumul_name,
492  hCumul_title,
493  hCumul_NchX,
494  hCumul_LowX,
495  hCumul_HighX);
496  CondObj_ME.CumulDistr->setAxisTitle(hCumul_xTitle,1);
497  CondObj_ME.CumulDistr->setAxisTitle(hCumul_yTitle,2);
498  dqmStore_->tag(CondObj_ME.CumulDistr, detId_);
499 
500 }
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
void setDetectorFolder(uint32_t rawdetid=0)
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripBaseCondObjDQM::bookProfileMEs ( SiStripBaseCondObjDQM::ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
private

Definition at line 417 of file SiStripBaseCondObjDQM.cc.

References DQMStore::book1D(), CondObj_name_, SiStripHistoId::createHistoId(), dqmStore_, folder_organizer, SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), hidmanager, hPSet_, SiStripBaseCondObjDQM::ModMEs::ProfileDistr, reader, MonitorElement::setAxisTitle(), SiStripFolderOrganizer::setDetectorFolder(), and DQMStore::tag().

Referenced by getModMEs().

417  {
418 
419  int hProfile_NchX = 0;
420  double hProfile_LowX = 0;
421  double hProfile_HighX = 0;
422 
423  std::string hProfile_description;
424  hProfile_description = hPSet_.getParameter<std::string>("Profile_description");
425 
426  std::string hProfile_xTitle, hProfile_yTitle;
427  hProfile_xTitle = hPSet_.getParameter<std::string>("Profile_xTitle");
428  hProfile_yTitle = hPSet_.getParameter<std::string>("Profile_yTitle");
429 
430  if( CondObj_name_!= "apvgain" ){
431 
432  int nStrip = reader->getNumberOfApvsAndStripLength(detId_).first*128;
433 
434  hProfile_NchX = nStrip;
435  hProfile_LowX = 0.5;
436  hProfile_HighX = nStrip+0.5;
437  }
438  else {
439 
440  int nApv = reader->getNumberOfApvsAndStripLength(detId_).first;
441 
442  hProfile_NchX = nApv;
443  hProfile_LowX = 0.5;
444  hProfile_HighX = nApv+0.5;
445  }
446 
448 
449  std::string hProfile_Name;
450  hProfile_Name = hidmanager.createHistoId(hProfile_description, "det", detId_);
451 
452  std::string hProfile;
453  hProfile = hProfile_Name ;
454 
455  CondObj_ME.ProfileDistr = dqmStore_->book1D(hProfile_Name, hProfile, hProfile_NchX, hProfile_LowX, hProfile_HighX);
456  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_xTitle,1);
457  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_yTitle,2);
458  dqmStore_->tag(CondObj_ME.ProfileDistr, detId_);
459 
460 }
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
SiStripDetInfoFileReader * reader
void setDetectorFolder(uint32_t rawdetid=0)
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripBaseCondObjDQM::bookSummaryCumulMEs ( SiStripBaseCondObjDQM::ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
private

Definition at line 733 of file SiStripBaseCondObjDQM.cc.

References DQMStore::book1D(), CondObj_name_, SiStripHistoId::createHistoLayer(), dqmStore_, first, folder_organizer, getLayerNameAndId(), edm::ParameterSet::getParameter(), getStringNameAndId(), SiStripFolderOrganizer::GetSubDetAndLayer(), hidmanager, hPSet_, sistrip::layer_, MonitorElement::setAxisTitle(), SiStripFolderOrganizer::setLayerFolder(), SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr, SummaryOnStringLevel_On_, and DQMStore::tag().

Referenced by getSummaryMEs().

733  {
734 
735  int hSummaryOfCumul_NchX = 0;
736  double hSummaryOfCumul_LowX = 0;
737  double hSummaryOfCumul_HighX = 0;
738 
739  std::string hSummaryOfCumul_description;
740  hSummaryOfCumul_description = hPSet_.getParameter<std::string>("SummaryOfCumul_description");
741 
742  std::string hSummaryOfCumul_xTitle, hSummaryOfCumul_yTitle;
743  hSummaryOfCumul_xTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_xTitle");
744  hSummaryOfCumul_yTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_yTitle");
745 
746  hSummaryOfCumul_NchX = hPSet_.getParameter<int>("SummaryOfCumul_NchX");
747  hSummaryOfCumul_LowX = hPSet_.getParameter<double>("SummaryOfCumul_LowX");
748  hSummaryOfCumul_HighX = hPSet_.getParameter<double>("SummaryOfCumul_HighX");
749 
750  uint32_t layer_=0;
751 
752  layer_ = folder_organizer.GetSubDetAndLayer(detId_).second;
753 
754  folder_organizer.setLayerFolder(detId_,layer_);
755 
756  std::string hSummaryOfCumul_name;
757 
758  // ---
759  int subdetectorId_ = ((detId_>>25)&0x7);
760 
761  if( subdetectorId_<3 || subdetectorId_>6 ){
762  edm::LogError("SiStripBaseCondObjDQM")
763  << "[SiStripBaseCondObjDQM::bookSummaryCumulMEs] WRONG INPUT : no such subdetector type : "
764  << subdetectorId_ << " no folder set!"
765  << std::endl;
766  return;
767  }
768  // ---
769 
770  // LA Histos are plotted for each string:
771  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
772  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getStringNameAndId(detId_).first, "") ;
773  }
774  else {
775  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getLayerNameAndId(detId_).first, "") ;
776  }
777 
778 
779  std::string hSummaryOfCumul_title;
780  hSummaryOfCumul_title = hSummaryOfCumul_name ;
781 
782  CondObj_ME.SummaryOfCumulDistr = dqmStore_->book1D(hSummaryOfCumul_name,
783  hSummaryOfCumul_title,
784  hSummaryOfCumul_NchX,
785  hSummaryOfCumul_LowX,
786  hSummaryOfCumul_HighX);
787 
788  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_xTitle,1);
789  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_yTitle,2);
790 
791  dqmStore_->tag(CondObj_ME.SummaryOfCumulDistr, layer_);
792 
793 }
T getParameter(std::string const &) const
static const char layer_[]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
bool first
Definition: L1TdeRCT.cc:94
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_)
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void setLayerFolder(uint32_t rawdetid=0, int32_t layer=0, bool ring_flag=0)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripBaseCondObjDQM::bookSummaryMEs ( SiStripBaseCondObjDQM::ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
private

Definition at line 799 of file SiStripBaseCondObjDQM.cc.

References activeDetIds, DQMStore::bookProfile(), SiStripHistoId::createHistoLayer(), dqmStore_, first, folder_organizer, getLayerNameAndId(), edm::ParameterSet::getParameter(), GetSameLayerDetId(), SiStripFolderOrganizer::GetSubDetAndLayer(), hidmanager, hPSet_, i, sistrip::layer_, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), SiStripFolderOrganizer::setLayerFolder(), SiStripBaseCondObjDQM::ModMEs::SummaryDistr, and DQMStore::tag().

Referenced by getSummaryMEs().

799  {
800 
801  std::vector<uint32_t> sameLayerDetIds_;
802 
803  int hSummary_NchX = 0;
804  double hSummary_LowX = 0;
805  double hSummary_HighX = 0;
806 
807  std::string hSummary_description;
808  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
809 
810  std::string hSummary_xTitle, hSummary_yTitle;
811  hSummary_xTitle = hPSet_.getParameter<std::string>("Summary_xTitle");
812  hSummary_yTitle = hPSet_.getParameter<std::string>("Summary_yTitle");
813 
814  int hSummary_NchY;
815  double hSummary_LowY, hSummary_HighY;
816  hSummary_NchY = hPSet_.getParameter<int>("Summary_NchY");
817  hSummary_LowY = hPSet_.getParameter<double>("Summary_LowY");
818  hSummary_HighY = hPSet_.getParameter<double>("Summary_HighY");
819 
820 
821  // -----
822  // get detIds belonging to same layer to fill X-axis with detId-number
823 
824 
825  sameLayerDetIds_.clear();
826 
827  sameLayerDetIds_=GetSameLayerDetId(activeDetIds,detId_);
828 
829  hSummary_NchX = sameLayerDetIds_.size();
830  hSummary_LowX = 0.5;
831  hSummary_HighX = sameLayerDetIds_.size()+0.5;
832 
833  uint32_t layer_=0;
834 
835  layer_ = folder_organizer.GetSubDetAndLayer(detId_).second;
836 
837  folder_organizer.setLayerFolder(detId_,layer_);
838 
839  std::string hSummary_name;
840 
841  // ---
842  int subdetectorId_ = ((detId_>>25)&0x7);
843 
844 
845  if( subdetectorId_<3 ||subdetectorId_>6 ){
846  edm::LogError("SiStripBaseCondObjDQM")
847  << "[SiStripBaseCondObjDQM::bookSummaryMEs] WRONG INPUT : no such subdetector type : "
848  << subdetectorId_ << " no folder set!"
849  << std::endl;
850  return;
851  }
852  // ---
853 
854  hSummary_name = hidmanager.createHistoLayer(hSummary_description,
855  "layer" ,
856  getLayerNameAndId(detId_).first,
857  "") ;
858 
859  std::string hSummary_title;
860  hSummary_title = hSummary_name ;
861 
862  CondObj_ME.SummaryDistr = dqmStore_->bookProfile(hSummary_name,
863  hSummary_title,
864  hSummary_NchX,
865  hSummary_LowX,
866  hSummary_HighX,
867  hSummary_NchY,
868  0.,
869  0.);
870  // hSummary_LowY,
871  // hSummary_HighY);
872  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_xTitle,1);
873  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_yTitle,2);
874  CondObj_ME.SummaryDistr->setAxisRange(hSummary_LowY, hSummary_HighY,2);
875 
876  // -----
877  // in order to get the right detId-number labelled in right bin of x-axis
878  unsigned int iBin=0;
879 
880  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
881 
882  iBin++;
883  char sameLayerDetIds_Name[1024];
884  sprintf(sameLayerDetIds_Name,"%u",sameLayerDetIds_[i]);
885  if(iBin%100==0)
886  CondObj_ME.SummaryDistr->setBinLabel(iBin, sameLayerDetIds_Name);
887 
888  }
889  // -----
890 
891  dqmStore_->tag(CondObj_ME.SummaryDistr, layer_);
892 
893 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
static const char layer_[]
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
std::vector< uint32_t > GetSameLayerDetId(std::vector< uint32_t > activeDetIds, uint32_t selDetId)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1031
bool first
Definition: L1TdeRCT.cc:94
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
std::vector< uint32_t > activeDetIds
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void setLayerFolder(uint32_t rawdetid=0, int32_t layer=0, bool ring_flag=0)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripBaseCondObjDQM::bookSummaryProfileMEs ( SiStripBaseCondObjDQM::ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
private

Definition at line 507 of file SiStripBaseCondObjDQM.cc.

References activeDetIds, DQMStore::bookProfile(), CondObj_name_, SiStripHistoId::createHistoLayer(), dqmStore_, first, folder_organizer, getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), getStringNameAndId(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), hidmanager, hPSet_, i, sistrip::layer_, align::tib::layerNumber(), python.rootplot.argparse::module, reader, align::tob::rodNumber(), MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), SiStripFolderOrganizer::setLayerFolder(), align::tib::stringNumber(), SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, SummaryOnLayerLevel_On_, SummaryOnStringLevel_On_, and DQMStore::tag().

Referenced by getSummaryMEs().

507  {
508 
509  std::vector<uint32_t> sameLayerDetIds_;
510 
511  int hSummaryOfProfile_NchX = 0;
512  double hSummaryOfProfile_LowX = 0;
513  double hSummaryOfProfile_HighX = 0;
514 
515  std::string hSummaryOfProfile_description;
516  hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
517 
518  std::string hSummaryOfProfile_xTitle, hSummaryOfProfile_yTitle;
519  hSummaryOfProfile_xTitle = hPSet_.getParameter<std::string>("SummaryOfProfile_xTitle");
520  hSummaryOfProfile_yTitle = hPSet_.getParameter<std::string>("SummaryOfProfile_yTitle");
521 
522  int hSummaryOfProfile_NchY;
523  double hSummaryOfProfile_LowY, hSummaryOfProfile_HighY;
524  hSummaryOfProfile_NchY = hPSet_.getParameter<int>("SummaryOfProfile_NchY");
525  hSummaryOfProfile_LowY = hPSet_.getParameter<double>("SummaryOfProfile_LowY");
526  hSummaryOfProfile_HighY = hPSet_.getParameter<double>("SummaryOfProfile_HighY");
527 
528  int nStrip, nApv, layerId_;
529 
530  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) { layerId_= getStringNameAndId(detId_).second;}
531  else { layerId_= getLayerNameAndId(detId_).second;}
532 
533 
534  if( CondObj_name_ == "pedestal" || CondObj_name_ == "noise"|| CondObj_name_ == "lowthreshold" || CondObj_name_ == "highthreshold" ){ // plot in strip number
535 
536  if( (layerId_ > 610 && layerId_ < 620) || // TID & TEC have 768 strips at maximum
537  (layerId_ > 620 && layerId_ < 630) ||
538  (layerId_ > 410 && layerId_ < 414) ||
539  (layerId_ > 420 && layerId_ < 424) ){ nStrip =768;}
540  else { nStrip = reader->getNumberOfApvsAndStripLength(detId_).first*128;}
541 
542  hSummaryOfProfile_NchX = nStrip;
543  hSummaryOfProfile_LowX = 0.5;
544  hSummaryOfProfile_HighX = nStrip+0.5;
545 
546  }
547  else if( (CondObj_name_ == "lorentzangle" && SummaryOnLayerLevel_On_) || CondObj_name_ == "quality"){ // plot in detId-number
548 
549  // -----
550  // get detIds belonging to same layer to fill X-axis with detId-number
551 
552  uint32_t subDetId_ = ((detId_>>25)&0x7);
553  SiStripSubStructure substructure_;
554 
555  sameLayerDetIds_.clear();
556 
557  if(subDetId_==3){ // TIB
558  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_,TIBDetId(detId_).layerNumber(),0,0,TIBDetId(detId_).stringNumber());
559  }
560  else if(subDetId_==4){ // TID
561  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds_,0,0,0,0);
562  }
563  else if(subDetId_==5){ // TOB
564  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds_, TOBDetId(detId_).layerNumber(),0,0);
565  }
566  else if(subDetId_==6){ // TEC
567  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0,0,0);
568  }
569 
570  hSummaryOfProfile_NchX = sameLayerDetIds_.size();
571  hSummaryOfProfile_LowX = 0.5;
572  hSummaryOfProfile_HighX = sameLayerDetIds_.size()+0.5;
573 
574  }
575  else if( CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_){ // plot in detId-number
576 
577  // -----
578  // get detIds belonging to same string to fill X-axis with detId-number
579 
580  uint32_t subDetId_ = ((detId_>>25)&0x7);
581  SiStripSubStructure substructure_;
582 
583  sameLayerDetIds_.clear();
584 
585  if(subDetId_==3){ // TIB
586  if(TIBDetId(detId_).isInternalString()){
587  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_, TIBDetId(detId_).layerNumber(),0,1,TIBDetId(detId_).stringNumber()); }
588  else if(TIBDetId(detId_).isExternalString()){
589  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_, TIBDetId(detId_).layerNumber(),0,2,TIBDetId(detId_).stringNumber()); }
590  }
591  else if(subDetId_==4){ // TID
592  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0);
593  }
594  else if(subDetId_==5){ // TOB
595  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds_, TOBDetId(detId_).layerNumber(),0,TOBDetId(detId_).rodNumber());
596  }
597  else if(subDetId_==6){ // TEC
598  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0,0,0);
599  }
600 
601 
602  hSummaryOfProfile_NchX = sameLayerDetIds_.size();
603  hSummaryOfProfile_LowX = 0.5;
604  hSummaryOfProfile_HighX = sameLayerDetIds_.size()+0.5;
605 
606  }
607  else if( CondObj_name_ == "apvgain"){
608 
609  if( (layerId_ > 610 && layerId_ < 620) || // TID & TEC have 6 apvs at maximum
610  (layerId_ > 620 && layerId_ < 630) ||
611  (layerId_ > 410 && layerId_ < 414) ||
612  (layerId_ > 420 && layerId_ < 424) ){ nApv =6;}
613  else { nApv = reader->getNumberOfApvsAndStripLength(detId_).first;}
614 
615  hSummaryOfProfile_NchX = nApv;
616  hSummaryOfProfile_LowX = 0.5;
617  hSummaryOfProfile_HighX = nApv+0.5;
618 
619  }
620  else {
621  edm::LogWarning("SiStripBaseCondObjDQM")
622  << "[SiStripBaseCondObjDQM::bookSummaryProfileMEs] PLEASE CHECK : x-axis label in your cfg"
623  << std::endl;
624  }
625 
626  uint32_t layer_=0;
627 
628  layer_ = folder_organizer.GetSubDetAndLayer(detId_).second;
629 
630  folder_organizer.setLayerFolder(detId_,layer_);
631 
632  std::string hSummaryOfProfile_name;
633 
634  // ---
635  int subdetectorId_ = ((detId_>>25)&0x7);
636 
637 
638  if( subdetectorId_<3 ||subdetectorId_>6 ){
639  edm::LogError("SiStripBaseCondObjDQM")
640  << "[SiStripBaseCondObjDQM::bookSummaryProfileMEs] WRONG INPUT : no such subdetector type : "
641  << subdetectorId_ << " no folder set!"
642  << std::endl;
643  return;
644  }
645  // ---
646 
647  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
648  hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer" , getStringNameAndId(detId_).first,"") ;
649  }
650  else {
651  hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer" , getLayerNameAndId(detId_).first,"") ;
652  }
653 
654  std::string hSummaryOfProfile_title;
655  hSummaryOfProfile_title = hSummaryOfProfile_name ;
656 
657  CondObj_ME.SummaryOfProfileDistr = dqmStore_->bookProfile(hSummaryOfProfile_name,
658  hSummaryOfProfile_title,
659  hSummaryOfProfile_NchX,
660  hSummaryOfProfile_LowX,
661  hSummaryOfProfile_HighX,
662  hSummaryOfProfile_NchY,
663  0.,
664  0.);
665  // hSummaryOfProfile_LowY,
666  // hSummaryOfProfile_HighY);
667  CondObj_ME.SummaryOfProfileDistr->setAxisTitle(hSummaryOfProfile_xTitle,1);
668  CondObj_ME.SummaryOfProfileDistr->setAxisTitle(hSummaryOfProfile_yTitle,2);
669  CondObj_ME.SummaryOfProfileDistr->setAxisRange(hSummaryOfProfile_LowY, hSummaryOfProfile_HighY,2);
670 
671  // -----
672  // in order to get the right detId-number labelled in right bin of x-axis
673 
674  if( CondObj_name_ == "quality" ){
675 
676  unsigned int iBin=0;
677 
678  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
679 
680  iBin++;
681  char sameLayerDetIds_Name[1024];
682  sprintf(sameLayerDetIds_Name,"%u",sameLayerDetIds_[i]);
683  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
684 
685  }
686  }
687  if( CondObj_name_ == "lorentzangle"){
688 
689  // Put the detIds for the -z side as following the geometrical order:
690  reverse(sameLayerDetIds_.begin(), sameLayerDetIds_.begin()+sameLayerDetIds_.size()/2);
691 
692  unsigned int iBin=0;
693  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
694  iBin++;
696  // remove the label for detIds:
697  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, "");
698  }
699 
701  // Label with module position instead of detIds:
702  char sameLayerDetIds_Name[1024];
703  if(subdetectorId_==3){//re-abelling for TIB
704  if(TIBDetId(sameLayerDetIds_[i]).isZPlusSide()){
705  sprintf(sameLayerDetIds_Name,"%i",TIBDetId(sameLayerDetIds_[i]).module());}
706  else if(TIBDetId(sameLayerDetIds_[i]).isZMinusSide()){
707  sprintf(sameLayerDetIds_Name,"%i",-TIBDetId(sameLayerDetIds_[i]).module());}
708  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
709  }
710  else if(subdetectorId_==5){//re-abelling for TOB
711  if(TOBDetId(sameLayerDetIds_[i]).isZPlusSide()) { sprintf(sameLayerDetIds_Name,"%i",TOBDetId(sameLayerDetIds_[i]).module());}
712  else if(TOBDetId(sameLayerDetIds_[i]).isZMinusSide()) { sprintf(sameLayerDetIds_Name,"%i",-TOBDetId(sameLayerDetIds_[i]).module());}
713  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
714  }
715  }
716  }
717 
718 
719 
720 
721  // -----
722 
723  dqmStore_->tag(CondObj_ME.SummaryOfProfileDistr, layer_);
724 
725  } // if "lorentzangle"
726 
727 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
static const char layer_[]
unsigned int rodNumber(align::ID)
Rod number increases with phi.
Definition: TOBNameSpace.h:41
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
unsigned int layerNumber(align::ID)
Layer number increases with rho from 1 to 8.
Definition: TIBNameSpace.h:85
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1354
SiStripDetInfoFileReader * reader
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1031
bool first
Definition: L1TdeRCT.cc:94
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_)
unsigned int stringNumber(align::ID)
Definition: TIBNameSpace.h:51
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
std::vector< uint32_t > activeDetIds
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void setLayerFolder(uint32_t rawdetid=0, int32_t layer=0, bool ring_flag=0)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiStripBaseCondObjDQM::bookTkMap ( const std::string &  TkMapname)
private

Definition at line 1149 of file SiStripBaseCondObjDQM.cc.

References tkMap.

Referenced by SiStripBaseCondObjDQM().

1149  {
1150  tkMap= new TrackerMap(TkMapname.c_str());
1151 }
void SiStripBaseCondObjDQM::end ( void  )
virtual

Definition at line 1205 of file SiStripBaseCondObjDQM.cc.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and SiStripMonitorCondData::endRun().

1205  {
1206  edm::LogInfo("SiStripBaseCondObjDQM")
1207  << "SiStripBase::end"
1208  << std::endl;
1209 }
virtual void SiStripBaseCondObjDQM::fillMEsForDet ( ModMEs  selModME_,
uint32_t  selDetId_ 
)
protectedpure virtual
virtual void SiStripBaseCondObjDQM::fillMEsForLayer ( uint32_t  selDetId_)
protectedpure virtual
void SiStripBaseCondObjDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds)
protectedvirtual

Reimplemented in SiStripQualityDQM, SiStripApvGainsDQM, SiStripCablingDQM, SiStripLorentzAngleDQM, SiStripPedestalsDQM, and SiStripThresholdDQM.

Definition at line 1212 of file SiStripBaseCondObjDQM.cc.

References fillMEsForDet().

Referenced by analysis(), and analysisOnDemand().

1212  {
1213  ModMEs CondObj_ME;
1214 
1215  for(std::vector<uint32_t>::const_iterator detIter_=selectedDetIds.begin();
1216  detIter_!=selectedDetIds.end();++detIter_){
1217  fillMEsForDet(CondObj_ME,*detIter_);
1218  }
1219 }
virtual void fillMEsForDet(ModMEs selModME_, uint32_t selDetId_)=0
void SiStripBaseCondObjDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds)
protectedvirtual

Reimplemented in SiStripQualityDQM, SiStripLorentzAngleDQM, SiStripApvGainsDQM, SiStripCablingDQM, SiStripPedestalsDQM, and SiStripThresholdDQM.

Definition at line 1222 of file SiStripBaseCondObjDQM.cc.

References alignmentValidation::c1, CondObj_fillId_, fillMEsForLayer(), fPSet_, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), MonitorElement::getTProfile(), hPSet_, mergeVDriftHistosByStation::name, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SummaryMEsMap_, SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr, and SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr.

Referenced by analysis(), and analysisOnDemand().

1222  {
1223 
1224  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
1225  detIter_!= selectedDetIds.end();detIter_++){
1226  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_);
1227  }
1228 
1229  for (std::map<uint32_t, ModMEs>::iterator iter=SummaryMEsMap_.begin(); iter!=SummaryMEsMap_.end(); iter++){
1230 
1231  ModMEs selME;
1232  selME = iter->second;
1233 
1234  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel") && fPSet_.getParameter<bool>("OutputSummaryProfileAtLayerLevelAsImage")){
1235 
1236  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
1237 
1238  TCanvas c1("c1");
1239  selME.SummaryOfProfileDistr->getTProfile()->Draw();
1240  std::string name (selME.SummaryOfProfileDistr->getTProfile()->GetTitle());
1241  name+=".png";
1242  c1.Print(name.c_str());
1243  }
1244  }
1245  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel") && fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")){
1246 
1247  TCanvas c1("c1");
1248  selME.SummaryDistr->getTH1()->Draw();
1249  std::string name (selME.SummaryDistr->getTH1()->GetTitle());
1250  name+=".png";
1251  c1.Print(name.c_str());
1252  }
1253  if(hPSet_.getParameter<bool>("FillCumulativeSummaryAtLayerLevel") && fPSet_.getParameter<bool>("OutputCumulativeSummaryAtLayerLevelAsImage")){
1254 
1255  if( CondObj_fillId_ =="onlyCumul" || CondObj_fillId_ =="ProfileAndCumul"){
1256 
1257  TCanvas c1("c1");
1258  selME.SummaryOfCumulDistr->getTH1()->Draw();
1259  std::string name (selME.SummaryOfCumulDistr->getTH1()->GetTitle());
1260  name+=".png";
1261  c1.Print(name.c_str());
1262  }
1263  }
1264 
1265  }
1266 
1267 }
T getParameter(std::string const &) const
std::map< uint32_t, ModMEs > SummaryMEsMap_
virtual void fillMEsForLayer(uint32_t selDetId_)=0
void SiStripBaseCondObjDQM::fillTkMap ( const uint32_t &  detid,
const float &  value 
)
protected
virtual void SiStripBaseCondObjDQM::getActiveDetIds ( const edm::EventSetup eSetup)
pure virtual
std::vector< uint32_t > SiStripBaseCondObjDQM::getCabledModules ( )

Definition at line 149 of file SiStripBaseCondObjDQM.cc.

References detCablingHandle_, eSetup_, and edm::EventSetup::get().

149  {
150 
151  std::vector<uint32_t> cabledDetIds_;
153  detCablingHandle_->addActiveDetectorsRawIds(cabledDetIds_);
154 
155  return cabledDetIds_;
156 
157 }
edm::ESHandle< SiStripDetCabling > detCablingHandle_
const T & get() const
Definition: EventSetup.h:55
const edm::EventSetup & eSetup_
virtual unsigned long long SiStripBaseCondObjDQM::getCache ( const edm::EventSetup eSetup_)
pure virtual
virtual void SiStripBaseCondObjDQM::getConditionObject ( const edm::EventSetup eSetup_)
pure virtual
std::pair< std::string, uint32_t > SiStripBaseCondObjDQM::getLayerNameAndId ( const uint32_t &  detId_)
protected

Definition at line 898 of file SiStripBaseCondObjDQM.cc.

References i, TOBDetId::layer(), TIBDetId::layer(), TIDDetId::side(), TECDetId::side(), TIDDetId::wheel(), and TECDetId::wheel().

Referenced by bookSummaryCumulMEs(), bookSummaryMEs(), bookSummaryProfileMEs(), SiStripNoisesDQM::fillMEsForLayer(), SiStripPedestalsDQM::fillMEsForLayer(), SiStripThresholdDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillMEsForLayer(), SiStripApvGainsDQM::fillMEsForLayer(), SiStripQualityDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillSummaryMEs(), and getSummaryMEs().

898  {
899 
900  int subdetectorId_ = ((detId_>>25)&0x7);
901  int layerId_=0;
902 
903  std::stringstream layerName;
904 
905  if( subdetectorId_ == 3 ){ //TIB
906 
907  for( unsigned int i = 1; i < 5; i++ ){
908  if( TIBDetId( detId_ ).layer() ==i ){
909  layerName << "TIB__layer__" << i;
910  layerId_ = 300 + i;
911  }
912  }
913 
914  }
915 
916  else if( subdetectorId_ == 4 ){ //TIDD
917 
918  if( TIDDetId( detId_ ).side() == 1 ) { // TIDD side 1
919 
920  for( unsigned int i = 1; i < 4; i++ ){
921  if(TIDDetId(detId_).wheel()==i){
922  layerName << "TID__side__1__wheel__" << i;
923  layerId_ = 410 + i;
924  }
925  }
926 
927  }
928 
929  else if( TIDDetId( detId_ ).side() == 2 ) { // TIDD side 2
930 
931  for( unsigned int i = 1; i < 4; i++ ) {
932  if(TIDDetId(detId_).wheel()==i){
933  layerName << "TID__side__2__wheel__" << i;
934  layerId_ = 420 + i;
935  }
936  }
937 
938  }
939 
940  }
941 
942 
943  else if( subdetectorId_ == 5 ){ // TOB
944 
945  for( unsigned int i = 1; i < 7; i++ ) {
946  if( TOBDetId( detId_ ).layer() == i ) {
947  layerName << "TOB__layer__" << i;
948  layerId_ = 500 + i;
949  }
950  }
951 
952  }
953 
954  else if( subdetectorId_ == 6 ){ // TEC
955 
956  if( TECDetId( detId_ ).side() == 1) { // TEC side 1
957 
958  for( unsigned int i = 1; i < 10; i++ ) {
959  if( TECDetId( detId_ ).wheel() == i ) {
960  layerName << "TEC__side__1__wheel__" << i;
961  layerId_ = 610 + i;
962  }
963  }
964 
965  }
966 
967  else if( TECDetId( detId_ ).side() == 2 ) { // TEC side 2
968 
969  for( unsigned int i = 1; i < 10; i++ ) {
970  if( TECDetId( detId_ ).wheel() == i ) {
971  layerName << "TEC__side__2__wheel__" << i;
972  layerId_ = 620 + i;
973  }
974  }
975 
976  }
977  }
978 
979  return std::make_pair( layerName.str(), layerId_ );
980 
981 }
int i
Definition: DBlmapReader.cc:9
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
void SiStripBaseCondObjDQM::getModMEs ( ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
protected

Definition at line 314 of file SiStripBaseCondObjDQM.cc.

References bookCumulMEs(), bookProfileMEs(), CondObj_fillId_, CondObj_name_, SiStripBaseCondObjDQM::ModMEs::CumulDistr, ModMEsMap_, SiStripBaseCondObjDQM::ModMEs::ProfileDistr, and MonitorElement::Reset().

Referenced by SiStripNoisesDQM::fillMEsForDet(), SiStripThresholdDQM::fillMEsForDet(), SiStripApvGainsDQM::fillMEsForDet(), SiStripPedestalsDQM::fillMEsForDet(), and SiStripQualityDQM::fillMEsForDet().

314  {
315 
316  std::map< uint32_t, ModMEs >::const_iterator ModMEsMap_iter = ModMEsMap_.find(detId_);
317 
318  if (ModMEsMap_iter != ModMEsMap_.end()){
319 
320  CondObj_ME=ModMEsMap_iter->second;
321 
322  if( ( CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile") && CondObj_ME.ProfileDistr ) {
323  CondObj_ME.ProfileDistr ->Reset();
324  }
325 
326  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" ) && CondObj_ME.CumulDistr ){
327  CondObj_ME.CumulDistr ->Reset();
328  }
329  else {
330  edm::LogWarning("SiStripBaseCondObjDQM")
331  << "[SiStripBaseCondObjDQM::getModMEs] PLEASE CHECK : CondObj_fillId option mispelled";
332  }
333  return;
334 
335  }
336 
337  // --> profile defined for all CondData
338  if ( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile")) {
339  bookProfileMEs(CondObj_ME,detId_);
340  }
341 
342  // --> cumul currently only defined for noise and apvgain
343  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" )
344  &&(CondObj_name_ == "noise" || CondObj_name_ == "apvgain") ) bookCumulMEs(CondObj_ME,detId_);
345 
346 
347  ModMEsMap_.insert( std::make_pair(detId_,CondObj_ME) );
348 
349 }
std::map< uint32_t, ModMEs > ModMEsMap_
void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
std::vector< uint32_t > SiStripBaseCondObjDQM::GetSameLayerDetId ( std::vector< uint32_t >  activeDetIds,
uint32_t  selDetId 
)
protected

Definition at line 1121 of file SiStripBaseCondObjDQM.cc.

References SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), and SiStripSubStructure::getTOBDetectors().

Referenced by bookSummaryMEs(), SiStripNoisesDQM::fillMEsForLayer(), SiStripThresholdDQM::fillMEsForLayer(), SiStripPedestalsDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillMEsForLayer(), SiStripApvGainsDQM::fillMEsForLayer(), and SiStripQualityDQM::fillMEsForLayer().

1121  {
1122 
1123  std::vector<uint32_t> sameLayerDetIds;
1124  sameLayerDetIds.clear();
1125 
1126  SiStripSubStructure substructure_;
1127 
1128  uint32_t subselDetId_ = ((selDetId>>25)&0x7);
1129 
1130  if(subselDetId_==3){ // TIB
1131  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds, TIBDetId(selDetId).layer(),0,0,0);
1132  }
1133  else if(subselDetId_==4){ // TID
1134  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds, TIDDetId(selDetId).side(),TIDDetId(selDetId).wheel(),0,0);
1135  }
1136  else if(subselDetId_==5){ // TOB
1137  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds, TOBDetId(selDetId).layer(),0,0);
1138  }
1139  else if(subselDetId_==6){ // TEC
1140  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds, TECDetId(selDetId).side(),TECDetId(selDetId).wheel(),0,0,0,0);
1141  }
1142 
1143  return sameLayerDetIds;
1144 
1145 }
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
std::vector< uint32_t > activeDetIds
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
std::pair< std::string, uint32_t > SiStripBaseCondObjDQM::getStringNameAndId ( const uint32_t &  detId_)
protected

Definition at line 987 of file SiStripBaseCondObjDQM.cc.

References i, TIBDetId::isExternalString(), TIBDetId::isInternalString(), TOBDetId::layer(), TIBDetId::layer(), TOBDetId::rodNumber(), and TIBDetId::stringNumber().

Referenced by bookSummaryCumulMEs(), bookSummaryProfileMEs(), SiStripNoisesDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillSummaryMEs(), and getSummaryMEs().

987  {
988 
989  int subdetectorId_ = ((detId_>>25)&0x7);
990  int layerStringId_=0;
991 
992  std::stringstream layerStringName;
993 
994  if( subdetectorId_==3 ){ //TIB
995  if(TIBDetId(detId_).layer()==1 && TIBDetId(detId_).isInternalString()){ //1st layer int
996  for( unsigned int i=1; i < 27 ;i++){
997  if(TIBDetId(detId_).stringNumber()==i){
998  layerStringName << "TIB_L1_Int_Str_" << i;
999  layerStringId_ = 30110+i;
1000  }
1001  }
1002  }
1003  else if(TIBDetId(detId_).layer()==1 && TIBDetId(detId_).isExternalString()){ //1st layer ext
1004  for( unsigned int i=1; i < 31 ;i++){
1005  if(TIBDetId(detId_).stringNumber()==i){
1006  layerStringName << "TIB_L1_Ext_Str_" << i;
1007  layerStringId_ = 301200+i;
1008  }
1009  }
1010  }
1011  else if(TIBDetId(detId_).layer()==2 && TIBDetId(detId_).isInternalString()){ //2nd layer int
1012  for( unsigned int i=1; i < 35 ;i++){
1013  if(TIBDetId(detId_).stringNumber()==i){
1014  layerStringName << "TIB_L2_Int_Str_" << i;
1015  layerStringId_ = 302100+i;
1016  }
1017  }
1018  }
1019  else if(TIBDetId(detId_).layer()==2 && TIBDetId(detId_).isExternalString()){ //2nd layer ext
1020  for( unsigned int i=1; i < 39 ;i++){
1021  if(TIBDetId(detId_).stringNumber()==i){
1022  layerStringName << "TIB_L2_Ext_Str_" << i;
1023  layerStringId_ = 302200+i;
1024  }
1025  }
1026  }
1027  else if(TIBDetId(detId_).layer()==3 && TIBDetId(detId_).isInternalString()){ //3rd layer int
1028  for( unsigned int i=1; i < 45 ;i++){
1029  if(TIBDetId(detId_).stringNumber()==i){
1030  layerStringName << "TIB_L3_Int_Str_" << i;
1031  layerStringId_ = 303100+i;
1032  }
1033  }
1034  }
1035  else if(TIBDetId(detId_).layer()==3 && TIBDetId(detId_).isExternalString()){ //3rd layer ext
1036  for( unsigned int i=1; i < 47 ;i++){
1037  if(TIBDetId(detId_).stringNumber()==i){
1038  layerStringName << "TIB_L3_Ext_Str_" << i;
1039  layerStringId_ = 303200+i;
1040  }
1041  }
1042  }
1043  else if(TIBDetId(detId_).layer()==4 && TIBDetId(detId_).isInternalString()){ //4th layer int
1044  for( unsigned int i=1; i < 53 ;i++){
1045  if(TIBDetId(detId_).stringNumber()==i){
1046  layerStringName << "TIB_L4_Int_Str_" << i;
1047  layerStringId_ = 304100+i;
1048  }
1049  }
1050  }
1051  else if(TIBDetId(detId_).layer()==4 && TIBDetId(detId_).isExternalString()){ //4th layer ext
1052  for( unsigned int i=1; i < 57 ;i++){
1053  if(TIBDetId(detId_).stringNumber()==i){
1054  layerStringName << "TIB_L4_Ext_Str_" << i;
1055  layerStringId_ = 304200+i;
1056  }
1057  }
1058  }
1059  } //TIB
1060 
1061 
1062  else if( subdetectorId_==5 ){ // TOB
1063  if(TOBDetId(detId_).layer()==1){ //1st layer
1064  for( unsigned int i=1; i < 43 ;i++){
1065  if(TOBDetId(detId_).rodNumber()==i){
1066  layerStringName << "TOB_L1_Rod_" << i;
1067  layerStringId_ = 50100+i;
1068  }
1069  }
1070  }
1071  else if(TOBDetId(detId_).layer()==2){ //2nd layer
1072  for( unsigned int i=1; i < 49 ;i++){
1073  if(TOBDetId(detId_).rodNumber()==i){
1074  layerStringName << "TOB_L2_Rod_" << i;
1075  layerStringId_ = 50200+i;
1076  }
1077  }
1078  }
1079  else if(TOBDetId(detId_).layer()==3){ //3rd layer
1080  for( unsigned int i=1; i < 55 ;i++){
1081  if(TOBDetId(detId_).rodNumber()==i){
1082  layerStringName << "TOB_L3_Rod_" << i;
1083  layerStringId_ = 50300+i;
1084  }
1085  }
1086  }
1087  else if(TOBDetId(detId_).layer()==4){ //4th layer
1088  for( unsigned int i=1; i < 61 ;i++){
1089  if(TOBDetId(detId_).rodNumber()==i){
1090  layerStringName << "TOB_L4_Rod_" << i;
1091  layerStringId_ = 50400+i;
1092  }
1093  }
1094  }
1095  else if(TOBDetId(detId_).layer()==5){ //5th layer
1096  for( unsigned int i=1; i < 67 ;i++){
1097  if(TOBDetId(detId_).rodNumber()==i){
1098  layerStringName << "TOB_L5_Rod_" << i;
1099  layerStringId_ = 50500+i;
1100  }
1101  }
1102  }
1103  else if(TOBDetId(detId_).layer()==6){ //6st layer
1104  for( unsigned int i=1; i < 75 ;i++){
1105  if(TOBDetId(detId_).rodNumber()==i){
1106  layerStringName << "TOB_L6_Rod_" << i;
1107  layerStringId_ = 50600+i;
1108  }
1109  }
1110  }
1111  }//TOB
1112 
1113  return std::make_pair( layerStringName.str(), layerStringId_ );
1114 
1115 }
unsigned int rodNumber() const
Definition: TOBDetId.h:77
int i
Definition: DBlmapReader.cc:9
unsigned int stringNumber() const
Definition: TIBDetId.h:87
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
bool isExternalString() const
Definition: TIBDetId.h:99
bool isInternalString() const
Definition: TIBDetId.h:95
unsigned int layer() const
layer id
Definition: TIBDetId.h:41
void SiStripBaseCondObjDQM::getSummaryMEs ( ModMEs CondObj_ME,
const uint32_t &  detId_ 
)
protected

Definition at line 355 of file SiStripBaseCondObjDQM.cc.

References bookSummaryCumulMEs(), bookSummaryMEs(), bookSummaryProfileMEs(), CondObj_fillId_, CondObj_name_, getLayerNameAndId(), edm::ParameterSet::getParameter(), getStringNameAndId(), hPSet_, edm::second(), SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SummaryMEsMap_, SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, and SummaryOnStringLevel_On_.

Referenced by SiStripNoisesDQM::fillMEsForLayer(), SiStripThresholdDQM::fillMEsForLayer(), SiStripPedestalsDQM::fillMEsForLayer(), SiStripLorentzAngleDQM::fillMEsForLayer(), SiStripApvGainsDQM::fillMEsForLayer(), and SiStripQualityDQM::fillMEsForLayer().

355  {
356 
357  std::map<uint32_t, ModMEs>::const_iterator SummaryMEsMap_iter;
358 
359  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_ ){
360  SummaryMEsMap_iter = SummaryMEsMap_.find(getStringNameAndId(detId_).second);
361  }
362  else {
363  SummaryMEsMap_iter = SummaryMEsMap_.find(getLayerNameAndId(detId_).second);
364  }
365 
366  if (SummaryMEsMap_iter != SummaryMEsMap_.end()){ return;}
367 
368  //FIXME t's not good that the base class has to know about which derived class shoudl exist.
369  // please modify this part. implement virtual functions, esplicited in the derived classes
370  // --> currently only profile summary defined for all condition objects except quality
371  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile" ) &&
372  (
373  CondObj_name_ == "pedestal" ||
374  CondObj_name_ == "noise" ||
375  CondObj_name_ == "lowthreshold" ||
376  CondObj_name_ == "highthreshold" ||
377  CondObj_name_ == "apvgain" ||
378  CondObj_name_ == "lorentzangle") ) {
379  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel"))
380  if (!CondObj_ME.SummaryOfProfileDistr) { bookSummaryProfileMEs(CondObj_ME,detId_); }
381  }
382 
383  // --> currently only genuine cumul LA
384  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" ) &&
385  (
386  CondObj_name_ == "lorentzangle" ||
387  CondObj_name_ == "noise") ) {
388  if(hPSet_.getParameter<bool>("FillCumulativeSummaryAtLayerLevel"))
389  if (!CondObj_ME.SummaryOfCumulDistr) { bookSummaryCumulMEs(CondObj_ME,detId_); }
390  }
391 
392  // --> currently only summary as a function of detId for noise, pedestal and apvgain
393  if( CondObj_name_ == "noise" ||
394  CondObj_name_ == "lowthreshold" ||
395  CondObj_name_ == "highthreshold" ||
396  CondObj_name_ == "apvgain" ||
397  CondObj_name_ == "pedestal" ||
398  CondObj_name_ == "quality" ) {
399  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel"))
400  if (!CondObj_ME.SummaryDistr) { bookSummaryMEs(CondObj_ME,detId_); }
401 
402  }
403 
404  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
405  //FIXME getStringNameandId takes time. not need to call it every timne. put the call at the beginning of the method and caache the string
406  SummaryMEsMap_.insert( std::make_pair(getStringNameAndId(detId_).second,CondObj_ME) );
407  }
408  else {
409  SummaryMEsMap_.insert( std::make_pair(getLayerNameAndId(detId_).second,CondObj_ME) );
410  }
411 
412 }
T getParameter(std::string const &) const
U second(std::pair< T, U > const &p)
std::map< uint32_t, ModMEs > SummaryMEsMap_
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_)
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_)
void SiStripBaseCondObjDQM::saveTkMap ( const std::string &  TkMapname,
double  minValue,
double  maxValue 
)
private

Definition at line 1159 of file SiStripBaseCondObjDQM.cc.

References python.tagInventory::entries, edm::ParameterSet::getParameter(), hPSet_, i, j, max(), min, TrackerMap::save(), TrackerMap::setPalette(), TrackerMap::showPalette(), tkMap, and tkMapScaler.

Referenced by analysis().

1159  {
1160  if(tkMapScaler.size()!=0){
1161  //check that saturation is below x% below minValue and above minValue, and in case re-arrange.
1162  float th=hPSet_.getParameter<double>("saturatedFraction");
1163 
1164  size_t imin=0,imax=0;
1165  float entries=0 ;
1166  for(size_t i=0;i<tkMapScaler.size();++i)
1167  entries+=tkMapScaler[i];
1168 
1169  float min=0 ;
1170  for(size_t i=0;(i<tkMapScaler.size()) && (min<th);++i){
1171  min+=tkMapScaler[i]/entries;
1172  imin=i;
1173  }
1174 
1175  float max=0;
1176  // for(size_t i=tkMapScaler.size()-1;(i>=0) && (max<th);--i){ // Wrong
1177  // Since i is unsigned, i >= 0 is always true,
1178  // and the loop termination condition is never reached.
1179  // We offset the loop index by one to fix this.
1180  for(size_t j=tkMapScaler.size();(j>0) && (max<th);--j){
1181  size_t i = j - 1;
1182  max+=tkMapScaler[i]/entries;
1183  imax=i;
1184  }
1185 
1186  //reset maxValue;
1187  if(maxValue<imax){
1188  edm::LogInfo("")<< "Resetting TkMap maxValue from " << maxValue << " to " << imax;
1189  maxValue=imax;
1190  }
1191  //reset minValue;
1192  if(minValue>imin){
1193  edm::LogInfo("")<< "Resetting TkMap minValue from " << minValue << " to " << imin;
1194  minValue=imin;
1195  }
1196  }
1197 
1198  tkMap->save(false, minValue, maxValue, TkMapname.c_str(),4500,2400);
1199  tkMap->setPalette(1); tkMap->showPalette(true);
1200 
1201 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
#define min(a, b)
Definition: mlp_lapack.h:161
std::vector< int > tkMapScaler
void showPalette(bool printflag1)
Definition: TrackerMap.h:70
const T & max(const T &a, const T &b)
void setPalette(int numpalette)
Definition: TrackerMap.h:68
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:632
int j
Definition: DBlmapReader.cc:9
void SiStripBaseCondObjDQM::selectModules ( std::vector< uint32_t > &  detIds_)

Definition at line 166 of file SiStripBaseCondObjDQM.cc.

References fPSet_, edm::ParameterSet::getParameter(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), i, ModulesToBeExcluded_, ModulesToBeIncluded_, python.multivaluedict::sort(), SubDetectorsToBeExcluded_, swap(), and tmp.

Referenced by analysis().

166  {
167 
168  ModulesToBeExcluded_ = fPSet_.getParameter< std::vector<unsigned int> >("ModulesToBeExcluded");
169  ModulesToBeIncluded_ = fPSet_.getParameter< std::vector<unsigned int> >("ModulesToBeIncluded");
170  SubDetectorsToBeExcluded_= fPSet_.getParameter< std::vector<std::string> >("SubDetectorsToBeExcluded");
171 
172  // vectors to be sorted otherwise the intersection is non computed properly
173 
175  std::sort(ModulesToBeIncluded_.begin(),ModulesToBeIncluded_.end());
176 
177  if(fPSet_.getParameter<bool>("restrictModules")
178  && ModulesToBeExcluded_.size()==0
179  && ModulesToBeIncluded_.size()==0 ){
180  edm::LogWarning("SiStripBaseCondObjDQM")
181  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no modules to be exclude/included in your cfg"
182  << std::endl;
183  }
184 
185 
186 
187 
188  // --> detIds to start with
189 
190  if( fPSet_.getParameter<bool>("restrictModules")){
191 
192  if( ModulesToBeIncluded_.size()>0 ){
193  std::vector<uint32_t> tmp;
194  tmp.clear();
195  set_intersection( detIds_.begin(), detIds_.end(),
196  ModulesToBeIncluded_.begin(), ModulesToBeIncluded_.end(),
197  inserter(tmp,tmp.begin()));
198  swap(detIds_,tmp);
199  }
200 
201  }
202 
203 
204 
205  // -----
206  // *** exclude modules ***
207 
208  if( fPSet_.getParameter<bool>("restrictModules") ){
209 
210  std::sort(detIds_.begin(),detIds_.end());
211 
212  for( std::vector<uint32_t>::const_iterator modIter_ = ModulesToBeExcluded_.begin();
213  modIter_ != ModulesToBeExcluded_.end(); modIter_++){
214 
215  std::vector<uint32_t>::iterator detIter_=std::lower_bound(detIds_.begin(),detIds_.end(),*modIter_);
216  detIds_.erase(detIter_);
217  detIter_--;
218 
219  }
220 
221  }
222  // *** exclude modules ***
223  // -----
224 
225 
226  // -----
227  // *** restrict to a particular subdetector ***
228 
229  if( *(SubDetectorsToBeExcluded_.begin()) !="none" ){
230 
231  std::vector<uint32_t> tmp;
232 
233  SiStripSubStructure substructure_;
234 
235  for( std::vector<std::string>::const_iterator modIter_ = SubDetectorsToBeExcluded_.begin();
236  modIter_ != SubDetectorsToBeExcluded_.end(); modIter_++){
237  tmp.clear();
238 
239  if (*modIter_=="TIB") { substructure_.getTIBDetectors(detIds_, tmp, 0,0,0,0);}
240  else if (*modIter_=="TOB") { substructure_.getTOBDetectors(detIds_, tmp, 0,0,0);}
241  else if (*modIter_=="TID") { substructure_.getTIDDetectors(detIds_, tmp, 0,0,0,0);}
242  else if (*modIter_=="TEC") { substructure_.getTECDetectors(detIds_, tmp, 0,0,0,0,0,0);}
243  else {
244  edm::LogWarning("SiStripBaseCondObjDQM")
245  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no correct (name) subdetector to be excluded in your cfg"
246  << std::endl;
247  }
248 
249  std::vector<uint32_t>::iterator iterBegin_=std::lower_bound(detIds_.begin(),
250  detIds_.end(),
251  *min_element(tmp.begin(), tmp.end()));
252 
253  std::vector<uint32_t>::iterator iterEnd_=std::lower_bound(detIds_.begin(),
254  detIds_.end(),
255  *max_element(tmp.begin(), tmp.end()));
256 
257  for(std::vector<uint32_t>::iterator detIter_ = iterEnd_;
258  detIter_!= iterBegin_-1;detIter_--){
259  detIds_.erase(detIter_);
260  }
261 
262  } // loop SubDetectorsToBeExcluded_
263  }
264 
265 
266  // -----
267  // *** fill only one Module per layer ***
268 
269  if(fPSet_.getParameter<std::string>("ModulesToBeFilled") == "onlyOneModulePerLayer"){
270 
271  std::vector<uint32_t> tmp;
272  std::vector<uint32_t> layerDetIds;
273 
274  SiStripSubStructure substructure_;
275 
276  for(unsigned int i=1; i<5 ; i++){
277  tmp.clear();
278  substructure_.getTIBDetectors(detIds_, tmp, i,0,0,0);
279  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
280  }
281  for(unsigned int i=1; i<7 ; i++){
282  tmp.clear();
283  substructure_.getTOBDetectors(detIds_, tmp, i,0,0);
284  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
285  }
286  for(unsigned int i=1; i<4 ; i++){
287  tmp.clear();
288  substructure_.getTIDDetectors(detIds_, tmp, 1,i,0,0);
289  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
290  substructure_.getTIDDetectors(detIds_, tmp, 2,i,0,0);
291  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
292  }
293  for(unsigned int i=1; i<10 ; i++){
294  tmp.clear();
295  substructure_.getTECDetectors(detIds_, tmp, 1,i,0,0,0,0);
296  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
297  substructure_.getTECDetectors(detIds_, tmp, 2,i,0,0,0,0);
298  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
299  }
300 
301  detIds_.clear();
302  detIds_=layerDetIds;
303 
304  }
305  // -----
306 
307 
308 } //selectModules
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< uint32_t > ModulesToBeExcluded_
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
std::vector< uint32_t > ModulesToBeIncluded_
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
std::vector< std::string > SubDetectorsToBeExcluded_

Member Data Documentation

std::vector<uint32_t> SiStripBaseCondObjDQM::activeDetIds
protected
std::vector<uint32_t> SiStripBaseCondObjDQM::all_DetIds
protected

Definition at line 129 of file SiStripBaseCondObjDQM.h.

unsigned long long SiStripBaseCondObjDQM::cacheID_current
protected
unsigned long long SiStripBaseCondObjDQM::cacheID_memory
protected
std::string SiStripBaseCondObjDQM::condDataMonitoringMode_
private

Definition at line 156 of file SiStripBaseCondObjDQM.h.

std::string SiStripBaseCondObjDQM::CondObj_fillId_
protected
std::string SiStripBaseCondObjDQM::CondObj_name_
protected
edm::ESHandle<SiStripDetCabling> SiStripBaseCondObjDQM::detCablingHandle_
private

Definition at line 154 of file SiStripBaseCondObjDQM.h.

Referenced by getCabledModules().

DQMStore* SiStripBaseCondObjDQM::dqmStore_
private
const edm::EventSetup& SiStripBaseCondObjDQM::eSetup_
protected

Definition at line 109 of file SiStripBaseCondObjDQM.h.

Referenced by getCabledModules().

SiStripFolderOrganizer SiStripBaseCondObjDQM::folder_organizer
private
edm::ParameterSet SiStripBaseCondObjDQM::fPSet_
protected
bool SiStripBaseCondObjDQM::GrandSummary_On_
protected

Definition at line 117 of file SiStripBaseCondObjDQM.h.

Referenced by SiStripBaseCondObjDQM().

SiStripHistoId SiStripBaseCondObjDQM::hidmanager
private
bool SiStripBaseCondObjDQM::HistoMaps_On_
protected
edm::ParameterSet SiStripBaseCondObjDQM::hPSet_
protected
double SiStripBaseCondObjDQM::maxValue
protected

Definition at line 118 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

double SiStripBaseCondObjDQM::minValue
protected

Definition at line 118 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

bool SiStripBaseCondObjDQM::Mod_On_
protected

Definition at line 113 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

std::map<uint32_t, ModMEs> SiStripBaseCondObjDQM::ModMEsMap_
protected

Definition at line 126 of file SiStripBaseCondObjDQM.h.

Referenced by getModMEs().

std::vector<uint32_t> SiStripBaseCondObjDQM::ModulesToBeExcluded_
private

Definition at line 150 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

std::vector<uint32_t> SiStripBaseCondObjDQM::ModulesToBeIncluded_
private

Definition at line 151 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

SiStripDetInfoFileReader* SiStripBaseCondObjDQM::reader
protected
std::vector<std::string> SiStripBaseCondObjDQM::SubDetectorsToBeExcluded_
private

Definition at line 152 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

std::map<uint32_t, ModMEs> SiStripBaseCondObjDQM::SummaryMEsMap_
protected
bool SiStripBaseCondObjDQM::SummaryOnLayerLevel_On_
protected
bool SiStripBaseCondObjDQM::SummaryOnStringLevel_On_
protected
TkHistoMap* SiStripBaseCondObjDQM::Tk_HM_
protected
TkHistoMap* SiStripBaseCondObjDQM::Tk_HM_H
protected
TkHistoMap* SiStripBaseCondObjDQM::Tk_HM_L
protected
TrackerMap* SiStripBaseCondObjDQM::tkMap
protected

Definition at line 137 of file SiStripBaseCondObjDQM.h.

Referenced by bookTkMap(), fillTkMap(), and saveTkMap().

std::vector<int> SiStripBaseCondObjDQM::tkMapScaler
protected

Definition at line 119 of file SiStripBaseCondObjDQM.h.

Referenced by SiStripNoisesDQM::fillMEsForLayer(), and saveTkMap().