23 #ifdef THIS_IS_AN_EVENT_EXAMPLE
28 #ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
30 iSetup.
get<SetupRecord>().
get(pSetup);
49 if(!bRS && !fRS)
return;
55 std::cout <<
"found " <<
mes.size() <<
" monitoring elements!" << std::endl;
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);
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.);
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.);
88 bhPedestalMean =
fs_->
make<TH1F>(
"bpedestalMean",
"ScurvePedestalSummary_mean_Barrel",11520,0.,11520.);
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.);
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);
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.);
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.);
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.);
140 if(
vbpixM[
i]<pixelAliveThresh){
142 int shell = (int)((temp-1)/2880);
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;
161 temp -= modsize; mod ++;
171 std::cout <<
" Lay" << lay <<
" Lad" << lad <<
" Mod" << mod <<
" Chip" << temp <<
"\n\n";
181 if(
vfpixM[
i]<pixelAliveThresh){
183 int hcyl = (int)((temp-1)/1080);
193 int panel = 1,
mod = 1;
225 std::cout <<
" Disk" << disk <<
" Blade" << blade <<
" Panel" << panel <<
" Mod" <<
mod <<
" Chip" << temp <<
"\n\n";
241 RocSummary(
"ScurveThresholds_siPixelCalibDigis_");
260 RocSummary(
"ScurveSigmas_siPixelCalibDigis_");
318 int maxcrow, maxccol;
324 bool bbarrel =
false, bforward =
false, bhalfMod =
false, bwasHM =
false;
329 for(std::vector<MonitorElement*>::const_iterator ime =
mes.begin(); ime!=
mes.end(); ++ime){
333 bbarrel =
false; bforward =
false; bhalfMod =
false;
335 name = (*ime)->getName();
337 path = (*ime)->getPathname();
340 if(path.find(
"Module_")<path.size()){
343 if(moduleNumber!=1) bMNCS =
true;
348 if(moduleNumber>0) bMNCS =
true;
354 if(path.find(
"Barrel/") < path.size()) {
356 if(path.find(
"H/") < path.size()) bhalfMod =
true;
358 if(path.find(
"Endcap/") < path.size()) {
361 if(path.find(
"Panel_1") < path.size()) panelNumber = 1;
362 if(path.find(
"Panel_2") < path.size()) panelNumber = 2;
368 if(name.find(tagname)<name.size()) bPFFM =
true;
377 for(
int i=0;
i<
a;
i++){
379 vbpixCN.push_back(bchipNumber);
384 if(bwasHM) bchipNumber += 8;
385 else bchipNumber += 16;
394 if(panelNumber == 1) mod = 4;
397 if(panelNumber==1 && (mod==1 || mod==4)) maxcol = 1;
401 vfpixCN.push_back(fchipNumber);
418 maxccol=8, maxcrow=2;
432 if(panelNumber==1 && (moduleNumber==1 || moduleNumber==4)) maxcrow = 1;
438 std::cout <<
"Number of Chips: b" << bchipNumber <<
" f" << fchipNumber <<
" " << tagname << std::endl;
445 float temp, sum, nentries;
446 for(
int cr=0; cr<maxr; cr++){
447 for(
int cc=0; cc<maxc; cc++){
453 for(
int c=1;
c<53;
c++){
454 for(
int r=1;
r<81;
r++){
465 vecCN.push_back(chipNumber);
466 vecMean.push_back(0);
469 double mean = sum/nentries;
472 vecCN.push_back(chipNumber);
473 vecMean.push_back(mean);
476 for(
int c=1;
c<53;
c++){
477 for(
int r=1;
r<81;
r++){
480 avsd += (temp-
mean)*(temp-mean);
488 vecSD.push_back(avsd);
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]);
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
std::vector< double > vfpixSD
TH1F * bhThresholdMean_dist
#define DEFINE_FWK_MODULE(type)
void RocSumOneModule(int maxr, int maxc, MonitorElement *const &me, std::vector< double > &vecCN, std::vector< double > &vecMean, std::vector< double > &vecSD, int &chipNumber)
SiPixelDQMRocLevelAnalyzer(const edm::ParameterSet &)
std::vector< double > vfpixCN
TH1F * ehPedestalRMS_dist
unsigned int moduleNumber(align::ID, const TrackerTopology *)
Module number increases (decreases) with phi for +z (-z) endcap.
TH1F * ehPedestalMean_dist
std::vector< double > vbpixM
std::vector< MonitorElement * > getAllContents(const std::string &path) const
void RocSummary(std::string tagname)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
~SiPixelDQMRocLevelAnalyzer()
unsigned int panelNumber(align::ID, const TrackerTopology *)
Panel number is 1 for 4 modules, 2 for 3 modules.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TH1F * ehThresholdMean_dist
std::vector< double > vfpixM
TH1F * ehThresholdRMS_dist
double getBinContent(int binx) const
get content of bin (1-D)
TH1F * bhPedestalRMS_dist
T * make() const
make new ROOT object
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
edm::Service< TFileService > fs_
std::vector< double > vbpixCN
T mod(const T &a, const T &b)
TH1F * bhThresholdRMS_dist
TH1F * bhPedestalMean_dist
std::vector< double > vbpixSD