CMS 3D CMS Logo

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

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

Inheritance diagram for SiPixelDQMRocLevelAnalyzer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiPixelDQMRocLevelAnalyzer (const edm::ParameterSet &)
 
 ~SiPixelDQMRocLevelAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
void FillRocLevelHistos (TH1F *hrocdep, TH1F *hdist, std::vector< double > &vecx, std::vector< double > &vecy)
 
void RocSummary (std::string tagname)
 
void RocSumOneModule (int maxr, int maxc, MonitorElement *const &me, std::vector< double > &vecCN, std::vector< double > &vecMean, std::vector< double > &vecSD, int &chipNumber)
 

Private Attributes

TH1F * bhGainMean
 
TH1F * bhGainMean_dist
 
TH1F * bhGainRMS
 
TH1F * bhGainRMS_dist
 
TH1F * bhNoiseMean
 
TH1F * bhNoiseMean_dist
 
TH1F * bhNoiseRMS
 
TH1F * bhNoiseRMS_dist
 
TH1F * bhPedestalMean
 
TH1F * bhPedestalMean_dist
 
TH1F * bhPedestalRMS
 
TH1F * bhPedestalRMS_dist
 
TH1F * bhPixelAlive
 
TH1F * bhPixelAlive_dist
 
TH1F * bhThresholdMean
 
TH1F * bhThresholdMean_dist
 
TH1F * bhThresholdRMS
 
TH1F * bhThresholdRMS_dist
 
bool bPixelAlive
 
bool bRS
 
edm::ParameterSet conf_
 
DQMStoredbe
 
TH1F * ehGainMean
 
TH1F * ehGainMean_dist
 
TH1F * ehGainRMS
 
TH1F * ehGainRMS_dist
 
TH1F * ehNoiseMean
 
TH1F * ehNoiseMean_dist
 
TH1F * ehNoiseRMS
 
TH1F * ehNoiseRMS_dist
 
TH1F * ehPedestalMean
 
TH1F * ehPedestalMean_dist
 
TH1F * ehPedestalRMS
 
TH1F * ehPedestalRMS_dist
 
TH1F * ehPixelAlive
 
TH1F * ehPixelAlive_dist
 
TH1F * ehThresholdMean
 
TH1F * ehThresholdMean_dist
 
TH1F * ehThresholdRMS
 
TH1F * ehThresholdRMS_dist
 
bool fRS
 
edm::Service< TFileServicefs_
 
std::vector< MonitorElement * > mes
 
std::vector< double > vbpixCN
 
std::vector< double > vbpixM
 
std::vector< double > vbpixSD
 
std::vector< double > vfpixCN
 
std::vector< double > vfpixM
 
std::vector< double > vfpixSD
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 44 of file SiPixelDQMRocLevelAnalyzer.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 47 of file SiPixelDQMRocLevelAnalyzer.h.

◆ MonitorElement

Definition at line 46 of file SiPixelDQMRocLevelAnalyzer.h.

Constructor & Destructor Documentation

◆ SiPixelDQMRocLevelAnalyzer()

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

Definition at line 3 of file SiPixelDQMRocLevelAnalyzer.cc.

References TFileService::kSharedResource.

3  : conf_(iConfig) {
4  usesResource(TFileService::kSharedResource);
5 }
static const std::string kSharedResource
Definition: TFileService.h:76

◆ ~SiPixelDQMRocLevelAnalyzer()

SiPixelDQMRocLevelAnalyzer::~SiPixelDQMRocLevelAnalyzer ( )
overridedefault

Member Function Documentation

◆ analyze()

void SiPixelDQMRocLevelAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 10 of file SiPixelDQMRocLevelAnalyzer.cc.

10 {}

◆ beginJob()

void SiPixelDQMRocLevelAnalyzer::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 13 of file SiPixelDQMRocLevelAnalyzer.cc.

References bhGainMean, bhGainMean_dist, bhGainRMS, bhGainRMS_dist, bhNoiseMean, bhNoiseMean_dist, bhNoiseRMS, bhNoiseRMS_dist, bhPedestalMean, bhPedestalMean_dist, bhPedestalRMS, bhPedestalRMS_dist, bhPixelAlive, bhPixelAlive_dist, bhThresholdMean, bhThresholdMean_dist, bhThresholdRMS, bhThresholdRMS_dist, bPixelAlive, bRS, conf_, gather_cfg::cout, dbe, ehGainMean, ehGainMean_dist, ehGainRMS, ehGainRMS_dist, ehNoiseMean, ehNoiseMean_dist, ehNoiseRMS, ehNoiseRMS_dist, ehPedestalMean, ehPedestalMean_dist, ehPedestalRMS, ehPedestalRMS_dist, ehPixelAlive, ehPixelAlive_dist, ehThresholdMean, ehThresholdMean_dist, ehThresholdRMS, ehThresholdRMS_dist, corrVsCorr::filename, FillRocLevelHistos(), fRS, fs_, dqm::implementation::IGetter::getAllContents(), edm::ParameterSet::getUntrackedParameter(), mps_fire::i, createfilelist::int, TFileService::make(), mes, mod(), dqm::implementation::DQMStore::open(), Utilities::operator, RocSummary(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, vbpixCN, vbpixM, vbpixSD, vfpixCN, vfpixM, and vfpixSD.

13  {
15  bRS = conf_.getUntrackedParameter<bool>("barrelRocStud");
16  fRS = conf_.getUntrackedParameter<bool>("endcapRocStud");
17  bPixelAlive = conf_.getUntrackedParameter<bool>("pixelAliveStudy");
18  double pixelAliveThresh = conf_.getUntrackedParameter<double>("pixelAliveThreshold");
19  bool bThreshold = conf_.getUntrackedParameter<bool>("thresholdStudy");
20  bool bNoise = conf_.getUntrackedParameter<bool>("noiseStudy");
21  bool bGain = conf_.getUntrackedParameter<bool>("gainStudy");
22  bool bPedestal = conf_.getUntrackedParameter<bool>("pedestalStudy");
23 
24  if (!bRS && !fRS)
25  return;
26 
27  //Open file and get MEs
29  dbe->open(filename);
30  mes = dbe->getAllContents("");
31  std::cout << "found " << mes.size() << " monitoring elements!" << std::endl;
32 
33  //BARREL
34  if (bRS) {
35  //PIXELALIVE
36  if (bPixelAlive) {
37  bhPixelAlive = fs_->make<TH1F>("bpixAlive", "PixelAliveSummary_mean_Barrel", 11520, 0., 11520.);
39  fs_->make<TH1F>("bpixAliveDist", "Mean PixelAliveSummary_mean_Barrel Disbribution", 110, 0., 1.1);
40  }
41  //THRESHOLD
42  if (bThreshold) {
43  bhThresholdMean = fs_->make<TH1F>("bthreshMean", "ScurveThresholdSummary_mean_Barrel", 11520, 0., 11520.);
45  fs_->make<TH1F>("bthreshMeanDist", "Mean ScurveThresholdSummary_mean_Barrel Distribution", 600, 0., 150.);
46  bhThresholdRMS = fs_->make<TH1F>("bthreshRMS", "ScurveThresholdSummary_RMS_Barrel", 11520, 0., 11520.);
48  fs_->make<TH1F>("bthreshRMSDist", "Mean ScurveThresholdSummary_RMS_Barrel Distribution", 800, 0., 80.);
49  }
50  //NOISE
51  if (bNoise) {
52  bhNoiseMean = fs_->make<TH1F>("bnoiseMean", "ScurveSigmasSummary_mean_Barrel", 11520, 0., 11520.);
54  fs_->make<TH1F>("bnoiseMeanDist", "Mean ScurveSigmasSummary_mean_Barrel Distribution", 256, -2., 6.);
55  bhNoiseRMS = fs_->make<TH1F>("bnoiseRMS", "ScurveSigmasSummary_RMS_Barrel", 11520, 0., 11520.);
57  fs_->make<TH1F>("bnoiseRMSDist", "Mean ScurveSigmasSummary_RMS_Barrel Distribution", 768, 0., 8.);
58  }
59  //GAIN
60  if (bGain) {
61  bhGainMean = fs_->make<TH1F>("bgainMean", "ScurveGainSummary_mean_Barrel", 11520, 0., 11520.);
62  bhGainMean_dist = fs_->make<TH1F>("bgainMeanDist", "Mean ScurveGainSummary_mean_Barrel Distribution", 80, 0., 8.);
63  bhGainRMS = fs_->make<TH1F>("bgainRMS", "ScurveGainSummary_RMS_Barrel", 11520, 0., 11520.);
64  bhGainRMS_dist = fs_->make<TH1F>("bgainRMSDist", "Mean ScurveGainSummary_RMS_Barrel Distribution", 100, 0., 10.);
65  }
66  //PEDESTAL
67  if (bPedestal) {
68  bhPedestalMean = fs_->make<TH1F>("bpedestalMean", "ScurvePedestalSummary_mean_Barrel", 11520, 0., 11520.);
70  fs_->make<TH1F>("bpedestalMeanDist", "Mean ScurvePedestalSummary_mean_Barrel Distribution", 600, 0., 300.);
71  bhPedestalRMS = fs_->make<TH1F>("bpedestalRMS", "ScurvePedestalSummary_RMS_Barrel", 11520, 0., 11520.);
73  fs_->make<TH1F>("bpedestalRMSDist", "Mean ScurvePedestalSummary_RMS_Barrel Distribution", 1000, 0., 100.);
74  }
75  }
76 
77  //ENDCAP
78  if (fRS) {
79  //PIXELALIVE
80  if (bPixelAlive) {
81  ehPixelAlive = fs_->make<TH1F>("fpixAlive", "PixelAliveSummary_mean_Endcap", 4320, 0., 4320.);
83  fs_->make<TH1F>("fpixAliveDist", "Mean PixelAliveSummary_mean_Endcap Disbribution", 110, 0., 1.1);
84  }
85  //THRESHOLD
86  if (bThreshold) {
87  ehThresholdMean = fs_->make<TH1F>("fthreshMean", "ScurveThresholdSummary_mean_Endcap", 4320, 0., 4320.);
89  fs_->make<TH1F>("fthreshMeanDist", "Mean ScurveThresholdSummary_mean_Endcap Distribution", 600, 0., 150.);
90  ehThresholdRMS = fs_->make<TH1F>("fthreshRMS", "ScurveThresholdSummary_RMS_Endcap", 4320, 0., 4320.);
92  fs_->make<TH1F>("fthreshRMSDist", "Mean ScurveThresholdSummary_RMS_Endcap Distribution", 800, 0., 80.);
93  }
94  //NOISE
95  if (bNoise) {
96  ehNoiseMean = fs_->make<TH1F>("fnoiseMean", "ScurveSigmasSummary_mean_Endcap", 4320, 0., 4320.);
98  fs_->make<TH1F>("fnoiseMeanDist", "Mean ScurveSigmasSummary_mean_Endcap Distribution", 256, -2., 6.);
99  ehNoiseRMS = fs_->make<TH1F>("fnoiseRMS", "ScurveSigmasSummary_RMS_Endcap", 4320, 0., 4320.);
101  fs_->make<TH1F>("fnoiseRMSDist", "Mean ScurveSigmasSummary_RMS_Endcap Distribution", 384, 0., 4.);
102  }
103  //GAIN
104  if (bGain) {
105  ehGainMean = fs_->make<TH1F>("fgainMean", "ScurveGainSummary_mean_Endcap", 4320, 0., 4320.);
107  fs_->make<TH1F>("fgainMeanDist", "Mean ScurveGainSummary_mean_Endcap Distribution", 600, 0., 150.);
108  ehGainRMS = fs_->make<TH1F>("fgainRMS", "ScurveGainSummary_RMS_Endcap", 4320, 0., 4320.);
109  ehGainRMS_dist = fs_->make<TH1F>("fgainRMSDist", "Mean ScurveGainSummary_RMS_Endcap Distribution", 800, 0., 80.);
110  }
111  //PEDESTAL
112  if (bPedestal) {
113  ehPedestalMean = fs_->make<TH1F>("fpedestalMean", "ScurvePedestalSummary_mean_Endcap", 4320, 0., 4320.);
115  fs_->make<TH1F>("fpedestalMeanDist", "Mean ScurvePedestalSummary_mean_Endcap Distribution", 600, 0., 150.);
116  ehPedestalRMS = fs_->make<TH1F>("fpedestalRMS", "ScurvePedestalSummary_RMS_Endcap", 4320, 0., 4320.);
118  fs_->make<TH1F>("fpedestalRMSDist", "Mean ScurvePedestalSummary_RMS_Endcap Distribution", 800, 0., 80.);
119  }
120  }
121  //PIXELALIVE
122  if (bPixelAlive) {
123  RocSummary("pixelAlive_siPixelCalibDigis_");
124  if (bRS) {
126 
127  //print a list of pixels with pixelAlive quantity below pixelAliveThresh
128  for (unsigned int i = 0; i < vbpixCN.size(); i++) {
129  if (vbpixM[i] < pixelAliveThresh) {
130  double temp = vbpixCN[i];
131  int shell = (int)((temp - 1) / 2880); //0 mi, 1 mo, 2 pi, 3 po
132  temp -= shell * 2880;
133  int lay = 1;
134  if (temp > 576) {
135  temp -= 576;
136  lay++;
137  }
138  if (temp > 960) {
139  temp -= 960;
140  lay++;
141  }
142  int lad = 1;
143  if (temp > 32) {
144  temp -= 32;
145  lad++;
146  }
147  while (temp > 64) {
148  temp -= 64;
149  lad++;
150  }
151  int mod = 1;
152  int modsize = 16;
153  if (lad == 1 || (lay == 1 && lad == 10) || (lay == 2 && lad == 16) || (lay == 3 && lad == 22))
154  modsize = 8;
155  while (temp > modsize) {
156  temp -= modsize;
157  mod++;
158  }
159  std::cout << vbpixCN[i] << " " << vbpixM[i] << ":\n";
160  std::cout << "Shell ";
161  switch (shell) {
162  case 0:
163  std::cout << "mI";
164  break;
165  case 1:
166  std::cout << "mO";
167  break;
168  case 2:
169  std::cout << "pI";
170  break;
171  case 3:
172  std::cout << "pO";
173  break;
174  }
175  std::cout << " Lay" << lay << " Lad" << lad << " Mod" << mod << " Chip" << temp << "\n\n";
176  }
177  }
178  }
179  if (fRS) {
181  //print a list of pixels with pixelAlive quantity below pixelAliveThresh
182  for (unsigned int i = 0; i < vfpixCN.size(); i++) {
183  if (vfpixM[i] < pixelAliveThresh) {
184  double temp = vfpixCN[i];
185  int hcyl = (int)((temp - 1) / 1080); //0 mi, 1 mo, 2 pi, 3 po
186  temp -= hcyl * 1080;
187  int disk = 1;
188  if (temp > 540) {
189  temp -= 540;
190  disk++;
191  }
192  int blade = 1;
193  while (temp > 45) {
194  temp -= 45;
195  blade++;
196  }
197  int panel = 1, mod = 1;
198  if (temp < 22) {
199  //panel 1
200  if (temp > 16) {
201  temp -= 16;
202  mod = 4;
203  } else if (temp > 8) {
204  temp -= 8;
205  mod = 3;
206  } else if (temp > 2) {
207  temp -= 2;
208  mod = 2;
209  }
210  } else {
211  //panel 2
212  temp -= 21;
213  panel++;
214  if (temp > 14) {
215  temp -= 14;
216  mod = 3;
217  } else if (temp > 6) {
218  temp -= 6;
219  mod = 2;
220  }
221  }
222 
223  std::cout << vfpixCN[i] << " " << vfpixM[i] << ":\n";
224  std::cout << "HalfCylinder ";
225  switch (hcyl) {
226  case 0:
227  std::cout << "mI";
228  break;
229  case 1:
230  std::cout << "mO";
231  break;
232  case 2:
233  std::cout << "pI";
234  break;
235  case 3:
236  std::cout << "pO";
237  break;
238  }
239  std::cout << " Disk" << disk << " Blade" << blade << " Panel" << panel << " Mod" << mod << " Chip" << temp
240  << "\n\n";
241  }
242  }
243  }
244  }
245  //THRESHOLD
246  if (bThreshold) {
247  vbpixCN.clear();
248  vbpixM.clear();
249  vbpixSD.clear();
250  vfpixCN.clear();
251  vfpixM.clear();
252  vfpixSD.clear();
253 
254  RocSummary("ScurveThresholds_siPixelCalibDigis_");
255  if (bRS) {
258  }
259  if (fRS) {
262  }
263  }
264  //NOISE
265  if (bNoise) {
266  vbpixCN.clear();
267  vbpixM.clear();
268  vbpixSD.clear();
269  vfpixCN.clear();
270  vfpixM.clear();
271  vfpixSD.clear();
272 
273  RocSummary("ScurveSigmas_siPixelCalibDigis_");
274  if (bRS) {
277  }
278  if (fRS) {
281  }
282  }
283  //GAIN
284  if (bGain) {
285  vbpixCN.clear();
286  vbpixM.clear();
287  vbpixSD.clear();
288  vfpixCN.clear();
289  vfpixM.clear();
290  vfpixSD.clear();
291 
292  RocSummary("Gain2d_siPixelCalibDigis_");
293  if (bRS) {
296  }
297  if (fRS) {
300  }
301  }
302  //PEDESTAL
303  if (bPedestal) {
304  vbpixCN.clear();
305  vbpixM.clear();
306  vbpixSD.clear();
307  vfpixCN.clear();
308  vfpixM.clear();
309  vfpixSD.clear();
310 
311  RocSummary("Pedestal2d_siPixelCalibDigis_");
312  if (bRS) {
315  }
316  if (fRS) {
319  }
320  }
321 }
void FillRocLevelHistos(TH1F *hrocdep, TH1F *hdist, std::vector< double > &vecx, std::vector< double > &vecy)
T getUntrackedParameter(std::string const &, T const &) const
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
Definition: DQMStore.cc:609
void RocSummary(std::string tagname)
std::vector< MonitorElement * > mes
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
Definition: shell.py:1
edm::Service< TFileService > fs_
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:790

◆ endJob()

void SiPixelDQMRocLevelAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 324 of file SiPixelDQMRocLevelAnalyzer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

324 {}

◆ FillRocLevelHistos()

void SiPixelDQMRocLevelAnalyzer::FillRocLevelHistos ( TH1F *  hrocdep,
TH1F *  hdist,
std::vector< double > &  vecx,
std::vector< double > &  vecy 
)
private

Definition at line 510 of file SiPixelDQMRocLevelAnalyzer.cc.

References mps_fire::i.

Referenced by beginJob().

513  {
514  if (vecx.size() == vecy.size()) {
515  for (unsigned int i = 0; i < vecx.size(); i++) {
516  hrocdep->Fill(vecx[i], vecy[i]);
517  hdist->Fill(vecy[i]);
518  }
519  }
520 }

◆ RocSummary()

void SiPixelDQMRocLevelAnalyzer::RocSummary ( std::string  tagname)
private

Definition at line 326 of file SiPixelDQMRocLevelAnalyzer.cc.

References a, bPixelAlive, bRS, gather_cfg::cout, fRS, mps_fire::i, mes, mod(), Skims_PA_cff::name, castor_dqm_sourceclient_file_cfg::path, RocSumOneModule(), AlCaHLTBitMon_QueryRunRegistry::string, createPayload::tagname, vbpixCN, vbpixM, vbpixSD, vfpixCN, vfpixM, and vfpixSD.

Referenced by beginJob().

326  {
327  int maxcrow, maxccol;
328  std::string name, path = "first";
329  std::string oldPath = "";
330  int moduleNumber = 0;
331  int bchipNumber = 0;
332  int fchipNumber = 0;
333  bool bbarrel = false, bforward = false, bhalfMod = false, bwasHM = false;
334  bool bPFFM = false;
335  bool bMNCS = false;
336  int panelNumber = -1;
337 
338  for (std::vector<MonitorElement *>::const_iterator ime = mes.begin(); ime != mes.end(); ++ime) {
339  bwasHM = bhalfMod;
340  //set default values
341  bMNCS = false;
342  bbarrel = false;
343  bforward = false;
344  bhalfMod = false;
345  //set name, (old) path
346  name = (*ime)->getName();
347  oldPath = path;
348  path = (*ime)->getPathname();
349 
350  //determine module number if any
351  if (path.find("Module_") < path.size()) {
352  if (path != oldPath) {
353  moduleNumber++;
354  if (moduleNumber != 1)
355  bMNCS = true;
356  }
357  } else {
358  if (moduleNumber > 0)
359  bMNCS = true;
360  moduleNumber = 0;
361  }
362 
363  //find out location (barrel (hm), endcap)
364  if (path.find("Barrel/") < path.size()) {
365  bbarrel = true;
366  if (path.find("H/") < path.size())
367  bhalfMod = true;
368  }
369  if (path.find("Endcap/") < path.size()) {
370  bforward = true;
371  panelNumber = -1;
372  if (path.find("Panel_1") < path.size())
373  panelNumber = 1;
374  if (path.find("Panel_2") < path.size())
375  panelNumber = 2;
376  }
377 
378  //find tagname in histoname
379  if (name.find(tagname) < name.size())
380  bPFFM = true;
381  else {
382  //adjust chip number if necessary, skip ME
383  if (bMNCS) {
384  if (!bPFFM) {
385  if (bbarrel && bRS) {
386  if (bPixelAlive) {
387  int a = 16;
388  if (bwasHM)
389  a = 8;
390  for (int i = 0; i < a; i++) {
391  bchipNumber++;
392  vbpixCN.push_back(bchipNumber);
393  vbpixM.push_back(0);
394  }
395  } else {
396  if (bwasHM)
397  bchipNumber += 8;
398  else
399  bchipNumber += 16;
400  }
401  }
402  if (bforward && fRS) {
403  int maxcol = 2;
404  int mod = moduleNumber;
405  if (mod > 1)
406  mod--;
407  else {
408  if (panelNumber == 1)
409  mod = 4;
410  else
411  mod = 3;
412  }
413  if (panelNumber == 1 && (mod == 1 || mod == 4))
414  maxcol = 1;
415  if (bPixelAlive) {
416  for (int i = 0; i < maxcol * (mod + panelNumber); i++) {
417  fchipNumber++;
418  vfpixCN.push_back(fchipNumber);
419  vfpixM.push_back(0);
420  }
421  } else {
422  fchipNumber += maxcol * (mod + panelNumber);
423  }
424  }
425  } else
426  bPFFM = false;
427  }
428  continue;
429  }
430 
431  //BARREL ROC LEVEL PLOTS
432 
433  if (bbarrel && bRS) {
434  maxccol = 8, maxcrow = 2;
435  if (bhalfMod) {
436  maxcrow = 1;
437  }
438 
439  RocSumOneModule(maxcrow, maxccol, (*ime), vbpixCN, vbpixM, vbpixSD, bchipNumber);
440  }
441 
442  //ENDCAP ROC LEVEL PLOTS
443  if (bforward && fRS) {
444  maxccol = moduleNumber + panelNumber;
445  maxcrow = 2;
446  if (panelNumber == 1 && (moduleNumber == 1 || moduleNumber == 4))
447  maxcrow = 1;
448 
449  RocSumOneModule(maxcrow, maxccol, (*ime), vfpixCN, vfpixM, vfpixSD, fchipNumber);
450  }
451  }
452 
453  std::cout << "Number of Chips: b" << bchipNumber << " f" << fchipNumber << " " << tagname << std::endl;
454 }
void RocSumOneModule(int maxr, int maxc, MonitorElement *const &me, std::vector< double > &vecCN, std::vector< double > &vecMean, std::vector< double > &vecSD, int &chipNumber)
std::vector< MonitorElement * > mes
double a
Definition: hdecay.h:119
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4

◆ RocSumOneModule()

void SiPixelDQMRocLevelAnalyzer::RocSumOneModule ( int  maxr,
int  maxc,
MonitorElement *const &  me,
std::vector< double > &  vecCN,
std::vector< double > &  vecMean,
std::vector< double > &  vecSD,
int &  chipNumber 
)
private

Definition at line 456 of file SiPixelDQMRocLevelAnalyzer.cc.

References bPixelAlive, c, gpuPixelDoublets::maxr, hlt_dqm_clientPB-live_cfg::me, SiStripPI::mean, compareTotals::ne, alignCSCRings::r, mathSSE::sqrt(), and groupFilesInBlocks::temp.

Referenced by RocSummary().

462  {
463  float temp, sum, nentries;
464  for (int cr = 0; cr < maxr; cr++) {
465  for (int cc = 0; cc < maxc; cc++) {
466  //compute mean of 1 ROC
467  chipNumber++;
468  sum = 0;
469  nentries = 0;
470  //sum for 1 ROC
471  for (int c = 1; c < 53; c++) {
472  for (int r = 1; r < 81; r++) {
473  temp = me->getBinContent(52 * cc + c, 80 * cr + r);
474 
475  if (temp != 0.) {
476  sum += temp;
477  nentries++;
478  }
479  }
480  }
481  if (nentries == 0 && bPixelAlive) {
482  vecCN.push_back(chipNumber);
483  vecMean.push_back(0);
484  }
485  if (nentries != 0) {
486  double mean = sum / nentries;
487  double avsd = 0.;
488  int ne = 0;
489  vecCN.push_back(chipNumber);
490  vecMean.push_back(mean);
491 
492  //computing std dev.
493  for (int c = 1; c < 53; c++) {
494  for (int r = 1; r < 81; r++) {
495  temp = me->getBinContent(52 * cc + c, 80 * cr + r);
496  if (temp != 0) {
497  avsd += (temp - mean) * (temp - mean);
498  ne++;
499  }
500  }
501  }
502  avsd = avsd / ne;
503  avsd = sqrt(avsd);
504  vecSD.push_back(avsd);
505  }
506  }
507  }
508 }
__constant__ float const maxr[nPairs]
T sqrt(T t)
Definition: SSEVec.h:19

Member Data Documentation

◆ bhGainMean

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainMean
private

Definition at line 93 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhGainMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainMean_dist
private

Definition at line 94 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhGainRMS

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainRMS
private

Definition at line 95 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhGainRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainRMS_dist
private

Definition at line 96 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhNoiseMean

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseMean
private

Definition at line 89 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhNoiseMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseMean_dist
private

Definition at line 90 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhNoiseRMS

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseRMS
private

Definition at line 91 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhNoiseRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseRMS_dist
private

Definition at line 92 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPedestalMean

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalMean
private

Definition at line 97 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPedestalMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalMean_dist
private

Definition at line 98 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPedestalRMS

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalRMS
private

Definition at line 99 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPedestalRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalRMS_dist
private

Definition at line 100 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPixelAlive

TH1F* SiPixelDQMRocLevelAnalyzer::bhPixelAlive
private

Definition at line 83 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhPixelAlive_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhPixelAlive_dist
private

Definition at line 84 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhThresholdMean

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdMean
private

Definition at line 85 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhThresholdMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdMean_dist
private

Definition at line 86 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhThresholdRMS

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdRMS
private

Definition at line 87 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bhThresholdRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdRMS_dist
private

Definition at line 88 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ bPixelAlive

bool SiPixelDQMRocLevelAnalyzer::bPixelAlive
private

Definition at line 73 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), RocSummary(), and RocSumOneModule().

◆ bRS

bool SiPixelDQMRocLevelAnalyzer::bRS
private

Definition at line 73 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ conf_

edm::ParameterSet SiPixelDQMRocLevelAnalyzer::conf_
private

Definition at line 68 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ dbe

DQMStore* SiPixelDQMRocLevelAnalyzer::dbe
private

Definition at line 69 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehGainMean

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainMean
private

Definition at line 112 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehGainMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainMean_dist
private

Definition at line 113 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehGainRMS

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainRMS
private

Definition at line 114 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehGainRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainRMS_dist
private

Definition at line 115 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehNoiseMean

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseMean
private

Definition at line 108 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehNoiseMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseMean_dist
private

Definition at line 109 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehNoiseRMS

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseRMS
private

Definition at line 110 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehNoiseRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseRMS_dist
private

Definition at line 111 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPedestalMean

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalMean
private

Definition at line 116 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPedestalMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalMean_dist
private

Definition at line 117 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPedestalRMS

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalRMS
private

Definition at line 118 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPedestalRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalRMS_dist
private

Definition at line 119 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPixelAlive

TH1F* SiPixelDQMRocLevelAnalyzer::ehPixelAlive
private

Definition at line 102 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehPixelAlive_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehPixelAlive_dist
private

Definition at line 103 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehThresholdMean

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdMean
private

Definition at line 104 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehThresholdMean_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdMean_dist
private

Definition at line 105 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehThresholdRMS

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdRMS
private

Definition at line 106 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ ehThresholdRMS_dist

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdRMS_dist
private

Definition at line 107 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ fRS

bool SiPixelDQMRocLevelAnalyzer::fRS
private

Definition at line 73 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ fs_

edm::Service<TFileService> SiPixelDQMRocLevelAnalyzer::fs_
private

Definition at line 70 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

◆ mes

std::vector<MonitorElement *> SiPixelDQMRocLevelAnalyzer::mes
private

Definition at line 72 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vbpixCN

std::vector<double> SiPixelDQMRocLevelAnalyzer::vbpixCN
private

Definition at line 75 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vbpixM

std::vector<double> SiPixelDQMRocLevelAnalyzer::vbpixM
private

Definition at line 76 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vbpixSD

std::vector<double> SiPixelDQMRocLevelAnalyzer::vbpixSD
private

Definition at line 77 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vfpixCN

std::vector<double> SiPixelDQMRocLevelAnalyzer::vfpixCN
private

Definition at line 78 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vfpixM

std::vector<double> SiPixelDQMRocLevelAnalyzer::vfpixM
private

Definition at line 79 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

◆ vfpixSD

std::vector<double> SiPixelDQMRocLevelAnalyzer::vfpixSD
private

Definition at line 80 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().