CMS 3D CMS Logo

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

#include <SiStripCablingDQM.h>

Inheritance diagram for SiStripCablingDQM:
SiStripBaseCondObjDQM

Public Member Functions

void fillMEsForDet (const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo) override
 
void fillMEsForLayer (uint32_t selDetId_, const TrackerTopology *tTopo) override
 
void fillModMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es) override
 
void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es) override
 
void getActiveDetIds (const edm::EventSetup &eSetup) override
 
unsigned long long getCache (const edm::EventSetup &eSetup) override
 
void getConditionObject (const edm::EventSetup &eSetup) override
 
 SiStripCablingDQM (const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
 ~SiStripCablingDQM () override
 
- Public Member Functions inherited from SiStripBaseCondObjDQM
void analysis (const edm::EventSetup &eSetup_)
 
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)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
 
virtual void end ()
 
std::vector< uint32_t > getCabledModules ()
 
void selectModules (std::vector< uint32_t > &detIds_, const TrackerTopology *tTopo)
 
 SiStripBaseCondObjDQM (const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
virtual ~SiStripBaseCondObjDQM ()
 

Private Attributes

edm::ESHandle< SiStripDetCablingcablingHandle_
 

Additional Inherited Members

- Public Types inherited from SiStripBaseCondObjDQM
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from SiStripBaseCondObjDQM
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 inherited from SiStripBaseCondObjDQM
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_
 
std::unique_ptr< TkHistoMapTk_HM_
 
std::unique_ptr< TkHistoMapTk_HM_H
 
std::unique_ptr< TkHistoMapTk_HM_L
 
TrackerMaptkMap
 
std::vector< int > tkMapScaler
 

Detailed Description

Definition at line 14 of file SiStripCablingDQM.h.

Constructor & Destructor Documentation

◆ SiStripCablingDQM()

SiStripCablingDQM::SiStripCablingDQM ( const edm::EventSetup eSetup,
edm::RunNumber_t  iRun,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet 
)

Definition at line 9 of file SiStripCablingDQM.cc.

13  : SiStripBaseCondObjDQM(eSetup, iRun, hPSet, fPSet) {
14  // Build the Histo_TkMap:
15  if (HistoMaps_On_) {
16  edm::ESHandle<TkDetMap> tkDetMapHandle;
17  eSetup.get<TrackerTopologyRcd>().get(tkDetMapHandle);
18  Tk_HM_ = std::make_unique<TkHistoMap>(tkDetMapHandle.product(), "SiStrip/Histo_Map", "Cabling_TkMap", 0.);
19  }
20 }

References edm::EventSetup::get(), get, SiStripBaseCondObjDQM::HistoMaps_On_, edm::ESHandle< T >::product(), and SiStripBaseCondObjDQM::Tk_HM_.

◆ ~SiStripCablingDQM()

SiStripCablingDQM::~SiStripCablingDQM ( )
override

Definition at line 24 of file SiStripCablingDQM.cc.

24 {}

Member Function Documentation

◆ fillMEsForDet()

void SiStripCablingDQM::fillMEsForDet ( const ModMEs selModME_,
uint32_t  selDetId_,
const TrackerTopology tTopo 
)
inlineoverridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 26 of file SiStripCablingDQM.h.

26 { ; }

◆ fillMEsForLayer()

void SiStripCablingDQM::fillMEsForLayer ( uint32_t  selDetId_,
const TrackerTopology tTopo 
)
inlineoverridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 27 of file SiStripCablingDQM.h.

28  {
29  ;
30  }

◆ fillModMEs()

void SiStripCablingDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds,
const edm::EventSetup es 
)
inlineoverridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 23 of file SiStripCablingDQM.h.

23 { ; }

◆ fillSummaryMEs()

void SiStripCablingDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds,
const edm::EventSetup es 
)
inlineoverridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 24 of file SiStripCablingDQM.h.

24 { ; }

◆ getActiveDetIds()

void SiStripCablingDQM::getActiveDetIds ( const edm::EventSetup eSetup)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 28 of file SiStripCablingDQM.cc.

28  {
29  // Retrieve tracker topology from geometry
31  eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
32  const TrackerTopology *const tTopo = tTopoHandle.product();
33 
34  // Get active and total detIds
35  getConditionObject(eSetup);
36  if (!cablingHandle_.isValid()) {
37  edm::LogError("InvalidCablingHandle") << "Invalid Cabling Handle";
38  return;
39  }
42 
43  // Initialize arrays for counting:
44  int counterTIB[4];
45  for (int i = 0; i < 4; i++)
46  counterTIB[i] = 0;
47  int counterTID[2][3];
48  for (int i = 0; i < 2; i++) {
49  for (int j = 0; j < 3; j++)
50  counterTID[i][j] = 0;
51  }
52  int counterTOB[6];
53  for (int i = 0; i < 6; i++)
54  counterTOB[i] = 0;
55  int counterTEC[2][9];
56  for (int i = 0; i < 2; i++) {
57  for (int j = 0; j < 9; j++)
58  counterTEC[i][j] = 0;
59  }
60 
61  std::vector<uint32_t>::const_iterator idet = activeDetIds.begin();
62 
63  // fill arrays for counting and fill Histo_Map with value for connected :
64  for (; idet != activeDetIds.end(); ++idet) {
65  uint32_t detId = *idet;
66  StripSubdetector subdet(detId);
67 
68  if (HistoMaps_On_) {
69  Tk_HM_->fill(detId, cablingHandle_->nApvPairs(detId) * 2);
70  }
71  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On")) {
72  int32_t n_conn = 0;
73  for (uint32_t connDet_i = 0; connDet_i < cablingHandle_->getConnections(detId).size(); connDet_i++) {
74  if (cablingHandle_->getConnections(detId)[connDet_i] != nullptr &&
75  cablingHandle_->getConnections(detId)[connDet_i]->isConnected() != 0)
76  n_conn++;
77  }
78  fillTkMap(detId, n_conn * 2.);
79  }
80  switch (subdet.subdetId()) {
81  case StripSubdetector::TIB: {
82  int i = tTopo->tibLayer(detId) - 1;
83  counterTIB[i]++;
84  break;
85  }
86  case StripSubdetector::TID: {
87  int j = tTopo->tidWheel(detId) - 1;
88  int side = tTopo->tidSide(detId);
89  if (side == 2) {
90  counterTID[0][j]++;
91  } else if (side == 1) {
92  counterTID[1][j]++;
93  }
94  break;
95  }
96  case StripSubdetector::TOB: {
97  int i = tTopo->tobLayer(detId) - 1;
98  counterTOB[i]++;
99  break;
100  }
101  case StripSubdetector::TEC: {
102  int j = tTopo->tecWheel(detId) - 1;
103  int side = tTopo->tecSide(detId);
104  if (side == 2) {
105  counterTEC[0][j]++;
106  } else if (side == 1) {
107  counterTEC[1][j]++;
108  }
109  break;
110  }
111  }
112 
113  } // idet
114 
115  // obtained from tracker.dat and hard-coded
116  int TIBDetIds[4] = {672, 864, 540, 648};
117  int TIDDetIds[2][3] = {{136, 136, 136}, {136, 136, 136}};
118  int TOBDetIds[6] = {1008, 1152, 648, 720, 792, 888};
119  int TECDetIds[2][9] = {{408, 408, 408, 360, 360, 360, 312, 312, 272}, {408, 408, 408, 360, 360, 360, 312, 312, 272}};
120 
121  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
122 
123  std::string FolderName = fPSet_.getParameter<std::string>("FolderName_For_QualityAndCabling_SummaryHistos");
124 
126 
127  // dqmStore_->cd("SiStrip/MechanicalView/");
129  ME = dqmStore_->book2D("SummaryOfCabling", "SummaryOfCabling", 6, 0.5, 6.5, 9, 0.5, 9.5);
130  ME->setAxisTitle("Sub Det", 1);
131  ME->setAxisTitle("Layer", 2);
132 
133  ME->getTH1()->GetXaxis()->SetBinLabel(1, "TIB");
134  ME->getTH1()->GetXaxis()->SetBinLabel(2, "TID F");
135  ME->getTH1()->GetXaxis()->SetBinLabel(3, "TID B");
136  ME->getTH1()->GetXaxis()->SetBinLabel(4, "TOB");
137  ME->getTH1()->GetXaxis()->SetBinLabel(5, "TEC F");
138  ME->getTH1()->GetXaxis()->SetBinLabel(6, "TEC B");
139 
140  for (int i = 0; i < 4; i++) {
141  ME->Fill(1, i + 1, float(counterTIB[i]) / TIBDetIds[i]);
142  }
143 
144  for (int i = 0; i < 2; i++) {
145  for (int j = 0; j < 3; j++) {
146  ME->Fill(i + 2, j + 1, float(counterTID[i][j]) / TIDDetIds[i][j]);
147  }
148  }
149 
150  for (int i = 0; i < 6; i++) {
151  ME->Fill(4, i + 1, float(counterTOB[i]) / TOBDetIds[i]);
152  }
153 
154  for (int i = 0; i < 2; i++) {
155  for (int j = 0; j < 9; j++) {
156  ME->Fill(i + 5, j + 1, float(counterTEC[i][j]) / TECDetIds[i][j]);
157  }
158  }
159 
160  if (fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")) {
161  TCanvas c1("c1");
162  ME->getTH1()->Draw("TEXT");
163  ME->getTH1()->SetStats(kFALSE);
164  std::string name(ME->getTH1()->GetTitle());
165  name += ".png";
166  c1.Print(name.c_str());
167  }
168 }

References SiStripBaseCondObjDQM::activeDetIds, SiStripDetCabling::addActiveDetectorsRawIds(), SiStripDetCabling::addAllDetectorsRawIds(), dqm::implementation::IBooker::book2D(), alignmentValidation::c1, cablingHandle_, SiStripBaseCondObjDQM::dqmStore_, SiStripBaseCondObjDQM::fillTkMap(), PixelVTXMonitor_cfi::FolderName, SiStripBaseCondObjDQM::fPSet_, edm::EventSetup::get(), get, getConditionObject(), SiStripDetCabling::getConnections(), edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::HistoMaps_On_, SiStripBaseCondObjDQM::hPSet_, mps_fire::i, edm::ESHandleBase::isValid(), dqmiolumiharvest::j, Skims_PA_cff::name, SiStripDetCabling::nApvPairs(), edm::ESHandle< T >::product(), dqm::implementation::DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripBaseCondObjDQM::Tk_HM_, StripSubdetector::TOB, and TrackerTopology::tobLayer().

◆ getCache()

unsigned long long SiStripCablingDQM::getCache ( const edm::EventSetup eSetup)
inlineoverridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 33 of file SiStripCablingDQM.h.

33  {
34  return eSetup.get<SiStripDetCablingRcd>().cacheIdentifier();
35  }

References edm::EventSetup::get().

◆ getConditionObject()

void SiStripCablingDQM::getConditionObject ( const edm::EventSetup eSetup)
inlineoverridevirtual

Member Data Documentation

◆ cablingHandle_

edm::ESHandle<SiStripDetCabling> SiStripCablingDQM::cablingHandle_
private

Definition at line 45 of file SiStripCablingDQM.h.

Referenced by getActiveDetIds(), and getConditionObject().

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiStripDetCabling::addActiveDetectorsRawIds
void addActiveDetectorsRawIds(std::vector< uint32_t > &) const
Definition: SiStripDetCabling.cc:134
mps_fire.i
i
Definition: mps_fire.py:428
TrackerTopology
Definition: TrackerTopology.h:16
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:123
StripSubdetector
Definition: StripSubdetector.h:12
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiStripBaseCondObjDQM::HistoMaps_On_
bool HistoMaps_On_
Definition: SiStripBaseCondObjDQM.h:109
SiStripCablingDQM::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripCablingDQM.h:37
PixelVTXMonitor_cfi.FolderName
FolderName
Definition: PixelVTXMonitor_cfi.py:5
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
SiStripBaseCondObjDQM::fillTkMap
void fillTkMap(const uint32_t &detid, const float &value)
Definition: SiStripBaseCondObjDQM.cc:1144
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
dqm::legacy::DQMStore
Definition: DQMStore.h:727
SiStripBaseCondObjDQM::Tk_HM_
std::unique_ptr< TkHistoMap > Tk_HM_
Definition: SiStripBaseCondObjDQM.h:129
edm::ESHandle
Definition: DTSurvey.h:22
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
StripSubdetector::TIB
static constexpr auto TIB
Definition: StripSubdetector.h:16
SiStripBaseCondObjDQM::cacheID_memory
unsigned long long cacheID_memory
Definition: SiStripBaseCondObjDQM.h:126
SiStripDetCablingRcd
Definition: SiStripDependentRecords.h:19
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ME
dqm::harvesting::MonitorElement ME
Definition: TrackingDQMClientHeavyIons.cc:20
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
edm::Service
Definition: Service.h:30
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
StripSubdetector::TEC
static constexpr auto TEC
Definition: StripSubdetector.h:19
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
SiStripDetCabling::nApvPairs
const uint16_t nApvPairs(uint32_t det_id) const
Definition: SiStripDetCabling.cc:209
ME
Definition: ME.h:11
SiStripCablingDQM::cablingHandle_
edm::ESHandle< SiStripDetCabling > cablingHandle_
Definition: SiStripCablingDQM.h:45
StripSubdetector::TOB
static constexpr auto TOB
Definition: StripSubdetector.h:18
SiStripBaseCondObjDQM::SiStripBaseCondObjDQM
SiStripBaseCondObjDQM(const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
Definition: SiStripBaseCondObjDQM.cc:10
SiStripBaseCondObjDQM::fPSet_
edm::ParameterSet fPSet_
Definition: SiStripBaseCondObjDQM.h:106
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripBaseCondObjDQM::hPSet_
edm::ParameterSet hPSet_
Definition: SiStripBaseCondObjDQM.h:105
SiStripDetCabling::addAllDetectorsRawIds
void addAllDetectorsRawIds(std::vector< uint32_t > &vector_to_fill_with_detids) const
Definition: SiStripDetCabling.cc:143
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
SiStripBaseCondObjDQM::dqmStore_
DQMStore * dqmStore_
Definition: SiStripBaseCondObjDQM.h:159
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
SiStripDetCabling::getConnections
const std::vector< const FedChannelConnection * > & getConnections(uint32_t det_id) const
Definition: SiStripDetCabling.cc:161
StripSubdetector::TID
static constexpr auto TID
Definition: StripSubdetector.h:17
SiStripBaseCondObjDQM::cacheID_current
unsigned long long cacheID_current
Definition: SiStripBaseCondObjDQM.h:127
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerTopology::tecSide
unsigned int tecSide(const DetId &id) const
Definition: TrackerTopology.h:184