CMS 3D CMS Logo

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

#include <SiStripPedestalsDQM.h>

Inheritance diagram for SiStripPedestalsDQM:
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
 
 SiStripPedestalsDQM (const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
 ~SiStripPedestalsDQM () 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< SiStripPedestalspedestalHandle_
 

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 SiStripPedestalsDQM.h.

Constructor & Destructor Documentation

◆ SiStripPedestalsDQM()

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

Definition at line 7 of file SiStripPedestalsDQM.cc.

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

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

◆ ~SiStripPedestalsDQM()

SiStripPedestalsDQM::~SiStripPedestalsDQM ( )
override

Definition at line 22 of file SiStripPedestalsDQM.cc.

22 {}

Member Function Documentation

◆ fillMEsForDet()

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

Implements SiStripBaseCondObjDQM.

Definition at line 49 of file SiStripPedestalsDQM.cc.

49  {
50  ModMEs selModME_ = _selModME_;
51  getModMEs(selModME_, selDetId_, tTopo);
52 
53  SiStripPedestals::Range pedRange = pedestalHandle_->getRange(selDetId_);
54  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
55 
56  for (int istrip = 0; istrip < nStrip; ++istrip) {
57  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
58  selModME_.ProfileDistr->Fill(istrip + 1, pedestalHandle_->getPed(istrip, pedRange));
59  }
60  } // istrip
61 }

References SiStripBaseCondObjDQM::CondObj_fillId_, dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), SiStripPedestals::getPed(), SiStripPedestals::getRange(), pedestalHandle_, SiStripBaseCondObjDQM::ModMEs::ProfileDistr, and SiStripBaseCondObjDQM::reader.

Referenced by fillModMEs().

◆ fillMEsForLayer()

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

Implements SiStripBaseCondObjDQM.

Definition at line 104 of file SiStripPedestalsDQM.cc.

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

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), dqmdumpme::first, SiStripBaseCondObjDQM::fPSet_, SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripPedestals::getPed(), SiStripPedestals::getRange(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::HistoMaps_On_, SiStripBaseCondObjDQM::hPSet_, mps_fire::i, pedestalHandle_, SiStripBaseCondObjDQM::reader, edm::second(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::SummaryMEsMap_, SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr, and SiStripBaseCondObjDQM::Tk_HM_.

Referenced by fillSummaryMEs().

◆ fillModMEs()

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 33 of file SiStripPedestalsDQM.cc.

33  {
34  // Retrieve tracker topology from geometry
36  es.get<TrackerTopologyRcd>().get(tTopoHandle);
37  const TrackerTopology *const tTopo = tTopoHandle.product();
38 
39  ModMEs CondObj_ME;
40 
41  for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
42  detIter_++) {
43  fillMEsForDet(CondObj_ME, *detIter_, tTopo);
44  }
45 }

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

◆ fillSummaryMEs()

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 65 of file SiStripPedestalsDQM.cc.

65  {
66  // Retrieve tracker topology from geometry
68  es.get<TrackerTopologyRcd>().get(tTopoHandle);
69  const TrackerTopology *const tTopo = tTopoHandle.product();
70 
71  for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
72  detIter_++) {
73  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_, tTopo);
74  }
75 
76  for (std::map<uint32_t, ModMEs>::iterator iter = SummaryMEsMap_.begin(); iter != SummaryMEsMap_.end(); iter++) {
77  ModMEs selME;
78  selME = iter->second;
79 
80  if (hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel") &&
81  fPSet_.getParameter<bool>("OutputSummaryProfileAtLayerLevelAsImage")) {
82  if (CondObj_fillId_ == "onlyProfile" || CondObj_fillId_ == "ProfileAndCumul") {
83  TCanvas c1("c1");
84  selME.SummaryOfProfileDistr->getTProfile()->Draw();
85  std::string name(selME.SummaryOfProfileDistr->getTProfile()->GetTitle());
86  name += ".png";
87  c1.Print(name.c_str());
88  }
89  }
90  if (hPSet_.getParameter<bool>("FillSummaryAtLayerLevel") &&
91  fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")) {
92  TCanvas c1("c1");
93  selME.SummaryDistr->getTH1()->Draw();
94  std::string name(selME.SummaryDistr->getTH1()->GetTitle());
95  name += ".png";
96  c1.Print(name.c_str());
97  }
98  }
99 }

References alignmentValidation::c1, SiStripBaseCondObjDQM::CondObj_fillId_, fillMEsForLayer(), SiStripBaseCondObjDQM::fPSet_, edm::EventSetup::get(), get, edm::ParameterSet::getParameter(), dqm::legacy::MonitorElement::getTH1(), dqm::legacy::MonitorElement::getTProfile(), SiStripBaseCondObjDQM::hPSet_, Skims_PA_cff::name, edm::ESHandle< T >::product(), AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::SummaryMEsMap_, and SiStripBaseCondObjDQM::ModMEs::SummaryOfProfileDistr.

◆ getActiveDetIds()

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

◆ getCache()

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

Implements SiStripBaseCondObjDQM.

Definition at line 27 of file SiStripPedestalsDQM.h.

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

References edm::EventSetup::get().

◆ getConditionObject()

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

Member Data Documentation

◆ pedestalHandle_

edm::ESHandle<SiStripPedestals> SiStripPedestalsDQM::pedestalHandle_
private
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:428
SiStripPedestals::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripPedestals.h:51
SiStripPedestals::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripPedestals.cc:38
TrackerTopology
Definition: TrackerTopology.h:16
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:123
SiStripPedestalsDQM::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripPedestalsDQM.h:31
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SiStripBaseCondObjDQM::HistoMaps_On_
bool HistoMaps_On_
Definition: SiStripBaseCondObjDQM.h:109
dqmdumpme.first
first
Definition: dqmdumpme.py:55
SiStripPedestalsRcd
Definition: SiStripCondDataRecords.h:43
SiStripBaseCondObjDQM::SummaryMEsMap_
std::map< uint32_t, ModMEs > SummaryMEsMap_
Definition: SiStripBaseCondObjDQM.h:122
SiStripBaseCondObjDQM::reader
SiStripDetInfoFileReader * reader
Definition: SiStripBaseCondObjDQM.h:102
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
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
SiStripBaseCondObjDQM::Tk_HM_
std::unique_ptr< TkHistoMap > Tk_HM_
Definition: SiStripBaseCondObjDQM.h:129
edm::ESHandle
Definition: DTSurvey.h:22
SiStripBaseCondObjDQM::cacheID_memory
unsigned long long cacheID_memory
Definition: SiStripBaseCondObjDQM.h:126
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripPedestals::getRange
const Range getRange(const uint32_t &detID) const
Definition: SiStripPedestals.cc:28
SiStripBaseCondObjDQM::CondObj_fillId_
std::string CondObj_fillId_
Definition: SiStripBaseCondObjDQM.h:118
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
SiStripBaseCondObjDQM::getModMEs
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:363
SiStripHistoId
Definition: SiStripHistoId.h:25
SiStripDetInfoFileReader::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:101
SiStripPedestalsDQM::pedestalHandle_
edm::ESHandle< SiStripPedestals > pedestalHandle_
Definition: SiStripPedestalsDQM.h:37
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::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
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
SiStripPedestals::getPed
float getPed(const uint16_t &strip, const Range &range) const
Definition: SiStripPedestals.cc:51
SiStripBaseCondObjDQM::GetSameLayerDetId
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
Definition: SiStripBaseCondObjDQM.cc:1114
SiStripPedestalsDQM::fillMEsForLayer
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo) override
Definition: SiStripPedestalsDQM.cc:104
SiStripBaseCondObjDQM::cacheID_current
unsigned long long cacheID_current
Definition: SiStripBaseCondObjDQM.h:127
SiStripPedestalsDQM::fillMEsForDet
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo) override
Definition: SiStripPedestalsDQM.cc:49