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 (std::map< uint32_t, ModMEs > selModMEsMap_, 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, python.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 461 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().

461  {
462 
463  int hCumul_NchX = 0;
464  double hCumul_LowX = 0;
465  double hCumul_HighX = 0;
466 
467  std::string hCumul_description;
468  hCumul_description = hPSet_.getParameter<std::string>("Cumul_description");
469 
470  std::string hCumul_xTitle, hCumul_yTitle;
471  hCumul_xTitle = hPSet_.getParameter<std::string>("Cumul_xTitle");
472  hCumul_yTitle = hPSet_.getParameter<std::string>("Cumul_yTitle");
473 
474  hCumul_NchX = hPSet_.getParameter<int>("Cumul_NchX");
475  hCumul_LowX = hPSet_.getParameter<double>("Cumul_LowX");
476  hCumul_HighX = hPSet_.getParameter<double>("Cumul_HighX");
477 
479 
480  std::string hCumul_name;
481  hCumul_name = hidmanager.createHistoId(hCumul_description , "det", detId_); ;
482 
483  std::string hCumul_title;
484  hCumul_title = hCumul_name ;
485 
486  CondObj_ME.CumulDistr = dqmStore_->book1D(hCumul_name,
487  hCumul_title,
488  hCumul_NchX,
489  hCumul_LowX,
490  hCumul_HighX);
491  CondObj_ME.CumulDistr->setAxisTitle(hCumul_xTitle,1);
492  CondObj_ME.CumulDistr->setAxisTitle(hCumul_yTitle,2);
493  dqmStore_->tag(CondObj_ME.CumulDistr, detId_);
494 
495 }
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:514
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1151
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 412 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().

412  {
413 
414  int hProfile_NchX = 0;
415  double hProfile_LowX = 0;
416  double hProfile_HighX = 0;
417 
418  std::string hProfile_description;
419  hProfile_description = hPSet_.getParameter<std::string>("Profile_description");
420 
421  std::string hProfile_xTitle, hProfile_yTitle;
422  hProfile_xTitle = hPSet_.getParameter<std::string>("Profile_xTitle");
423  hProfile_yTitle = hPSet_.getParameter<std::string>("Profile_yTitle");
424 
425  if( CondObj_name_!= "apvgain" ){
426 
427  int nStrip = reader->getNumberOfApvsAndStripLength(detId_).first*128;
428 
429  hProfile_NchX = nStrip;
430  hProfile_LowX = 0.5;
431  hProfile_HighX = nStrip+0.5;
432  }
433  else {
434 
435  int nApv = reader->getNumberOfApvsAndStripLength(detId_).first;
436 
437  hProfile_NchX = nApv;
438  hProfile_LowX = 0.5;
439  hProfile_HighX = nApv+0.5;
440  }
441 
443 
444  std::string hProfile_Name;
445  hProfile_Name = hidmanager.createHistoId(hProfile_description, "det", detId_);
446 
447  std::string hProfile;
448  hProfile = hProfile_Name ;
449 
450  CondObj_ME.ProfileDistr = dqmStore_->book1D(hProfile_Name, hProfile, hProfile_NchX, hProfile_LowX, hProfile_HighX);
451  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_xTitle,1);
452  CondObj_ME.ProfileDistr->setAxisTitle(hProfile_yTitle,2);
453  dqmStore_->tag(CondObj_ME.ProfileDistr, detId_);
454 
455 }
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:514
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1151
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 727 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().

727  {
728 
729  int hSummaryOfCumul_NchX = 0;
730  double hSummaryOfCumul_LowX = 0;
731  double hSummaryOfCumul_HighX = 0;
732 
733  std::string hSummaryOfCumul_description;
734  hSummaryOfCumul_description = hPSet_.getParameter<std::string>("SummaryOfCumul_description");
735 
736  std::string hSummaryOfCumul_xTitle, hSummaryOfCumul_yTitle;
737  hSummaryOfCumul_xTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_xTitle");
738  hSummaryOfCumul_yTitle = hPSet_.getParameter<std::string>("SummaryOfCumul_yTitle");
739 
740  hSummaryOfCumul_NchX = hPSet_.getParameter<int>("SummaryOfCumul_NchX");
741  hSummaryOfCumul_LowX = hPSet_.getParameter<double>("SummaryOfCumul_LowX");
742  hSummaryOfCumul_HighX = hPSet_.getParameter<double>("SummaryOfCumul_HighX");
743 
744  uint32_t layer_=0;
745 
746  layer_ = folder_organizer.GetSubDetAndLayer(detId_).second;
747 
748  folder_organizer.setLayerFolder(detId_,layer_);
749 
750  std::string hSummaryOfCumul_name;
751 
752  // ---
753  int subdetectorId_ = ((detId_>>25)&0x7);
754 
755  if( subdetectorId_<3 || subdetectorId_>6 ){
756  edm::LogError("SiStripBaseCondObjDQM")
757  << "[SiStripBaseCondObjDQM::bookSummaryCumulMEs] WRONG INPUT : no such subdetector type : "
758  << subdetectorId_ << " no folder set!"
759  << std::endl;
760  return;
761  }
762  // ---
763 
764  // LA Histos are plotted for each string:
765  if(CondObj_name_ == "lorentzangle" && SummaryOnStringLevel_On_) {
766  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getStringNameAndId(detId_).first, "") ;
767  }
768  else {
769  hSummaryOfCumul_name = hidmanager.createHistoLayer(hSummaryOfCumul_description, "layer" , getLayerNameAndId(detId_).first, "") ;
770  }
771 
772 
773  std::string hSummaryOfCumul_title;
774  hSummaryOfCumul_title = hSummaryOfCumul_name ;
775 
776  CondObj_ME.SummaryOfCumulDistr = dqmStore_->book1D(hSummaryOfCumul_name,
777  hSummaryOfCumul_title,
778  hSummaryOfCumul_NchX,
779  hSummaryOfCumul_LowX,
780  hSummaryOfCumul_HighX);
781 
782  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_xTitle,1);
783  CondObj_ME.SummaryOfCumulDistr->setAxisTitle(hSummaryOfCumul_yTitle,2);
784 
785  dqmStore_->tag(CondObj_ME.SummaryOfCumulDistr, layer_);
786 
787 }
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:514
SiStripFolderOrganizer folder_organizer
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1151
bool first
Definition: L1TdeRCT.cc:79
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 793 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().

793  {
794 
795  std::vector<uint32_t> sameLayerDetIds_;
796 
797  int hSummary_NchX = 0;
798  double hSummary_LowX = 0;
799  double hSummary_HighX = 0;
800 
801  std::string hSummary_description;
802  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
803 
804  std::string hSummary_xTitle, hSummary_yTitle;
805  hSummary_xTitle = hPSet_.getParameter<std::string>("Summary_xTitle");
806  hSummary_yTitle = hPSet_.getParameter<std::string>("Summary_yTitle");
807 
808  int hSummary_NchY;
809  double hSummary_LowY, hSummary_HighY;
810  hSummary_NchY = hPSet_.getParameter<int>("Summary_NchY");
811  hSummary_LowY = hPSet_.getParameter<double>("Summary_LowY");
812  hSummary_HighY = hPSet_.getParameter<double>("Summary_HighY");
813 
814 
815  // -----
816  // get detIds belonging to same layer to fill X-axis with detId-number
817 
818 
819  sameLayerDetIds_.clear();
820 
821  sameLayerDetIds_=GetSameLayerDetId(activeDetIds,detId_);
822 
823  hSummary_NchX = sameLayerDetIds_.size();
824  hSummary_LowX = 0.5;
825  hSummary_HighX = sameLayerDetIds_.size()+0.5;
826 
827  uint32_t layer_=0;
828 
829  layer_ = folder_organizer.GetSubDetAndLayer(detId_).second;
830 
831  folder_organizer.setLayerFolder(detId_,layer_);
832 
833  std::string hSummary_name;
834 
835  // ---
836  int subdetectorId_ = ((detId_>>25)&0x7);
837 
838 
839  if( subdetectorId_<3 ||subdetectorId_>6 ){
840  edm::LogError("SiStripBaseCondObjDQM")
841  << "[SiStripBaseCondObjDQM::bookSummaryMEs] WRONG INPUT : no such subdetector type : "
842  << subdetectorId_ << " no folder set!"
843  << std::endl;
844  return;
845  }
846  // ---
847 
848  hSummary_name = hidmanager.createHistoLayer(hSummary_description,
849  "layer" ,
850  getLayerNameAndId(detId_).first,
851  "") ;
852 
853  std::string hSummary_title;
854  hSummary_title = hSummary_name ;
855 
856  CondObj_ME.SummaryDistr = dqmStore_->bookProfile(hSummary_name,
857  hSummary_title,
858  hSummary_NchX,
859  hSummary_LowX,
860  hSummary_HighX,
861  hSummary_NchY,
862  hSummary_LowY,
863  hSummary_HighY);
864  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_xTitle,1);
865  CondObj_ME.SummaryDistr->setAxisTitle(hSummary_yTitle,2);
866  CondObj_ME.SummaryDistr->setAxisRange(hSummary_LowY, hSummary_HighY,2);
867 
868  // -----
869  // in order to get the right detId-number labelled in right bin of x-axis
870  unsigned int iBin=0;
871 
872  for(unsigned int i=0;i< sameLayerDetIds_.size(); i++){
873 
874  iBin++;
875  char sameLayerDetIds_Name[1024];
876  sprintf(sameLayerDetIds_Name,"%u",sameLayerDetIds_[i]);
877  if(iBin%100==0)
878  CondObj_ME.SummaryDistr->setBinLabel(iBin, sameLayerDetIds_Name);
879 
880  }
881  // -----
882 
883  dqmStore_->tag(CondObj_ME.SummaryDistr, layer_);
884 
885 }
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:1151
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:828
bool first
Definition: L1TdeRCT.cc:79
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 502 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(), 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().

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

References tkMap.

Referenced by SiStripBaseCondObjDQM().

1141  {
1142  tkMap= new TrackerMap(TkMapname.c_str());
1143 }
void SiStripBaseCondObjDQM::end ( void  )
virtual

Definition at line 1197 of file SiStripBaseCondObjDQM.cc.

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

1197  {
1198  edm::LogInfo("SiStripBaseCondObjDQM")
1199  << "SiStripBase::end"
1200  << std::endl;
1201 }
virtual void SiStripBaseCondObjDQM::fillMEsForDet ( ModMEs  selModME_,
uint32_t  selDetId_ 
)
protectedpure virtual
virtual void SiStripBaseCondObjDQM::fillMEsForLayer ( std::map< uint32_t, ModMEs selModMEsMap_,
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 1204 of file SiStripBaseCondObjDQM.cc.

References fillMEsForDet().

Referenced by analysis(), and analysisOnDemand().

1204  {
1205  ModMEs CondObj_ME;
1206 
1207  for(std::vector<uint32_t>::const_iterator detIter_=selectedDetIds.begin();
1208  detIter_!=selectedDetIds.end();++detIter_){
1209  fillMEsForDet(CondObj_ME,*detIter_);
1210  }
1211 }
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 1214 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().

1214  {
1215 
1216  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
1217  detIter_!= selectedDetIds.end();detIter_++){
1218  fillMEsForLayer(SummaryMEsMap_, *detIter_);
1219  }
1220 
1221  for (std::map<uint32_t, ModMEs>::iterator iter=SummaryMEsMap_.begin(); iter!=SummaryMEsMap_.end(); iter++){
1222 
1223  ModMEs selME;
1224  selME = iter->second;
1225 
1226  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel") && fPSet_.getParameter<bool>("OutputSummaryProfileAtLayerLevelAsImage")){
1227 
1228  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
1229 
1230  TCanvas c1("c1");
1231  selME.SummaryOfProfileDistr->getTProfile()->Draw();
1232  std::string name (selME.SummaryOfProfileDistr->getTProfile()->GetTitle());
1233  name+=".png";
1234  c1.Print(name.c_str());
1235  }
1236  }
1237  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel") && fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")){
1238 
1239  TCanvas c1("c1");
1240  selME.SummaryDistr->getTH1()->Draw();
1241  std::string name (selME.SummaryDistr->getTH1()->GetTitle());
1242  name+=".png";
1243  c1.Print(name.c_str());
1244  }
1245  if(hPSet_.getParameter<bool>("FillCumulativeSummaryAtLayerLevel") && fPSet_.getParameter<bool>("OutputCumulativeSummaryAtLayerLevelAsImage")){
1246 
1247  if( CondObj_fillId_ =="onlyCumul" || CondObj_fillId_ =="ProfileAndCumul"){
1248 
1249  TCanvas c1("c1");
1250  selME.SummaryOfCumulDistr->getTH1()->Draw();
1251  std::string name (selME.SummaryOfCumulDistr->getTH1()->GetTitle());
1252  name+=".png";
1253  c1.Print(name.c_str());
1254  }
1255  }
1256 
1257  }
1258 
1259 }
T getParameter(std::string const &) const
std::map< uint32_t, ModMEs > SummaryMEsMap_
virtual void fillMEsForLayer(std::map< uint32_t, ModMEs > selModMEsMap_, 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 890 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().

890  {
891 
892  int subdetectorId_ = ((detId_>>25)&0x7);
893  int layerId_=0;
894 
895  std::stringstream layerName;
896 
897  if( subdetectorId_ == 3 ){ //TIB
898 
899  for( unsigned int i = 1; i < 5; i++ ){
900  if( TIBDetId( detId_ ).layer() ==i ){
901  layerName << "TIB__layer__" << i;
902  layerId_ = 300 + i;
903  }
904  }
905 
906  }
907 
908  else if( subdetectorId_ == 4 ){ //TIDD
909 
910  if( TIDDetId( detId_ ).side() == 1 ) { // TIDD side 1
911 
912  for( unsigned int i = 1; i < 4; i++ ){
913  if(TIDDetId(detId_).wheel()==i){
914  layerName << "TID__side__1__wheel__" << i;
915  layerId_ = 410 + i;
916  }
917  }
918 
919  }
920 
921  else if( TIDDetId( detId_ ).side() == 2 ) { // TIDD side 2
922 
923  for( unsigned int i = 1; i < 4; i++ ) {
924  if(TIDDetId(detId_).wheel()==i){
925  layerName << "TID__side__2__wheel__" << i;
926  layerId_ = 420 + i;
927  }
928  }
929 
930  }
931 
932  }
933 
934 
935  else if( subdetectorId_ == 5 ){ // TOB
936 
937  for( unsigned int i = 1; i < 7; i++ ) {
938  if( TOBDetId( detId_ ).layer() == i ) {
939  layerName << "TOB__layer__" << i;
940  layerId_ = 500 + i;
941  }
942  }
943 
944  }
945 
946  else if( subdetectorId_ == 6 ){ // TEC
947 
948  if( TECDetId( detId_ ).side() == 1) { // TEC side 1
949 
950  for( unsigned int i = 1; i < 10; i++ ) {
951  if( TECDetId( detId_ ).wheel() == i ) {
952  layerName << "TEC__side__1__wheel__" << i;
953  layerId_ = 610 + i;
954  }
955  }
956 
957  }
958 
959  else if( TECDetId( detId_ ).side() == 2 ) { // TEC side 2
960 
961  for( unsigned int i = 1; i < 10; i++ ) {
962  if( TECDetId( detId_ ).wheel() == i ) {
963  layerName << "TEC__side__2__wheel__" << i;
964  layerId_ = 620 + i;
965  }
966  }
967 
968  }
969  }
970 
971  return std::make_pair( layerName.str(), layerId_ );
972 
973 }
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 309 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().

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

1113  {
1114 
1115  std::vector<uint32_t> sameLayerDetIds;
1116  sameLayerDetIds.clear();
1117 
1118  SiStripSubStructure substructure_;
1119 
1120  uint32_t subselDetId_ = ((selDetId>>25)&0x7);
1121 
1122  if(subselDetId_==3){ // TIB
1123  substructure_.getTIBDetectors(activeDetIds, sameLayerDetIds, TIBDetId(selDetId).layer(),0,0,0);
1124  }
1125  else if(subselDetId_==4){ // TID
1126  substructure_.getTIDDetectors(activeDetIds, sameLayerDetIds, TIDDetId(selDetId).side(),TIDDetId(selDetId).wheel(),0,0);
1127  }
1128  else if(subselDetId_==5){ // TOB
1129  substructure_.getTOBDetectors(activeDetIds, sameLayerDetIds, TOBDetId(selDetId).layer(),0,0);
1130  }
1131  else if(subselDetId_==6){ // TEC
1132  substructure_.getTECDetectors(activeDetIds, sameLayerDetIds, TECDetId(selDetId).side(),TECDetId(selDetId).wheel(),0,0,0,0);
1133  }
1134 
1135  return sameLayerDetIds;
1136 
1137 }
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 979 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().

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

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

1151  {
1152  if(tkMapScaler.size()!=0){
1153  //check that saturation is below x% below minValue and above minValue, and in case re-arrange.
1154  float th=hPSet_.getParameter<double>("saturatedFraction");
1155 
1156  size_t imin=0,imax=0;
1157  float entries=0 ;
1158  for(size_t i=0;i<tkMapScaler.size();++i)
1159  entries+=tkMapScaler[i];
1160 
1161  float min=0 ;
1162  for(size_t i=0;(i<tkMapScaler.size()) && (min<th);++i){
1163  min+=tkMapScaler[i]/entries;
1164  imin=i;
1165  }
1166 
1167  float max=0;
1168  // for(size_t i=tkMapScaler.size()-1;(i>=0) && (max<th);--i){ // Wrong
1169  // Since i is unsigned, i >= 0 is always true,
1170  // and the loop termination condition is never reached.
1171  // We offset the loop index by one to fix this.
1172  for(size_t j=tkMapScaler.size();(j>0) && (max<th);--j){
1173  size_t i = j - 1;
1174  max+=tkMapScaler[i]/entries;
1175  imax=i;
1176  }
1177 
1178  //reset maxValue;
1179  if(maxValue<imax){
1180  edm::LogInfo("")<< "Resetting TkMap maxValue from " << maxValue << " to " << imax;
1181  maxValue=imax;
1182  }
1183  //reset minValue;
1184  if(minValue>imin){
1185  edm::LogInfo("")<< "Resetting TkMap minValue from " << minValue << " to " << imin;
1186  minValue=imin;
1187  }
1188  }
1189 
1190  tkMap->save(false, minValue, maxValue, TkMapname.c_str());
1191  tkMap->setPalette(1); tkMap->showPalette(true);
1192 
1193 }
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  if(fPSet_.getParameter<bool>("restrictModules")
173  && ModulesToBeExcluded_.size()==0
174  && ModulesToBeIncluded_.size()==0 ){
175  edm::LogWarning("SiStripBaseCondObjDQM")
176  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no modules to be exclude/included in your cfg"
177  << std::endl;
178  }
179 
180 
181 
182 
183  // --> detIds to start with
184 
185  if( fPSet_.getParameter<bool>("restrictModules")){
186 
187  if( ModulesToBeIncluded_.size()>0 ){
188  std::vector<uint32_t> tmp;
189  tmp.clear();
190  set_intersection( detIds_.begin(), detIds_.end(),
191  ModulesToBeIncluded_.begin(), ModulesToBeIncluded_.end(),
192  inserter(tmp,tmp.begin()));
193  swap(detIds_,tmp);
194  }
195 
196  }
197 
198 
199 
200  // -----
201  // *** exclude modules ***
202 
203  if( fPSet_.getParameter<bool>("restrictModules") ){
204 
205  std::sort(detIds_.begin(),detIds_.end());
206 
207  for( std::vector<uint32_t>::const_iterator modIter_ = ModulesToBeExcluded_.begin();
208  modIter_ != ModulesToBeExcluded_.end(); modIter_++){
209 
210  std::vector<uint32_t>::iterator detIter_=std::lower_bound(detIds_.begin(),detIds_.end(),*modIter_);
211  detIds_.erase(detIter_);
212  detIter_--;
213 
214  }
215 
216  }
217  // *** exclude modules ***
218  // -----
219 
220 
221  // -----
222  // *** restrict to a particular subdetector ***
223 
224  if( *(SubDetectorsToBeExcluded_.begin()) !="none" ){
225 
226  std::vector<uint32_t> tmp;
227 
228  SiStripSubStructure substructure_;
229 
230  for( std::vector<std::string>::const_iterator modIter_ = SubDetectorsToBeExcluded_.begin();
231  modIter_ != SubDetectorsToBeExcluded_.end(); modIter_++){
232  tmp.clear();
233 
234  if (*modIter_=="TIB") { substructure_.getTIBDetectors(detIds_, tmp, 0,0,0,0);}
235  else if (*modIter_=="TOB") { substructure_.getTOBDetectors(detIds_, tmp, 0,0,0);}
236  else if (*modIter_=="TID") { substructure_.getTIDDetectors(detIds_, tmp, 0,0,0,0);}
237  else if (*modIter_=="TEC") { substructure_.getTECDetectors(detIds_, tmp, 0,0,0,0,0,0);}
238  else {
239  edm::LogWarning("SiStripBaseCondObjDQM")
240  << "[SiStripBaseCondObjDQM::selectModules] PLEASE CHECK : no correct (name) subdetector to be excluded in your cfg"
241  << std::endl;
242  }
243 
244  std::vector<uint32_t>::iterator iterBegin_=std::lower_bound(detIds_.begin(),
245  detIds_.end(),
246  *min_element(tmp.begin(), tmp.end()));
247 
248  std::vector<uint32_t>::iterator iterEnd_=std::lower_bound(detIds_.begin(),
249  detIds_.end(),
250  *max_element(tmp.begin(), tmp.end()));
251 
252  for(std::vector<uint32_t>::iterator detIter_ = iterEnd_;
253  detIter_!= iterBegin_-1;detIter_--){
254  detIds_.erase(detIter_);
255  }
256 
257  } // loop SubDetectorsToBeExcluded_
258  }
259 
260 
261  // -----
262  // *** fill only one Module per layer ***
263 
264  if(fPSet_.getParameter<std::string>("ModulesToBeFilled") == "onlyOneModulePerLayer"){
265 
266  std::vector<uint32_t> tmp;
267  std::vector<uint32_t> layerDetIds;
268 
269  SiStripSubStructure substructure_;
270 
271  for(unsigned int i=1; i<5 ; i++){
272  tmp.clear();
273  substructure_.getTIBDetectors(detIds_, tmp, i,0,0,0);
274  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
275  }
276  for(unsigned int i=1; i<7 ; i++){
277  tmp.clear();
278  substructure_.getTOBDetectors(detIds_, tmp, i,0,0);
279  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
280  }
281  for(unsigned int i=1; i<4 ; i++){
282  tmp.clear();
283  substructure_.getTIDDetectors(detIds_, tmp, 1,i,0,0);
284  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
285  substructure_.getTIDDetectors(detIds_, tmp, 2,i,0,0);
286  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
287  }
288  for(unsigned int i=1; i<10 ; i++){
289  tmp.clear();
290  substructure_.getTECDetectors(detIds_, tmp, 1,i,0,0,0,0);
291  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
292  substructure_.getTECDetectors(detIds_, tmp, 2,i,0,0,0,0);
293  if(tmp.size() !=0) { layerDetIds.push_back(*(tmp.begin()));}
294  }
295 
296  detIds_.clear();
297  detIds_=layerDetIds;
298 
299  }
300  // -----
301 
302 
303 } //selectModules
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:74
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 124 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 151 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 149 of file SiStripBaseCondObjDQM.h.

Referenced by getCabledModules().

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

Definition at line 104 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 112 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 113 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

double SiStripBaseCondObjDQM::minValue
protected

Definition at line 113 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

bool SiStripBaseCondObjDQM::Mod_On_
protected

Definition at line 108 of file SiStripBaseCondObjDQM.h.

Referenced by analysis(), and SiStripBaseCondObjDQM().

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

Definition at line 121 of file SiStripBaseCondObjDQM.h.

Referenced by getModMEs().

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

Definition at line 145 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

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

Definition at line 146 of file SiStripBaseCondObjDQM.h.

Referenced by selectModules().

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

Definition at line 147 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 132 of file SiStripBaseCondObjDQM.h.

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

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

Definition at line 114 of file SiStripBaseCondObjDQM.h.

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