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)
 
void fillMEsForLayer (uint32_t selDetId_, const TrackerTopology *tTopo)
 
void fillModMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
 
void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
 
void getActiveDetIds (const edm::EventSetup &eSetup)
 
unsigned long long getCache (const edm::EventSetup &eSetup)
 
void getConditionObject (const edm::EventSetup &eSetup)
 
 SiStripThresholdDQM (const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
 
virtual ~SiStripThresholdDQM ()
 
- 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_)
 
 SiStripBaseCondObjDQM (const edm::EventSetup &eSetup, 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_
 
TkHistoMapTk_HM_
 
TkHistoMapTk_HM_H
 
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::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet 
)

Definition at line 8 of file SiStripThresholdDQM.cc.

References edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::HistoMaps_On_, AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::Tk_HM_H, SiStripBaseCondObjDQM::Tk_HM_L, and WhichThreshold.

10  :SiStripBaseCondObjDQM(eSetup, hPSet, fPSet){
11  WhichThreshold=hPSet.getParameter<std::string>("WhichThreshold");
12 
13  // Build the Histo_TkMap:
14  if(HistoMaps_On_ ){
15  if(WhichThreshold=="Low") Tk_HM_L = new TkHistoMap("SiStrip/Histo_Map","LowThresh_TkMap",0.);
16  if(WhichThreshold=="High") Tk_HM_H = new TkHistoMap("SiStrip/Histo_Map","HighThresh_TkMap",0.);
17  }
18 }
SiStripBaseCondObjDQM(const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
SiStripThresholdDQM::~SiStripThresholdDQM ( )
virtual

Definition at line 25 of file SiStripThresholdDQM.cc.

25 {}

Member Function Documentation

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

Implements SiStripBaseCondObjDQM.

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

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

Implements SiStripBaseCondObjDQM.

Definition at line 119 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), TkHistoMap::fill(), 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().

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 41 of file SiStripThresholdDQM.cc.

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

41  {
42 
43  //Retrieve tracker topology from geometry
45  es.get<TrackerTopologyRcd>().get(tTopoHandle);
46  const TrackerTopology* const tTopo = tTopoHandle.product();
47 
48  ModMEs CondObj_ME;
49 
50 
51  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
52  detIter_!= selectedDetIds.end();detIter_++){
53 
54  fillMEsForDet(CondObj_ME,*detIter_,tTopo);
55 
56  }
57 }
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
void SiStripThresholdDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds,
const edm::EventSetup es 
)
virtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 100 of file SiStripThresholdDQM.cc.

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

100  {
101 
102  //Retrieve tracker topology from geometry
103  edm::ESHandle<TrackerTopology> tTopoHandle;
104  es.get<TrackerTopologyRcd>().get(tTopoHandle);
105  const TrackerTopology* const tTopo = tTopoHandle.product();
106 
107  for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
108  detIter_!= selectedDetIds.end();detIter_++){
109  fillMEsForLayer(/*SummaryMEsMap_,*/ *detIter_,tTopo);
110 
111  }
112 
113 }
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
void SiStripThresholdDQM::getActiveDetIds ( const edm::EventSetup eSetup)
virtual

Implements SiStripBaseCondObjDQM.

Definition at line 30 of file SiStripThresholdDQM.cc.

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

30  {
31 
32  getConditionObject(eSetup);
34 }
edm::ESHandle< SiStripThreshold > thresholdHandle_
void getDetIds(std::vector< uint32_t > &DetIds_) const
std::vector< uint32_t > activeDetIds
void getConditionObject(const edm::EventSetup &eSetup)
unsigned long long SiStripThresholdDQM::getCache ( const edm::EventSetup eSetup)
inlinevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 29 of file SiStripThresholdDQM.h.

References edm::EventSetup::get().

29 { return eSetup.get<SiStripThresholdRcd>().cacheIdentifier();}
const T & get() const
Definition: EventSetup.h:56
void SiStripThresholdDQM::getConditionObject ( const edm::EventSetup eSetup)
inlinevirtual

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().