CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
SiStripMonitorCluster Class Reference

#include <DQM/SiStripMonitorCluster/src/SiStripMonitorCluster.cc>

Inheritance diagram for SiStripMonitorCluster:
edm::EDAnalyzer

Classes

struct  ClusterProperties
 
struct  LayerMEs
 
struct  ModMEs
 
struct  SubDetMEs
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual void endJob ()
 
 SiStripMonitorCluster (const edm::ParameterSet &)
 
 ~SiStripMonitorCluster ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Public Attributes

MonitorElementGlobalApvCycleDBxTH2
 

Private Member Functions

MonitorElementbookME1D (const char *ParameterSetLabel, const char *HistoName)
 
MonitorElementbookMETrend (const char *, const char *)
 
void createLayerMEs (std::string label, int ndets)
 
void createMEs (const edm::EventSetup &es)
 
void createModuleMEs (ModMEs &mod_single, uint32_t detid)
 
void createSubDetMEs (std::string label)
 
void fillLayerMEs (LayerMEs &, ClusterProperties &cluster, float timeinorbit)
 
void fillME (MonitorElement *ME, float value1)
 
void fillME (MonitorElement *ME, float value1, float value2)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3)
 
void fillME (MonitorElement *ME, float value1, float value2, float value3, float value4)
 
void fillModuleMEs (ModMEs &mod_mes, ClusterProperties &cluster)
 
void ResetModuleMEs (uint32_t idet)
 

Private Attributes

bool applyClusterQuality_
 
edm::InputTag apvPhaseProducer_
 
edm::InputTag clusterProducer_
 
bool clustertkhistomapon
 
edm::ParameterSet conf_
 
bool createTrendMEs
 
SiStripDCSStatusdcsStatus_
 
DQMStoredqmStore_
 
int eventNb
 
int firstEvent
 
bool globalswitchapvcycledbxth2on
 
edm::InputTag historyProducer_
 
std::map< std::string,
std::vector< uint32_t > > 
LayerDetMap
 
std::map< std::string, LayerMEsLayerMEsMap
 
bool layerswitchcluschargeon
 
bool layerswitchclusdigiposon
 
bool layerswitchclusnoiseon
 
bool layerswitchclusposon
 
bool layerswitchclusstonon
 
bool layerswitchclusstonVsposon
 
bool layerswitchclusterwidthprofon
 
bool layerswitchcluswidthon
 
bool layerswitchlocaloccupancy
 
bool layerswitchncluson
 
bool layerswitchnrclusterizedstrip
 
bool layerswitchnumclusterprofon
 
unsigned long long m_cacheID_
 
bool Mod_On_
 
std::map< uint32_t, ModMEsModuleMEsMap
 
std::vector< uint32_t > ModulesToBeExcluded_
 
bool moduleswitchcluschargeon
 
bool moduleswitchclusdigiposon
 
bool moduleswitchclusnoiseon
 
bool moduleswitchclusposon
 
bool moduleswitchclusstonon
 
bool moduleswitchclusstonVsposon
 
bool moduleswitchcluswidthon
 
bool moduleswitchlocaloccupancy
 
bool moduleswitchncluson
 
bool moduleswitchnrclusterizedstrip
 
edm::ParameterSet Parameters
 
std::string qualityLabel_
 
bool reset_each_run
 
int runNb
 
bool select_all_detectors
 
bool show_control_view
 
bool show_mechanical_structure_view
 
bool show_readout_view
 
edm::ESHandle< SiStripDetCablingSiStripDetCabling_
 
double sToNLowerLimit_
 
double sToNUpperLimit_
 
std::map< std::string, SubDetMEsSubDetMEsMap
 
std::map< std::string,
std::string > 
SubDetPhasePartMap
 
bool subdetswitchapvcycledbxprof2on
 
bool subdetswitchapvcycleprofon
 
bool subdetswitchapvcycleth2on
 
bool subdetswitchdbxcycleprofon
 
bool subdetswitchtotclusprofon
 
bool subdetswitchtotclusth1on
 
TkHistoMaptkmapcluster
 
std::string topFolderName_
 
double widthLowerLimit_
 
double widthUpperLimit_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Data Quality Monitoring source of the Silicon Strip Tracker. Produces histograms related to clusters.

Definition at line 30 of file SiStripMonitorCluster.h.

Constructor & Destructor Documentation

SiStripMonitorCluster::SiStripMonitorCluster ( const edm::ParameterSet iConfig)
explicit

Definition at line 48 of file SiStripMonitorCluster.cc.

References applyClusterQuality_, apvPhaseProducer_, clusterProducer_, clustertkhistomapon, conf_, createTrendMEs, dcsStatus_, eventNb, firstEvent, edm::ParameterSet::getParameter(), globalswitchapvcycledbxth2on, historyProducer_, layerswitchcluschargeon, layerswitchclusdigiposon, layerswitchclusnoiseon, layerswitchclusposon, layerswitchclusstonon, layerswitchclusstonVsposon, layerswitchclusterwidthprofon, layerswitchcluswidthon, layerswitchlocaloccupancy, layerswitchncluson, layerswitchnrclusterizedstrip, layerswitchnumclusterprofon, Mod_On_, moduleswitchcluschargeon, moduleswitchclusdigiposon, moduleswitchclusnoiseon, moduleswitchclusposon, moduleswitchclusstonon, moduleswitchclusstonVsposon, moduleswitchcluswidthon, moduleswitchlocaloccupancy, moduleswitchncluson, moduleswitchnrclusterizedstrip, qualityLabel_, sToNLowerLimit_, sToNUpperLimit_, SubDetPhasePartMap, subdetswitchapvcycledbxprof2on, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchdbxcycleprofon, subdetswitchtotclusprofon, subdetswitchtotclusth1on, topFolderName_, widthLowerLimit_, and widthUpperLimit_.

49 {
50 
51  firstEvent = -1;
52  eventNb = 0;
53 
54  // Detector Partitions
55  SubDetPhasePartMap["TIB"] = "TI";
56  SubDetPhasePartMap["TID__side__1"] = "TI";
57  SubDetPhasePartMap["TID__side__2"] = "TI";
58  SubDetPhasePartMap["TOB"] = "TO";
59  SubDetPhasePartMap["TEC__side__1"] = "TM";
60  SubDetPhasePartMap["TEC__side__2"] = "TP";
61 
62  //get on/off option for every cluster from cfi
63  edm::ParameterSet ParametersnClusters = conf_.getParameter<edm::ParameterSet>("TH1nClusters");
64  layerswitchncluson = ParametersnClusters.getParameter<bool>("layerswitchon");
65  moduleswitchncluson = ParametersnClusters.getParameter<bool>("moduleswitchon");
66 
67  edm::ParameterSet ParametersClusterCharge = conf_.getParameter<edm::ParameterSet>("TH1ClusterCharge");
68  layerswitchcluschargeon = ParametersClusterCharge.getParameter<bool>("layerswitchon");
69  moduleswitchcluschargeon = ParametersClusterCharge.getParameter<bool>("moduleswitchon");
70 
71  edm::ParameterSet ParametersClusterStoN = conf_.getParameter<edm::ParameterSet>("TH1ClusterStoN");
72  layerswitchclusstonon = ParametersClusterStoN.getParameter<bool>("layerswitchon");
73  moduleswitchclusstonon = ParametersClusterStoN.getParameter<bool>("moduleswitchon");
74 
75  edm::ParameterSet ParametersClusterStoNVsPos = conf_.getParameter<edm::ParameterSet>("TH1ClusterStoNVsPos");
76  layerswitchclusstonVsposon = ParametersClusterStoNVsPos.getParameter<bool>("layerswitchon");
77  moduleswitchclusstonVsposon = ParametersClusterStoNVsPos.getParameter<bool>("moduleswitchon");
78 
79  edm::ParameterSet ParametersClusterPos = conf_.getParameter<edm::ParameterSet>("TH1ClusterPos");
80  layerswitchclusposon = ParametersClusterPos.getParameter<bool>("layerswitchon");
81  moduleswitchclusposon = ParametersClusterPos.getParameter<bool>("moduleswitchon");
82 
83  edm::ParameterSet ParametersClusterDigiPos = conf_.getParameter<edm::ParameterSet>("TH1ClusterDigiPos");
84  layerswitchclusdigiposon = ParametersClusterDigiPos.getParameter<bool>("layerswitchon");
85  moduleswitchclusdigiposon = ParametersClusterDigiPos.getParameter<bool>("moduleswitchon");
86 
87  edm::ParameterSet ParametersClusterNoise = conf_.getParameter<edm::ParameterSet>("TH1ClusterNoise");
88  layerswitchclusnoiseon = ParametersClusterNoise.getParameter<bool>("layerswitchon");
89  moduleswitchclusnoiseon = ParametersClusterNoise.getParameter<bool>("moduleswitchon");
90 
91  edm::ParameterSet ParametersClusterWidth = conf_.getParameter<edm::ParameterSet>("TH1ClusterWidth");
92  layerswitchcluswidthon = ParametersClusterWidth.getParameter<bool>("layerswitchon");
93  moduleswitchcluswidthon = ParametersClusterWidth.getParameter<bool>("moduleswitchon");
94 
95  edm::ParameterSet ParametersModuleLocalOccupancy = conf_.getParameter<edm::ParameterSet>("TH1ModuleLocalOccupancy");
96  layerswitchlocaloccupancy = ParametersModuleLocalOccupancy.getParameter<bool>("layerswitchon");
97  moduleswitchlocaloccupancy = ParametersModuleLocalOccupancy.getParameter<bool>("moduleswitchon");
98 
99  edm::ParameterSet ParametersNrOfClusterizedStrips = conf_.getParameter<edm::ParameterSet>("TH1NrOfClusterizedStrips");
100  layerswitchnrclusterizedstrip = ParametersNrOfClusterizedStrips.getParameter<bool>("layerswitchon");
101  moduleswitchnrclusterizedstrip = ParametersNrOfClusterizedStrips.getParameter<bool>("moduleswitchon");
102 
103  edm::ParameterSet ParametersClusterProf = conf_.getParameter<edm::ParameterSet>("TProfNumberOfCluster");
104  layerswitchnumclusterprofon = ParametersClusterProf.getParameter<bool>("layerswitchon");
105 
106  edm::ParameterSet ParametersClusterWidthProf = conf_.getParameter<edm::ParameterSet>("TProfClusterWidth");
107  layerswitchclusterwidthprofon = ParametersClusterWidthProf.getParameter<bool>("layerswitchon");
108 
109  edm::ParameterSet ParametersTotClusterProf = conf_.getParameter<edm::ParameterSet>("TProfTotalNumberOfClusters");
110  subdetswitchtotclusprofon = ParametersTotClusterProf.getParameter<bool>("subdetswitchon");
111 
112  edm::ParameterSet ParametersTotClusterTH1 = conf_.getParameter<edm::ParameterSet>("TH1TotalNumberOfClusters");
113  subdetswitchtotclusth1on = ParametersTotClusterTH1.getParameter<bool>("subdetswitchon");
114 
115  edm::ParameterSet ParametersClusterApvProf = conf_.getParameter<edm::ParameterSet>("TProfClustersApvCycle");
116  subdetswitchapvcycleprofon = ParametersClusterApvProf.getParameter<bool>("subdetswitchon");
117 
118  edm::ParameterSet ParametersClustersApvTH2 = conf_.getParameter<edm::ParameterSet>("TH2ClustersApvCycle");
119  subdetswitchapvcycleth2on = ParametersClustersApvTH2.getParameter<bool>("subdetswitchon");
120 
121  edm::ParameterSet ParametersApvCycleDBxProf2 = conf_.getParameter<edm::ParameterSet>("TProf2ApvCycleVsDBx");
122  subdetswitchapvcycledbxprof2on = ParametersApvCycleDBxProf2.getParameter<bool>("subdetswitchon");
123 
124  edm::ParameterSet ParametersDBxCycleProf = conf_.getParameter<edm::ParameterSet>("TProfClustersVsDBxCycle");
125  subdetswitchdbxcycleprofon = ParametersDBxCycleProf.getParameter<bool>("subdetswitchon");
126 
127  edm::ParameterSet ParametersApvCycleVsDBxGlobalTH2 = conf_.getParameter<edm::ParameterSet>("TH2ApvCycleVsDBxGlobal");
128  globalswitchapvcycledbxth2on = ParametersApvCycleVsDBxGlobalTH2.getParameter<bool>("globalswitchon");
129 
130  clustertkhistomapon = conf_.getParameter<bool>("TkHistoMap_On");
131  createTrendMEs = conf_.getParameter<bool>("CreateTrendMEs");
132  Mod_On_ = conf_.getParameter<bool>("Mod_On");
133 
134  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
135 
136 
137  // Poducer name of input StripClusterCollection
138  clusterProducer_ = conf_.getParameter<edm::InputTag>("ClusterProducer");
139  // SiStrip Quality Label
140  qualityLabel_ = conf_.getParameter<std::string>("StripQualityLabel");
141  // cluster quality conditions
142  edm::ParameterSet cluster_condition = conf_.getParameter<edm::ParameterSet>("ClusterConditions");
143  applyClusterQuality_ = cluster_condition.getParameter<bool>("On");
144  sToNLowerLimit_ = cluster_condition.getParameter<double>("minStoN");
145  sToNUpperLimit_ = cluster_condition.getParameter<double>("maxStoN");
146  widthLowerLimit_ = cluster_condition.getParameter<double>("minWidth");
147  widthUpperLimit_ = cluster_condition.getParameter<double>("maxWidth");
148 
149  // Event History Producer
150  historyProducer_ = conf_.getParameter<edm::InputTag>("HistoryProducer");
151  // Apv Phase Producer
152  apvPhaseProducer_ = conf_.getParameter<edm::InputTag>("ApvPhaseProducer");
153 
154  // Create DCS Status
155  bool checkDCS = conf_.getParameter<bool>("UseDCSFiltering");
156  if (checkDCS) dcsStatus_ = new SiStripDCSStatus();
157  else dcsStatus_ = 0;
158 
159 }
T getParameter(std::string const &) const
unsigned long long m_cacheID_
std::map< std::string, std::string > SubDetPhasePartMap
SiStripDCSStatus * dcsStatus_
SiStripMonitorCluster::~SiStripMonitorCluster ( )

Definition at line 161 of file SiStripMonitorCluster.cc.

References dcsStatus_.

161  {
162  if (dcsStatus_) delete dcsStatus_;
163 }
SiStripDCSStatus * dcsStatus_

Member Function Documentation

void SiStripMonitorCluster::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 298 of file SiStripMonitorCluster.cc.

References applyClusterQuality_, apvPhaseProducer_, edmNew::DetSet< T >::begin(), SiStripMonitorCluster::ClusterProperties::charge, clusterProducer_, clustertkhistomapon, createTrendMEs, dcsStatus_, cond::rpcobgas::detid, edmNew::DetSet< T >::end(), eventNb, edm::HandleBase::failedToGet(), TkHistoMap::fill(), MonitorElement::Fill(), fillLayerMEs(), fillME(), fillModuleMEs(), edm::EventSetup::get(), edm::Event::getByLabel(), SiStripDCSStatus::getStatus(), SiStripFolderOrganizer::getSubDetFolderAndTag(), GlobalApvCycleDBxTH2, globalswitchapvcycledbxth2on, historyProducer_, edm::EventBase::id(), APVCyclePhaseCollection::invalid, edm::HandleBase::isValid(), SiStripMonitorCluster::LayerMEs::LayerClusterWidthProfile, LayerDetMap, SiStripMonitorCluster::LayerMEs::LayerLocalOccupancy, SiStripMonitorCluster::LayerMEs::LayerLocalOccupancyTrend, LayerMEsMap, SiStripMonitorCluster::LayerMEs::LayerNumberOfClusterProfile, layerswitchclusterwidthprofon, layerswitchlocaloccupancy, layerswitchnumclusterprofon, Association::map, Mod_On_, SiStripMonitorCluster::ModMEs::ModuleLocalOccupancy, ModuleMEsMap, moduleswitchlocaloccupancy, moduleswitchncluson, moduleswitchnrclusterizedstrip, APVCyclePhaseCollection::multiphase, SiStripMonitorCluster::ClusterProperties::noise, APVCyclePhaseCollection::nopartition, SiStripMonitorCluster::ModMEs::NrOfClusterizedStrips, NULL, SiStripMonitorCluster::ModMEs::NumberOfClusters, edm::EventBase::orbitNumber(), SiStripMonitorCluster::ClusterProperties::position, qualityLabel_, edm::EventID::run(), runNb, SiStripDetCabling_, edmNew::DetSet< T >::size(), mathSSE::sqrt(), SiStripMonitorCluster::ClusterProperties::start, sToNLowerLimit_, sToNUpperLimit_, SiStripMonitorCluster::SubDetMEs::SubDetApvDBxProf2, SiStripMonitorCluster::SubDetMEs::SubDetClusterApvProf, SiStripMonitorCluster::SubDetMEs::SubDetClusterApvTH2, SiStripMonitorCluster::SubDetMEs::SubDetClusterDBxCycleProf, SubDetMEsMap, SubDetPhasePartMap, subdetswitchapvcycledbxprof2on, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchdbxcycleprofon, subdetswitchtotclusprofon, subdetswitchtotclusth1on, SiStripMonitorCluster::SubDetMEs::SubDetTotClusterProf, SiStripMonitorCluster::SubDetMEs::SubDetTotClusterTH1, tkmapcluster, SiStripMonitorCluster::SubDetMEs::totNClusters, SiStripMonitorCluster::ClusterProperties::width, widthLowerLimit_, and widthUpperLimit_.

299 {
300 
301  // Filter out events if DCS Event if requested
302  if (dcsStatus_ && !dcsStatus_->getStatus(iEvent,iSetup)) return;
303 
304  runNb = iEvent.id().run();
305  eventNb++;
306  float iOrbitSec = iEvent.orbitNumber()/11223.0;
307 
308  edm::ESHandle<SiStripNoises> noiseHandle;
309  iSetup.get<SiStripNoisesRcd>().get(noiseHandle);
310 
311  edm::ESHandle<SiStripGain> gainHandle;
312  iSetup.get<SiStripGainRcd>().get(gainHandle);
313 
314 
315  edm::ESHandle<SiStripQuality> qualityHandle;
316  iSetup.get<SiStripQualityRcd>().get(qualityLabel_,qualityHandle);
317 
319 
320  // get collection of DetSetVector of clusters from Event
322  iEvent.getByLabel(clusterProducer_, cluster_detsetvektor);
323 
324  if (!cluster_detsetvektor.isValid()) return;
325 
326  // initialise # of clusters to zero
327  for (std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.begin();
328  iSubdet != SubDetMEsMap.end(); iSubdet++) {
329  iSubdet->second.totNClusters = 0;
330  }
331 
332  SiStripFolderOrganizer folder_organizer;
333  bool found_layer_me = false;
334  for (std::map<std::string, std::vector< uint32_t > >::const_iterator iterLayer = LayerDetMap.begin();
335  iterLayer != LayerDetMap.end(); iterLayer++) {
336 
337  std::string layer_label = iterLayer->first;
338 
339  int ncluster_layer = 0;
340  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(layer_label);
341 
342  //get Layer MEs
343  LayerMEs layer_single;
344  if(iLayerME != LayerMEsMap.end()) {
345  layer_single = iLayerME->second;
346  found_layer_me = true;
347  }
348 
349  bool found_module_me = false;
350  uint16_t iDet = 0;
351  std::string subdet_label = "";
352  // loop over all modules in the layer
353  for (std::vector< uint32_t >::const_iterator iterDets = iterLayer->second.begin() ;
354  iterDets != iterLayer->second.end() ; iterDets++) {
355  iDet++;
356  // detid and type of ME
357  uint32_t detid = (*iterDets);
358 
359  // Get SubDet label once
360  if (subdet_label.size() == 0) subdet_label = folder_organizer.getSubDetFolderAndTag(detid).second;
361 
362  // DetId and corresponding set of MEs
363  ModMEs mod_single;
364  if (Mod_On_) {
365  std::map<uint32_t, ModMEs >::iterator imodME = ModuleMEsMap.find(detid);
366  if (imodME != ModuleMEsMap.end()) {
367  mod_single = imodME->second;
368  found_module_me = true;
369  }
370  } else found_module_me = false;
371 
372  edmNew::DetSetVector<SiStripCluster>::const_iterator isearch = cluster_detsetvektor->find(detid); // search clusters of detid
373 
374  if(isearch==cluster_detsetvektor->end()){
375  if(found_module_me && moduleswitchncluson && (mod_single.NumberOfClusters)){
376  (mod_single.NumberOfClusters)->Fill(0.); // no clusters for this detector module,fill histogram with 0
377  }
378  if(clustertkhistomapon) tkmapcluster->fill(detid,0.);
379  if (found_layer_me && layerswitchnumclusterprofon) layer_single.LayerNumberOfClusterProfile->Fill(iDet, 0.0);
380  continue; // no clusters for this detid => jump to next step of loop
381  }
382 
383  //cluster_detset is a structure, cluster_detset.data is a std::vector<SiStripCluster>, cluster_detset.id is uint32_t
384  edmNew::DetSet<SiStripCluster> cluster_detset = (*cluster_detsetvektor)[detid]; // the statement above makes sure there exists an element with 'detid'
385 
386  // Filling TkHistoMap with number of clusters for each module
387  if(clustertkhistomapon) {
388  tkmapcluster->fill(detid,static_cast<float>(cluster_detset.size()));
389  }
390 
391  if(moduleswitchncluson && found_module_me && (mod_single.NumberOfClusters != NULL)){ // nr. of clusters per module
392  (mod_single.NumberOfClusters)->Fill(static_cast<float>(cluster_detset.size()));
393  }
394  if (found_layer_me && layerswitchnumclusterprofon)
395  layer_single.LayerNumberOfClusterProfile->Fill(iDet, static_cast<float>(cluster_detset.size()));
396  ncluster_layer += cluster_detset.size();
397 
398  short total_clusterized_strips = 0;
399 
400  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detid);
401  SiStripApvGain::Range detGainRange = gainHandle->getRange(detid);
402  SiStripQuality::Range qualityRange = qualityHandle->getRange(detid);
403 
404  for(edmNew::DetSet<SiStripCluster>::const_iterator clusterIter = cluster_detset.begin(); clusterIter!= cluster_detset.end(); clusterIter++){
405 
406  const std::vector<uint8_t>& ampls = clusterIter->amplitudes();
407  // cluster position
408  float cluster_position = clusterIter->barycenter();
409  // start defined as nr. of first strip beloning to the cluster
410  short cluster_start = clusterIter->firstStrip();
411  // width defined as nr. of strips that belong to cluster
412  short cluster_width = ampls.size();
413  // add nr of strips of this cluster to total nr. of clusterized strips
414  total_clusterized_strips = total_clusterized_strips + cluster_width;
415 
416  // cluster signal and noise from the amplitudes
417  float cluster_signal = 0.0;
418  float cluster_noise = 0.0;
419  int nrnonzeroamplitudes = 0;
420  float noise2 = 0.0;
421  float noise = 0.0;
422  for(uint iamp=0; iamp<ampls.size(); iamp++){
423  if(ampls[iamp]>0){ // nonzero amplitude
424  cluster_signal += ampls[iamp];
425  if(!qualityHandle->IsStripBad(qualityRange, clusterIter->firstStrip()+iamp)){
426  noise = noiseHandle->getNoise(clusterIter->firstStrip()+iamp,detNoiseRange)/gainHandle->getStripGain(clusterIter->firstStrip()+iamp, detGainRange);
427  }
428  noise2 += noise*noise;
429  nrnonzeroamplitudes++;
430  }
431  } // End loop over cluster amplitude
432 
433  if (nrnonzeroamplitudes > 0) cluster_noise = sqrt(noise2/nrnonzeroamplitudes);
434 
435  if( applyClusterQuality_ &&
436  (cluster_signal/cluster_noise < sToNLowerLimit_ ||
437  cluster_signal/cluster_noise > sToNUpperLimit_ ||
438  cluster_width < widthLowerLimit_ ||
439  cluster_width > widthUpperLimit_) ) continue;
440 
441  ClusterProperties cluster_properties;
442  cluster_properties.charge = cluster_signal;
443  cluster_properties.position = cluster_position;
444  cluster_properties.start = cluster_start;
445  cluster_properties.width = cluster_width;
446  cluster_properties.noise = cluster_noise;
447 
448  // Fill Module Level MEs
449  if (found_module_me) fillModuleMEs(mod_single, cluster_properties);
450 
451  // Fill Layer Level MEs
452  if (found_layer_me) {
453  fillLayerMEs(layer_single, cluster_properties, iOrbitSec);
455  layer_single.LayerClusterWidthProfile->Fill(iDet, cluster_width);
456  }
457  } // end loop over clusters
458 
459  short total_nr_strips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128; // get correct # of avp pairs
460  float local_occupancy = static_cast<float>(total_clusterized_strips)/static_cast<float>(total_nr_strips);
461  if (found_module_me) {
462  if(moduleswitchnrclusterizedstrip && mod_single.NrOfClusterizedStrips ){ // nr of clusterized strips
463  mod_single.NrOfClusterizedStrips->Fill(static_cast<float>(total_clusterized_strips));
464  }
465 
466  if(moduleswitchlocaloccupancy && mod_single.ModuleLocalOccupancy ){ // Occupancy
467  mod_single.ModuleLocalOccupancy->Fill(local_occupancy);
468  }
469  }
470  if (layerswitchlocaloccupancy && found_layer_me && layer_single.LayerLocalOccupancy) {
471  fillME(layer_single.LayerLocalOccupancy,local_occupancy);
472  if (createTrendMEs) fillME(layer_single.LayerLocalOccupancyTrend,iOrbitSec,local_occupancy);
473  }
474  }
475  std::map<std::string, SubDetMEs>::iterator iSubdet = SubDetMEsMap.find(subdet_label);
476  if(iSubdet != SubDetMEsMap.end()) iSubdet->second.totNClusters += ncluster_layer;
477  }
478 
479  // EventHistory
480  edm::Handle<EventWithHistory> event_history;
481  iEvent.getByLabel(historyProducer_,event_history);
482 
483  // Phase of APV
484  edm::Handle<APVCyclePhaseCollection> apv_phase_collection;
485  iEvent.getByLabel(apvPhaseProducer_,apv_phase_collection);
486 
487  if (event_history.isValid()
488  && !event_history.failedToGet()
489  && apv_phase_collection.isValid()
490  && !apv_phase_collection.failedToGet()) {
491 
492 
493  long long dbx = event_history->deltaBX();
494  long long tbx = event_history->absoluteBX();
495 
496  bool global_histo_filled = false;
497  for (std::map<std::string, SubDetMEs>::iterator it = SubDetMEsMap.begin();
498  it != SubDetMEsMap.end(); it++) {
499  std::string sdet = it->first;
500  // std::string sdet = sdet_tag.substr(0,sdet_tag.find_first_of("_"));
501  SubDetMEs sdetmes = it->second;
502 
503  int the_phase = APVCyclePhaseCollection::invalid;
504  long long tbx_corr = tbx;
505 
506  if (SubDetPhasePartMap.find(sdet) != SubDetPhasePartMap.end()) the_phase = apv_phase_collection->getPhase(SubDetPhasePartMap[sdet]);
507  if(the_phase==APVCyclePhaseCollection::nopartition ||
509  the_phase==APVCyclePhaseCollection::invalid) the_phase=30;
510  tbx_corr -= the_phase;
511  long long dbxincycle = event_history->deltaBXinCycle(the_phase);
512  if (globalswitchapvcycledbxth2on && !global_histo_filled) {
513  GlobalApvCycleDBxTH2->Fill(tbx_corr%70,dbx);
514  global_histo_filled = true;
515  }
516  if (subdetswitchtotclusth1on) sdetmes.SubDetTotClusterTH1->Fill(sdetmes.totNClusters);
517  if (subdetswitchtotclusprofon) sdetmes.SubDetTotClusterProf->Fill(iOrbitSec,sdetmes.totNClusters);
518  if (subdetswitchapvcycleprofon) sdetmes.SubDetClusterApvProf->Fill(tbx_corr%70,sdetmes.totNClusters);
519  if (subdetswitchapvcycleth2on) sdetmes.SubDetClusterApvTH2->Fill(tbx_corr%70,sdetmes.totNClusters);
520  if (subdetswitchdbxcycleprofon) sdetmes.SubDetClusterDBxCycleProf->Fill(dbxincycle,sdetmes.totNClusters);
521  if (subdetswitchapvcycledbxprof2on) sdetmes.SubDetApvDBxProf2->Fill(tbx_corr%70,dbx,sdetmes.totNClusters);
522  }
523  }
524 }
RunNumber_t run() const
Definition: EventID.h:42
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
#define NULL
Definition: scimark2.h:8
data_type const * const_iterator
Definition: DetSetNew.h:25
std::map< std::string, LayerMEs > LayerMEsMap
std::map< std::string, std::vector< uint32_t > > LayerDetMap
dictionary map
Definition: Association.py:160
void Fill(long long x)
std::map< uint32_t, ModMEs > ModuleMEsMap
bool getStatus(edm::Event const &e, edm::EventSetup const &eSetup)
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * GlobalApvCycleDBxTH2
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid)
T sqrt(T t)
Definition: SSEVec.h:28
void fill(uint32_t &detid, float value)
Definition: TkHistoMap.cc:130
void fillLayerMEs(LayerMEs &, ClusterProperties &cluster, float timeinorbit)
std::pair< ContainerIterator, ContainerIterator > Range
int orbitNumber() const
Definition: EventBase.h:63
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
SiStripDCSStatus * dcsStatus_
bool failedToGet() const
Definition: HandleBase.h:80
void fillME(MonitorElement *ME, float value1)
const T & get() const
Definition: EventSetup.h:55
edm::EventID id() const
Definition: EventBase.h:56
iterator end()
Definition: DetSetNew.h:59
std::map< std::string, SubDetMEs > SubDetMEsMap
std::pair< ContainerIterator, ContainerIterator > Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
size_type size() const
Definition: DetSetNew.h:75
void fillModuleMEs(ModMEs &mod_mes, ClusterProperties &cluster)
iterator begin()
Definition: DetSetNew.h:56
void SiStripMonitorCluster::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 166 of file SiStripMonitorCluster.cc.

References createMEs(), edm::EventSetup::get(), m_cacheID_, ModuleMEsMap, reset_each_run, ResetModuleMEs(), and show_mechanical_structure_view.

166  {
167 
169  unsigned long long cacheID = es.get<SiStripDetCablingRcd>().cacheIdentifier();
170  if (m_cacheID_ != cacheID) {
171  m_cacheID_ = cacheID;
172  edm::LogInfo("SiStripMonitorCluster") <<"SiStripMonitorCluster::beginRun: "
173  << " Creating MEs for new Cabling ";
174 
175  createMEs(es);
176  }
177  } else if (reset_each_run) {
178  edm::LogInfo("SiStripMonitorCluster") <<"SiStripMonitorCluster::beginRun: "
179  << " Resetting MEs ";
180  for (std::map<uint32_t, ModMEs >::const_iterator idet = ModuleMEsMap.begin() ; idet!=ModuleMEsMap.end() ; idet++) {
181  ResetModuleMEs(idet->first);
182  }
183  }
184 }
void ResetModuleMEs(uint32_t idet)
void createMEs(const edm::EventSetup &es)
unsigned long long m_cacheID_
std::map< uint32_t, ModMEs > ModuleMEsMap
const T & get() const
Definition: EventSetup.h:55
MonitorElement * SiStripMonitorCluster::bookME1D ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 910 of file SiStripMonitorCluster.cc.

References DQMStore::book1D(), conf_, dqmStore_, and edm::ParameterSet::getParameter().

Referenced by createLayerMEs(), createModuleMEs(), and createSubDetMEs().

911 {
912  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
914  Parameters.getParameter<int32_t>("Nbinx"),
915  Parameters.getParameter<double>("xmin"),
916  Parameters.getParameter<double>("xmax")
917  );
918 }
T getParameter(std::string const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
std::string HistoName
std::vector< edm::ParameterSet > Parameters
Definition: HLTMuonBPAG.cc:49
MonitorElement * SiStripMonitorCluster::bookMETrend ( const char *  ParameterSetLabel,
const char *  HistoName 
)
private

Definition at line 889 of file SiStripMonitorCluster.cc.

References DQMStore::bookProfile(), conf_, MonitorElement::DQM_KIND_TPROFILE, dqmStore_, edm::ParameterSet::getParameter(), and MonitorElement::setAxisTitle().

Referenced by createLayerMEs().

890 {
891  Parameters = conf_.getParameter<edm::ParameterSet>(ParameterSetLabel);
892  edm::ParameterSet ParametersTrend = conf_.getParameter<edm::ParameterSet>("Trending");
894  ParametersTrend.getParameter<int32_t>("Nbins"),
895  // 0,
896  ParametersTrend.getParameter<double>("xmin"),
897  ParametersTrend.getParameter<double>("xmax"),
898  // ParametersTrend.getParameter<int32_t>("Nbins"),
899  100, //that parameter should not be there !?
900  ParametersTrend.getParameter<double>("ymin"),
901  ParametersTrend.getParameter<double>("ymax"),
902  "" );
903  if(!me) return me;
904  me->setAxisTitle("Event Time in Seconds",1);
905  if (me->kind() == MonitorElement::DQM_KIND_TPROFILE) me->getTH1()->SetBit(TH1::kCanRebin);
906  return me;
907 }
T getParameter(std::string const &) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:833
std::string HistoName
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< edm::ParameterSet > Parameters
Definition: HLTMuonBPAG.cc:49
void SiStripMonitorCluster::createLayerMEs ( std::string  label,
int  ndets 
)
private

Definition at line 656 of file SiStripMonitorCluster.cc.

References bookME1D(), bookMETrend(), DQMStore::bookProfile(), SiStripHistoId::createHistoLayer(), createTrendMEs, dqmStore_, label, SiStripMonitorCluster::LayerMEs::LayerClusterCharge, SiStripMonitorCluster::LayerMEs::LayerClusterChargeTrend, SiStripMonitorCluster::LayerMEs::LayerClusterNoise, SiStripMonitorCluster::LayerMEs::LayerClusterNoiseTrend, SiStripMonitorCluster::LayerMEs::LayerClusterStoN, SiStripMonitorCluster::LayerMEs::LayerClusterStoNTrend, SiStripMonitorCluster::LayerMEs::LayerClusterWidth, SiStripMonitorCluster::LayerMEs::LayerClusterWidthProfile, SiStripMonitorCluster::LayerMEs::LayerClusterWidthTrend, SiStripMonitorCluster::LayerMEs::LayerLocalOccupancy, SiStripMonitorCluster::LayerMEs::LayerLocalOccupancyTrend, LayerMEsMap, SiStripMonitorCluster::LayerMEs::LayerNumberOfClusterProfile, layerswitchcluschargeon, layerswitchclusnoiseon, layerswitchclusstonon, layerswitchclusterwidthprofon, layerswitchcluswidthon, layerswitchlocaloccupancy, and layerswitchnumclusterprofon.

Referenced by createMEs().

656  {
657 
658  SiStripHistoId hidmanager;
659 
660  LayerMEs layerMEs;
661  layerMEs.LayerClusterStoN = 0;
662  layerMEs.LayerClusterStoNTrend = 0;
663  layerMEs.LayerClusterCharge = 0;
664  layerMEs.LayerClusterChargeTrend = 0;
665  layerMEs.LayerClusterNoise = 0;
666  layerMEs.LayerClusterNoiseTrend = 0;
667  layerMEs.LayerClusterWidth = 0;
668  layerMEs.LayerClusterWidthTrend = 0;
669  layerMEs.LayerLocalOccupancy = 0;
670  layerMEs.LayerLocalOccupancyTrend = 0;
671  layerMEs.LayerNumberOfClusterProfile = 0;
672  layerMEs.LayerClusterWidthProfile = 0;
673 
674  //Cluster Width
676  layerMEs.LayerClusterWidth=bookME1D("TH1ClusterWidth", hidmanager.createHistoLayer("Summary_ClusterWidth","layer",label,"").c_str());
677  if (createTrendMEs) layerMEs.LayerClusterWidthTrend=bookMETrend("TH1ClusterWidth", hidmanager.createHistoLayer("Trend_ClusterWidth","layer",label,"").c_str());
678  }
679 
680  //Cluster Noise
682  layerMEs.LayerClusterNoise=bookME1D("TH1ClusterNoise", hidmanager.createHistoLayer("Summary_ClusterNoise","layer",label,"").c_str());
683  if (createTrendMEs) layerMEs.LayerClusterNoiseTrend=bookMETrend("TH1ClusterNoise", hidmanager.createHistoLayer("Trend_ClusterNoise","layer",label,"").c_str());
684  }
685 
686  //Cluster Charge
688  layerMEs.LayerClusterCharge=bookME1D("TH1ClusterCharge", hidmanager.createHistoLayer("Summary_ClusterCharge","layer",label,"").c_str());
689  if (createTrendMEs) layerMEs.LayerClusterChargeTrend=bookMETrend("TH1ClusterCharge", hidmanager.createHistoLayer("Trend_ClusterCharge","layer",label,"").c_str());
690  }
691 
692  //Cluster StoN
694  layerMEs.LayerClusterStoN=bookME1D("TH1ClusterStoN", hidmanager.createHistoLayer("Summary_ClusterSignalOverNoise","layer",label,"").c_str());
695  if (createTrendMEs) layerMEs.LayerClusterStoNTrend=bookMETrend("TH1ClusterStoN", hidmanager.createHistoLayer("Trend_ClusterSignalOverNoise","layer",label,"").c_str());
696  }
697 
698  //Cluster Occupancy
700  layerMEs.LayerLocalOccupancy=bookME1D("TH1ModuleLocalOccupancy", hidmanager.createHistoLayer("Summary_ClusterLocalOccupancy","layer",label,"").c_str());
701  if (createTrendMEs) layerMEs.LayerLocalOccupancyTrend=bookMETrend("TH1ModuleLocalOccupancy", hidmanager.createHistoLayer("Trend_ClusterLocalOccupancy","layer",label,"").c_str());
702 
703  }
704 
705  // # of Cluster Profile
707  std::string hid = hidmanager.createHistoLayer("NumberOfClusterProfile","layer",label,"");
708  layerMEs.LayerNumberOfClusterProfile = dqmStore_->bookProfile(hid, hid, ndets, 0.5, ndets+0.5,21, -0.5, 20.5);
709  }
710 
711  // Cluster Width Profile
713  std::string hid = hidmanager.createHistoLayer("ClusterWidthProfile","layer",label,"");
714  layerMEs.LayerClusterWidthProfile = dqmStore_->bookProfile(hid, hid, ndets, 0.5, ndets+0.5, 20, -0.5, 19.5);
715  }
716 
717  LayerMEsMap[label]=layerMEs;
718 }
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName)
const std::string & label
Definition: MVAComputer.cc:186
std::map< std::string, LayerMEs > LayerMEsMap
MonitorElement * bookMETrend(const char *, const char *)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:833
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void SiStripMonitorCluster::createMEs ( const edm::EventSetup es)
private

Definition at line 187 of file SiStripMonitorCluster.cc.

References abs, DQMStore::book2D(), SiStripMonitorCluster::ModMEs::ClusterCharge, SiStripMonitorCluster::ModMEs::ClusterDigiPosition, SiStripMonitorCluster::ModMEs::ClusterNoise, SiStripMonitorCluster::ModMEs::ClusterPosition, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoise, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoiseVsPos, clustertkhistomapon, SiStripMonitorCluster::ModMEs::ClusterWidth, conf_, createLayerMEs(), createModuleMEs(), createSubDetMEs(), cond::rpcobgas::detid, dqmStore_, edm::EventSetup::get(), edm::ParameterSet::getParameter(), SiStripFolderOrganizer::GetSubDetAndLayer(), SiStripFolderOrganizer::getSubDetFolderAndTag(), SiStripHistoId::getSubdetid(), SiStripSubStructure::getTECDetectors(), SiStripSubStructure::getTIBDetectors(), SiStripSubStructure::getTIDDetectors(), SiStripSubStructure::getTOBDetectors(), GlobalApvCycleDBxTH2, globalswitchapvcycledbxth2on, label, LayerDetMap, LayerMEsMap, Mod_On_, SiStripMonitorCluster::ModMEs::ModuleLocalOccupancy, ModuleMEsMap, SiStripMonitorCluster::ModMEs::NrOfClusterizedStrips, SiStripMonitorCluster::ModMEs::NumberOfClusters, reset_each_run, ResetModuleMEs(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), SiStripFolderOrganizer::setDetectorFolder(), SiStripFolderOrganizer::setLayerFolder(), SiStripFolderOrganizer::setSiStripFolder(), SiStripFolderOrganizer::setSiStripFolderName(), show_mechanical_structure_view, SiStripDetCabling_, SubDetMEsMap, tkmapcluster, and topFolderName_.

Referenced by beginRun().

187  {
188 
190  // take from eventSetup the SiStripDetCabling object - here will use SiStripDetControl later on
192 
193  // get list of active detectors from SiStripDetCabling
194  std::vector<uint32_t> activeDets;
195  SiStripDetCabling_->addActiveDetectorsRawIds(activeDets);
196 
197  SiStripSubStructure substructure;
198 
199  SiStripFolderOrganizer folder_organizer;
200  folder_organizer.setSiStripFolderName(topFolderName_);
201  folder_organizer.setSiStripFolder();
202 
203 
204  // Create TkHistoMap for Cluster
205  if (clustertkhistomapon) {
206  if (topFolderName_ == "SiStrip") tkmapcluster = new TkHistoMap("SiStrip/TkHistoMap","TkHMap_NumberOfCluster",0.,1);
207  else tkmapcluster = new TkHistoMap(topFolderName_+"/TkHistoMap","TkHMap_NumberOfCluster",0.,0);
208  }
209 
210  // loop over detectors and book MEs
211  edm::LogInfo("SiStripTkDQM|SiStripMonitorCluster")<<"nr. of activeDets: "<<activeDets.size();
212  for(std::vector<uint32_t>::iterator detid_iterator = activeDets.begin(); detid_iterator!=activeDets.end(); detid_iterator++){
213  uint32_t detid = (*detid_iterator);
214  // remove any eventual zero elements - there should be none, but just in case
215  if(detid == 0) {
216  activeDets.erase(detid_iterator);
217  continue;
218  }
219 
220  if (Mod_On_) {
221  ModMEs mod_single;
222  mod_single.NumberOfClusters = 0;
223  mod_single.ClusterPosition = 0;
224  mod_single.ClusterDigiPosition = 0;
225  mod_single.ClusterWidth = 0;
226  mod_single.ClusterCharge = 0;
227  mod_single.ClusterNoise = 0;
228  mod_single.ClusterSignalOverNoise = 0;
229  mod_single.ClusterSignalOverNoiseVsPos = 0;
230  mod_single.ModuleLocalOccupancy = 0;
231  mod_single.NrOfClusterizedStrips = 0;
232 
233  // set appropriate folder using SiStripFolderOrganizer
234  folder_organizer.setDetectorFolder(detid); // pass the detid to this method
235  if (reset_each_run) ResetModuleMEs(detid);
236  createModuleMEs(mod_single, detid);
237  // append to ModuleMEsMap
238  ModuleMEsMap.insert( std::make_pair(detid, mod_single));
239  }
240 
241  // Create Layer Level MEs if they are not created already
242  std::pair<std::string,int32_t> det_layer_pair = folder_organizer.GetSubDetAndLayer(detid);
243  SiStripHistoId hidmanager;
244  std::string label = hidmanager.getSubdetid(detid,false);
245 
246  std::map<std::string, LayerMEs>::iterator iLayerME = LayerMEsMap.find(label);
247  if(iLayerME==LayerMEsMap.end()) {
248 
249  // get detids for the layer
250  int32_t lnumber = det_layer_pair.second;
251  std::vector<uint32_t> layerDetIds;
252  if (det_layer_pair.first == "TIB") {
253  substructure.getTIBDetectors(activeDets,layerDetIds,lnumber,0,0,0);
254  } else if (det_layer_pair.first == "TOB") {
255  substructure.getTOBDetectors(activeDets,layerDetIds,lnumber,0,0);
256  } else if (det_layer_pair.first == "TID" && lnumber > 0) {
257  substructure.getTIDDetectors(activeDets,layerDetIds,2,abs(lnumber),0,0);
258  } else if (det_layer_pair.first == "TID" && lnumber < 0) {
259  substructure.getTIDDetectors(activeDets,layerDetIds,1,abs(lnumber),0,0);
260  } else if (det_layer_pair.first == "TEC" && lnumber > 0) {
261  substructure.getTECDetectors(activeDets,layerDetIds,2,abs(lnumber),0,0,0,0);
262  } else if (det_layer_pair.first == "TEC" && lnumber < 0) {
263  substructure.getTECDetectors(activeDets,layerDetIds,1,abs(lnumber),0,0,0,0);
264  }
265  LayerDetMap[label] = layerDetIds;
266 
267  // book Layer MEs
268  folder_organizer.setLayerFolder(detid,det_layer_pair.second);
269  createLayerMEs(label, layerDetIds.size());
270  }
271  // book sub-detector plots
272  std::pair<std::string,std::string> sdet_pair = folder_organizer.getSubDetFolderAndTag(detid);
273  if (SubDetMEsMap.find(sdet_pair.second) == SubDetMEsMap.end()){
274  dqmStore_->setCurrentFolder(sdet_pair.first);
275  createSubDetMEs(sdet_pair.second);
276  }
277  }//end of loop over detectors
278 
279  // Create Global Histogram
281  dqmStore_->setCurrentFolder(topFolderName_+"/MechanicalView/");
282  edm::ParameterSet GlobalTH2Parameters = conf_.getParameter<edm::ParameterSet>("TH2ApvCycleVsDBxGlobal");
283  std::string HistoName = "DeltaBx_vs_ApvCycle";
284  GlobalApvCycleDBxTH2 = dqmStore_->book2D(HistoName,HistoName,
285  GlobalTH2Parameters.getParameter<int32_t>("Nbinsx"),
286  GlobalTH2Parameters.getParameter<double>("xmin"),
287  GlobalTH2Parameters.getParameter<double>("xmax"),
288  GlobalTH2Parameters.getParameter<int32_t>("Nbinsy"),
289  GlobalTH2Parameters.getParameter<double>("ymin"),
290  GlobalTH2Parameters.getParameter<double>("ymax"));
291  GlobalApvCycleDBxTH2->setAxisTitle("APV Cycle (Corrected Absolute Bx % 70)",1);
292  GlobalApvCycleDBxTH2->setAxisTitle("Delta Bunch Crossing Cycle",2);
293  }
294  }//end of if
295 }//end of method
void ResetModuleMEs(uint32_t idet)
T getParameter(std::string const &) const
void setSiStripFolderName(std::string name)
const std::string & label
Definition: MVAComputer.cc:186
#define abs(x)
Definition: mlp_lapack.h:159
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
std::map< std::string, LayerMEs > LayerMEsMap
std::map< std::string, std::vector< uint32_t > > LayerDetMap
std::map< uint32_t, ModMEs > ModuleMEsMap
void createSubDetMEs(std::string label)
std::string getSubdetid(uint32_t id, bool flag_ring)
MonitorElement * GlobalApvCycleDBxTH2
std::pair< std::string, std::string > getSubDetFolderAndTag(const uint32_t &detid)
void getTOBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tobDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t rod=0) const
void createModuleMEs(ModMEs &mod_single, uint32_t detid)
void setDetectorFolder(uint32_t rawdetid=0)
const T & get() const
Definition: EventSetup.h:55
std::string HistoName
void getTECDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tecDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t petal_bkw_frw=0, uint32_t petal=0, uint32_t ring=0, uint32_t ster=0) const
void createLayerMEs(std::string label, int ndets)
std::map< std::string, SubDetMEs > SubDetMEsMap
void getTIBDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tibDetRawIds, uint32_t layer=0, uint32_t bkw_frw=0, uint32_t int_ext=0, uint32_t string=0) const
std::pair< std::string, int32_t > GetSubDetAndLayer(const uint32_t &detid, bool ring_flag=0)
void getTIDDetectors(const std::vector< uint32_t > &inputDetRawIds, std::vector< uint32_t > &tidDetRawIds, uint32_t side=0, uint32_t wheel=0, uint32_t ring=0, uint32_t ster=0) const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
void setLayerFolder(uint32_t rawdetid=0, int32_t layer=0, bool ring_flag=0)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void SiStripMonitorCluster::createModuleMEs ( ModMEs mod_single,
uint32_t  detid 
)
private

Definition at line 556 of file SiStripMonitorCluster.cc.

References DQMStore::book1D(), bookME1D(), DQMStore::bookProfile(), SiStripMonitorCluster::ModMEs::ClusterCharge, SiStripMonitorCluster::ModMEs::ClusterDigiPosition, SiStripMonitorCluster::ModMEs::ClusterNoise, SiStripMonitorCluster::ModMEs::ClusterPosition, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoise, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoiseVsPos, SiStripMonitorCluster::ModMEs::ClusterWidth, conf_, SiStripHistoId::createHistoId(), dqmStore_, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), SiStripMonitorCluster::ModMEs::ModuleLocalOccupancy, moduleswitchcluschargeon, moduleswitchclusdigiposon, moduleswitchclusnoiseon, moduleswitchclusposon, moduleswitchclusstonon, moduleswitchclusstonVsposon, moduleswitchcluswidthon, moduleswitchlocaloccupancy, moduleswitchncluson, moduleswitchnrclusterizedstrip, SiStripMonitorCluster::ModMEs::NrOfClusterizedStrips, SiStripMonitorCluster::ModMEs::NumberOfClusters, MonitorElement::setAxisTitle(), SiStripDetCabling_, and DQMStore::tag().

Referenced by createMEs().

556  {
557 
558  // use SistripHistoId for producing histogram id (and title)
559  SiStripHistoId hidmanager;
560  std::string hid;
561 
562  //nr. of clusters per module
563  if(moduleswitchncluson) {
564  hid = hidmanager.createHistoId("NumberOfClusters","det",detid);
565  mod_single.NumberOfClusters = bookME1D("TH1nClusters", hid.c_str());
566  dqmStore_->tag(mod_single.NumberOfClusters, detid);
567  mod_single.NumberOfClusters->setAxisTitle("number of clusters in one detector module");
568  mod_single.NumberOfClusters->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
569  }
570 
571  //ClusterPosition
573  short total_nr_strips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128; // get correct # of avp pairs
574  hid = hidmanager.createHistoId("ClusterPosition","det",detid);
575  mod_single.ClusterPosition = dqmStore_->book1D(hid, hid, total_nr_strips, 0.5, total_nr_strips+0.5);
576  dqmStore_->tag(mod_single.ClusterPosition, detid);
577  mod_single.ClusterPosition->setAxisTitle("cluster position [strip number +0.5]");
578  }
579 
580  //ClusterDigiPosition
582  short total_nr_strips = SiStripDetCabling_->nApvPairs(detid) * 2 * 128; // get correct # of avp pairs
583  hid = hidmanager.createHistoId("ClusterDigiPosition","det",detid);
584  mod_single.ClusterDigiPosition = dqmStore_->book1D(hid, hid, total_nr_strips, 0.5, total_nr_strips+0.5);
585  dqmStore_->tag(mod_single.ClusterDigiPosition, detid);
586  mod_single.ClusterDigiPosition->setAxisTitle("digi in cluster position [strip number +0.5]");
587  }
588 
589  //ClusterWidth
591  hid = hidmanager.createHistoId("ClusterWidth","det",detid);
592  mod_single.ClusterWidth = bookME1D("TH1ClusterWidth", hid.c_str());
593  dqmStore_->tag(mod_single.ClusterWidth, detid);
594  mod_single.ClusterWidth->setAxisTitle("cluster width [nr strips]");
595  }
596 
597  //ClusterCharge
599  hid = hidmanager.createHistoId("ClusterCharge","det",detid);
600  mod_single.ClusterCharge = bookME1D("TH1ClusterCharge", hid.c_str());
601  dqmStore_->tag(mod_single.ClusterCharge, detid);
602  mod_single.ClusterCharge->setAxisTitle("cluster charge [ADC]");
603  }
604 
605  //ClusterNoise
607  hid = hidmanager.createHistoId("ClusterNoise","det",detid);
608  mod_single.ClusterNoise = bookME1D("TH1ClusterNoise", hid.c_str());
609  dqmStore_->tag(mod_single.ClusterNoise, detid);
610  mod_single.ClusterNoise->setAxisTitle("cluster noise");
611  }
612 
613  //ClusterSignalOverNoise
615  hid = hidmanager.createHistoId("ClusterSignalOverNoise","det",detid);
616  mod_single.ClusterSignalOverNoise = bookME1D("TH1ClusterStoN", hid.c_str());
617  dqmStore_->tag(mod_single.ClusterSignalOverNoise, detid);
618  mod_single.ClusterSignalOverNoise->setAxisTitle("ratio of signal to noise for each cluster");
619  }
620 
621  //ClusterSignalOverNoiseVsPos
623  hid = hidmanager.createHistoId("ClusterSignalOverNoiseVsPos","det",detid);
624  Parameters = conf_.getParameter<edm::ParameterSet>("TH1ClusterStoNVsPos");
625  mod_single.ClusterSignalOverNoiseVsPos= dqmStore_->bookProfile(hid.c_str(),hid.c_str(),
626  Parameters.getParameter<int32_t>("Nbinx"),
627  Parameters.getParameter<double>("xmin"),
628  Parameters.getParameter<double>("xmax"),
629  Parameters.getParameter<int32_t>("Nbiny"),
630  Parameters.getParameter<double>("ymin"),
631  Parameters.getParameter<double>("ymax")
632  );
633  dqmStore_->tag(mod_single.ClusterSignalOverNoiseVsPos, detid);
634  mod_single.ClusterSignalOverNoiseVsPos->setAxisTitle("pos");
635  }
636 
637  //ModuleLocalOccupancy
639  hid = hidmanager.createHistoId("ClusterLocalOccupancy","det",detid);
640  mod_single.ModuleLocalOccupancy = bookME1D("TH1ModuleLocalOccupancy", hid.c_str());
641  dqmStore_->tag(mod_single.ModuleLocalOccupancy, detid);
642  mod_single.ModuleLocalOccupancy->setAxisTitle("module local occupancy [% of clusterized strips]");
643  }
644 
645  //NrOfClusterizedStrips
647  hid = hidmanager.createHistoId("NrOfClusterizedStrips","det",detid);
648  mod_single.NrOfClusterizedStrips = bookME1D("TH1NrOfClusterizedStrips", hid.c_str());
649  dqmStore_->tag(mod_single.NrOfClusterizedStrips, detid);
650  mod_single.NrOfClusterizedStrips->setAxisTitle("number of clusterized strips");
651  }
652 }
T getParameter(std::string const &) const
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1156
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:833
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id)
std::vector< edm::ParameterSet > Parameters
Definition: HLTMuonBPAG.cc:49
void SiStripMonitorCluster::createSubDetMEs ( std::string  label)
private

Definition at line 722 of file SiStripMonitorCluster.cc.

References DQMStore::book2D(), bookME1D(), DQMStore::bookProfile(), DQMStore::bookProfile2D(), conf_, MonitorElement::DQM_KIND_TPROFILE, dqmStore_, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), MonitorElement::kind(), label, MonitorElement::setAxisTitle(), SiStripMonitorCluster::SubDetMEs::SubDetApvDBxProf2, SiStripMonitorCluster::SubDetMEs::SubDetClusterApvProf, SiStripMonitorCluster::SubDetMEs::SubDetClusterApvTH2, SiStripMonitorCluster::SubDetMEs::SubDetClusterDBxCycleProf, SubDetMEsMap, subdetswitchapvcycledbxprof2on, subdetswitchapvcycleprofon, subdetswitchapvcycleth2on, subdetswitchdbxcycleprofon, subdetswitchtotclusprofon, subdetswitchtotclusth1on, SiStripMonitorCluster::SubDetMEs::SubDetTotClusterProf, SiStripMonitorCluster::SubDetMEs::SubDetTotClusterTH1, and SiStripMonitorCluster::SubDetMEs::totNClusters.

Referenced by createMEs().

722  {
723 
724  SubDetMEs subdetMEs;
725  subdetMEs.totNClusters = 0;
726  subdetMEs.SubDetTotClusterTH1 = 0;
727  subdetMEs.SubDetTotClusterProf = 0;
728  subdetMEs.SubDetClusterApvProf = 0;
729  subdetMEs.SubDetClusterApvTH2 = 0;
730  subdetMEs.SubDetClusterDBxCycleProf = 0;
731  subdetMEs.SubDetApvDBxProf2 = 0;
732 
733  std::string HistoName;
734  // Total Number of Cluster - 1D
736  HistoName = "TotalNumberOfCluster__" + label;
737  subdetMEs.SubDetTotClusterTH1 = bookME1D("TH1TotalNumberOfClusters",HistoName.c_str());
738  subdetMEs.SubDetTotClusterTH1->setAxisTitle("Total number of clusters in subdetector");
739  subdetMEs.SubDetTotClusterTH1->getTH1()->StatOverflows(kTRUE); // over/underflows in Mean calculation
740  }
741  // Total Number of Cluster vs Time - Profile
743  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfTotalNumberOfClusters");
744  HistoName = "TotalNumberOfClusterProfile__" + label;
745  subdetMEs.SubDetTotClusterProf = dqmStore_->bookProfile(HistoName,HistoName,
746  Parameters.getParameter<int32_t>("Nbins"),
747  Parameters.getParameter<double>("xmin"),
748  Parameters.getParameter<double>("xmax"),
749  100, //that parameter should not be there !?
750  Parameters.getParameter<double>("ymin"),
751  Parameters.getParameter<double>("ymax"),
752  "" );
753  subdetMEs.SubDetTotClusterProf->setAxisTitle("Event Time (Seconds)",1);
754  if (subdetMEs.SubDetTotClusterProf->kind() == MonitorElement::DQM_KIND_TPROFILE) subdetMEs.SubDetTotClusterProf->getTH1()->SetBit(TH1::kCanRebin);
755  }
756  // Total Number of Cluster vs APV cycle - Profile
758  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfClustersApvCycle");
759  HistoName = "Cluster_vs_ApvCycle__" + label;
760  subdetMEs.SubDetClusterApvProf=dqmStore_->bookProfile(HistoName,HistoName,
761  Parameters.getParameter<int32_t>("Nbins"),
762  Parameters.getParameter<double>("xmin"),
763  Parameters.getParameter<double>("xmax"),
764  200, //that parameter should not be there !?
765  Parameters.getParameter<double>("ymin"),
766  Parameters.getParameter<double>("ymax"),
767  "" );
768  subdetMEs.SubDetClusterApvProf->setAxisTitle("Apv Cycle (Corrected Absolute Bx % 70)",1);
769  }
770 
771  // Total Number of Clusters vs ApvCycle - 2D
773  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TH2ClustersApvCycle");
774  HistoName = "Cluster_vs_ApvCycle_2D__" + label;
775  // Adjusting the scale for 2D histogram
776  double h2ymax = 9999.0;
777  double yfact = Parameters.getParameter<double>("yfactor");
778  if(label.find("TIB") != std::string::npos) h2ymax = (6984.*256.)*yfact;
779  else if (label.find("TID") != std::string::npos) h2ymax = (2208.*256.)*yfact;
780  else if (label.find("TOB") != std::string::npos) h2ymax = (12906.*256.)*yfact;
781  else if (label.find("TEC") != std::string::npos) h2ymax = (7552.*2.*256.)*yfact;
782 
783  subdetMEs.SubDetClusterApvTH2=dqmStore_->book2D(HistoName,HistoName,
784  Parameters.getParameter<int32_t>("Nbinsx"),
785  Parameters.getParameter<double>("xmin"),
786  Parameters.getParameter<double>("xmax"),
787  Parameters.getParameter<int32_t>("Nbinsy"),
788  Parameters.getParameter<double>("ymin"),
789  h2ymax);
790  subdetMEs.SubDetClusterApvTH2->setAxisTitle("Apv Cycle (Corrected Absolute Bx % 70))",1);
791  subdetMEs.SubDetClusterApvTH2->setAxisTitle("Total # of Clusters",2);
792 
793  }
794  // Total Number of Cluster vs DeltaBxCycle - Profile
796  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProfClustersVsDBxCycle");
797  HistoName = "Cluster_vs_DeltaBxCycle__" + label;
798  subdetMEs.SubDetClusterDBxCycleProf = dqmStore_->bookProfile(HistoName,HistoName,
799  Parameters.getParameter<int32_t>("Nbins"),
800  Parameters.getParameter<double>("xmin"),
801  Parameters.getParameter<double>("xmax"),
802  200, //that parameter should not be there !?
803  Parameters.getParameter<double>("ymin"),
804  Parameters.getParameter<double>("ymax"),
805  "" );
806  subdetMEs.SubDetClusterDBxCycleProf->setAxisTitle("Delta Bunch Crossing Cycle",1);
807  }
808  // DeltaBx vs ApvCycle - 2DProfile
810  edm::ParameterSet Parameters = conf_.getParameter<edm::ParameterSet>("TProf2ApvCycleVsDBx");
811  HistoName = "DeltaBx_vs_ApvCycle__" + label;
812  subdetMEs.SubDetApvDBxProf2 = dqmStore_->bookProfile2D(HistoName,HistoName,
813  Parameters.getParameter<int32_t>("Nbinsx"),
814  Parameters.getParameter<double>("xmin"),
815  Parameters.getParameter<double>("xmax"),
816  Parameters.getParameter<int32_t>("Nbinsy"),
817  Parameters.getParameter<double>("ymin"),
818  Parameters.getParameter<double>("ymax"),
819  Parameters.getParameter<double>("zmin"),
820  Parameters.getParameter<double>("zmax"),
821  "" );
822  subdetMEs.SubDetApvDBxProf2->setAxisTitle("APV Cycle (Corrected Absolute Bx % 70)",1);
823  subdetMEs.SubDetApvDBxProf2->setAxisTitle("Delta Bunch Crossing Cycle",2);
824  }
825  SubDetMEsMap[label]=subdetMEs;
826 }
T getParameter(std::string const &) const
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName)
const std::string & label
Definition: MVAComputer.cc:186
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:833
std::string HistoName
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< edm::ParameterSet > Parameters
Definition: HLTMuonBPAG.cc:49
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:977
void SiStripMonitorCluster::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 528 of file SiStripMonitorCluster.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), ExpressReco_HICollisions_FallBack::outputFileName, and DQMStore::save().

528  {
529  bool outputMEsInRootFile = conf_.getParameter<bool>("OutputMEsInRootFile");
530  std::string outputFileName = conf_.getParameter<std::string>("OutputFileName");
531 
532  // save histos in a file
533  if(outputMEsInRootFile) dqmStore_->save(outputFileName);
534 }
T getParameter(std::string const &) const
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1883
void SiStripMonitorCluster::fillLayerMEs ( LayerMEs layerMEs,
ClusterProperties cluster,
float  timeinorbit 
)
private

Definition at line 866 of file SiStripMonitorCluster.cc.

References SiStripMonitorCluster::ClusterProperties::charge, createTrendMEs, fillME(), SiStripMonitorCluster::LayerMEs::LayerClusterCharge, SiStripMonitorCluster::LayerMEs::LayerClusterChargeTrend, SiStripMonitorCluster::LayerMEs::LayerClusterNoise, SiStripMonitorCluster::LayerMEs::LayerClusterNoiseTrend, SiStripMonitorCluster::LayerMEs::LayerClusterStoN, SiStripMonitorCluster::LayerMEs::LayerClusterStoNTrend, SiStripMonitorCluster::LayerMEs::LayerClusterWidth, SiStripMonitorCluster::LayerMEs::LayerClusterWidthTrend, layerswitchcluschargeon, layerswitchclusnoiseon, layerswitchclusstonon, layerswitchcluswidthon, SiStripMonitorCluster::ClusterProperties::noise, and SiStripMonitorCluster::ClusterProperties::width.

Referenced by analyze().

866  {
868  fillME(layerMEs.LayerClusterStoN ,cluster.charge/cluster.noise);
869  if (createTrendMEs) fillME(layerMEs.LayerClusterStoNTrend,timeinorbit,cluster.charge/cluster.noise);
870  }
871 
873  fillME(layerMEs.LayerClusterCharge,cluster.charge);
874  if (createTrendMEs) fillME(layerMEs.LayerClusterChargeTrend,timeinorbit,cluster.charge);
875  }
876 
878  fillME(layerMEs.LayerClusterNoise ,cluster.noise);
879  if (createTrendMEs) fillME(layerMEs.LayerClusterNoiseTrend,timeinorbit,cluster.noise);
880  }
881 
883  fillME(layerMEs.LayerClusterWidth ,cluster.width);
884  if (createTrendMEs) fillME(layerMEs.LayerClusterWidthTrend,timeinorbit,cluster.width);
885  }
886 
887 }
void fillME(MonitorElement *ME, float value1)
void SiStripMonitorCluster::fillME ( MonitorElement ME,
float  value1 
)
inlineprivate

Definition at line 100 of file SiStripMonitorCluster.h.

References MonitorElement::Fill().

Referenced by analyze(), and fillLayerMEs().

100 {if (ME!=0)ME->Fill(value1);}
void Fill(long long x)
void SiStripMonitorCluster::fillME ( MonitorElement ME,
float  value1,
float  value2 
)
inlineprivate

Definition at line 101 of file SiStripMonitorCluster.h.

References MonitorElement::Fill().

101 {if (ME!=0)ME->Fill(value1,value2);}
void Fill(long long x)
void SiStripMonitorCluster::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3 
)
inlineprivate

Definition at line 102 of file SiStripMonitorCluster.h.

References MonitorElement::Fill().

102 {if (ME!=0)ME->Fill(value1,value2,value3);}
void Fill(long long x)
void SiStripMonitorCluster::fillME ( MonitorElement ME,
float  value1,
float  value2,
float  value3,
float  value4 
)
inlineprivate

Definition at line 103 of file SiStripMonitorCluster.h.

References MonitorElement::Fill().

103 {if (ME!=0)ME->Fill(value1,value2,value3,value4);}
void Fill(long long x)
void SiStripMonitorCluster::fillModuleMEs ( ModMEs mod_mes,
ClusterProperties cluster 
)
private

Definition at line 831 of file SiStripMonitorCluster.cc.

References SiStripMonitorCluster::ClusterProperties::charge, SiStripMonitorCluster::ModMEs::ClusterCharge, SiStripMonitorCluster::ModMEs::ClusterDigiPosition, SiStripMonitorCluster::ModMEs::ClusterNoise, SiStripMonitorCluster::ModMEs::ClusterPosition, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoise, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoiseVsPos, SiStripMonitorCluster::ModMEs::ClusterWidth, moduleswitchcluschargeon, moduleswitchclusdigiposon, moduleswitchclusnoiseon, moduleswitchclusposon, moduleswitchclusstonon, moduleswitchclusstonVsposon, moduleswitchcluswidthon, SiStripMonitorCluster::ClusterProperties::noise, SiStripMonitorCluster::ClusterProperties::position, SiStripMonitorCluster::ClusterProperties::start, and SiStripMonitorCluster::ClusterProperties::width.

Referenced by analyze().

831  {
832 
833  if(moduleswitchclusposon && (mod_mes.ClusterPosition)) // position of cluster
834  (mod_mes.ClusterPosition)->Fill(cluster.position);
835 
836  // position of digis in cluster
837  if(moduleswitchclusdigiposon && (mod_mes.ClusterDigiPosition)) {
838  for(int ipos=cluster.start+1; ipos<=cluster.start+cluster.width; ipos++){
839  (mod_mes.ClusterDigiPosition)->Fill(ipos);
840  }
841  }
842 
843  if(moduleswitchcluswidthon && (mod_mes.ClusterWidth)) // width of cluster
844  (mod_mes.ClusterWidth)->Fill(static_cast<float>(cluster.width));
845 
846  if(moduleswitchclusstonon && (mod_mes.ClusterSignalOverNoise)) {// SignalToNoise
847  if (cluster.noise > 0)
848  (mod_mes.ClusterSignalOverNoise)->Fill(cluster.charge/cluster.noise);
849  }
850 
851  if(moduleswitchclusstonVsposon && (mod_mes.ClusterSignalOverNoiseVsPos)) {// SignalToNoise
852  if (cluster.noise > 0)
853  (mod_mes.ClusterSignalOverNoiseVsPos)->Fill(cluster.position,cluster.charge/cluster.noise);
854  }
855 
856  if(moduleswitchclusnoiseon && (mod_mes.ClusterNoise)) // Noise
857  (mod_mes.ClusterNoise)->Fill(cluster.noise);
858 
859  if(moduleswitchcluschargeon && (mod_mes.ClusterCharge)) // charge of cluster
860  (mod_mes.ClusterCharge)->Fill(cluster.charge);
861 
862 }
void SiStripMonitorCluster::ResetModuleMEs ( uint32_t  idet)
private

Definition at line 538 of file SiStripMonitorCluster.cc.

References SiStripMonitorCluster::ModMEs::ClusterCharge, SiStripMonitorCluster::ModMEs::ClusterDigiPosition, SiStripMonitorCluster::ModMEs::ClusterNoise, SiStripMonitorCluster::ModMEs::ClusterPosition, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoise, SiStripMonitorCluster::ModMEs::ClusterSignalOverNoiseVsPos, SiStripMonitorCluster::ModMEs::ClusterWidth, SiStripMonitorCluster::ModMEs::ModuleLocalOccupancy, ModuleMEsMap, moduleswitchcluschargeon, moduleswitchclusdigiposon, moduleswitchclusnoiseon, moduleswitchclusposon, moduleswitchclusstonon, moduleswitchclusstonVsposon, moduleswitchcluswidthon, moduleswitchlocaloccupancy, moduleswitchncluson, moduleswitchnrclusterizedstrip, SiStripMonitorCluster::ModMEs::NrOfClusterizedStrips, SiStripMonitorCluster::ModMEs::NumberOfClusters, pos, and MonitorElement::Reset().

Referenced by beginRun(), and createMEs().

538  {
539  std::map<uint32_t, ModMEs >::iterator pos = ModuleMEsMap.find(idet);
540  ModMEs mod_me = pos->second;
541 
542  if (moduleswitchncluson) mod_me.NumberOfClusters->Reset();
543  if (moduleswitchclusposon) mod_me.ClusterPosition->Reset();
544  if (moduleswitchclusdigiposon) mod_me.ClusterDigiPosition->Reset();
545  if (moduleswitchclusstonVsposon) mod_me.ClusterSignalOverNoiseVsPos->Reset();
546  if (moduleswitchcluswidthon) mod_me.ClusterWidth->Reset();
547  if (moduleswitchcluschargeon) mod_me.ClusterCharge->Reset();
548  if (moduleswitchclusnoiseon) mod_me.ClusterNoise->Reset();
549  if (moduleswitchclusstonon) mod_me.ClusterSignalOverNoise->Reset();
550  if (moduleswitchlocaloccupancy) mod_me.ModuleLocalOccupancy->Reset();
551  if (moduleswitchnrclusterizedstrip) mod_me.NrOfClusterizedStrips->Reset();
552 }
std::map< uint32_t, ModMEs > ModuleMEsMap

Member Data Documentation

bool SiStripMonitorCluster::applyClusterQuality_
private

Definition at line 174 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

edm::InputTag SiStripMonitorCluster::apvPhaseProducer_
private

Definition at line 172 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

edm::InputTag SiStripMonitorCluster::clusterProducer_
private

Definition at line 170 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::clustertkhistomapon
private

Definition at line 162 of file SiStripMonitorCluster.h.

Referenced by analyze(), createMEs(), and SiStripMonitorCluster().

edm::ParameterSet SiStripMonitorCluster::conf_
private
bool SiStripMonitorCluster::createTrendMEs
private
SiStripDCSStatus* SiStripMonitorCluster::dcsStatus_
private

Definition at line 180 of file SiStripMonitorCluster.h.

Referenced by analyze(), SiStripMonitorCluster(), and ~SiStripMonitorCluster().

DQMStore* SiStripMonitorCluster::dqmStore_
private
int SiStripMonitorCluster::eventNb
private

Definition at line 128 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

int SiStripMonitorCluster::firstEvent
private

Definition at line 129 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

MonitorElement* SiStripMonitorCluster::GlobalApvCycleDBxTH2

Definition at line 87 of file SiStripMonitorCluster.h.

Referenced by analyze(), and createMEs().

bool SiStripMonitorCluster::globalswitchapvcycledbxth2on
private

Definition at line 160 of file SiStripMonitorCluster.h.

Referenced by analyze(), createMEs(), and SiStripMonitorCluster().

edm::InputTag SiStripMonitorCluster::historyProducer_
private

Definition at line 171 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

std::map<std::string, std::vector< uint32_t > > SiStripMonitorCluster::LayerDetMap
private

Definition at line 112 of file SiStripMonitorCluster.h.

Referenced by analyze(), and createMEs().

std::map<std::string, LayerMEs> SiStripMonitorCluster::LayerMEsMap
private

Definition at line 111 of file SiStripMonitorCluster.h.

Referenced by analyze(), createLayerMEs(), and createMEs().

bool SiStripMonitorCluster::layerswitchcluschargeon
private

Definition at line 132 of file SiStripMonitorCluster.h.

Referenced by createLayerMEs(), fillLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusdigiposon
private

Definition at line 136 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusnoiseon
private

Definition at line 137 of file SiStripMonitorCluster.h.

Referenced by createLayerMEs(), fillLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusposon
private

Definition at line 135 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusstonon
private

Definition at line 133 of file SiStripMonitorCluster.h.

Referenced by createLayerMEs(), fillLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusstonVsposon
private

Definition at line 134 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchclusterwidthprofon
private

Definition at line 142 of file SiStripMonitorCluster.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchcluswidthon
private

Definition at line 138 of file SiStripMonitorCluster.h.

Referenced by createLayerMEs(), fillLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchlocaloccupancy
private

Definition at line 139 of file SiStripMonitorCluster.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchncluson
private

Definition at line 131 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchnrclusterizedstrip
private

Definition at line 140 of file SiStripMonitorCluster.h.

Referenced by SiStripMonitorCluster().

bool SiStripMonitorCluster::layerswitchnumclusterprofon
private

Definition at line 141 of file SiStripMonitorCluster.h.

Referenced by analyze(), createLayerMEs(), and SiStripMonitorCluster().

unsigned long long SiStripMonitorCluster::m_cacheID_
private

Definition at line 118 of file SiStripMonitorCluster.h.

Referenced by beginRun().

bool SiStripMonitorCluster::Mod_On_
private

Definition at line 165 of file SiStripMonitorCluster.h.

Referenced by analyze(), createMEs(), and SiStripMonitorCluster().

std::map<uint32_t, ModMEs> SiStripMonitorCluster::ModuleMEsMap
private

Definition at line 110 of file SiStripMonitorCluster.h.

Referenced by analyze(), beginRun(), createMEs(), and ResetModuleMEs().

std::vector<uint32_t> SiStripMonitorCluster::ModulesToBeExcluded_
private

Definition at line 121 of file SiStripMonitorCluster.h.

bool SiStripMonitorCluster::moduleswitchcluschargeon
private
bool SiStripMonitorCluster::moduleswitchclusdigiposon
private
bool SiStripMonitorCluster::moduleswitchclusnoiseon
private
bool SiStripMonitorCluster::moduleswitchclusposon
private
bool SiStripMonitorCluster::moduleswitchclusstonon
private
bool SiStripMonitorCluster::moduleswitchclusstonVsposon
private
bool SiStripMonitorCluster::moduleswitchcluswidthon
private
bool SiStripMonitorCluster::moduleswitchlocaloccupancy
private
bool SiStripMonitorCluster::moduleswitchncluson
private
bool SiStripMonitorCluster::moduleswitchnrclusterizedstrip
private
edm::ParameterSet SiStripMonitorCluster::Parameters
private

Definition at line 123 of file SiStripMonitorCluster.h.

std::string SiStripMonitorCluster::qualityLabel_
private

Definition at line 168 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::reset_each_run
private

Definition at line 117 of file SiStripMonitorCluster.h.

Referenced by beginRun(), and createMEs().

int SiStripMonitorCluster::runNb
private

Definition at line 128 of file SiStripMonitorCluster.h.

Referenced by analyze().

bool SiStripMonitorCluster::select_all_detectors
private

Definition at line 117 of file SiStripMonitorCluster.h.

bool SiStripMonitorCluster::show_control_view
private

Definition at line 117 of file SiStripMonitorCluster.h.

bool SiStripMonitorCluster::show_mechanical_structure_view
private

Definition at line 117 of file SiStripMonitorCluster.h.

Referenced by beginRun(), and createMEs().

bool SiStripMonitorCluster::show_readout_view
private

Definition at line 117 of file SiStripMonitorCluster.h.

edm::ESHandle<SiStripDetCabling> SiStripMonitorCluster::SiStripDetCabling_
private

Definition at line 120 of file SiStripMonitorCluster.h.

Referenced by analyze(), createMEs(), and createModuleMEs().

double SiStripMonitorCluster::sToNLowerLimit_
private

Definition at line 175 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

double SiStripMonitorCluster::sToNUpperLimit_
private

Definition at line 176 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

std::map<std::string, SubDetMEs> SiStripMonitorCluster::SubDetMEsMap
private

Definition at line 113 of file SiStripMonitorCluster.h.

Referenced by analyze(), createMEs(), and createSubDetMEs().

std::map<std::string, std::string> SiStripMonitorCluster::SubDetPhasePartMap
private

Definition at line 114 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchapvcycledbxprof2on
private

Definition at line 157 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchapvcycleprofon
private

Definition at line 155 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchapvcycleth2on
private

Definition at line 156 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchdbxcycleprofon
private

Definition at line 158 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchtotclusprofon
private

Definition at line 154 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

bool SiStripMonitorCluster::subdetswitchtotclusth1on
private

Definition at line 159 of file SiStripMonitorCluster.h.

Referenced by analyze(), createSubDetMEs(), and SiStripMonitorCluster().

TkHistoMap* SiStripMonitorCluster::tkmapcluster
private

Definition at line 126 of file SiStripMonitorCluster.h.

Referenced by analyze(), and createMEs().

std::string SiStripMonitorCluster::topFolderName_
private

Definition at line 167 of file SiStripMonitorCluster.h.

Referenced by createMEs(), and SiStripMonitorCluster().

double SiStripMonitorCluster::widthLowerLimit_
private

Definition at line 177 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().

double SiStripMonitorCluster::widthUpperLimit_
private

Definition at line 178 of file SiStripMonitorCluster.h.

Referenced by analyze(), and SiStripMonitorCluster().