CMS 3D CMS Logo

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

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

Inheritance diagram for SiPixelDQMRocLevelAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 SiPixelDQMRocLevelAnalyzer (const edm::ParameterSet &)
 
 ~SiPixelDQMRocLevelAnalyzer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
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::vector< ModuleDescription const * > &modules, 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 updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

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

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

Definition at line 46 of file SiPixelDQMRocLevelAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 3 of file SiPixelDQMRocLevelAnalyzer.cc.

3  :conf_(iConfig)
4 {
5 
6 
7 }
SiPixelDQMRocLevelAnalyzer::~SiPixelDQMRocLevelAnalyzer ( )
override

Definition at line 10 of file SiPixelDQMRocLevelAnalyzer.cc.

11 {
12 
13 
14 }

Member Function Documentation

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

Definition at line 18 of file SiPixelDQMRocLevelAnalyzer.cc.

References edm::EventSetup::get(), and edm::Event::getByLabel().

19 {
20  using namespace edm;
21 
22 
23 #ifdef THIS_IS_AN_EVENT_EXAMPLE
25  iEvent.getByLabel("example",pIn);
26 #endif
27 
28 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
29  ESHandle<SetupData> pSetup;
30  iSetup.get<SetupRecord>().get(pSetup);
31 #endif
32 }
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
const T & get() const
Definition: EventSetup.h:55
HLT enums.
void SiPixelDQMRocLevelAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 37 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_, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, createfilelist::int, TFileService::make(), mes, mod(), Utilities::operator, RocSummary(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, vbpixCN, vbpixM, vbpixSD, vfpixCN, vfpixM, and vfpixSD.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 312 of file SiPixelDQMRocLevelAnalyzer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

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

Definition at line 496 of file SiPixelDQMRocLevelAnalyzer.cc.

References DEFINE_FWK_MODULE, and mps_fire::i.

Referenced by beginJob().

496  {
497  if(vecx.size() == vecy.size()){
498  for(unsigned int i=0; i<vecx.size(); i++){
499  hrocdep->Fill(vecx[i],vecy[i]);
500  hdist->Fill(vecy[i]);
501  }
502  }
503 }
void SiPixelDQMRocLevelAnalyzer::RocSummary ( std::string  tagname)
private

Definition at line 316 of file SiPixelDQMRocLevelAnalyzer.cc.

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

Referenced by beginJob().

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

References bPixelAlive, EnergyCorrector::c, MonitorElement::getBinContent(), SiStripPI::mean, Vispa.Plugins.EdmBrowser.EdmDataAccessor::ne(), alignCSCRings::r, mathSSE::sqrt(), and groupFilesInBlocks::temp.

Referenced by RocSummary().

443  {
444 
445  float temp, sum, nentries;
446  for(int cr=0; cr<maxr; cr++){
447  for(int cc=0; cc<maxc; cc++){
448  //compute mean of 1 ROC
449  chipNumber++;
450  sum = 0;
451  nentries = 0;
452  //sum for 1 ROC
453  for(int c=1; c<53; c++){
454  for(int r=1; r<81; r++){
455 
456  temp = me->getBinContent(52*cc+c, 80*cr+r);
457 
458  if(temp!=0.){
459  sum += temp;
460  nentries++;
461  }
462  }
463  }
464  if(nentries==0 && bPixelAlive){
465  vecCN.push_back(chipNumber);
466  vecMean.push_back(0);
467  }
468  if(nentries!=0){
469  double mean = sum/nentries;
470  double avsd = 0.;
471  int ne = 0;
472  vecCN.push_back(chipNumber);
473  vecMean.push_back(mean);
474 
475  //computing std dev.
476  for(int c=1; c<53; c++){
477  for(int r=1; r<81; r++){
478  temp = me->getBinContent(52*cc+c, 80*cr+r);
479  if(temp!=0){
480  avsd += (temp-mean)*(temp-mean);
481  ne++;
482 
483  }
484  }
485  }
486  avsd = avsd/ne;
487  avsd = sqrt(avsd);
488  vecSD.push_back(avsd);
489  }
490 
491  }
492  }
493 }
T sqrt(T t)
Definition: SSEVec.h:18
double getBinContent(int binx) const
get content of bin (1-D)

Member Data Documentation

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainMean
private

Definition at line 90 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainMean_dist
private

Definition at line 91 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainRMS
private

Definition at line 92 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhGainRMS_dist
private

Definition at line 93 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseMean
private

Definition at line 86 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseMean_dist
private

Definition at line 87 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseRMS
private

Definition at line 88 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhNoiseRMS_dist
private

Definition at line 89 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalMean
private

Definition at line 94 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalMean_dist
private

Definition at line 95 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalRMS
private

Definition at line 96 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPedestalRMS_dist
private

Definition at line 97 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPixelAlive
private

Definition at line 80 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhPixelAlive_dist
private

Definition at line 81 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdMean
private

Definition at line 82 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdMean_dist
private

Definition at line 83 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdRMS
private

Definition at line 84 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::bhThresholdRMS_dist
private

Definition at line 85 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

bool SiPixelDQMRocLevelAnalyzer::bPixelAlive
private

Definition at line 70 of file SiPixelDQMRocLevelAnalyzer.h.

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

bool SiPixelDQMRocLevelAnalyzer::bRS
private

Definition at line 70 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

edm::ParameterSet SiPixelDQMRocLevelAnalyzer::conf_
private

Definition at line 65 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

DQMStore* SiPixelDQMRocLevelAnalyzer::dbe
private

Definition at line 66 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainMean
private

Definition at line 109 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainMean_dist
private

Definition at line 110 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainRMS
private

Definition at line 111 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehGainRMS_dist
private

Definition at line 112 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseMean
private

Definition at line 105 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseMean_dist
private

Definition at line 106 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseRMS
private

Definition at line 107 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehNoiseRMS_dist
private

Definition at line 108 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalMean
private

Definition at line 113 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalMean_dist
private

Definition at line 114 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalRMS
private

Definition at line 115 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPedestalRMS_dist
private

Definition at line 116 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPixelAlive
private

Definition at line 99 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehPixelAlive_dist
private

Definition at line 100 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdMean
private

Definition at line 101 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdMean_dist
private

Definition at line 102 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdRMS
private

Definition at line 103 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

TH1F* SiPixelDQMRocLevelAnalyzer::ehThresholdRMS_dist
private

Definition at line 104 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

bool SiPixelDQMRocLevelAnalyzer::fRS
private

Definition at line 70 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 67 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob().

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

Definition at line 69 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 72 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 73 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 74 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 75 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 76 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().

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

Definition at line 77 of file SiPixelDQMRocLevelAnalyzer.h.

Referenced by beginJob(), and RocSummary().