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 11 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.

11  :SiStripBaseCondObjDQM(eSetup, iRun, hPSet, fPSet){
12  WhichThreshold=hPSet.getParameter<std::string>("WhichThreshold");
13 
14  // Build the Histo_TkMap:
15  if(HistoMaps_On_ ){
16  edm::ESHandle<TkDetMap> tkDetMapHandle;
17  eSetup.get<TrackerTopologyRcd>().get(tkDetMapHandle);
18  const TkDetMap* tkDetMap = tkDetMapHandle.product();
19  if(WhichThreshold=="Low") Tk_HM_L = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map","LowThresh_TkMap",0.);
20  if(WhichThreshold=="High") Tk_HM_H = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map","HighThresh_TkMap",0.);
21  }
22 }
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:63
T const * product() const
Definition: ESHandle.h:86
SiStripThresholdDQM::~SiStripThresholdDQM ( )
override

Definition at line 29 of file SiStripThresholdDQM.cc.

29 {}

Member Function Documentation

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

Implements SiStripBaseCondObjDQM.

Definition at line 71 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().

71  {
72  ModMEs selModME_ = _selModME_;
73  std::vector<uint32_t> DetIds;
74  thresholdHandle_->getDetIds(DetIds);
75 
76 
77  SiStripThreshold::Range ThresholdRange = thresholdHandle_->getRange(selDetId_);
78  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first*128;
79 
80 
81  getModMEs(selModME_,selDetId_,tTopo);
82 
83 
84 
85  for( int istrip=0;istrip<nStrip;++istrip){
86  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
87  if(WhichThreshold=="Low")
88  selModME_.ProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getLth());
89  if(WhichThreshold=="High")
90  selModME_.ProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getHth());
91  }
92  }// istrip
93 
94 
95 }
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 123 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().

123  {
124 
125  // ----
126  int subdetectorId_ = ((selDetId_>>25)&0x7);
127 
128  if( subdetectorId_<3 || subdetectorId_>6 ){
129  edm::LogError("SiStripThresholdDQM")
130  << "[SiStripThresholdDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
131  << subdetectorId_ << " no folder set!"
132  << std::endl;
133  return;
134  }
135  // ----
136 
137  std::map<uint32_t, ModMEs>::iterator selMEsMapIter_ = SummaryMEsMap_.find(getLayerNameAndId(selDetId_,tTopo).second);
138  ModMEs selME_;
139  if ( selMEsMapIter_ != SummaryMEsMap_.end())
140  selME_ =selMEsMapIter_->second;
141 
142  getSummaryMEs(selME_,selDetId_,tTopo);
143 
144 
145  SiStripThreshold::Range ThresholdRange = thresholdHandle_->getRange(selDetId_);
146 
147  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first*128;
148 
150 
151 
152  if(hPSet_.getParameter<bool>("FillSummaryProfileAtLayerLevel")){
153  // --> profile summary
154 
155  std::string hSummaryOfProfile_description;
156  hSummaryOfProfile_description = hPSet_.getParameter<std::string>("SummaryOfProfile_description");
157 
158  std::string hSummaryOfProfile_name;
159 
160  hSummaryOfProfile_name = hidmanager.createHistoLayer(hSummaryOfProfile_description, "layer", getLayerNameAndId(selDetId_,tTopo).first, "") ;
161 
162 
163 
164  for( int istrip=0;istrip<nStrip;++istrip){
165 
166  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
167  if(WhichThreshold=="Low"){
168  selME_.SummaryOfProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getLth());
169  if(fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On")) fillTkMap(selDetId_, thresholdHandle_->getData(istrip,ThresholdRange).getLth());
170  }
171  if(WhichThreshold=="High"){
172  selME_.SummaryOfProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getHth());
173  if(fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On")) fillTkMap(selDetId_, thresholdHandle_->getData(istrip,ThresholdRange).getHth());
174  }
175  }
176  }// istrip
177 
178 
179 
180  }//if Fill
181 
182 
183 
184  if(hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")){
185 
186  // --> summary
187 
188  std::string hSummary_description;
189  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
190 
191  std::string hSummary_name;
192  hSummary_name = hidmanager.createHistoLayer(hSummary_description,
193  "layer",
194  getLayerNameAndId(selDetId_,tTopo).first,
195  "") ;
196 
197 
198  float meanLowThreshold=0;
199  float meanHighThreshold=0;
200 
201  for( int istrip=0;istrip<nStrip;++istrip){
202 
203  meanLowThreshold = meanLowThreshold + thresholdHandle_->getData(istrip,ThresholdRange).getLth();
204  meanHighThreshold = meanHighThreshold + thresholdHandle_->getData(istrip,ThresholdRange).getHth();
205  }//istrip
206 
207 
208  meanLowThreshold = meanLowThreshold/nStrip;
209  meanHighThreshold = meanHighThreshold/nStrip;
210 
211 
212  // -----
213  // get detIds belonging to same layer to fill X-axis with detId-number
214 
215  std::vector<uint32_t> sameLayerDetIds_=GetSameLayerDetId(activeDetIds,selDetId_,tTopo);
216 
217  unsigned int iBin=0;
218  for(unsigned int i=0;i<sameLayerDetIds_.size();i++){
219  if(sameLayerDetIds_[i]==selDetId_){iBin=i+1;}
220  }
221 
222  if(WhichThreshold=="Low"){
223  selME_.SummaryDistr->Fill(iBin,meanLowThreshold);
224  if(HistoMaps_On_ ) Tk_HM_L->fill(selDetId_, meanLowThreshold);
225  }
226  if(WhichThreshold=="High"){
227  selME_.SummaryDistr->Fill(iBin,meanHighThreshold);
228  if(HistoMaps_On_ )Tk_HM_H->fill(selDetId_, meanHighThreshold);
229  }
230 
231  }//if Fill ...
232 
233 
234 
235 }
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 45 of file SiStripThresholdDQM.cc.

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

45  {
46 
47  //Retrieve tracker topology from geometry
49  es.get<TrackerTopologyRcd>().get(tTopoHandle);
50  const TrackerTopology* const tTopo = tTopoHandle.product();
51 
52  ModMEs CondObj_ME;
53 
54 
55  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
56  detIter_!= selectedDetIds.end();detIter_++){
57 
58  fillMEsForDet(CondObj_ME,*detIter_,tTopo);
59 
60  }
61 }
T get() const
Definition: EventSetup.h:63
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 104 of file SiStripThresholdDQM.cc.

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

104  {
105 
106  //Retrieve tracker topology from geometry
107  edm::ESHandle<TrackerTopology> tTopoHandle;
108  es.get<TrackerTopologyRcd>().get(tTopoHandle);
109  const TrackerTopology* const tTopo = tTopoHandle.product();
110 
111  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
112  detIter_!= selectedDetIds.end();detIter_++){
113  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_,tTopo);
114 
115  }
116 
117 }
T get() const
Definition: EventSetup.h:63
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 
36  getConditionObject(eSetup);
38 }
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 30 of file SiStripThresholdDQM.h.

References edm::EventSetup::get().

30 { return eSetup.get<SiStripThresholdRcd>().cacheIdentifier();}
T get() const
Definition: EventSetup.h:63
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 39 of file SiStripThresholdDQM.h.

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