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

#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_, const 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 (const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo)=0
 
virtual void fillMEsForLayer (uint32_t selDetId_, const TrackerTopology *tTopo)=0
 
virtual void fillModMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
 
virtual void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
 
void fillTkMap (const uint32_t &detid, const float &value)
 
std::pair< std::string, uint32_t > getLayerNameAndId (const uint32_t &detId_, const TrackerTopology *tTopo)
 
void getModMEs (ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 
std::vector< uint32_t > GetSameLayerDetId (const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
 
std::pair< std::string, uint32_t > getStringNameAndId (const uint32_t &detId_, const TrackerTopology *tTopo)
 
void getSummaryMEs (ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 

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_, const TrackerTopology *tTopo)
 
void bookProfileMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 
void bookSummaryCumulMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 
void bookSummaryMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 
void bookSummaryProfileMEs (SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
 
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

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, AlCaHLTBitMon_QueryRunRegistry::string, 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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 
67  if(Mod_On_ ) { fillModMEs (activeDetIds, eSetup_); }
69 
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
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
virtual void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
const IOVSyncValue & iovSyncValue() const
Definition: EventSetup.h:89
tuple filename
Definition: lut2db_cfg.py:20
std::vector< uint32_t > activeDetIds
unsigned long long cacheID_current
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
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_, eSetup_);
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
unsigned long long cacheID_current
virtual void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
void SiStripBaseCondObjDQM::analysisOnDemand ( const edm::EventSetup eSetup_,
const 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, eSetup_);
144 
145 }
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 fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
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_,
const TrackerTopology tTopo 
)
private

Definition at line 498 of file SiStripBaseCondObjDQM.cc.

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

Referenced by getModMEs().

498  {
499 
500  int hCumul_NchX = 0;
501  double hCumul_LowX = 0;
502  double hCumul_HighX = 0;
503 
504  std::string hCumul_description;
505  hCumul_description = hPSet_.getParameter<std::string>("Cumul_description");
506 
507  std::string hCumul_xTitle, hCumul_yTitle;
508  hCumul_xTitle = hPSet_.getParameter<std::string>("Cumul_xTitle");
509  hCumul_yTitle = hPSet_.getParameter<std::string>("Cumul_yTitle");
510 
511  hCumul_NchX = hPSet_.getParameter<int>("Cumul_NchX");
512  hCumul_LowX = hPSet_.getParameter<double>("Cumul_LowX");
513  hCumul_HighX = hPSet_.getParameter<double>("Cumul_HighX");
514 
515  folder_organizer.setDetectorFolder(detId_,tTopo);
516 
517  std::string hCumul_name;
518  hCumul_name = hidmanager.createHistoId(hCumul_description , "det", detId_); ;
519 
520  std::string hCumul_title;
521  hCumul_title = hCumul_name ;
522 
523  CondObj_ME.CumulDistr = dqmStore_->book1D(hCumul_name,
524  hCumul_title,
525  hCumul_NchX,
526  hCumul_LowX,
527  hCumul_HighX);
528  CondObj_ME.CumulDistr->setAxisTitle(hCumul_xTitle,1);
529  CondObj_ME.CumulDistr->setAxisTitle(hCumul_yTitle,2);
530  dqmStore_->tag(CondObj_ME.CumulDistr, detId_);
531 
532 }
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:872
SiStripFolderOrganizer folder_organizer
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
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_,
const TrackerTopology tTopo 
)
private

Definition at line 449 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(), AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::tag().

Referenced by getModMEs().

449  {
450 
451  int hProfile_NchX = 0;
452  double hProfile_LowX = 0;
453  double hProfile_HighX = 0;
454 
455  std::string hProfile_description;
456  hProfile_description = hPSet_.getParameter<std::string>("Profile_description");
457 
458  std::string hProfile_xTitle, hProfile_yTitle;
459  hProfile_xTitle = hPSet_.getParameter<std::string>("Profile_xTitle");
460  hProfile_yTitle = hPSet_.getParameter<std::string>("Profile_yTitle");
461 
462  if( CondObj_name_!= "apvgain" ){
463 
464  int nStrip = reader->getNumberOfApvsAndStripLength(detId_).first*128;
465 
466  hProfile_NchX = nStrip;
467  hProfile_LowX = 0.5;
468  hProfile_HighX = nStrip+0.5;
469  }
470  else {
471 
472  int nApv = reader->getNumberOfApvsAndStripLength(detId_).first;
473 
474  hProfile_NchX = nApv;
475  hProfile_LowX = 0.5;
476  hProfile_HighX = nApv+0.5;
477  }
478 
479  folder_organizer.setDetectorFolder(detId_,tTopo);
480 
481  std::string hProfile_Name;
482  hProfile_Name = hidmanager.createHistoId(hProfile_description, "det", detId_);
483 
484  std::string hProfile;
485  hProfile = hProfile_Name ;
486 
487  CondObj_ME.ProfileDistr = dqmStore_->book1D(hProfile_Name, hProfile, hProfile_NchX, hProfile_LowX, hProfile_HighX);
488  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_xTitle,1);
489  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_yTitle,2);
490  dqmStore_->tag(CondObj_ME.ProfileDistr, detId_);
491 
492 }
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:872
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
SiStripFolderOrganizer folder_organizer
void setDetectorFolder(uint32_t rawdetid, const TrackerTopology *tTopo)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
SiStripDetInfoFileReader * reader
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_,
const TrackerTopology tTopo 
)
private

Definition at line 765 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(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr, SummaryOnStringLevel_On_, and DQMStore::tag().

Referenced by getSummaryMEs().

765  {
766 
767  int hSummaryOfCumul_NchX = 0;
768  double hSummaryOfCumul_LowX = 0;
769  double hSummaryOfCumul_HighX = 0;
770 
771  std::string hSummaryOfCumul_description;
772  hSummaryOfCumul_description = hPSet_.getParameter<std::string>("SummaryOfCumul_description");
773 
774  std::string hSummaryOfCumul_xTitle, hSummaryOfCumul_yTitle;
775  hSummaryOfCumul_xTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_xTitle");
776  hSummaryOfCumul_yTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_yTitle");
777 
778  hSummaryOfCumul_NchX = hPSet_.getParameter<int>("SummaryOfCumul_NchX");
779  hSummaryOfCumul_LowX = hPSet_.getParameter<double>("SummaryOfCumul_LowX");
780  hSummaryOfCumul_HighX = hPSet_.getParameter<double>("SummaryOfCumul_HighX");
781 
782  uint32_t layer_=0;
783 
784  layer_ = folder_organizer.GetSubDetAndLayer(detId_, tTopo).second;
785 
786  folder_organizer.setLayerFolder(detId_,tTopo,layer_);
787 
788  std::string hSummaryOfCumul_name;
789 
790  // ---
791  int subdetectorId_ = ((detId_>>25)&0x7);
792 
793  if( subdetectorId_<3 || subdetectorId_>6 ){
794  edm::LogError("SiStripBaseCondObjDQM")
795  << "[SiStripBaseCondObjDQM::bookSummaryCumulMEs] WRONG INPUT : no such subdetector type : "
796  << subdetectorId_ << " no folder set!"
797  << std::endl;
798  return;
799  }
800  // ---
801 
802  // LA Histos are plotted for each string:
803  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
804  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getStringNameAndId(detId_,tTopo).first, "") ;
805  }
806  else {
807  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getLayerNameAndId(detId_,tTopo).first, "") ;
808  }
809 
810 
811  std::string hSummaryOfCumul_title;
812  hSummaryOfCumul_title = hSummaryOfCumul_name ;
813 
814  CondObj_ME.SummaryOfCumulDistr = dqmStore_->book1D(hSummaryOfCumul_name,
815  hSummaryOfCumul_title,
816  hSummaryOfCumul_NchX,
817  hSummaryOfCumul_LowX,
818  hSummaryOfCumul_HighX);
819 
820  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_xTitle,1);
821  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_yTitle,2);
822 
823  dqmStore_->tag(CondObj_ME.SummaryOfCumulDistr, layer_);
824 
825 }
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:872
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
bool first
Definition: L1TdeRCT.cc:79
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
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_,
const TrackerTopology tTopo 
)
private

Definition at line 831 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(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, and DQMStore::tag().

Referenced by getSummaryMEs().

831  {
832 
833  std::vector<uint32_t> sameLayerDetIds_;
834 
835  int hSummary_NchX = 0;
836  double hSummary_LowX = 0;
837  double hSummary_HighX = 0;
838 
839  std::string hSummary_description;
840  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
841 
842  std::string hSummary_xTitle, hSummary_yTitle;
843  hSummary_xTitle = hPSet_.getParameter<std::string>("Summary_xTitle");
844  hSummary_yTitle = hPSet_.getParameter<std::string>("Summary_yTitle");
845 
846  int hSummary_NchY;
847  double hSummary_LowY, hSummary_HighY;
848  hSummary_NchY = hPSet_.getParameter<int>("Summary_NchY");
849  hSummary_LowY = hPSet_.getParameter<double>("Summary_LowY");
850  hSummary_HighY = hPSet_.getParameter<double>("Summary_HighY");
851 
852 
853  // -----
854  // get detIds belonging to same layer to fill X-axis with detId-number
855 
856 
857  sameLayerDetIds_.clear();
858 
859  sameLayerDetIds_=GetSameLayerDetId(activeDetIds,detId_,tTopo);
860 
861  hSummary_NchX = sameLayerDetIds_.size();
862  hSummary_LowX = 0.5;
863  hSummary_HighX = sameLayerDetIds_.size()+0.5;
864 
865  uint32_t layer_=0;
866 
867  layer_ = folder_organizer.GetSubDetAndLayer(detId_, tTopo).second;
868 
869  folder_organizer.setLayerFolder(detId_,tTopo,layer_);
870 
871  std::string hSummary_name;
872 
873  // ---
874  int subdetectorId_ = ((detId_>>25)&0x7);
875 
876 
877  if( subdetectorId_<3 || subdetectorId_>6 ){
878  edm::LogError("SiStripBaseCondObjDQM")
879  << "[SiStripBaseCondObjDQM::bookSummaryMEs] WRONG INPUT : no such subdetector type : "
880  << subdetectorId_ << " no folder set!"
881  << std::endl;
882  return;
883  }
884  // ---
885 
886  hSummary_name = hidmanager.createHistoLayer(hSummary_description,
887  "layer" ,
888  getLayerNameAndId(detId_,tTopo).first,
889  "") ;
890 
891  std::string hSummary_title;
892  hSummary_title = hSummary_name ;
893 
894  CondObj_ME.SummaryDistr = dqmStore_->bookProfile(hSummary_name,
895  hSummary_title,
896  hSummary_NchX,
897  hSummary_LowX,
898  hSummary_HighX,
899  hSummary_NchY,
900  0.,
901  0.);
902  // hSummary_LowY,
903  // hSummary_HighY);
904  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_xTitle,1);
905  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_yTitle,2);
906  CondObj_ME.SummaryDistr->setAxisRange(hSummary_LowY, hSummary_HighY,2);
907 
908  // -----
909  // in order to get the right detId-number labelled in right bin of x-axis
910  unsigned int iBin=0;
911 
912  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
913 
914  iBin++;
915  char sameLayerDetIds_Name[1024];
916  sprintf(sameLayerDetIds_Name,"%u",sameLayerDetIds_[i]);
917  if(iBin%100==0)
918  CondObj_ME.SummaryDistr->setBinLabel(iBin, sameLayerDetIds_Name);
919 
920  }
921  // -----
922 
923  dqmStore_->tag(CondObj_ME.SummaryDistr, layer_);
924 
925 }
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)
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)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
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:1186
bool first
Definition: L1TdeRCT.cc:79
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > activeDetIds
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
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_,
const TrackerTopology tTopo 
)
private

Definition at line 539 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_, reader, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), SiStripFolderOrganizer::setLayerFolder(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, SummaryOnLayerLevel_On_, SummaryOnStringLevel_On_, DQMStore::tag(), TrackerTopology::tibIsExternalString(), TrackerTopology::tibIsInternalString(), TrackerTopology::tibIsZMinusSide(), TrackerTopology::tibIsZPlusSide(), TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TrackerTopology::tibString(), TrackerTopology::tobIsZMinusSide(), TrackerTopology::tobIsZPlusSide(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), and TrackerTopology::tobRod().

Referenced by getSummaryMEs().

539  {
540 
541  std::vector<uint32_t> sameLayerDetIds_;
542 
543  int hSummaryOfProfile_NchX = 0;
544  double hSummaryOfProfile_LowX = 0;
545  double hSummaryOfProfile_HighX = 0;
546 
547  std::string hSummaryOfProfile_description;
548  hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
549 
550  std::string hSummaryOfProfile_xTitle, hSummaryOfProfile_yTitle;
551  hSummaryOfProfile_xTitle = hPSet_.getParameter<std::string>("SummaryOfProfile_xTitle");
552  hSummaryOfProfile_yTitle = hPSet_.getParameter<std::string>("SummaryOfProfile_yTitle");
553 
554  int hSummaryOfProfile_NchY;
555  double hSummaryOfProfile_LowY, hSummaryOfProfile_HighY;
556  hSummaryOfProfile_NchY = hPSet_.getParameter<int>("SummaryOfProfile_NchY");
557  hSummaryOfProfile_LowY = hPSet_.getParameter<double>("SummaryOfProfile_LowY");
558  hSummaryOfProfile_HighY = hPSet_.getParameter<double>("SummaryOfProfile_HighY");
559 
560  int nStrip, nApv, layerId_;
561 
562  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) { layerId_= getStringNameAndId(detId_,tTopo).second;}
563  else { layerId_= getLayerNameAndId(detId_,tTopo).second;}
564 
565 
566  if( CondObj_name_ == "pedestal" || CondObj_name_ == "noise" || CondObj_name_ == "lowthreshold" || CondObj_name_ == "highthreshold" ){ // plot in strip number
567 
568  if( (layerId_ > 610 && layerId_ < 620) || // TID & TEC have 768 strips at maximum
569  (layerId_ > 620 && layerId_ < 630) ||
570  (layerId_ > 410 && layerId_ < 414) ||
571  (layerId_ > 420 && layerId_ < 424) ){ nStrip =768;}
572  else { nStrip = reader->getNumberOfApvsAndStripLength(detId_).first*128;}
573 
574  hSummaryOfProfile_NchX = nStrip;
575  hSummaryOfProfile_LowX = 0.5;
576  hSummaryOfProfile_HighX = nStrip+0.5;
577 
578  }
579  else if( (CondObj_name_ == "lorentzangle" && SummaryOnLayerLevel_On_) || CondObj_name_ == "quality"){ // plot in detId-number
580 
581  // -----
582  // get detIds belonging to same layer to fill X-axis with detId-number
583 
584  uint32_t subDetId_ = ((detId_>>25)&0x7);
585  SiStripSubStructure substructure_;
586 
587  sameLayerDetIds_.clear();
588 
589  if(subDetId_==3){ // TIB
590  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_,tTopo->tibLayer(detId_),0,0,tTopo->tibString(detId_));
591  }
592  else if(subDetId_==4){ // TID
593  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds_,0,0,0,0);
594  }
595  else if(subDetId_==5){ // TOB
596  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds_, tTopo->tobLayer(detId_),0,0);
597  }
598  else if(subDetId_==6){ // TEC
599  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0,0,0);
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_ == "lorentzangle" && SummaryOnStringLevel_On_){ // plot in detId-number
608 
609  // -----
610  // get detIds belonging to same string to fill X-axis with detId-number
611 
612  uint32_t subDetId_ = ((detId_>>25)&0x7);
613  SiStripSubStructure substructure_;
614 
615  sameLayerDetIds_.clear();
616 
617  if(subDetId_==3){ // TIB
618  if(tTopo->tibIsInternalString(detId_)){
619  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_, tTopo->tibLayer(detId_),0,1,tTopo->tibString(detId_)); }
620  else if(tTopo->tibIsExternalString(detId_)){
621  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds_, tTopo->tibLayer(detId_),0,2,tTopo->tibString(detId_)); }
622  }
623  else if(subDetId_==4){ // TID
624  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0);
625  }
626  else if(subDetId_==5){ // TOB
627  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds_, tTopo->tobLayer(detId_),0,tTopo->tobRod(detId_));
628  }
629  else if(subDetId_==6){ // TEC
630  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds_, 0,0,0,0,0,0);
631  }
632 
633 
634  hSummaryOfProfile_NchX = sameLayerDetIds_.size();
635  hSummaryOfProfile_LowX = 0.5;
636  hSummaryOfProfile_HighX = sameLayerDetIds_.size()+0.5;
637 
638  }
639  else if( CondObj_name_ == "apvgain"){
640 
641  if( (layerId_ > 610 && layerId_ < 620) || // TID & TEC have 6 apvs at maximum
642  (layerId_ > 620 && layerId_ < 630) ||
643  (layerId_ > 410 && layerId_ < 414) ||
644  (layerId_ > 420 && layerId_ < 424) ){ nApv =6;}
645  else { nApv = reader->getNumberOfApvsAndStripLength(detId_).first;}
646 
647  hSummaryOfProfile_NchX = nApv;
648  hSummaryOfProfile_LowX = 0.5;
649  hSummaryOfProfile_HighX = nApv+0.5;
650 
651  }
652  else {
653  edm::LogWarning("SiStripBaseCondObjDQM")
654  << "[SiStripBaseCondObjDQM::bookSummaryProfileMEs] PLEASE CHECK : x-axis label in your cfg"
655  << std::endl;
656  }
657 
658  uint32_t layer_=0;
659 
660  layer_ = folder_organizer.GetSubDetAndLayer(detId_, tTopo).second;
661 
662  folder_organizer.setLayerFolder(detId_,tTopo,layer_);
663 
664  std::string hSummaryOfProfile_name;
665 
666  // ---
667  int subdetectorId_ = ((detId_>>25)&0x7);
668 
669 
670  if( subdetectorId_<3 || subdetectorId_>6 ){
671  edm::LogError("SiStripBaseCondObjDQM")
672  << "[SiStripBaseCondObjDQM::bookSummaryProfileMEs] WRONG INPUT : no such subdetector type : "
673  << subdetectorId_ << " no folder set!"
674  << std::endl;
675  return;
676  }
677  // ---
678 
679  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
680  hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer" , getStringNameAndId(detId_,tTopo).first,"") ;
681  }
682  else {
683  hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer" , getLayerNameAndId(detId_,tTopo).first,"") ;
684  }
685 
686  std::string hSummaryOfProfile_title;
687  hSummaryOfProfile_title = hSummaryOfProfile_name ;
688 
689  CondObj_ME.SummaryOfProfileDistr = dqmStore_->bookProfile(hSummaryOfProfile_name,
690  hSummaryOfProfile_title,
691  hSummaryOfProfile_NchX,
692  hSummaryOfProfile_LowX,
693  hSummaryOfProfile_HighX,
694  hSummaryOfProfile_NchY,
695  0.,
696  0.);
697  // hSummaryOfProfile_LowY,
698  // hSummaryOfProfile_HighY);
699  CondObj_ME.SummaryOfProfileDistr->setAxisTitle(hSummaryOfProfile_xTitle,1);
700  CondObj_ME.SummaryOfProfileDistr->setAxisTitle(hSummaryOfProfile_yTitle,2);
701  CondObj_ME.SummaryOfProfileDistr->setAxisRange(hSummaryOfProfile_LowY, hSummaryOfProfile_HighY,2);
702 
703  // -----
704  // in order to get the right detId-number labelled in right bin of x-axis
705 
706  if( CondObj_name_ == "quality" ){
707 
708  unsigned int iBin=0;
709 
710  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
711 
712  iBin++;
713  char sameLayerDetIds_Name[1024];
714  sprintf(sameLayerDetIds_Name,"%u",sameLayerDetIds_[i]);
715  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
716 
717  }
718  }
719  if( CondObj_name_ == "lorentzangle"){
720 
721  // Put the detIds for the -z side as following the geometrical order:
722  reverse(sameLayerDetIds_.begin(), sameLayerDetIds_.begin()+sameLayerDetIds_.size()/2);
723 
724  unsigned int iBin=0;
725  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
726  iBin++;
728  // remove the label for detIds:
729  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, "");
730  }
731 
733  // Label with module position instead of detIds:
734  char sameLayerDetIds_Name[1024];
735  if(subdetectorId_==3){//re-abelling for TIB
736  if(tTopo->tibIsZPlusSide(sameLayerDetIds_[i])){
737  sprintf(sameLayerDetIds_Name,"%i",tTopo->tibModule(sameLayerDetIds_[i]));}
738  else if(tTopo->tibIsZMinusSide(sameLayerDetIds_[i])){
739  sprintf(sameLayerDetIds_Name,"%i",-tTopo->tibModule(sameLayerDetIds_[i]));}
740  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
741  }
742  else if(subdetectorId_==5){//re-abelling for TOB
743  if(tTopo->tobIsZPlusSide(sameLayerDetIds_[i])) { sprintf(sameLayerDetIds_Name,"%i",tTopo->tobModule(sameLayerDetIds_[i]));}
744  else if(tTopo->tobIsZMinusSide(sameLayerDetIds_[i])) { sprintf(sameLayerDetIds_Name,"%i",-tTopo->tobModule(sameLayerDetIds_[i]));}
745  CondObj_ME.SummaryOfProfileDistr->setBinLabel(iBin, sameLayerDetIds_Name);
746  }
747  }
748  }
749 
750 
751 
752 
753  // -----
754 
755  dqmStore_->tag(CondObj_ME.SummaryOfProfileDistr, layer_);
756 
757  } // if "lorentzangle"
758 
759 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
static const char layer_[]
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
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
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)
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, const TrackerTopology *tTopo, bool ring_flag=0)
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
bool tibIsZPlusSide(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
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
bool tibIsZMinusSide(const DetId &id) const
bool tobIsZPlusSide(const DetId &id) const
bool tobIsZMinusSide(const DetId &id) const
std::pair< std::string, uint32_t > getStringNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
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:1186
bool first
Definition: L1TdeRCT.cc:79
unsigned int tibModule(const DetId &id) const
void setLayerFolder(uint32_t rawdetid, const TrackerTopology *tTopo, int32_t layer=0, bool ring_flag=0)
unsigned int tobModule(const DetId &id) 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
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
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::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
unsigned int tobRod(const DetId &id) const
bool tibIsInternalString(const DetId &id) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
unsigned int tobLayer(const DetId &id) const
void SiStripBaseCondObjDQM::bookTkMap ( const std::string &  TkMapname)
private

Definition at line 1181 of file SiStripBaseCondObjDQM.cc.

References tkMap.

Referenced by SiStripBaseCondObjDQM().

1181  {
1182  tkMap= new TrackerMap(TkMapname.c_str());
1183 }
void SiStripBaseCondObjDQM::end ( void  )
virtual

Definition at line 1238 of file SiStripBaseCondObjDQM.cc.

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

1238  {
1239  edm::LogInfo("SiStripBaseCondObjDQM") << "SiStripBaseCondObjDQM::end" << std::endl;
1240 }
virtual void SiStripBaseCondObjDQM::fillMEsForDet ( const ModMEs selModME_,
uint32_t  selDetId_,
const TrackerTopology tTopo 
)
protectedpure virtual
virtual void SiStripBaseCondObjDQM::fillMEsForLayer ( uint32_t  selDetId_,
const TrackerTopology tTopo 
)
protectedpure virtual
void SiStripBaseCondObjDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds,
const edm::EventSetup es 
)
protectedvirtual

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

Definition at line 1243 of file SiStripBaseCondObjDQM.cc.

References fillMEsForDet(), edm::EventSetup::get(), and edm::ESHandle< class >::product().

Referenced by analysis(), and analysisOnDemand().

1243  {
1244 
1245  //Retrieve tracker topology from geometry
1246  edm::ESHandle<TrackerTopology> tTopoHandle;
1247  es.get<IdealGeometryRecord>().get(tTopoHandle);
1248  const TrackerTopology* const tTopo = tTopoHandle.product();
1249 
1250  ModMEs CondObj_ME;
1251 
1252  for(std::vector<uint32_t>::const_iterator detIter_=selectedDetIds.begin();
1253  detIter_!=selectedDetIds.end();++detIter_){
1254  fillMEsForDet(CondObj_ME,*detIter_,tTopo);
1255  }
1256 }
virtual void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo)=0
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
void SiStripBaseCondObjDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds,
const edm::EventSetup es 
)
protectedvirtual

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

Definition at line 1259 of file SiStripBaseCondObjDQM.cc.

References alignmentValidation::c1, CondObj_fillId_, fillMEsForLayer(), fPSet_, edm::EventSetup::get(), edm::ParameterSet::getParameter(), MonitorElement::getTH1(), MonitorElement::getTProfile(), hPSet_, mergeVDriftHistosByStation::name, edm::ESHandle< class >::product(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SummaryMEsMap_, SiStripBaseCondObjDQM::ModMEs::SummaryOfCumulDistr, and SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr.

Referenced by analysis(), and analysisOnDemand().

1259  {
1260 
1261  //Retrieve tracker topology from geometry
1262  edm::ESHandle<TrackerTopology> tTopoHandle;
1263  es.get<IdealGeometryRecord>().get(tTopoHandle);
1264  const TrackerTopology* const tTopo = tTopoHandle.product();
1265 
1266  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
1267  detIter_!= selectedDetIds.end();detIter_++){
1268  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_,tTopo);
1269  }
1270 
1271  for (std::map<uint32_t, ModMEs>::iterator iter=SummaryMEsMap_.begin();
1272  iter!=SummaryMEsMap_.end(); iter++){
1273 
1274  ModMEs selME;
1275  selME = iter->second;
1276 
1277  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel") &&
1278  fPSet_.getParameter<bool>("OutputSummaryProfileAtLayerLevelAsImage")){
1279 
1280  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
1281 
1282  TCanvas c1("c1");
1283  selME.SummaryOfProfileDistr->getTProfile()->Draw();
1284  std::string name (selME.SummaryOfProfileDistr->getTProfile()->GetTitle());
1285  name+=".png";
1286  c1.Print(name.c_str());
1287  }
1288  }
1289  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel") &&
1290  fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")){
1291 
1292  TCanvas c1("c1");
1293  selME.SummaryDistr->getTH1()->Draw();
1294  std::string name (selME.SummaryDistr->getTH1()->GetTitle());
1295  name+=".png";
1296  c1.Print(name.c_str());
1297  }
1298  if(hPSet_.getParameter<bool>("FillCumulativeSummaryAtLayerLevel") &&
1299  fPSet_.getParameter<bool>("OutputCumulativeSummaryAtLayerLevelAsImage")){
1300 
1301  if( CondObj_fillId_ =="onlyCumul" || CondObj_fillId_ =="ProfileAndCumul"){
1302 
1303  TCanvas c1("c1");
1304  selME.SummaryOfCumulDistr->getTH1()->Draw();
1305  std::string name (selME.SummaryOfCumulDistr->getTH1()->GetTitle());
1306  name+=".png";
1307  c1.Print(name.c_str());
1308  }
1309  }
1310 
1311  }
1312 }
T getParameter(std::string const &) const
virtual void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo)=0
std::map< uint32_t, ModMEs > SummaryMEsMap_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
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_,
const TrackerTopology tTopo 
)
protected

Definition at line 930 of file SiStripBaseCondObjDQM.cc.

References i, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), and TrackerTopology::tobLayer().

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

930  {
931 
932  int subdetectorId_ = ((detId_>>25)&0x7);
933  int layerId_=0;
934 
935  std::stringstream layerName;
936 
937  if( subdetectorId_ == 3 ){ //TIB
938 
939  for( unsigned int i = 1; i < 5; i++ ){
940  if( tTopo->tibLayer( detId_ ) ==i ){
941  layerName << "TIB__layer__" << i;
942  layerId_ = 300 + i;
943  }
944  }
945 
946  }
947 
948  else if( subdetectorId_ == 4 ){ //TIDD
949 
950  if( tTopo->tidSide( detId_ ) == 1 ) { // TIDD side 1
951 
952  for( unsigned int i = 1; i < 4; i++ ){
953  if(tTopo->tidWheel(detId_)==i){
954  layerName << "TID__side__1__wheel__" << i;
955  layerId_ = 410 + i;
956  }
957  }
958 
959  }
960 
961  else if( tTopo->tidSide( detId_ ) == 2 ) { // TIDD side 2
962 
963  for( unsigned int i = 1; i < 4; i++ ) {
964  if(tTopo->tidWheel(detId_)==i){
965  layerName << "TID__side__2__wheel__" << i;
966  layerId_ = 420 + i;
967  }
968  }
969 
970  }
971 
972  }
973 
974 
975  else if( subdetectorId_ == 5 ){ // TOB
976 
977  for( unsigned int i = 1; i < 7; i++ ) {
978  if( tTopo->tobLayer( detId_ ) == i ) {
979  layerName << "TOB__layer__" << i;
980  layerId_ = 500 + i;
981  }
982  }
983 
984  }
985 
986  else if( subdetectorId_ == 6 ){ // TEC
987 
988  if( tTopo->tecSide( detId_ ) == 1) { // TEC side 1
989 
990  for( unsigned int i = 1; i < 10; i++ ) {
991  if( tTopo->tecWheel( detId_ ) == i ) {
992  layerName << "TEC__side__1__wheel__" << i;
993  layerId_ = 610 + i;
994  }
995  }
996 
997  }
998 
999  else if( tTopo->tecSide( detId_ ) == 2 ) { // TEC side 2
1000 
1001  for( unsigned int i = 1; i < 10; i++ ) {
1002  if( tTopo->tecWheel( detId_ ) == i ) {
1003  layerName << "TEC__side__2__wheel__" << i;
1004  layerId_ = 620 + i;
1005  }
1006  }
1007 
1008  }
1009  }
1010 
1011  return std::make_pair( layerName.str(), layerId_ );
1012 
1013 }
int i
Definition: DBlmapReader.cc:9
unsigned int tibLayer(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void SiStripBaseCondObjDQM::getModMEs ( ModMEs CondObj_ME,
const uint32_t &  detId_,
const TrackerTopology tTopo 
)
protected

Definition at line 346 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(), SiStripPedestalsDQM::fillMEsForDet(), SiStripApvGainsDQM::fillMEsForDet(), and SiStripQualityDQM::fillMEsForDet().

346  {
347 
348  std::map< uint32_t, ModMEs >::const_iterator ModMEsMap_iter = ModMEsMap_.find(detId_);
349 
350  if (ModMEsMap_iter != ModMEsMap_.end()){
351 
352  CondObj_ME=ModMEsMap_iter->second;
353 
354  if( ( CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile") && CondObj_ME.ProfileDistr ) {
355  CondObj_ME.ProfileDistr ->Reset();
356  }
357 
358  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" ) && CondObj_ME.CumulDistr ){
359  CondObj_ME.CumulDistr ->Reset();
360  }
361  else {
362  edm::LogWarning("SiStripBaseCondObjDQM")
363  << "[SiStripBaseCondObjDQM::getModMEs] PLEASE CHECK : CondObj_fillId option mispelled";
364  }
365  return;
366 
367  }
368 
369  // --> profile defined for all CondData
370  if ( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile")) {
371  bookProfileMEs(CondObj_ME,detId_,tTopo);
372  }
373 
374  // --> cumul currently only defined for noise and apvgain
375  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" )
376  &&(CondObj_name_ == "noise" || CondObj_name_ == "apvgain") ) bookCumulMEs(CondObj_ME,detId_,tTopo);
377 
378 
379  ModMEsMap_.insert( std::make_pair(detId_,CondObj_ME) );
380 
381 }
std::map< uint32_t, ModMEs > ModMEsMap_
void bookProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void bookCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > SiStripBaseCondObjDQM::GetSameLayerDetId ( const std::vector< uint32_t > &  activeDetIds,
uint32_t  selDetId,
const TrackerTopology tTopo 
)
protected

Definition at line 1153 of file SiStripBaseCondObjDQM.cc.

References SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), and TrackerTopology::tobLayer().

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

1153  {
1154 
1155  std::vector<uint32_t> sameLayerDetIds;
1156  sameLayerDetIds.clear();
1157 
1158  SiStripSubStructure substructure_;
1159 
1160  uint32_t subselDetId_ = ((selDetId>>25)&0x7);
1161 
1162  if(subselDetId_==3){ // TIB
1163  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds, tTopo->tibLayer(selDetId),0,0,0);
1164  }
1165  else if(subselDetId_==4){ // TID
1166  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds, tTopo->tidSide(selDetId),tTopo->tidWheel(selDetId),0,0);
1167  }
1168  else if(subselDetId_==5){ // TOB
1169  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds, tTopo->tobLayer(selDetId),0,0);
1170  }
1171  else if(subselDetId_==6){ // TEC
1172  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds, tTopo->tecSide(selDetId),tTopo->tecWheel(selDetId),0,0,0,0);
1173  }
1174 
1175  return sameLayerDetIds;
1176 
1177 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
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
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
std::pair< std::string, uint32_t > SiStripBaseCondObjDQM::getStringNameAndId ( const uint32_t &  detId_,
const TrackerTopology tTopo 
)
protected

Definition at line 1019 of file SiStripBaseCondObjDQM.cc.

References i, TrackerTopology::tibIsExternalString(), TrackerTopology::tibIsInternalString(), TrackerTopology::tibLayer(), TrackerTopology::tibString(), TrackerTopology::tobLayer(), and TrackerTopology::tobRod().

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

1019  {
1020 
1021  int subdetectorId_ = ((detId_>>25)&0x7);
1022  int layerStringId_=0;
1023 
1024  std::stringstream layerStringName;
1025 
1026  if( subdetectorId_==3 ){ //TIB
1027  if(tTopo->tibLayer(detId_)==1 && tTopo->tibIsInternalString(detId_)){ //1st layer int
1028  for( unsigned int i=1; i < 27 ;i++){
1029  if(tTopo->tibString(detId_)==i){
1030  layerStringName << "TIB_L1_Int_Str_" << i;
1031  layerStringId_ = 30110+i;
1032  }
1033  }
1034  }
1035  else if(tTopo->tibLayer(detId_)==1 && tTopo->tibIsExternalString(detId_)){ //1st layer ext
1036  for( unsigned int i=1; i < 31 ;i++){
1037  if(tTopo->tibString(detId_)==i){
1038  layerStringName << "TIB_L1_Ext_Str_" << i;
1039  layerStringId_ = 301200+i;
1040  }
1041  }
1042  }
1043  else if(tTopo->tibLayer(detId_)==2 && tTopo->tibIsInternalString(detId_)){ //2nd layer int
1044  for( unsigned int i=1; i < 35 ;i++){
1045  if(tTopo->tibString(detId_)==i){
1046  layerStringName << "TIB_L2_Int_Str_" << i;
1047  layerStringId_ = 302100+i;
1048  }
1049  }
1050  }
1051  else if(tTopo->tibLayer(detId_)==2 && tTopo->tibIsExternalString(detId_)){ //2nd layer ext
1052  for( unsigned int i=1; i < 39 ;i++){
1053  if(tTopo->tibString(detId_)==i){
1054  layerStringName << "TIB_L2_Ext_Str_" << i;
1055  layerStringId_ = 302200+i;
1056  }
1057  }
1058  }
1059  else if(tTopo->tibLayer(detId_)==3 && tTopo->tibIsInternalString(detId_)){ //3rd layer int
1060  for( unsigned int i=1; i < 45 ;i++){
1061  if(tTopo->tibString(detId_)==i){
1062  layerStringName << "TIB_L3_Int_Str_" << i;
1063  layerStringId_ = 303100+i;
1064  }
1065  }
1066  }
1067  else if(tTopo->tibLayer(detId_)==3 && tTopo->tibIsExternalString(detId_)){ //3rd layer ext
1068  for( unsigned int i=1; i < 47 ;i++){
1069  if(tTopo->tibString(detId_)==i){
1070  layerStringName << "TIB_L3_Ext_Str_" << i;
1071  layerStringId_ = 303200+i;
1072  }
1073  }
1074  }
1075  else if(tTopo->tibLayer(detId_)==4 && tTopo->tibIsInternalString(detId_)){ //4th layer int
1076  for( unsigned int i=1; i < 53 ;i++){
1077  if(tTopo->tibString(detId_)==i){
1078  layerStringName << "TIB_L4_Int_Str_" << i;
1079  layerStringId_ = 304100+i;
1080  }
1081  }
1082  }
1083  else if(tTopo->tibLayer(detId_)==4 && tTopo->tibIsExternalString(detId_)){ //4th layer ext
1084  for( unsigned int i=1; i < 57 ;i++){
1085  if(tTopo->tibString(detId_)==i){
1086  layerStringName << "TIB_L4_Ext_Str_" << i;
1087  layerStringId_ = 304200+i;
1088  }
1089  }
1090  }
1091  } //TIB
1092 
1093 
1094  else if( subdetectorId_==5 ){ // TOB
1095  if(tTopo->tobLayer(detId_)==1){ //1st layer
1096  for( unsigned int i=1; i < 43 ;i++){
1097  if(tTopo->tobRod(detId_)==i){
1098  layerStringName << "TOB_L1_Rod_" << i;
1099  layerStringId_ = 50100+i;
1100  }
1101  }
1102  }
1103  else if(tTopo->tobLayer(detId_)==2){ //2nd layer
1104  for( unsigned int i=1; i < 49 ;i++){
1105  if(tTopo->tobRod(detId_)==i){
1106  layerStringName << "TOB_L2_Rod_" << i;
1107  layerStringId_ = 50200+i;
1108  }
1109  }
1110  }
1111  else if(tTopo->tobLayer(detId_)==3){ //3rd layer
1112  for( unsigned int i=1; i < 55 ;i++){
1113  if(tTopo->tobRod(detId_)==i){
1114  layerStringName << "TOB_L3_Rod_" << i;
1115  layerStringId_ = 50300+i;
1116  }
1117  }
1118  }
1119  else if(tTopo->tobLayer(detId_)==4){ //4th layer
1120  for( unsigned int i=1; i < 61 ;i++){
1121  if(tTopo->tobRod(detId_)==i){
1122  layerStringName << "TOB_L4_Rod_" << i;
1123  layerStringId_ = 50400+i;
1124  }
1125  }
1126  }
1127  else if(tTopo->tobLayer(detId_)==5){ //5th layer
1128  for( unsigned int i=1; i < 67 ;i++){
1129  if(tTopo->tobRod(detId_)==i){
1130  layerStringName << "TOB_L5_Rod_" << i;
1131  layerStringId_ = 50500+i;
1132  }
1133  }
1134  }
1135  else if(tTopo->tobLayer(detId_)==6){ //6st layer
1136  for( unsigned int i=1; i < 75 ;i++){
1137  if(tTopo->tobRod(detId_)==i){
1138  layerStringName << "TOB_L6_Rod_" << i;
1139  layerStringId_ = 50600+i;
1140  }
1141  }
1142  }
1143  }//TOB
1144 
1145  return std::make_pair( layerStringName.str(), layerStringId_ );
1146 
1147 }
int i
Definition: DBlmapReader.cc:9
unsigned int tibLayer(const DetId &id) const
unsigned int tibString(const DetId &id) const
bool tibIsExternalString(const DetId &id) const
unsigned int tobRod(const DetId &id) const
bool tibIsInternalString(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
void SiStripBaseCondObjDQM::getSummaryMEs ( ModMEs CondObj_ME,
const uint32_t &  detId_,
const TrackerTopology tTopo 
)
protected

Definition at line 387 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().

387  {
388 
389  std::map<uint32_t, ModMEs>::const_iterator SummaryMEsMap_iter;
390 
391  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_ ){
392  SummaryMEsMap_iter = SummaryMEsMap_.find(getStringNameAndId(detId_,tTopo).second);
393  }
394  else {
395  SummaryMEsMap_iter = SummaryMEsMap_.find(getLayerNameAndId(detId_,tTopo).second);
396  }
397 
398  if (SummaryMEsMap_iter != SummaryMEsMap_.end()){ return;}
399 
400  //FIXME t's not good that the base class has to know about which derived class shoudl exist.
401  // please modify this part. implement virtual functions, esplicited in the derived classes
402  // --> currently only profile summary defined for all condition objects except quality
403  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyProfile" ) &&
404  (
405  CondObj_name_ == "pedestal" ||
406  CondObj_name_ == "noise" ||
407  CondObj_name_ == "lowthreshold" ||
408  CondObj_name_ == "highthreshold" ||
409  CondObj_name_ == "apvgain" ||
410  CondObj_name_ == "lorentzangle") ) {
411  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel"))
412  if (!CondObj_ME.SummaryOfProfileDistr) { bookSummaryProfileMEs(CondObj_ME,detId_,tTopo); }
413  }
414 
415  // --> currently only genuine cumul LA
416  if( (CondObj_fillId_ =="ProfileAndCumul" || CondObj_fillId_ =="onlyCumul" ) &&
417  (
418  CondObj_name_ == "lorentzangle" ||
419  CondObj_name_ == "noise") ) {
420  if(hPSet_.getParameter<bool>("FillCumulativeSummaryAtLayerLevel"))
421  if (!CondObj_ME.SummaryOfCumulDistr) { bookSummaryCumulMEs(CondObj_ME,detId_,tTopo); }
422  }
423 
424  // --> currently only summary as a function of detId for noise, pedestal and apvgain
425  if( CondObj_name_ == "noise" ||
426  CondObj_name_ == "lowthreshold" ||
427  CondObj_name_ == "highthreshold" ||
428  CondObj_name_ == "apvgain" ||
429  CondObj_name_ == "pedestal" ||
430  CondObj_name_ == "quality" ) {
431  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel"))
432  if (!CondObj_ME.SummaryDistr) { bookSummaryMEs(CondObj_ME,detId_,tTopo); }
433 
434  }
435 
436  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
437  //FIXME getStringNameandId takes time. not need to call it every timne. put the call at the beginning of the method and caache the string
438  SummaryMEsMap_.insert( std::make_pair(getStringNameAndId(detId_,tTopo).second,CondObj_ME) );
439  }
440  else {
441  SummaryMEsMap_.insert( std::make_pair(getLayerNameAndId(detId_,tTopo).second,CondObj_ME) );
442  }
443 
444 }
T getParameter(std::string const &) const
void bookSummaryMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void bookSummaryProfileMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
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_, const TrackerTopology *tTopo)
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
void bookSummaryCumulMEs(SiStripBaseCondObjDQM::ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void SiStripBaseCondObjDQM::saveTkMap ( const std::string &  TkMapname,
double  minValue,
double  maxValue 
)
private

Definition at line 1191 of file SiStripBaseCondObjDQM.cc.

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

Referenced by analysis().

1191  {
1192 
1193  if(tkMapScaler.size()!=0){
1194  //check that saturation is below x% below minValue and above minValue, and in case re-arrange.
1195  float th=hPSet_.getParameter<double>("saturatedFraction");
1196 
1197  size_t imin=0,imax=0;
1198  float entries=0 ;
1199  for(size_t i=0;i<tkMapScaler.size();++i)
1200  entries+=tkMapScaler[i];
1201 
1202  float min=0 ;
1203  for(size_t i=0;(i<tkMapScaler.size()) && (min<th);++i){
1204  min+=tkMapScaler[i]/entries;
1205  imin=i;
1206  }
1207 
1208  float max=0;
1209  // for(size_t i=tkMapScaler.size()-1;(i>=0) && (max<th);--i){ // Wrong
1210  // Since i is unsigned, i >= 0 is always true,
1211  // and the loop termination condition is never reached.
1212  // We offset the loop index by one to fix this.
1213  for(size_t j=tkMapScaler.size();(j>0) && (max<th);--j){
1214  size_t i = j - 1;
1215  max+=tkMapScaler[i]/entries;
1216  imax=i;
1217  }
1218 
1219  //reset maxValue;
1220  if(maxValue<imax){
1221  edm::LogInfo("SiStripBaseCondObjDQM") << "Resetting TkMap maxValue from " << maxValue << " to " << imax;
1222  maxValue=imax;
1223  }
1224  //reset minValue;
1225  if(minValue>imin){
1226  edm::LogInfo("SiStripBaseCondObjDQM") << "Resetting TkMap minValue from " << minValue << " to " << imin;
1227  minValue=imin;
1228  }
1229  }
1230 
1231  tkMap->save(false, minValue, maxValue, TkMapname.c_str(),4500,2400);
1232  tkMap->setPalette(1); tkMap->showPalette(true);
1233 
1234 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< int > tkMapScaler
void showPalette(bool printflag1)
Definition: TrackerMap.h:125
const T & max(const T &a, const T &b)
void setPalette(int numpalette)
Definition: TrackerMap.h:123
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:698
int j
Definition: DBlmapReader.cc:9
void SiStripBaseCondObjDQM::selectModules ( std::vector< uint32_t > &  detIds_)

Definition at line 166 of file SiStripBaseCondObjDQM.cc.

References cond::rpcobgas::detid, fPSet_, edm::ParameterSet::getParameter(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), i, DetIdSelector::isSelected(), mod(), ModulesToBeExcluded_, ModulesToBeIncluded_, python.multivaluedict::sort(), AlCaHLTBitMon_QueryRunRegistry::string, SubDetectorsToBeExcluded_, swap(), and tmp.

Referenced by analysis().

166  {
167 
168  edm::LogInfo("SiStripBaseCondObjDQM") << "[SiStripBaseCondObjDQM::selectModules] input detIds_: " << detIds_.size() << std::endl;
169 
170  if( fPSet_.getParameter<bool>("restrictModules")){
171 
172  std::map<unsigned int, std::string> m_included_subdets;
173  std::map<unsigned int, DetIdSelector> m_included_subdetsels;
174  std::vector<edm::ParameterSet> included_subdets = fPSet_.getParameter<std::vector<edm::ParameterSet> >("ModulesToBeIncluded_DetIdSelector");
175  for(std::vector<edm::ParameterSet>::const_iterator wsdps = included_subdets.begin();wsdps!=included_subdets.end();++wsdps) {
176  m_included_subdets [wsdps->getParameter<unsigned int>("detSelection")] = wsdps->getParameter<std::string>("detLabel");
177  m_included_subdetsels[wsdps->getParameter<unsigned int>("detSelection")] =
178  DetIdSelector(wsdps->getUntrackedParameter<std::vector<std::string> >("selection",std::vector<std::string>()));
179  }
180 
181  std::vector<uint32_t> modulesToBeIncluded;
182  for(std::vector<uint32_t>::const_iterator detid=detIds_.begin();detid!=detIds_.end();++detid) {
183  for(std::map<unsigned int,DetIdSelector>::const_iterator detidsel=m_included_subdetsels.begin();detidsel!=m_included_subdetsels.end();++detidsel) {
184  DetIdSelector detIdSel = detidsel->second;
185  if(detIdSel.isSelected(*detid)) {
186  modulesToBeIncluded.push_back(*detid);
187  // std::cout << "detId: " << *detid << " is selected" << std::endl;
188  }
189  }
190  }
191 
192  // -----
193  // *** exclude modules ***
194  std::map<unsigned int, std::string> m_excluded_subdets;
195  std::map<unsigned int, DetIdSelector> m_excluded_subdetsels;
196  std::vector<edm::ParameterSet> excluded_subdets = fPSet_.getParameter<std::vector<edm::ParameterSet> >("ModulesToBeExcluded_DetIdSelector");
197  for(std::vector<edm::ParameterSet>::const_iterator wsdps = excluded_subdets.begin();wsdps!=excluded_subdets.end();++wsdps) {
198  m_excluded_subdets [wsdps->getParameter<unsigned int>("detSelection")] = wsdps->getParameter<std::string>("detLabel");
199  m_excluded_subdetsels[wsdps->getParameter<unsigned int>("detSelection")] =
200  DetIdSelector(wsdps->getUntrackedParameter<std::vector<std::string> >("selection",std::vector<std::string>()));
201  }
202 
203  std::vector<uint32_t> modulesToBeExcluded;
204  for(std::vector<uint32_t>::const_iterator detid=detIds_.begin();detid!=detIds_.end();++detid) {
205  for(std::map<unsigned int,DetIdSelector>::const_iterator detidsel=m_excluded_subdetsels.begin();detidsel!=m_excluded_subdetsels.end();++detidsel) {
206  DetIdSelector detIdSel = detidsel->second;
207  if(detIdSel.isSelected(*detid)) {
208  modulesToBeExcluded.push_back(*detid);
209  }
210  }
211  }
212 
213  ModulesToBeExcluded_ = fPSet_.getParameter< std::vector<unsigned int> >("ModulesToBeExcluded");
214  ModulesToBeIncluded_ = fPSet_.getParameter< std::vector<unsigned int> >("ModulesToBeIncluded");
215  SubDetectorsToBeExcluded_= fPSet_.getParameter< std::vector<std::string> >("SubDetectorsToBeExcluded");
216 
217  // vectors to be sorted otherwise the intersection is non computed properly
218 
220  std::sort(ModulesToBeIncluded_.begin(),ModulesToBeIncluded_.end());
221 
222  if (modulesToBeExcluded.size()==0 && modulesToBeIncluded.size()==0 &&
223  ModulesToBeExcluded_.size()==0 && ModulesToBeIncluded_.size()==0 )
224  edm::LogWarning("SiStripBaseCondObjDQM")
225  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no modules to be exclude/included in your cfg"
226  << std::endl;
227 
228 
229  modulesToBeIncluded.insert(modulesToBeIncluded.end(),ModulesToBeIncluded_.begin(),ModulesToBeIncluded_.end());
230  edm::LogInfo("SiStripBaseCondObjDQM") << "[SiStripBaseCondObjDQM::selectModules] modulesToBeIncluded: " << modulesToBeIncluded.size() << std::endl;
231  modulesToBeExcluded.insert(modulesToBeExcluded.end(),ModulesToBeExcluded_.begin(),ModulesToBeExcluded_.end());
232  edm::LogInfo("SiStripBaseCondObjDQM") << "[SiStripBaseCondObjDQM::selectModules] modulesToBeExcluded: " << modulesToBeExcluded.size() << std::endl;
233 
234  // apply modules selection
235  if( modulesToBeIncluded.size()>0 ){
236  std::vector<uint32_t> tmp;
237  // The intersection of two sets is formed only by the elements that are present in both sets
238  set_intersection( detIds_.begin(), detIds_.end(),
239  modulesToBeIncluded.begin(), modulesToBeIncluded.end(),
240  inserter(tmp,tmp.begin()));
241  swap(detIds_,tmp);
242  }
243 
244  std::sort(detIds_.begin(),detIds_.end());
245  if(modulesToBeExcluded.size()>0) {
246  for( std::vector<uint32_t>::const_iterator mod = modulesToBeExcluded.begin();
247  mod != modulesToBeExcluded.end(); mod++){
248 
249  std::vector<uint32_t>::iterator detid=std::lower_bound(detIds_.begin(),detIds_.end(),*mod);
250  if (detid!=detIds_.end())
251  detIds_.erase(detid);
252  detid--;
253  }
254  }
255 
256  // -----
257  // *** restrict to a particular subdetector ***
258 
259  if( *(SubDetectorsToBeExcluded_.begin()) !="none" ){
260 
261  std::vector<uint32_t> tmp;
262 
263  SiStripSubStructure substructure_;
264 
265  for( std::vector<std::string>::const_iterator modIter_ = SubDetectorsToBeExcluded_.begin();
266  modIter_ != SubDetectorsToBeExcluded_.end(); modIter_++){
267  tmp.clear();
268 
269  if (*modIter_=="TIB") { substructure_.getTIBDetectors(detIds_, tmp, 0,0,0,0);}
270  else if (*modIter_=="TOB") { substructure_.getTOBDetectors(detIds_, tmp, 0,0,0);}
271  else if (*modIter_=="TID") { substructure_.getTIDDetectors(detIds_, tmp, 0,0,0,0);}
272  else if (*modIter_=="TEC") { substructure_.getTECDetectors(detIds_, tmp, 0,0,0,0,0,0);}
273  else {
274  edm::LogWarning("SiStripBaseCondObjDQM")
275  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no correct (name) subdetector to be excluded in your cfg"
276  << std::endl;
277  }
278 
279  std::vector<uint32_t>::iterator iterBegin_=std::lower_bound(detIds_.begin(),
280  detIds_.end(),
281  *min_element(tmp.begin(), tmp.end()));
282 
283  std::vector<uint32_t>::iterator iterEnd_=std::lower_bound(detIds_.begin(),
284  detIds_.end(),
285  *max_element(tmp.begin(), tmp.end()));
286 
287  for(std::vector<uint32_t>::iterator detIter_ = iterEnd_;
288  detIter_!= iterBegin_-1;detIter_--){
289  detIds_.erase(detIter_);
290  }
291 
292  } // loop SubDetectorsToBeExcluded_
293  }
294 
295  }
296  edm::LogInfo("SiStripBaseCondObjDQM") << "[SiStripBaseCondObjDQM::selectModules] output detIds_: " << detIds_.size() << std::endl;
297 
298  // -----
299  // *** fill only one Module per layer ***
300 
301  if(fPSet_.getParameter<std::string>("ModulesToBeFilled") == "onlyOneModulePerLayer"){
302 
303  std::vector<uint32_t> tmp;
304  std::vector<uint32_t> layerDetIds;
305 
306  SiStripSubStructure substructure_;
307 
308  for(unsigned int i=1; i<5 ; i++){
309  tmp.clear();
310  substructure_.getTIBDetectors(detIds_, tmp, i,0,0,0);
311  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
312  }
313  for(unsigned int i=1; i<7 ; i++){
314  tmp.clear();
315  substructure_.getTOBDetectors(detIds_, tmp, i,0,0);
316  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
317  }
318  for(unsigned int i=1; i<4 ; i++){
319  tmp.clear();
320  substructure_.getTIDDetectors(detIds_, tmp, 1,i,0,0);
321  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
322  substructure_.getTIDDetectors(detIds_, tmp, 2,i,0,0);
323  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
324  }
325  for(unsigned int i=1; i<10 ; i++){
326  tmp.clear();
327  substructure_.getTECDetectors(detIds_, tmp, 1,i,0,0,0,0);
328  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
329  substructure_.getTECDetectors(detIds_, tmp, 2,i,0,0,0,0);
330  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
331  }
332 
333  detIds_.clear();
334  detIds_=layerDetIds;
335 
336  }
337  // -----
338 
339 
340 } //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_
bool isSelected(const DetId &detid) const
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
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
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 157 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 155 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 151 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

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

Definition at line 152 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

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

Definition at line 153 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().