CMS 3D CMS Logo

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

#include <SiStripThresholdDQM.h>

Inheritance diagram for SiStripThresholdDQM:
SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd > SiStripBaseCondObjDQM

Public Member Functions

void fillMEsForDet (const ModMEs &selModME_, uint32_t selDetId_) override
 
void fillMEsForLayer (uint32_t selDetId_) override
 
void fillModMEs (const std::vector< uint32_t > &selectedDetIds) override
 
void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds) override
 
void getActiveDetIds (const edm::EventSetup &eSetup) override
 
 SiStripThresholdDQM (edm::ESGetToken< SiStripThreshold, SiStripThresholdRcd > token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
 
 ~SiStripThresholdDQM () override
 
- Public Member Functions inherited from SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >
bool checkChanged (const edm::EventSetup &eSetup) override
 
void getConditionObject (const edm::EventSetup &eSetup) override
 
 SiStripBaseCondObjDQMGet (tokentype token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
 
 ~SiStripBaseCondObjDQMGet () 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 ()
 
void selectModules (std::vector< uint32_t > &detIds_)
 
 SiStripBaseCondObjDQM (edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
 
virtual ~SiStripBaseCondObjDQM ()
 

Private Attributes

std::string WhichThreshold
 

Additional Inherited Members

- Public Types inherited from SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >
using tokentype = typename edm::ESGetToken< SiStripThreshold, SiStripThresholdRcd >
 
- 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_)
 
void getModMEs (ModMEs &CondObj_ME, const uint32_t &detId_)
 
std::vector< uint32_t > GetSameLayerDetId (const 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 inherited from SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >
const SiStripThresholdcondObj_
 
- Protected Attributes inherited from SiStripBaseCondObjDQM
std::vector< uint32_t > activeDetIds
 
std::vector< uint32_t > all_DetIds
 
std::string CondObj_fillId_
 
std::string CondObj_name_
 
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
 
const TrackerTopologytTopo_
 

Detailed Description

Definition at line 9 of file SiStripThresholdDQM.h.

Constructor & Destructor Documentation

◆ SiStripThresholdDQM()

SiStripThresholdDQM::SiStripThresholdDQM ( edm::ESGetToken< SiStripThreshold, SiStripThresholdRcd token,
edm::RunNumber_t  iRun,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet,
const TrackerTopology tTopo,
const TkDetMap tkDetMap 
)

Definition at line 3 of file SiStripThresholdDQM.cc.

10  WhichThreshold = hPSet.getParameter<std::string>("WhichThreshold");
11 
12  if (HistoMaps_On_) {
13  if (WhichThreshold == "Low")
14  Tk_HM_L = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map", "LowThresh_TkMap", 0.);
15  if (WhichThreshold == "High")
16  Tk_HM_H = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map", "HighThresh_TkMap", 0.);
17  }
18 }

References unpackBuffers-CaloStage2::token.

◆ ~SiStripThresholdDQM()

SiStripThresholdDQM::~SiStripThresholdDQM ( )
override

Definition at line 20 of file SiStripThresholdDQM.cc.

20 {}

Member Function Documentation

◆ fillMEsForDet()

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

Implements SiStripBaseCondObjDQM.

Definition at line 34 of file SiStripThresholdDQM.cc.

34  {
35  ModMEs selModME_ = _selModME_;
36  std::vector<uint32_t> DetIds;
37  condObj_->getDetIds(DetIds);
38 
39  const auto ThresholdRange = condObj_->getRange(selDetId_);
40  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
41 
42  getModMEs(selModME_, selDetId_);
43 
44  for (int istrip = 0; istrip < nStrip; ++istrip) {
45  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
46  if (WhichThreshold == "Low")
47  selModME_.ProfileDistr->Fill(istrip + 1, condObj_->getData(istrip, ThresholdRange).getLth());
48  if (WhichThreshold == "High")
49  selModME_.ProfileDistr->Fill(istrip + 1, condObj_->getData(istrip, ThresholdRange).getHth());
50  }
51  } // istrip
52 }

References SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >::condObj_, 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, and WhichThreshold.

Referenced by fillModMEs().

◆ fillMEsForLayer()

void SiStripThresholdDQM::fillMEsForLayer ( uint32_t  selDetId_)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 60 of file SiStripThresholdDQM.cc.

61  {
62  // ----
63  int subdetectorId_ = ((selDetId_ >> 25) & 0x7);
64 
65  if (subdetectorId_ < 3 || subdetectorId_ > 6) {
66  edm::LogError("SiStripThresholdDQM") << "[SiStripThresholdDQM::fillMEsForLayer] WRONG INPUT : no such "
67  "subdetector type : "
68  << subdetectorId_ << " no folder set!" << std::endl;
69  return;
70  }
71  // ----
72 
73  const auto selMEsMapIter_ = SummaryMEsMap_.find(getLayerNameAndId(selDetId_).second);
74  ModMEs selME_;
75  if (selMEsMapIter_ != SummaryMEsMap_.end())
76  selME_ = selMEsMapIter_->second;
77 
78  getSummaryMEs(selME_, selDetId_);
79 
80  const auto ThresholdRange = condObj_->getRange(selDetId_);
81 
82  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
83 
85 
86  if (hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel")) {
87  // --> profile summary
88 
89  std::string hSummaryOfProfile_description;
90  hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
91 
92  std::string hSummaryOfProfile_name;
93 
94  hSummaryOfProfile_name =
95  hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer", getLayerNameAndId(selDetId_).first, "");
96 
97  for (int istrip = 0; istrip < nStrip; ++istrip) {
98  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
99  if (WhichThreshold == "Low") {
100  selME_.SummaryOfProfileDistr->Fill(istrip + 1, condObj_->getData(istrip, ThresholdRange).getLth());
101  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On"))
102  fillTkMap(selDetId_, condObj_->getData(istrip, ThresholdRange).getLth());
103  }
104  if (WhichThreshold == "High") {
105  selME_.SummaryOfProfileDistr->Fill(istrip + 1, condObj_->getData(istrip, ThresholdRange).getHth());
106  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On"))
107  fillTkMap(selDetId_, condObj_->getData(istrip, ThresholdRange).getHth());
108  }
109  }
110  } // istrip
111 
112  } // if Fill
113 
114  if (hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")) {
115  // --> summary
116 
117  std::string hSummary_description;
118  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
119 
120  std::string hSummary_name;
121  hSummary_name = hidmanager.createHistoLayer(hSummary_description, "layer", getLayerNameAndId(selDetId_).first, "");
122 
123  float meanLowThreshold = 0;
124  float meanHighThreshold = 0;
125 
126  for (int istrip = 0; istrip < nStrip; ++istrip) {
127  meanLowThreshold = meanLowThreshold + condObj_->getData(istrip, ThresholdRange).getLth();
128  meanHighThreshold = meanHighThreshold + condObj_->getData(istrip, ThresholdRange).getHth();
129  } // istrip
130 
131  meanLowThreshold = meanLowThreshold / nStrip;
132  meanHighThreshold = meanHighThreshold / nStrip;
133 
134  // -----
135  // get detIds belonging to same layer to fill X-axis with detId-number
136 
137  std::vector<uint32_t> sameLayerDetIds_ = GetSameLayerDetId(activeDetIds, selDetId_);
138 
139  unsigned int iBin = 0;
140  for (unsigned int i = 0; i < sameLayerDetIds_.size(); i++) {
141  if (sameLayerDetIds_[i] == selDetId_) {
142  iBin = i + 1;
143  }
144  }
145 
146  if (WhichThreshold == "Low") {
147  selME_.SummaryDistr->Fill(iBin, meanLowThreshold);
148  if (HistoMaps_On_)
149  Tk_HM_L->fill(selDetId_, meanLowThreshold);
150  }
151  if (WhichThreshold == "High") {
152  selME_.SummaryDistr->Fill(iBin, meanHighThreshold);
153  if (HistoMaps_On_)
154  Tk_HM_H->fill(selDetId_, meanHighThreshold);
155  }
156 
157  } // if Fill ...
158 }

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >::condObj_, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), 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, SiStripBaseCondObjDQM::Tk_HM_H, SiStripBaseCondObjDQM::Tk_HM_L, and WhichThreshold.

Referenced by fillSummaryMEs().

◆ fillModMEs()

void SiStripThresholdDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds)
overridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 27 of file SiStripThresholdDQM.cc.

27  {
28  ModMEs CondObj_ME;
29  for (const auto det : selectedDetIds) {
30  fillMEsForDet(CondObj_ME, det);
31  }
32 }

References fillMEsForDet().

◆ fillSummaryMEs()

void SiStripThresholdDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds)
overridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 54 of file SiStripThresholdDQM.cc.

54  {
55  for (const auto det : selectedDetIds) {
56  fillMEsForLayer(/*SummaryMEsMap_,*/ det);
57  }
58 }

References fillMEsForLayer().

◆ getActiveDetIds()

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

Member Data Documentation

◆ WhichThreshold

std::string SiStripThresholdDQM::WhichThreshold
private

Definition at line 30 of file SiStripThresholdDQM.h.

Referenced by fillMEsForDet(), and fillMEsForLayer().

SiStripBaseCondObjDQM::Tk_HM_L
std::unique_ptr< TkHistoMap > Tk_HM_L
Definition: SiStripBaseCondObjDQM.h:119
SiStripHistoId::createHistoLayer
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
Definition: SiStripHistoId.cc:51
SiStripBaseCondObjDQM::hidmanager
SiStripHistoId hidmanager
Definition: SiStripBaseCondObjDQM.h:141
mps_fire.i
i
Definition: mps_fire.py:428
SiStripThreshold::Data::getLth
float getLth() const
Definition: SiStripThreshold.h:61
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:114
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
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:100
SiStripBaseCondObjDQM::SummaryMEsMap_
std::map< uint32_t, ModMEs > SummaryMEsMap_
Definition: SiStripBaseCondObjDQM.h:113
SiStripBaseCondObjDQM::reader
SiStripDetInfoFileReader * reader
Definition: SiStripBaseCondObjDQM.h:94
SiStripBaseCondObjDQM::Tk_HM_H
std::unique_ptr< TkHistoMap > Tk_HM_H
Definition: SiStripBaseCondObjDQM.h:118
SiStripBaseCondObjDQM::fillTkMap
void fillTkMap(const uint32_t &detid, const float &value)
Definition: SiStripBaseCondObjDQM.cc:1049
SiStripThreshold::getRange
const Range getRange(const uint32_t &detID) const
Definition: SiStripThreshold.cc:38
SiStripBaseCondObjDQM::getLayerNameAndId
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:827
SiStripBaseCondObjDQM::getModMEs
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:300
SiStripThreshold::getData
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
Definition: SiStripThreshold.cc:70
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >
SiStripBaseCondObjDQM::CondObj_fillId_
std::string CondObj_fillId_
Definition: SiStripBaseCondObjDQM.h:109
SiStripThresholdDQM::fillMEsForLayer
void fillMEsForLayer(uint32_t selDetId_) override
Definition: SiStripThresholdDQM.cc:60
SiStripThresholdDQM::WhichThreshold
std::string WhichThreshold
Definition: SiStripThresholdDQM.h:30
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiStripBaseCondObjDQM::GetSameLayerDetId
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId)
Definition: SiStripBaseCondObjDQM.cc:1022
SiStripHistoId
Definition: SiStripHistoId.h:25
SiStripDetInfoFileReader::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:101
SiStripBaseCondObjDQM::getSummaryMEs
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:333
SiStripThresholdDQM::fillMEsForDet
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_) override
Definition: SiStripThresholdDQM.cc:34
SiStripBaseCondObjDQM::fPSet_
edm::ParameterSet fPSet_
Definition: SiStripBaseCondObjDQM.h:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripBaseCondObjDQM::hPSet_
edm::ParameterSet hPSet_
Definition: SiStripBaseCondObjDQM.h:96
SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripBaseCondObjDQM.h:159
SiStripBaseCondObjDQMGet< SiStripThreshold, SiStripThresholdRcd >::condObj_
const SiStripThreshold * condObj_
Definition: SiStripBaseCondObjDQM.h:163
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316