CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 7 of file SiStripThresholdDQM.cc.

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

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

Definition at line 24 of file SiStripThresholdDQM.cc.

24 {}

Member Function Documentation

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

Implements SiStripBaseCondObjDQM.

Definition at line 66 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::CondObj_fillId_, MonitorElement::Fill(), SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), SiStripBaseCondObjDQM::ModMEs::ProfileDistr, SiStripBaseCondObjDQM::reader, thresholdHandle_, and WhichThreshold.

Referenced by fillModMEs().

66  {
67  ModMEs selModME_ = _selModME_;
68  std::vector<uint32_t> DetIds;
69  thresholdHandle_->getDetIds(DetIds);
70 
71 
72  SiStripThreshold::Range ThresholdRange = thresholdHandle_->getRange(selDetId_);
73  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first*128;
74 
75 
76  getModMEs(selModME_,selDetId_,tTopo);
77 
78 
79 
80  for( int istrip=0;istrip<nStrip;++istrip){
81  if( CondObj_fillId_ =="onlyProfile" || CondObj_fillId_ =="ProfileAndCumul"){
82  if(WhichThreshold=="Low")
83  selModME_.ProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getLth());
84  if(WhichThreshold=="High")
85  selModME_.ProfileDistr->Fill(istrip+1,thresholdHandle_->getData(istrip,ThresholdRange).getHth());
86  }
87  }// istrip
88 
89 
90 }
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
edm::ESHandle< SiStripThreshold > thresholdHandle_
SiStripDetInfoFileReader * reader
std::pair< ContainerIterator, ContainerIterator > Range
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void SiStripThresholdDQM::fillMEsForLayer ( uint32_t  selDetId_,
const TrackerTopology tTopo 
)
virtual

Implements SiStripBaseCondObjDQM.

Definition at line 118 of file SiStripThresholdDQM.cc.

References SiStripBaseCondObjDQM::activeDetIds, SiStripBaseCondObjDQM::CondObj_fillId_, SiStripHistoId::createHistoLayer(), TkHistoMap::fill(), MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), first, SiStripBaseCondObjDQM::fPSet_, SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::HistoMaps_On_, SiStripBaseCondObjDQM::hPSet_, 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().

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 40 of file SiStripThresholdDQM.cc.

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

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

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 99 of file SiStripThresholdDQM.cc.

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

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

Implements SiStripBaseCondObjDQM.

Definition at line 29 of file SiStripThresholdDQM.cc.

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

29  {
30 
31  getConditionObject(eSetup);
32  thresholdHandle_->getDetIds(activeDetIds);
33 }
edm::ESHandle< SiStripThreshold > thresholdHandle_
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:55
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().