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_, uint32_t detIdOnDemand)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, const std::vector< uint32_t > &detIdsOnDemand)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
 
virtual void end ()
 
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

- 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 ( const edm::EventSetup eSetup,
edm::RunNumber_t  iRun,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet 
)

Definition at line 8 of file SiStripThresholdDQM.cc.

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

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 }
std::unique_ptr< TkHistoMap > Tk_HM_L
std::unique_ptr< TkHistoMap > Tk_HM_H
SiStripBaseCondObjDQM(const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
SiStripThresholdDQM::~SiStripThresholdDQM ( )
override

Definition at line 30 of file SiStripThresholdDQM.cc.

30 {}

Member Function Documentation

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

Implements SiStripBaseCondObjDQM.

Definition at line 61 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::CondObj_fillId_, 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().

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 }
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
edm::ESHandle< SiStripThreshold > thresholdHandle_
SiStripDetInfoFileReader * reader
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
std::pair< ContainerIterator, ContainerIterator > Range
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void getDetIds(std::vector< uint32_t > &DetIds_) const
const Range getRange(const uint32_t &detID) const
void SiStripThresholdDQM::fillMEsForLayer ( uint32_t  selDetId_,
const TrackerTopology tTopo 
)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 100 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), plotBeamSpotDB::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().

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 }
std::unique_ptr< TkHistoMap > Tk_HM_L
T getParameter(std::string const &) const
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
std::unique_ptr< TkHistoMap > Tk_HM_H
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
edm::ESHandle< SiStripThreshold > thresholdHandle_
void fillTkMap(const uint32_t &detid, const float &value)
U second(std::pair< T, U > const &p)
std::map< uint32_t, ModMEs > SummaryMEsMap_
SiStripDetInfoFileReader * reader
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
SiStripThreshold::Data getData(const uint16_t &strip, const Range &range) const
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > activeDetIds
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
const Range getRange(const uint32_t &detID) const
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.

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

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 }
T get() const
Definition: EventSetup.h:71
T const * product() const
Definition: ESHandle.h:86
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo) override
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.

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

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 }
T get() const
Definition: EventSetup.h:71
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo) override
T const * product() const
Definition: ESHandle.h:86
void SiStripThresholdDQM::getActiveDetIds ( const edm::EventSetup eSetup)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 34 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, getConditionObject(), SiStripThreshold::getDetIds(), and thresholdHandle_.

34  {
35  getConditionObject(eSetup);
37 }
void getConditionObject(const edm::EventSetup &eSetup) override
edm::ESHandle< SiStripThreshold > thresholdHandle_
void getDetIds(std::vector< uint32_t > &DetIds_) const
std::vector< uint32_t > activeDetIds
unsigned long long SiStripThresholdDQM::getCache ( const edm::EventSetup eSetup)
inlineoverridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 27 of file SiStripThresholdDQM.h.

References edm::EventSetup::get().

27  {
28  return eSetup.get<SiStripThresholdRcd>().cacheIdentifier();
29  }
T get() const
Definition: EventSetup.h:71
void SiStripThresholdDQM::getConditionObject ( const edm::EventSetup eSetup)
inlineoverridevirtual

Member Data Documentation

edm::ESHandle<SiStripThreshold> SiStripThresholdDQM::thresholdHandle_
private
std::string SiStripThresholdDQM::WhichThreshold
private

Definition at line 38 of file SiStripThresholdDQM.h.

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