CMS 3D CMS Logo

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

#include <SiStripThresholdDQM.h>

Inheritance diagram for SiStripThresholdDQM:
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
 
 SiStripThresholdDQM (const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
 ~SiStripThresholdDQM () 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< SiStripThresholdthresholdHandle_
 
std::string WhichThreshold
 

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 9 of file SiStripThresholdDQM.h.

Constructor & Destructor Documentation

◆ SiStripThresholdDQM()

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

Definition at line 8 of file SiStripThresholdDQM.cc.

12  : SiStripBaseCondObjDQM(eSetup, iRun, hPSet, fPSet) {
13  WhichThreshold = hPSet.getParameter<std::string>("WhichThreshold");
14 
15  // Build the Histo_TkMap:
16  if (HistoMaps_On_) {
17  edm::ESHandle<TkDetMap> tkDetMapHandle;
18  eSetup.get<TrackerTopologyRcd>().get(tkDetMapHandle);
19  const TkDetMap *tkDetMap = tkDetMapHandle.product();
20  if (WhichThreshold == "Low")
21  Tk_HM_L = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map", "LowThresh_TkMap", 0.);
22  if (WhichThreshold == "High")
23  Tk_HM_H = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map", "HighThresh_TkMap", 0.);
24  }
25 }

References edm::EventSetup::get(), get, edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::HistoMaps_On_, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::Tk_HM_H, SiStripBaseCondObjDQM::Tk_HM_L, and WhichThreshold.

◆ ~SiStripThresholdDQM()

SiStripThresholdDQM::~SiStripThresholdDQM ( )
override

Definition at line 30 of file SiStripThresholdDQM.cc.

30 {}

Member Function Documentation

◆ fillMEsForDet()

void SiStripThresholdDQM::fillMEsForDet ( const ModMEs selModME_,
uint32_t  selDetId_,
const TrackerTopology tTopo 
)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 61 of file SiStripThresholdDQM.cc.

61  {
62  ModMEs selModME_ = _selModME_;
63  std::vector<uint32_t> DetIds;
64  thresholdHandle_->getDetIds(DetIds);
65 
66  SiStripThreshold::Range ThresholdRange = thresholdHandle_->getRange(selDetId_);
67  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
68 
69  getModMEs(selModME_, selDetId_, tTopo);
70 
71  for (int istrip = 0; istrip < nStrip; ++istrip) {
72  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
73  if (WhichThreshold == "Low")
74  selModME_.ProfileDistr->Fill(istrip + 1, thresholdHandle_->getData(istrip, ThresholdRange).getLth());
75  if (WhichThreshold == "High")
76  selModME_.ProfileDistr->Fill(istrip + 1, thresholdHandle_->getData(istrip, ThresholdRange).getHth());
77  }
78  } // istrip
79 }

References SiStripBaseCondObjDQM::CondObj_fillId_, dqm::impl::MonitorElement::Fill(), SiStripThreshold::getData(), SiStripThreshold::getDetIds(), SiStripThreshold::Data::getHth(), SiStripThreshold::Data::getLth(), SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), SiStripThreshold::getRange(), SiStripBaseCondObjDQM::ModMEs::ProfileDistr, SiStripBaseCondObjDQM::reader, thresholdHandle_, and WhichThreshold.

Referenced by fillModMEs().

◆ fillMEsForLayer()

void SiStripThresholdDQM::fillMEsForLayer ( uint32_t  selDetId_,
const TrackerTopology tTopo 
)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 100 of file SiStripThresholdDQM.cc.

101  {
102  // ----
103  int subdetectorId_ = ((selDetId_ >> 25) & 0x7);
104 
105  if (subdetectorId_ < 3 || subdetectorId_ > 6) {
106  edm::LogError("SiStripThresholdDQM") << "[SiStripThresholdDQM::fillMEsForLayer] WRONG INPUT : no such "
107  "subdetector type : "
108  << subdetectorId_ << " no folder set!" << std::endl;
109  return;
110  }
111  // ----
112 
113  std::map<uint32_t, ModMEs>::iterator selMEsMapIter_ = SummaryMEsMap_.find(getLayerNameAndId(selDetId_, tTopo).second);
114  ModMEs selME_;
115  if (selMEsMapIter_ != SummaryMEsMap_.end())
116  selME_ = selMEsMapIter_->second;
117 
118  getSummaryMEs(selME_, selDetId_, tTopo);
119 
120  SiStripThreshold::Range ThresholdRange = thresholdHandle_->getRange(selDetId_);
121 
122  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
123 
125 
126  if (hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel")) {
127  // --> profile summary
128 
129  std::string hSummaryOfProfile_description;
130  hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
131 
132  std::string hSummaryOfProfile_name;
133 
134  hSummaryOfProfile_name = hidmanager.createHistoLayer(
135  hSummaryOfProfile_description, "layer", getLayerNameAndId(selDetId_, tTopo).first, "");
136 
137  for (int istrip = 0; istrip < nStrip; ++istrip) {
138  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
139  if (WhichThreshold == "Low") {
140  selME_.SummaryOfProfileDistr->Fill(istrip + 1, thresholdHandle_->getData(istrip, ThresholdRange).getLth());
141  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On"))
142  fillTkMap(selDetId_, thresholdHandle_->getData(istrip, ThresholdRange).getLth());
143  }
144  if (WhichThreshold == "High") {
145  selME_.SummaryOfProfileDistr->Fill(istrip + 1, thresholdHandle_->getData(istrip, ThresholdRange).getHth());
146  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On"))
147  fillTkMap(selDetId_, thresholdHandle_->getData(istrip, ThresholdRange).getHth());
148  }
149  }
150  } // istrip
151 
152  } // if Fill
153 
154  if (hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")) {
155  // --> summary
156 
157  std::string hSummary_description;
158  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
159 
160  std::string hSummary_name;
161  hSummary_name =
162  hidmanager.createHistoLayer(hSummary_description, "layer", getLayerNameAndId(selDetId_, tTopo).first, "");
163 
164  float meanLowThreshold = 0;
165  float meanHighThreshold = 0;
166 
167  for (int istrip = 0; istrip < nStrip; ++istrip) {
168  meanLowThreshold = meanLowThreshold + thresholdHandle_->getData(istrip, ThresholdRange).getLth();
169  meanHighThreshold = meanHighThreshold + thresholdHandle_->getData(istrip, ThresholdRange).getHth();
170  } // istrip
171 
172  meanLowThreshold = meanLowThreshold / nStrip;
173  meanHighThreshold = meanHighThreshold / nStrip;
174 
175  // -----
176  // get detIds belonging to same layer to fill X-axis with detId-number
177 
178  std::vector<uint32_t> sameLayerDetIds_ = GetSameLayerDetId(activeDetIds, selDetId_, tTopo);
179 
180  unsigned int iBin = 0;
181  for (unsigned int i = 0; i < sameLayerDetIds_.size(); i++) {
182  if (sameLayerDetIds_[i] == selDetId_) {
183  iBin = i + 1;
184  }
185  }
186 
187  if (WhichThreshold == "Low") {
188  selME_.SummaryDistr->Fill(iBin, meanLowThreshold);
189  if (HistoMaps_On_)
190  Tk_HM_L->fill(selDetId_, meanLowThreshold);
191  }
192  if (WhichThreshold == "High") {
193  selME_.SummaryDistr->Fill(iBin, meanHighThreshold);
194  if (HistoMaps_On_)
195  Tk_HM_H->fill(selDetId_, meanHighThreshold);
196  }
197 
198  } // if Fill ...
199 }

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), dqmdumpme::first, SiStripBaseCondObjDQM::fPSet_, SiStripThreshold::getData(), SiStripThreshold::Data::getHth(), SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripThreshold::Data::getLth(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripThreshold::getRange(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::HistoMaps_On_, SiStripBaseCondObjDQM::hPSet_, mps_fire::i, SiStripBaseCondObjDQM::reader, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::SummaryMEsMap_, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, thresholdHandle_, SiStripBaseCondObjDQM::Tk_HM_H, SiStripBaseCondObjDQM::Tk_HM_L, and WhichThreshold.

Referenced by fillSummaryMEs().

◆ fillModMEs()

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 43 of file SiStripThresholdDQM.cc.

43  {
44  // Retrieve tracker topology from geometry
46  es.get<TrackerTopologyRcd>().get(tTopoHandle);
47  const TrackerTopology *const tTopo = tTopoHandle.product();
48 
49  ModMEs CondObj_ME;
50 
51  for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
52  detIter_++) {
53  fillMEsForDet(CondObj_ME, *detIter_, tTopo);
54  }
55 }

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

◆ fillSummaryMEs()

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 85 of file SiStripThresholdDQM.cc.

85  {
86  // Retrieve tracker topology from geometry
88  es.get<TrackerTopologyRcd>().get(tTopoHandle);
89  const TrackerTopology *const tTopo = tTopoHandle.product();
90 
91  for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
92  detIter_++) {
93  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_, tTopo);
94  }
95 }

References fillMEsForLayer(), edm::EventSetup::get(), get, and edm::ESHandle< T >::product().

◆ getActiveDetIds()

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

◆ getCache()

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

Implements SiStripBaseCondObjDQM.

Definition at line 27 of file SiStripThresholdDQM.h.

27  {
28  return eSetup.get<SiStripThresholdRcd>().cacheIdentifier();
29  }

References edm::EventSetup::get().

◆ getConditionObject()

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

Member Data Documentation

◆ thresholdHandle_

edm::ESHandle<SiStripThreshold> SiStripThresholdDQM::thresholdHandle_
private

◆ WhichThreshold

std::string SiStripThresholdDQM::WhichThreshold
private

Definition at line 38 of file SiStripThresholdDQM.h.

Referenced by fillMEsForDet(), fillMEsForLayer(), and SiStripThresholdDQM().

SiStripBaseCondObjDQM::Tk_HM_L
std::unique_ptr< TkHistoMap > Tk_HM_L
Definition: SiStripBaseCondObjDQM.h:131
SiStripHistoId::createHistoLayer
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
Definition: SiStripHistoId.cc:51
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
SiStripBaseCondObjDQM::hidmanager
SiStripHistoId hidmanager
Definition: SiStripBaseCondObjDQM.h:157
mps_fire.i
i
Definition: mps_fire.py:355
SiStripThreshold::Data::getLth
float getLth() const
Definition: SiStripThreshold.h:61
TrackerTopology
Definition: TrackerTopology.h:16
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:123
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
SiStripThreshold::Data::getHth
float getHth() const
Definition: SiStripThreshold.h:60
SiStripThreshold::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripThreshold.cc:48
SiStripBaseCondObjDQM::HistoMaps_On_
bool HistoMaps_On_
Definition: SiStripBaseCondObjDQM.h:109
dqmdumpme.first
first
Definition: dqmdumpme.py:55
SiStripBaseCondObjDQM::SummaryMEsMap_
std::map< uint32_t, ModMEs > SummaryMEsMap_
Definition: SiStripBaseCondObjDQM.h:122
SiStripBaseCondObjDQM::reader
SiStripDetInfoFileReader * reader
Definition: SiStripBaseCondObjDQM.h:102
SiStripBaseCondObjDQM::Tk_HM_H
std::unique_ptr< TkHistoMap > Tk_HM_H
Definition: SiStripBaseCondObjDQM.h:130
SiStripBaseCondObjDQM::fillTkMap
void fillTkMap(const uint32_t &detid, const float &value)
Definition: SiStripBaseCondObjDQM.cc:1144
SiStripBaseCondObjDQM::getLayerNameAndId
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:913
SiStripThresholdDQM::fillMEsForLayer
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo) override
Definition: SiStripThresholdDQM.cc:100
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
SiStripThreshold::getRange
const Range getRange(const uint32_t &detID) const
Definition: SiStripThreshold.cc:38
edm::ESHandle
Definition: DTSurvey.h:22
SiStripThreshold::getData
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
Definition: SiStripThreshold.cc:70
TkDetMap
Definition: TkDetMap.h:175
SiStripBaseCondObjDQM::cacheID_memory
unsigned long long cacheID_memory
Definition: SiStripBaseCondObjDQM.h:126
SiStripThresholdRcd
Definition: SiStripCondDataRecords.h:51
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripBaseCondObjDQM::CondObj_fillId_
std::string CondObj_fillId_
Definition: SiStripBaseCondObjDQM.h:118
edm::LogError
Definition: MessageLogger.h:183
SiStripThresholdDQM::WhichThreshold
std::string WhichThreshold
Definition: SiStripThresholdDQM.h:38
SiStripThreshold::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripThreshold.h:106
get
#define get
SiStripThresholdDQM::thresholdHandle_
edm::ESHandle< SiStripThreshold > thresholdHandle_
Definition: SiStripThresholdDQM.h:37
SiStripBaseCondObjDQM::getModMEs
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:363
SiStripThresholdDQM::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripThresholdDQM.h:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
SiStripHistoId
Definition: SiStripHistoId.h:25
SiStripDetInfoFileReader::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:101
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
SiStripBaseCondObjDQM::getSummaryMEs
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:399
SiStripBaseCondObjDQM::hPSet_
edm::ParameterSet hPSet_
Definition: SiStripBaseCondObjDQM.h:105
SiStripThresholdDQM::fillMEsForDet
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo) override
Definition: SiStripThresholdDQM.cc:61
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
SiStripBaseCondObjDQM::GetSameLayerDetId
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:1114
SiStripBaseCondObjDQM::cacheID_current
unsigned long long cacheID_current
Definition: SiStripBaseCondObjDQM.h:127