File indexing completed on 2023-03-17 10:44:45
0001
0002
0003
0004
0005 int Wait() {
0006 cout << " Continue [<RET>|q]? ";
0007 char x;
0008 x = getchar();
0009 if ((x == 'q') || (x == 'Q')) return 1;
0010 return 0;
0011 }
0012
0013 void DrawCosmicPlots(Char_t* infile = 0, Int_t runNum=0, Bool_t printPics = kTRUE, Char_t* fileType = "png", Char_t* dirName = ".", Bool_t doWait=kFALSE)
0014 {
0015
0016 gROOT->SetStyle("Plain");
0017 gStyle->SetPalette(1,0); gStyle->SetOptStat(10);
0018
0019 if (!infile) {
0020 cout << " No input file specified !" << endl;
0021 return;
0022 }
0023
0024 cout << "Producing cosmics plots for: " << infile << endl;
0025
0026 TFile* f = new TFile(infile);
0027
0028 int runNumber = 0;
0029 if (runNum==0) {
0030 runNumber = runNumberHist->GetBinContent(1);
0031 cout << "Run Number: " << runNumber << endl;
0032 } else {
0033 runNumber = runNum;
0034 }
0035
0036 char name[500];
0037
0038 const int nHists1=25;
0039 const int nHists2=17;
0040 const int nHists3=3+15;
0041 const int nHists4=8+12+8+1+6;
0042 const int nHists = nHists1+nHists2+nHists3+nHists4;
0043
0044 cout << nHists1 << " " << nHists2 << " " << nHists3 << " " << nHists4 << " " << nHists << endl;;
0045
0046 TCanvas* c[nHists];
0047 char cname[100];
0048
0049 for (int i=0; i<nHists1; i++) {
0050 sprintf(cname,"c%i",i);
0051 int x = (i%3)*600;
0052 int y = (i/3)*100;
0053 c[i] = new TCanvas(cname,cname,x,y,600,400);
0054 cout << "Hists1 " << i << " : " << x << " , " << y << endl;
0055 }
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 char runChar[50];
0070 sprintf(runChar,", run %i",runNumber);
0071
0072 c[0]->cd();
0073 gStyle->SetOptStat(111110);
0074 SeedEnergyAllFEDs->Draw();
0075 char mytitle[100]; sprintf(mytitle,"%s",SeedEnergyAllFEDs->GetTitle());
0076 strcat(mytitle,runChar); SeedEnergyAllFEDs->SetTitle(mytitle);
0077 c[0]->SetLogy(1);
0078 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_SeedEnergyAllFEDs_%i.%s",dirName,runNumber,fileType); c[0]->Print(name); }
0079
0080
0081 c[1]->cd();
0082 E2_AllClusters->Draw();
0083 char mytitle[100]; sprintf(mytitle,"%s",E2_AllClusters->GetTitle());
0084 strcat(mytitle,runChar); E2_AllClusters->SetTitle(mytitle);
0085 c[1]->SetLogy(1);
0086 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_E2_AllClusters_%i.%s",dirName,runNumber,fileType); c[1]->Print(name); }
0087
0088 c[2]->cd();
0089 energy_AllClusters->Draw();
0090 char mytitle[100]; sprintf(mytitle,"%s",energy_AllClusters->GetTitle());
0091 strcat(mytitle,runChar); energy_AllClusters->SetTitle(mytitle);
0092 c[2]->SetLogy(1);
0093 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_energy_AllClusters_%i.%s",dirName,runNumber,fileType); c[2]->Print(name); }
0094
0095 c[3]->cd();
0096 NumXtalsInClusterAllHist->Draw();
0097 char mytitle[100]; sprintf(mytitle,"%s",NumXtalsInClusterAllHist->GetTitle());
0098 strcat(mytitle,runChar); NumXtalsInClusterAllHist->SetTitle(mytitle);
0099 c[3]->SetLogy(0);
0100 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_NumXtalsInClusterAllHist_%i.%s",dirName,runNumber,fileType); c[3]->Print(name); }
0101
0102 c[4]->cd();
0103 energyvsE1_AllClusters->Draw("colz");
0104 char mytitle[100]; sprintf(mytitle,"%s",energyvsE1_AllClusters->GetTitle());
0105 strcat(mytitle,runChar); energyvsE1_AllClusters->SetTitle(mytitle);
0106 c[4]->SetLogy(0);
0107 c[4]->SetLogz(1);
0108 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_energyvsE1_AllClusters_%i.%s",dirName,runNumber,fileType); c[4]->Print(name); }
0109
0110 c[5]->cd();
0111 gStyle->SetOptStat(10);
0112 OccupancyAllEventsCoarse->Draw("colz");
0113 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse->GetTitle());
0114 strcat(mytitle,runChar); OccupancyAllEventsCoarse->SetTitle(mytitle);
0115 OccupancyAllEventsCoarse->SetMinimum(1);
0116 OccupancyAllEventsCoarse->GetXaxis()->SetNdivisions(-18);
0117 OccupancyAllEventsCoarse->GetYaxis()->SetNdivisions(2);
0118 c[5]->SetLogy(0);
0119 c[5]->SetLogz(1);
0120 c[5]->SetGridx(1);
0121 c[5]->SetGridy(1);
0122 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_%i.%s",dirName,runNumber,fileType); c[5]->Print(name); }
0123
0124 c[6]->cd();
0125 OccupancyAllEvents->Draw("colz");
0126 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents->GetTitle());
0127 strcat(mytitle,runChar); OccupancyAllEvents->SetTitle(mytitle);
0128 OccupancyAllEvents->SetMinimum(1);
0129
0130 OccupancyAllEvents->GetXaxis()->SetNdivisions(-18);
0131 OccupancyAllEvents->GetYaxis()->SetNdivisions(2);
0132 c[6]->SetLogy(0);
0133 c[6]->SetLogz(1);
0134 c[6]->SetGridx(1);
0135 c[6]->SetGridy(1);
0136 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_%i.%s",dirName,runNumber,fileType); c[6]->Print(name); }
0137
0138 c[7]->cd();
0139 gStyle->SetOptStat(10);
0140 TrueOccupancyAllEventsCoarse->Draw("colz");
0141 char mytitle[100]; sprintf(mytitle,"%s",TrueOccupancyAllEventsCoarse->GetTitle());
0142 strcat(mytitle,runChar); TrueOccupancyAllEventsCoarse->SetTitle(mytitle);
0143 TrueOccupancyAllEventsCoarse->SetMinimum(1);
0144 TrueOccupancyAllEventsCoarse->GetXaxis()->SetNdivisions(-18);
0145 TrueOccupancyAllEventsCoarse->GetYaxis()->SetNdivisions(2);
0146 c[7]->SetLogy(0);
0147 c[7]->SetLogz(1);
0148
0149
0150 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_TrueOccupancyAllEventsCoarse_%i.%s",dirName,runNumber,fileType); c[7]->Print(name); }
0151
0152 c[8]->cd();
0153 TrueOccupancyAllEvents->Draw("colz");
0154 char mytitle[100]; sprintf(mytitle,"%s",TrueOccupancyAllEvents->GetTitle());
0155 strcat(mytitle,runChar); TrueOccupancyAllEvents->SetTitle(mytitle);
0156 TrueOccupancyAllEvents->SetMinimum(1);
0157 TrueOccupancyAllEvents->GetXaxis()->SetNdivisions(-18);
0158 TrueOccupancyAllEvents->GetYaxis()->SetNdivisions(2);
0159 c[8]->SetLogy(0);
0160 c[8]->SetLogz(1);
0161
0162
0163 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_TrueOccupancyAllEvents_%i.%s",dirName,runNumber,fileType); c[8]->Print(name); }
0164
0165
0166 c[9]->cd();
0167 gStyle->SetOptStat(111110);
0168 timeForAllFeds->Draw();
0169 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds->GetTitle());
0170 strcat(mytitle,runChar); timeForAllFeds->SetTitle(mytitle);
0171 c[9]->SetLogy(0);
0172 c[9]->SetLogz(0);
0173 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_%i.%s",dirName,runNumber,fileType); c[9]->Print(name); }
0174
0175 c[10]->cd();
0176 timeVsAmpAllEvents->Draw("colz");
0177 char mytitle[100]; sprintf(mytitle,"%s",timeVsAmpAllEvents->GetTitle());
0178 strcat(mytitle,runChar); timeVsAmpAllEvents->SetTitle(mytitle);
0179 timeVsAmpAllEvents->SetMinimum(1);
0180 c[10]->SetLogy(0);
0181 c[10]->SetLogz(1);
0182 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeVsAmpAllFeds_%i.%s",dirName,runNumber,fileType); c[10]->Print(name); }
0183
0184 c[11]->cd();
0185 timePhiAllFEDs->ProfileX()->Draw();
0186 char mytitle[100]; sprintf(mytitle,"%s",timePhiAllFEDs->GetTitle());
0187 strcat(mytitle,runChar); timePhiAllFEDs->SetTitle(mytitle);
0188 timePhiAllFEDs->ProfileX()->GetYaxis()->SetTitle("Relative Time (1 clock = 25ns)");
0189 c[11]->SetLogy(0);
0190 c[11]->SetLogz(0);
0191 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiAllFeds_%i.%s",dirName,runNumber,fileType); c[11]->Print(name); }
0192
0193 c[12]->cd();
0194 timeEBP->Draw();
0195 char mytitle[100]; sprintf(mytitle,"%s",timeEBP->GetTitle());
0196 strcat(mytitle,runChar); timeEBP->SetTitle(mytitle);
0197 c[12]->SetLogy(0);
0198 c[12]->SetLogz(0);
0199 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBP_%i.%s",dirName,runNumber,fileType); c[12]->Print(name); }
0200
0201 c[13]->cd();
0202 timeEBM->Draw();
0203 char mytitle[100]; sprintf(mytitle,"%s",timeEBM->GetTitle());
0204 strcat(mytitle,runChar); timeEBM->SetTitle(mytitle);
0205 c[13]->SetLogy(0);
0206 c[13]->SetLogz(0);
0207 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBM_%i.%s",dirName,runNumber,fileType); c[13]->Print(name); }
0208
0209 c[14]->cd();
0210 timeEBPTop->Draw();
0211 char mytitle[100]; sprintf(mytitle,"%s",timeEBPTop->GetTitle());
0212 strcat(mytitle,runChar); timeEBPTop->SetTitle(mytitle);
0213 c[14]->SetLogy(0);
0214 c[14]->SetLogz(0);
0215 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBPTop_%i.%s",dirName,runNumber,fileType); c[14]->Print(name); }
0216
0217 c[15]->cd();
0218 timeEBMTop->Draw();
0219 char mytitle[100]; sprintf(mytitle,"%s",timeEBMTop->GetTitle());
0220 strcat(mytitle,runChar); timeEBMTop->SetTitle(mytitle);
0221 c[15]->SetLogy(0);
0222 c[15]->SetLogz(0);
0223 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBMTop_%i.%s",dirName,runNumber,fileType); c[15]->Print(name); }
0224
0225 c[16]->cd();
0226 timeEBPBottom->Draw();
0227 char mytitle[100]; sprintf(mytitle,"%s",timeEBPBottom->GetTitle());
0228 strcat(mytitle,runChar); timeEBPBottom->SetTitle(mytitle);
0229 c[16]->SetLogy(0);
0230 c[16]->SetLogz(0);
0231 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBPBottom_%i.%s",dirName,runNumber,fileType); c[16]->Print(name); }
0232
0233 c[17]->cd();
0234 timeEBMBottom->Draw();
0235 char mytitle[100]; sprintf(mytitle,"%s",timeEBMBottom->GetTitle());
0236 strcat(mytitle,runChar); timeEBMBottom->SetTitle(mytitle);
0237 c[17]->SetLogy(0);
0238 c[17]->SetLogz(0);
0239 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBMBottom_%i.%s",dirName,runNumber,fileType); c[17]->Print(name); }
0240
0241 c[18]->cd();
0242 FrequencyAllEvent->Draw();
0243 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEvent->GetTitle());
0244 strcat(mytitle,runChar); FrequencyAllEvent->SetTitle(mytitle);
0245 c[18]->SetLogy(0);
0246 c[18]->SetLogz(0);
0247 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEvent_%i.%s",dirName,runNumber,fileType); c[18]->Print(name); }
0248
0249 c[19]->cd();
0250 timeVsFreqAllEvent->Draw("colz");
0251 char mytitle[100]; sprintf(mytitle,"%s",timeVsFreqAllEvent->GetTitle());
0252 strcat(mytitle,runChar); timeVsFreqAllEvent->SetTitle(mytitle);
0253 timeVsFreqAllEvent->SetMinimum(1);
0254 c[19]->SetLogy(0);
0255 c[19]->SetLogz(0);
0256 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeVsFreqAllFeds_%i.%s",dirName,runNumber,fileType); c[19]->Print(name); }
0257
0258 c[20]->cd();
0259 numberofCosmicsPerEvent->Draw();
0260 char mytitle[100]; sprintf(mytitle,"%s",numberofCosmicsPerEvent->GetTitle());
0261 strcat(mytitle,runChar); numberofCosmicsPerEvent->SetTitle(mytitle);
0262 c[20]->SetLogy(0);
0263 c[20]->SetLogz(0);
0264 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofCosmicsPerEvent_%i.%s",dirName,runNumber,fileType); c[20]->Print(name); }
0265
0266 c[21]->cd();
0267 frequencyOfGoodEvents->Draw();
0268 char mytitle[100]; sprintf(mytitle,"%s",frequencyOfGoodEvents->GetTitle());
0269 strcat(mytitle,runChar); frequencyOfGoodEvents->SetTitle(mytitle);
0270 c[21]->SetLogy(0);
0271 c[21]->SetLogz(0);
0272 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_frequencyOfGoodEvents_%i.%s",dirName,runNumber,fileType); c[21]->Print(name); }
0273
0274
0275 c[22]->cd();
0276 OccupancyAllEvents->Draw("colz");
0277 char mytitle[100]; sprintf(mytitle,"%s max forced",OccupancyAllEvents->GetTitle());
0278
0279 OccupancyAllEvents->SetTitle(mytitle);
0280 OccupancyAllEvents->SetMinimum(1);
0281
0282 OccupancyAllEvents->SetMaximum(200);
0283 OccupancyAllEvents->GetXaxis()->SetNdivisions(-18);
0284 OccupancyAllEvents->GetYaxis()->SetNdivisions(2);
0285 c[22]->SetLogy(0);
0286 c[22]->SetLogz(1);
0287 c[22]->SetGridx(1);
0288 c[22]->SetGridy(1);
0289 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsMax200_%i.%s",dirName,runNumber,fileType); c[22]->Print(name); }
0290
0291 c[23]->cd();
0292 OccupancyAllEventsCoarse->Draw("colz");
0293 char mytitle[100]; sprintf(mytitle,"%s max forced",OccupancyAllEventsCoarse->GetTitle());
0294
0295 OccupancyAllEventsCoarse->SetTitle(mytitle);
0296 OccupancyAllEventsCoarse->SetMinimum(1);
0297
0298 OccupancyAllEventsCoarse->SetMaximum(5000);
0299 OccupancyAllEventsCoarse->GetXaxis()->SetNdivisions(-18);
0300 OccupancyAllEventsCoarse->GetYaxis()->SetNdivisions(2);
0301 c[23]->SetLogy(0);
0302 c[23]->SetLogz(1);
0303 c[23]->SetGridx(1);
0304 c[23]->SetGridy(1);
0305 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarseMax5000_%i.%s",dirName,runNumber,fileType); c[23]->Print(name); }
0306
0307 c[24]->cd();
0308 energyHigh_AllClusters->Draw();
0309 char mytitle[100]; sprintf(mytitle,"%s",energyHigh_AllClusters->GetTitle());
0310 strcat(mytitle,runChar); energyHigh_AllClusters->SetTitle(mytitle);
0311 c[24]->SetLogy(1);
0312 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_energyHigh_AllClusters_%i.%s",dirName,runNumber,fileType); c[24]->Print(name); }
0313
0314 if (doWait) {
0315 if (Wait()) return;
0316 }
0317
0318 for (int i=nHists1; i<nHists1+nHists2; i++) {
0319 sprintf(cname,"c%i",i);
0320 int x = ((i-nHists1)%3)*600;
0321 int y = ((i-nHists1)/3)*100;
0322 c[i] = new TCanvas(cname,cname,x,y,600,400);
0323 cout << "Hists2 " <<i << " : " << x << " , " << y << endl;
0324 }
0325
0326
0327
0328
0329 c[25]->cd();
0330 triggerHist->GetXaxis()->SetBinLabel(1,"ECAL");
0331 triggerHist->GetXaxis()->SetBinLabel(2,"HCAL");
0332 triggerHist->GetXaxis()->SetBinLabel(3,"DT");
0333 triggerHist->GetXaxis()->SetBinLabel(4,"RPC");
0334 triggerHist->GetXaxis()->SetBinLabel(5,"CSC");
0335 triggerHist->GetXaxis()->SetLabelSize(0.07);
0336 triggerHist->Draw();
0337 char mytitle[100]; sprintf(mytitle,"%s",triggerHist->GetTitle());
0338 strcat(mytitle,runChar); triggerHist->SetTitle(mytitle);
0339 c[25]->SetLogy(0);
0340 c[25]->SetLogz(0);
0341 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_triggerHist_%i.%s",dirName,runNumber,fileType); c[25]->Print(name); }
0342
0343
0344 c[26]->cd();
0345 triggerExclusiveHist->GetXaxis()->SetBinLabel(1,"ECAL");
0346 triggerExclusiveHist->GetXaxis()->SetBinLabel(2,"HCAL");
0347 triggerExclusiveHist->GetXaxis()->SetBinLabel(3,"DT");
0348 triggerExclusiveHist->GetXaxis()->SetBinLabel(4,"RPC");
0349 triggerExclusiveHist->GetXaxis()->SetBinLabel(5,"CSC");
0350 triggerExclusiveHist->GetXaxis()->SetLabelSize(0.07);
0351 triggerExclusiveHist->Draw();
0352 char mytitle[100]; sprintf(mytitle,"%s",triggerExclusiveHist->GetTitle());
0353 strcat(mytitle,runChar); triggerExclusiveHist->SetTitle(mytitle);
0354 c[26]->SetLogy(0);
0355 c[26]->SetLogz(0);
0356 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_triggerExclusiveHist_%i.%s",dirName,runNumber,fileType); c[26]->Print(name); }
0357
0358
0359
0360 c[27]->cd();
0361 gStyle->SetOptStat(10);
0362 OccupancyAllEventsCoarse_ECAL->Draw("colz");
0363 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ECAL->GetTitle());
0364 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ECAL->SetTitle(mytitle);
0365 OccupancyAllEventsCoarse_ECAL->SetMinimum(1);
0366
0367 OccupancyAllEventsCoarse_ECAL->GetXaxis()->SetNdivisions(-18);
0368 OccupancyAllEventsCoarse_ECAL->GetYaxis()->SetNdivisions(2);
0369 c[27]->SetLogy(0);
0370 c[27]->SetLogz(1);
0371 c[27]->SetGridx(1);
0372 c[27]->SetGridy(1);
0373 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ECAL_%i.%s",dirName,runNumber,fileType); c[27]->Print(name); }
0374
0375 c[28]->cd();
0376 OccupancyAllEvents_ECAL->Draw("colz");
0377 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ECAL->GetTitle());
0378 strcat(mytitle,runChar); OccupancyAllEvents_ECAL->SetTitle(mytitle);
0379 OccupancyAllEvents_ECAL->SetMinimum(1);
0380
0381 OccupancyAllEvents_ECAL->GetXaxis()->SetNdivisions(-18);
0382 OccupancyAllEvents_ECAL->GetYaxis()->SetNdivisions(2);
0383 c[28]->SetLogy(0);
0384 c[28]->SetLogz(1);
0385 c[28]->SetGridx(1);
0386 c[28]->SetGridy(1);
0387 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ECAL_%i.%s",dirName,runNumber,fileType); c[28]->Print(name); }
0388
0389 c[29]->cd();
0390 gStyle->SetOptStat(111110);
0391 timeForAllFeds_ECAL->Draw();
0392 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_ECAL->GetTitle());
0393 strcat(mytitle,runChar); timeForAllFeds_ECAL->SetTitle(mytitle);
0394 c[29]->SetLogy(0);
0395 c[29]->SetLogz(0);
0396 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_ECAL_%i.%s",dirName,runNumber,fileType); c[29]->Print(name); }
0397
0398
0399
0400 c[30]->cd();
0401 gStyle->SetOptStat(10);
0402 OccupancyAllEventsCoarse_HCAL->Draw("colz");
0403 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_HCAL->GetTitle());
0404 strcat(mytitle,runChar); OccupancyAllEventsCoarse_HCAL->SetTitle(mytitle);
0405 OccupancyAllEventsCoarse_HCAL->SetMinimum(1);
0406
0407 OccupancyAllEventsCoarse_HCAL->GetXaxis()->SetNdivisions(-18);
0408 OccupancyAllEventsCoarse_HCAL->GetYaxis()->SetNdivisions(2);
0409 c[30]->SetLogy(0);
0410 c[30]->SetLogz(1);
0411 c[30]->SetGridx(1);
0412 c[30]->SetGridy(1);
0413 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_HCAL_%i.%s",dirName,runNumber,fileType); c[30]->Print(name); }
0414
0415 c[31]->cd();
0416 OccupancyAllEvents_HCAL->Draw("colz");
0417 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_HCAL->GetTitle());
0418 strcat(mytitle,runChar); OccupancyAllEvents_HCAL->SetTitle(mytitle);
0419 OccupancyAllEvents_HCAL->SetMinimum(1);
0420
0421 OccupancyAllEvents_HCAL->GetXaxis()->SetNdivisions(-18);
0422 OccupancyAllEvents_HCAL->GetYaxis()->SetNdivisions(2);
0423 c[31]->SetLogy(0);
0424 c[31]->SetLogz(1);
0425 c[31]->SetGridx(1);
0426 c[31]->SetGridy(1);
0427 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_HCAL_%i.%s",dirName,runNumber,fileType); c[31]->Print(name); }
0428
0429 c[32]->cd();
0430 gStyle->SetOptStat(111110);
0431 timeForAllFeds_HCAL->Draw();
0432 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_HCAL->GetTitle());
0433 strcat(mytitle,runChar); timeForAllFeds_HCAL->SetTitle(mytitle);
0434 c[32]->SetLogy(0);
0435 c[32]->SetLogz(0);
0436 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_HCAL_%i.%s",dirName,runNumber,fileType); c[32]->Print(name); }
0437
0438
0439
0440 c[33]->cd();
0441 gStyle->SetOptStat(10);
0442 OccupancyAllEventsCoarse_DT->Draw("colz");
0443 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_DT->GetTitle());
0444 strcat(mytitle,runChar); OccupancyAllEventsCoarse_DT->SetTitle(mytitle);
0445 OccupancyAllEventsCoarse_DT->SetMinimum(1);
0446
0447 OccupancyAllEventsCoarse_DT->GetXaxis()->SetNdivisions(-18);
0448 OccupancyAllEventsCoarse_DT->GetYaxis()->SetNdivisions(2);
0449 c[33]->SetLogy(0);
0450 c[33]->SetLogz(1);
0451 c[33]->SetGridx(1);
0452 c[33]->SetGridy(1);
0453 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_DT_%i.%s",dirName,runNumber,fileType); c[33]->Print(name); }
0454
0455 c[34]->cd();
0456 OccupancyAllEvents_DT->Draw("colz");
0457 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_DT->GetTitle());
0458 strcat(mytitle,runChar); OccupancyAllEvents_DT->SetTitle(mytitle);
0459 OccupancyAllEvents_DT->SetMinimum(1);
0460
0461 OccupancyAllEvents_DT->GetXaxis()->SetNdivisions(-18);
0462 OccupancyAllEvents_DT->GetYaxis()->SetNdivisions(2);
0463 c[34]->SetLogy(0);
0464 c[34]->SetLogz(1);
0465 c[34]->SetGridx(1);
0466 c[34]->SetGridy(1);
0467 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_DT_%i.%s",dirName,runNumber,fileType); c[34]->Print(name); }
0468
0469 c[35]->cd();
0470 gStyle->SetOptStat(111110);
0471 timeForAllFeds_DT->Draw();
0472 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_DT->GetTitle());
0473 strcat(mytitle,runChar); timeForAllFeds_DT->SetTitle(mytitle);
0474 c[35]->SetLogy(0);
0475 c[35]->SetLogz(0);
0476 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_DT_%i.%s",dirName,runNumber,fileType); c[35]->Print(name); }
0477
0478
0479
0480 c[36]->cd();
0481 gStyle->SetOptStat(10);
0482 OccupancyAllEventsCoarse_RPC->Draw("colz");
0483 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_RPC->GetTitle());
0484 strcat(mytitle,runChar); OccupancyAllEventsCoarse_RPC->SetTitle(mytitle);
0485 OccupancyAllEventsCoarse_RPC->SetMinimum(1);
0486
0487 OccupancyAllEventsCoarse_RPC->GetXaxis()->SetNdivisions(-18);
0488 OccupancyAllEventsCoarse_RPC->GetYaxis()->SetNdivisions(2);
0489 c[36]->SetLogy(0);
0490 c[36]->SetLogz(1);
0491 c[36]->SetGridx(1);
0492 c[36]->SetGridy(1);
0493 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_RPC_%i.%s",dirName,runNumber,fileType); c[36]->Print(name); }
0494
0495 c[37]->cd();
0496 OccupancyAllEvents_RPC->Draw("colz");
0497 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_RPC->GetTitle());
0498 strcat(mytitle,runChar); OccupancyAllEvents_RPC->SetTitle(mytitle);
0499 OccupancyAllEvents_RPC->SetMinimum(1);
0500
0501 OccupancyAllEvents_RPC->GetXaxis()->SetNdivisions(-18);
0502 OccupancyAllEvents_RPC->GetYaxis()->SetNdivisions(2);
0503 c[37]->SetLogy(0);
0504 c[37]->SetLogz(1);
0505 c[37]->SetGridx(1);
0506 c[37]->SetGridy(1);
0507 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_RPC_%i.%s",dirName,runNumber,fileType); c[37]->Print(name); }
0508
0509 c[38]->cd();
0510 gStyle->SetOptStat(111110);
0511 timeForAllFeds_RPC->Draw();
0512 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_RPC->GetTitle());
0513 strcat(mytitle,runChar); timeForAllFeds_RPC->SetTitle(mytitle);
0514 c[38]->SetLogy(0);
0515 c[38]->SetLogz(0);
0516 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_RPC_%i.%s",dirName,runNumber,fileType); c[38]->Print(name); }
0517
0518
0519
0520
0521 c[39]->cd();
0522 gStyle->SetOptStat(10);
0523 OccupancyAllEventsCoarse_CSC->Draw("colz");
0524 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_CSC->GetTitle());
0525 strcat(mytitle,runChar); OccupancyAllEventsCoarse_CSC->SetTitle(mytitle);
0526 OccupancyAllEventsCoarse_CSC->SetMinimum(1);
0527
0528 OccupancyAllEventsCoarse_CSC->GetXaxis()->SetNdivisions(-18);
0529 OccupancyAllEventsCoarse_CSC->GetYaxis()->SetNdivisions(2);
0530 c[39]->SetLogy(0);
0531 c[39]->SetLogz(1);
0532 c[39]->SetGridx(1);
0533 c[39]->SetGridy(1);
0534 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_CSC_%i.%s",dirName,runNumber,fileType); c[39]->Print(name); }
0535
0536 c[40]->cd();
0537 OccupancyAllEvents_CSC->Draw("colz");
0538 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_CSC->GetTitle());
0539 strcat(mytitle,runChar); OccupancyAllEvents_CSC->SetTitle(mytitle);
0540 OccupancyAllEvents_CSC->SetMinimum(1);
0541
0542 OccupancyAllEvents_CSC->GetXaxis()->SetNdivisions(-18);
0543 OccupancyAllEvents_CSC->GetYaxis()->SetNdivisions(2);
0544 c[40]->SetLogy(0);
0545 c[40]->SetLogz(1);
0546 c[40]->SetGridx(1);
0547 c[40]->SetGridy(1);
0548 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_CSC_%i.%s",dirName,runNumber,fileType); c[40]->Print(name); }
0549
0550 c[41]->cd();
0551 gStyle->SetOptStat(111110);
0552 timeForAllFeds_CSC->Draw();
0553 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_CSC->GetTitle());
0554 strcat(mytitle,runChar); timeForAllFeds_CSC->SetTitle(mytitle);
0555 c[41]->SetLogy(0);
0556 c[41]->SetLogz(0);
0557 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_CSC_%i.%s",dirName,runNumber,fileType); c[41]->Print(name); }
0558
0559
0560 if (doWait) {
0561 if (Wait()) return;
0562 }
0563
0564 for (int i=nHists1+nHists2; i<nHists1+nHists2+nHists3; i++) {
0565 sprintf(cname,"c%i",i);
0566 int x = ((i-(nHists1+nHists2))%3)*600;
0567 int y = ((i-(nHists1+nHists2))/3)*100;
0568 c[i] = new TCanvas(cname,cname,x,y,600,400);
0569 cout << "Hists3 " <<i << " : " << x << " , " << y << endl;
0570 }
0571
0572
0573 c[42]->cd();
0574 gStyle->SetOptStat(10);
0575 OccupancyAllEventsCoarse_ExclusiveECAL->Draw("colz");
0576 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ExclusiveECAL->GetTitle());
0577 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ExclusiveECAL->SetTitle(mytitle);
0578 OccupancyAllEventsCoarse_ExclusiveECAL->SetMinimum(1);
0579
0580 OccupancyAllEventsCoarse_ExclusiveECAL->GetXaxis()->SetNdivisions(-18);
0581 OccupancyAllEventsCoarse_ExclusiveECAL->GetYaxis()->SetNdivisions(2);
0582 c[42]->SetLogy(0);
0583 c[42]->SetLogz(1);
0584 c[42]->SetGridx(1);
0585 c[42]->SetGridy(1);
0586 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ExclusiveECAL_%i.%s",dirName,runNumber,fileType); c[42]->Print(name); }
0587
0588 c[43]->cd();
0589 OccupancyAllEvents_ExclusiveECAL->Draw("colz");
0590 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ExclusiveECAL->GetTitle());
0591 strcat(mytitle,runChar); OccupancyAllEvents_ExclusiveECAL->SetTitle(mytitle);
0592 OccupancyAllEvents_ExclusiveECAL->SetMinimum(1);
0593
0594 OccupancyAllEvents_ExclusiveECAL->GetXaxis()->SetNdivisions(-18);
0595 OccupancyAllEvents_ExclusiveECAL->GetYaxis()->SetNdivisions(2);
0596 c[43]->SetLogy(0);
0597 c[43]->SetLogz(1);
0598 c[43]->SetGridx(1);
0599 c[43]->SetGridy(1);
0600 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ExclusiveECAL_%i.%s",dirName,runNumber,fileType); c[43]->Print(name); }
0601
0602
0603
0604 c[44]->cd();
0605 gStyle->SetOptStat(10);
0606 OccupancyAllEventsCoarse_ExclusiveHCAL->Draw("colz");
0607 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ExclusiveHCAL->GetTitle());
0608 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ExclusiveHCAL->SetTitle(mytitle);
0609 OccupancyAllEventsCoarse_ExclusiveHCAL->SetMinimum(1);
0610
0611 OccupancyAllEventsCoarse_ExclusiveHCAL->GetXaxis()->SetNdivisions(-18);
0612 OccupancyAllEventsCoarse_ExclusiveHCAL->GetYaxis()->SetNdivisions(2);
0613 c[44]->SetLogy(0);
0614 c[44]->SetLogz(1);
0615 c[44]->SetGridx(1);
0616 c[44]->SetGridy(1);
0617 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ExclusiveHCAL_%i.%s",dirName,runNumber,fileType); c[44]->Print(name); }
0618
0619 c[45]->cd();
0620 OccupancyAllEvents_ExclusiveHCAL->Draw("colz");
0621 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ExclusiveHCAL->GetTitle());
0622 strcat(mytitle,runChar); OccupancyAllEvents_ExclusiveHCAL->SetTitle(mytitle);
0623 OccupancyAllEvents_ExclusiveHCAL->SetMinimum(1);
0624
0625 OccupancyAllEvents_ExclusiveHCAL->GetXaxis()->SetNdivisions(-18);
0626 OccupancyAllEvents_ExclusiveHCAL->GetYaxis()->SetNdivisions(2);
0627 c[45]->SetLogy(0);
0628 c[45]->SetLogz(1);
0629 c[45]->SetGridx(1);
0630 c[45]->SetGridy(1);
0631 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ExclusiveHCAL_%i.%s",dirName,runNumber,fileType); c[45]->Print(name); }
0632
0633
0634
0635 c[46]->cd();
0636 gStyle->SetOptStat(10);
0637 OccupancyAllEventsCoarse_ExclusiveDT->Draw("colz");
0638 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ExclusiveDT->GetTitle());
0639 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ExclusiveDT->SetTitle(mytitle);
0640 OccupancyAllEventsCoarse_ExclusiveDT->SetMinimum(1);
0641
0642 OccupancyAllEventsCoarse_ExclusiveDT->GetXaxis()->SetNdivisions(-18);
0643 OccupancyAllEventsCoarse_ExclusiveDT->GetYaxis()->SetNdivisions(2);
0644 c[46]->SetLogy(0);
0645 c[46]->SetLogz(1);
0646 c[46]->SetGridx(1);
0647 c[46]->SetGridy(1);
0648 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ExclusiveDT_%i.%s",dirName,runNumber,fileType); c[46]->Print(name); }
0649
0650 c[47]->cd();
0651 OccupancyAllEvents_ExclusiveDT->Draw("colz");
0652 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ExclusiveDT->GetTitle());
0653 strcat(mytitle,runChar); OccupancyAllEvents_ExclusiveDT->SetTitle(mytitle);
0654 OccupancyAllEvents_ExclusiveDT->SetMinimum(1);
0655
0656 OccupancyAllEvents_ExclusiveDT->GetXaxis()->SetNdivisions(-18);
0657 OccupancyAllEvents_ExclusiveDT->GetYaxis()->SetNdivisions(2);
0658 c[47]->SetLogy(0);
0659 c[47]->SetLogz(1);
0660 c[47]->SetGridx(1);
0661 c[47]->SetGridy(1);
0662 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ExclusiveDT_%i.%s",dirName,runNumber,fileType); c[47]->Print(name); }
0663
0664
0665
0666 c[48]->cd();
0667 gStyle->SetOptStat(10);
0668 OccupancyAllEventsCoarse_ExclusiveRPC->Draw("colz");
0669 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ExclusiveRPC->GetTitle());
0670 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ExclusiveRPC->SetTitle(mytitle);
0671 OccupancyAllEventsCoarse_ExclusiveRPC->SetMinimum(1);
0672
0673 OccupancyAllEventsCoarse_ExclusiveRPC->GetXaxis()->SetNdivisions(-18);
0674 OccupancyAllEventsCoarse_ExclusiveRPC->GetYaxis()->SetNdivisions(2);
0675 c[48]->SetLogy(0);
0676 c[48]->SetLogz(1);
0677 c[48]->SetGridx(1);
0678 c[48]->SetGridy(1);
0679 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ExclusiveRPC_%i.%s",dirName,runNumber,fileType); c[48]->Print(name); }
0680
0681 c[49]->cd();
0682 OccupancyAllEvents_ExclusiveRPC->Draw("colz");
0683 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ExclusiveRPC->GetTitle());
0684 strcat(mytitle,runChar); OccupancyAllEvents_ExclusiveRPC->SetTitle(mytitle);
0685 OccupancyAllEvents_ExclusiveRPC->SetMinimum(1);
0686
0687 OccupancyAllEvents_ExclusiveRPC->GetXaxis()->SetNdivisions(-18);
0688 OccupancyAllEvents_ExclusiveRPC->GetYaxis()->SetNdivisions(2);
0689 c[49]->SetLogy(0);
0690 c[49]->SetLogz(1);
0691 c[49]->SetGridx(1);
0692 c[49]->SetGridy(1);
0693 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ExclusiveRPC_%i.%s",dirName,runNumber,fileType); c[49]->Print(name); }
0694
0695
0696
0697 c[50]->cd();
0698 gStyle->SetOptStat(10);
0699 OccupancyAllEventsCoarse_ExclusiveCSC->Draw("colz");
0700 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEventsCoarse_ExclusiveCSC->GetTitle());
0701 strcat(mytitle,runChar); OccupancyAllEventsCoarse_ExclusiveCSC->SetTitle(mytitle);
0702 OccupancyAllEventsCoarse_ExclusiveCSC->SetMinimum(1);
0703
0704 OccupancyAllEventsCoarse_ExclusiveCSC->GetXaxis()->SetNdivisions(-18);
0705 OccupancyAllEventsCoarse_ExclusiveCSC->GetYaxis()->SetNdivisions(2);
0706 c[50]->SetLogy(0);
0707 c[50]->SetLogz(1);
0708 c[50]->SetGridx(1);
0709 c[50]->SetGridy(1);
0710 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEventsCoarse_ExclusiveCSC_%i.%s",dirName,runNumber,fileType); c[50]->Print(name); }
0711
0712 c[51]->cd();
0713 OccupancyAllEvents_ExclusiveCSC->Draw("colz");
0714 char mytitle[100]; sprintf(mytitle,"%s",OccupancyAllEvents_ExclusiveCSC->GetTitle());
0715 strcat(mytitle,runChar); OccupancyAllEvents_ExclusiveCSC->SetTitle(mytitle);
0716 OccupancyAllEvents_ExclusiveCSC->SetMinimum(1);
0717
0718 OccupancyAllEvents_ExclusiveCSC->GetXaxis()->SetNdivisions(-18);
0719 OccupancyAllEvents_ExclusiveCSC->GetYaxis()->SetNdivisions(2);
0720 c[51]->SetLogy(0);
0721 c[51]->SetLogz(1);
0722 c[51]->SetGridx(1);
0723 c[51]->SetGridy(1);
0724 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyAllEvents_ExclusiveCSC_%i.%s",dirName,runNumber,fileType); c[51]->Print(name); }
0725
0726 c[52]->cd();
0727 gStyle->SetOptStat(111110);
0728 timeLMAllFEDs->Draw("colz");
0729 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs->GetTitle());
0730 strcat(mytitle,runChar); timeLMAllFEDs->SetTitle(mytitle);
0731 c[52]->SetLogy(0);
0732 c[52]->SetLogz(1);
0733 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_%i.%s",dirName,runNumber,fileType); c[52]->Print(name); }
0734
0735
0736 c[53]->cd();
0737 gStyle->SetOptStat(111110);
0738 timeLMAllFEDs_ECAL->Draw("colz");
0739 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs_ECAL->GetTitle());
0740 strcat(mytitle,runChar); timeLMAllFEDs_ECAL->SetTitle(mytitle);
0741 c[53]->SetLogy(0);
0742 c[53]->SetLogz(1);
0743 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_ECAL_%i.%s",dirName,runNumber,fileType); c[53]->Print(name); }
0744
0745
0746 c[54]->cd();
0747 gStyle->SetOptStat(111110);
0748 timeLMAllFEDs_HCAL->Draw("colz");
0749 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs_HCAL->GetTitle());
0750 strcat(mytitle,runChar); timeLMAllFEDs_HCAL->SetTitle(mytitle);
0751 c[54]->SetLogy(0);
0752 c[54]->SetLogz(1);
0753 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_HCAL_%i.%s",dirName,runNumber,fileType); c[54]->Print(name); }
0754
0755
0756 c[55]->cd();
0757 gStyle->SetOptStat(111110);
0758 timeLMAllFEDs_DT->Draw("colz");
0759 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs_DT->GetTitle());
0760 strcat(mytitle,runChar); timeLMAllFEDs_DT->SetTitle(mytitle);
0761 c[55]->SetLogy(0);
0762 c[55]->SetLogz(1);
0763 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_DT_%i.%s",dirName,runNumber,fileType); c[55]->Print(name); }
0764
0765
0766 c[56]->cd();
0767 gStyle->SetOptStat(111110);
0768 timeLMAllFEDs_RPC->Draw("colz");
0769 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs_RPC->GetTitle());
0770 strcat(mytitle,runChar); timeLMAllFEDs_RPC->SetTitle(mytitle);
0771 c[56]->SetLogy(0);
0772 c[56]->SetLogz(1);
0773 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_RPC_%i.%s",dirName,runNumber,fileType); c[56]->Print(name); }
0774
0775
0776
0777 c[57]->cd();
0778 gStyle->SetOptStat(111110);
0779 timeLMAllFEDs_CSC->Draw("colz");
0780 char mytitle[100]; sprintf(mytitle,"%s",timeLMAllFEDs_CSC->GetTitle());
0781 strcat(mytitle,runChar); timeLMAllFEDs_CSC->SetTitle(mytitle);
0782 c[57]->SetLogy(0);
0783 c[57]->SetLogz(1);
0784 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeLMAllFEDs_CSC_%i.%s",dirName,runNumber,fileType); c[57]->Print(name); }
0785
0786
0787 c[58]->cd();
0788 OccupancyHighEnergyEvents->Draw("colz");
0789 char mytitle[100]; sprintf(mytitle,"%s",OccupancyHighEnergyEvents->GetTitle());
0790 strcat(mytitle,runChar); OccupancyHighEnergyEvents->SetTitle(mytitle);
0791 OccupancyHighEnergyEvents->SetMinimum(1);
0792
0793
0794 OccupancyHighEnergyEvents->GetXaxis()->SetNdivisions(-18);
0795 OccupancyHighEnergyEvents->GetYaxis()->SetNdivisions(2);
0796 c[58]->SetLogy(0);
0797 c[58]->SetLogz(0);
0798 c[58]->SetGridx(1);
0799 c[58]->SetGridy(1);
0800 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyHighEnergyEvents_%i.%s",dirName,runNumber,fileType); c[58]->Print(name); }
0801
0802 c[59]->cd();
0803 OccupancyHighEnergyEventsCoarse->Draw("colz");
0804 char mytitle[100]; sprintf(mytitle,"%s",OccupancyHighEnergyEventsCoarse->GetTitle());
0805 strcat(mytitle,runChar); OccupancyHighEnergyEventsCoarse->SetTitle(mytitle);
0806 OccupancyHighEnergyEventsCoarse->SetMinimum(1);
0807
0808
0809 OccupancyHighEnergyEventsCoarse->GetXaxis()->SetNdivisions(-18);
0810 OccupancyHighEnergyEventsCoarse->GetYaxis()->SetNdivisions(2);
0811 c[59]->SetLogy(0);
0812 c[59]->SetLogz(0);
0813 c[59]->SetGridx(1);
0814 c[59]->SetGridy(1);
0815 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancyHighEnergyEventsCoarse_%i.%s",dirName,runNumber,fileType); c[59]->Print(name); }
0816
0817
0818 if (doWait) {
0819 if (Wait()) return;
0820 }
0821
0822 for (int i=nHists1+nHists2+nHists3; i<nHists; i++) {
0823 sprintf(cname,"c%i",i);
0824 int x = ((i-(nHists1+nHists2+nHists3))%3)*600;
0825 int y = ((i-(nHists1+nHists2+nHists3))/3)*100;
0826 c[i] = new TCanvas(cname,cname,x,y,600,400);
0827 cout <<"Hists4 " << i << " : " << x << " , " << y << endl;
0828 }
0829
0830
0831 c[60]->cd();
0832 NumActiveXtalsInClusterAllHist->Draw();
0833 char mytitle[100]; sprintf(mytitle,"%s", NumActiveXtalsInClusterAllHist->GetTitle());
0834 strcat(mytitle,runChar); NumActiveXtalsInClusterAllHist->SetTitle(mytitle);
0835 c[60]->SetLogy(0);
0836 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_NumActiveXtalsInClusterAllHist_%i.%s",dirName,runNumber,fileType); c[60]->Print(name); }
0837
0838 c[61]->cd();
0839 numberofBCinSC->Draw();
0840 char mytitle[100]; sprintf(mytitle,"%s", numberofBCinSC->GetTitle());
0841 strcat(mytitle,runChar); numberofBCinSC->SetTitle(mytitle);
0842 c[61]->SetLogy(1);
0843 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofBCinSC_%i.%s",dirName,runNumber,fileType); c[61]->Print(name); }
0844
0845 c[62]->cd();
0846
0847 numberofBCinSCphi->ProfileX()->Draw();
0848 char mytitle[100]; sprintf(mytitle,"%s", numberofBCinSCphi->GetTitle());
0849 strcat(mytitle,runChar); numberofBCinSCphi->SetTitle(mytitle);
0850 c[62]->SetLogy(0);
0851 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofBCinSCphi_%i.%s",dirName,runNumber,fileType); c[62]->Print(name); }
0852
0853
0854 c[63]->cd();
0855 gStyle->SetOptStat(10);
0856 BCTrueOccupancyAllEventsCoarse->Draw("colz");
0857 char mytitle[100]; sprintf(mytitle,"%s",BCTrueOccupancyAllEventsCoarse->GetTitle());
0858 strcat(mytitle,runChar); BCTrueOccupancyAllEventsCoarse->SetTitle(mytitle);
0859 BCTrueOccupancyAllEventsCoarse->SetMinimum(1);
0860 BCTrueOccupancyAllEventsCoarse->GetXaxis()->SetNdivisions(-18);
0861 BCTrueOccupancyAllEventsCoarse->GetYaxis()->SetNdivisions(2);
0862 c[63]->SetLogy(0);
0863 c[63]->SetLogz(1);
0864
0865
0866 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_BCTrueOccupancyAllEventsCoarse_%i.%s",dirName,runNumber,fileType); c[63]->Print(name); }
0867
0868 c[64]->cd();
0869 BCTrueOccupancyAllEvents->Draw("colz");
0870 char mytitle[100]; sprintf(mytitle,"%s",BCTrueOccupancyAllEvents->GetTitle());
0871 strcat(mytitle,runChar); BCTrueOccupancyAllEvents->SetTitle(mytitle);
0872 BCTrueOccupancyAllEvents->SetMinimum(1);
0873 BCTrueOccupancyAllEvents->GetXaxis()->SetNdivisions(-18);
0874 BCTrueOccupancyAllEvents->GetYaxis()->SetNdivisions(2);
0875 c[64]->SetLogy(0);
0876 c[64]->SetLogz(1);
0877
0878
0879 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_BCTrueOccupancyAllEvents_%i.%s",dirName,runNumber,fileType); c[64]->Print(name); }
0880
0881 c[65]->cd();
0882 gStyle->SetOptStat(111110);
0883
0884
0885
0886 NumXtalsVsEnergy->ProfileX()->Draw();
0887 char mytitle[100]; sprintf(mytitle,"%s",NumXtalsVsEnergy->GetTitle());
0888 strcat(mytitle,runChar); NumXtalsVsEnergy->SetTitle(mytitle);
0889 c[65]->SetLogy(0);
0890 c[65]->SetLogz(0);
0891 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_NumXtalsVsEnergy_%i.%s",dirName,runNumber,fileType); c[65]->Print(name); }
0892
0893
0894 c[66]->cd();
0895
0896
0897
0898 NumXtalsVsHighEnergy->ProfileX()->Draw();
0899 char mytitle[100]; sprintf(mytitle,"%s",NumXtalsVsHighEnergy->GetTitle());
0900 strcat(mytitle,runChar); NumXtalsVsHighEnergy->SetTitle(mytitle);
0901 c[66]->SetLogy(0);
0902 c[66]->SetLogz(0);
0903 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_NumXtalsVsHighEnergy_%i.%s",dirName,runNumber,fileType); c[66]->Print(name); }
0904
0905 c[67]->cd();
0906 gStyle->SetOptStat(111110);
0907 timeForAllFeds_EcalMuon->Draw();
0908 char mytitle[100]; sprintf(mytitle,"%s",timeForAllFeds_EcalMuon->GetTitle());
0909 strcat(mytitle,runChar); timeForAllFeds_EcalMuon->SetTitle(mytitle);
0910 c[67]->SetLogy(0);
0911 c[67]->SetLogz(0);
0912 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeForAllFeds_EcalMuon_%i.%s",dirName,runNumber,fileType); c[67]->Print(name); }
0913
0914
0915 c[68]->cd();
0916 gStyle->SetOptStat(111110);
0917 numberofCosmicsWTrackPerEvent->Draw();
0918 char mytitle[100]; sprintf(mytitle,"%s",numberofCosmicsWTrackPerEvent->GetTitle());
0919 strcat(mytitle,runChar); numberofCosmicsWTrackPerEvent->SetTitle(mytitle);
0920 c[68]->SetLogy(0);
0921 c[68]->SetLogz(0);
0922 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofCosmicsWTrackPerEvent_%i.%s",dirName,runNumber,fileType); c[68]->Print(name); }
0923
0924 c[69]->cd();
0925 gStyle->SetOptStat(111110);
0926 numberofCosmicsTopBottomPerEvent->Draw();
0927 char mytitle[100]; sprintf(mytitle,"%s",numberofCosmicsTopBottomPerEvent->GetTitle());
0928 strcat(mytitle,runChar); numberofCosmicsTopBottomPerEvent->SetTitle(mytitle);
0929 c[69]->SetLogy(0);
0930 c[69]->SetLogz(0);
0931 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofCosmicsTopBottomPerEvent_%i.%s",dirName,runNumber,fileType); c[69]->Print(name); }
0932
0933
0934 c[70]->cd();
0935 gStyle->SetOptStat(111110);
0936 numberofCrossedEcalCosmicsPerEvent->Draw();
0937 char mytitle[100]; sprintf(mytitle,"%s",numberofCrossedEcalCosmicsPerEvent->GetTitle());
0938 strcat(mytitle,runChar); numberofCrossedEcalCosmicsPerEvent->SetTitle(mytitle);
0939 c[70]->SetLogy(0);
0940 c[70]->SetLogz(0);
0941 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofCrossedEcalCosmicsPerEvent_%i.%s",dirName,runNumber,fileType); c[70]->Print(name); }
0942
0943
0944 c[71]->cd();
0945 gStyle->SetOptStat(111110);
0946 deltaRHist->Draw();
0947 char mytitle[100]; sprintf(mytitle,"%s",deltaRHist->GetTitle());
0948 strcat(mytitle,runChar); deltaRHist->SetTitle(mytitle);
0949 c[71]->SetLogy(0);
0950 c[71]->SetLogz(0);
0951 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_deltaRHist_%i.%s",dirName,runNumber,fileType); c[71]->Print(name); }
0952
0953
0954 c[72]->cd();
0955 gStyle->SetOptStat(111110);
0956 deltaIEtaHist->Draw();
0957 char mytitle[100]; sprintf(mytitle,"%s",deltaIEtaHist->GetTitle());
0958 strcat(mytitle,runChar); deltaIEtaHist->SetTitle(mytitle);
0959 c[72]->SetLogy(0);
0960 c[72]->SetLogz(0);
0961 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_deltaIEtaHist_%i.%s",dirName,runNumber,fileType); c[72]->Print(name); }
0962
0963 c[73]->cd();
0964 gStyle->SetOptStat(111110);
0965 deltaIPhiHist->Draw();
0966 char mytitle[100]; sprintf(mytitle,"%s",deltaIPhiHist->GetTitle());
0967 strcat(mytitle,runChar); deltaIPhiHist->SetTitle(mytitle);
0968 c[73]->SetLogy(0);
0969 c[73]->SetLogz(0);
0970 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_deltaIPhiHist_%i.%s",dirName,runNumber,fileType); c[73]->Print(name); }
0971
0972 c[74]->cd();
0973 gStyle->SetOptStat(111110);
0974 ratioAssocClusters->Draw();
0975 char mytitle[100]; sprintf(mytitle,"%s",ratioAssocClusters->GetTitle());
0976 strcat(mytitle,runChar); ratioAssocClusters->SetTitle(mytitle);
0977 c[74]->SetLogy(0);
0978 c[74]->SetLogz(0);
0979 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_ratioAssocClusters_%i.%s",dirName,runNumber,fileType); c[74]->Print(name); }
0980
0981
0982 c[75]->cd();
0983 gStyle->SetOptStat(111110);
0984 ratioAssocTracks->Draw();
0985 char mytitle[100]; sprintf(mytitle,"%s",ratioAssocTracks->GetTitle());
0986 strcat(mytitle,runChar); ratioAssocTracks->SetTitle(mytitle);
0987 c[75]->SetLogy(0);
0988 c[75]->SetLogz(0);
0989 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_ratioAssocTracks_%i.%s",dirName,runNumber,fileType); c[75]->Print(name); }
0990
0991
0992 c[76]->cd();
0993 gStyle->SetOptStat(111110);
0994 deltaEtaDeltaPhi->Draw();
0995 char mytitle[100]; sprintf(mytitle,"%s",deltaEtaDeltaPhi->GetTitle());
0996 strcat(mytitle,runChar); deltaEtaDeltaPhi->SetTitle(mytitle);
0997 c[76]->SetLogy(0);
0998 c[76]->SetLogz(0);
0999 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_deltaEtaDeltaPhi_%i.%s",dirName,runNumber,fileType); c[76]->Print(name); }
1000
1001
1002 c[77]->cd();
1003 gStyle->SetOptStat(111110);
1004 seedTrackPhi->Draw();
1005 char mytitle[100]; sprintf(mytitle,"%s",seedTrackPhi->GetTitle());
1006 strcat(mytitle,runChar); seedTrackPhi->SetTitle(mytitle);
1007 c[77]->SetLogy(0);
1008 c[77]->SetLogz(0);
1009 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_seedTrackPhi_%i.%s",dirName,runNumber,fileType); c[77]->Print(name); }
1010
1011
1012 c[78]->cd();
1013 gStyle->SetOptStat(111110);
1014 seedTrackEta->Draw();
1015 char mytitle[100]; sprintf(mytitle,"%s",seedTrackEta->GetTitle());
1016 strcat(mytitle,runChar); seedTrackEta->SetTitle(mytitle);
1017 c[78]->SetLogy(0);
1018 c[78]->SetLogz(0);
1019 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_seedTrackEta_%i.%s",dirName,runNumber,fileType); c[78]->Print(name); }
1020
1021
1022 c[79]->cd();
1023 gStyle->SetOptStat(10);
1024 trackAssoc_muonsEcal->Draw("colz");
1025 char mytitle[100]; sprintf(mytitle,"%s",trackAssoc_muonsEcal->GetTitle());
1026 strcat(mytitle,runChar); trackAssoc_muonsEcal->SetTitle(mytitle);
1027 c[79]->SetLogy(0);
1028 c[79]->SetLogz(0);
1029 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_trackAssoc_muonsEcal_%i.%s",dirName,runNumber,fileType); c[79]->Print(name); }
1030
1031 c[80]->cd();
1032 energyHigh_HighEnergyClusters->Draw();
1033 char mytitle[100]; sprintf(mytitle,"%s",energyHigh_HighEnergyClusters->GetTitle());
1034 strcat(mytitle,runChar); energyHigh_HighEnergyClusters->SetTitle(mytitle);
1035 c[80]->SetLogy(1);
1036 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_energyHigh_HighEnergyClusters_%i.%s",dirName,runNumber,fileType); c[80]->Print(name); }
1037
1038 c[81]->cd();
1039 energy_SingleXtalClusters->Draw();
1040 char mytitle[100]; sprintf(mytitle,"%s",energy_SingleXtalClusters->GetTitle());
1041 strcat(mytitle,runChar); energy_SingleXtalClusters->SetTitle(mytitle);
1042 c[81]->SetLogy(1);
1043 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_energy_SingleXtalClusters_%i.%s",dirName,runNumber,fileType); c[81]->Print(name); }
1044
1045 c[82]->cd();
1046 gStyle->SetOptStat(10);
1047 OccupancySingleXtal->Draw("colz");
1048 char mytitle[100]; sprintf(mytitle,"%s",OccupancySingleXtal->GetTitle());
1049 strcat(mytitle,runChar); OccupancySingleXtal->SetTitle(mytitle);
1050 OccupancySingleXtal->SetMinimum(1);
1051 OccupancySingleXtal->GetXaxis()->SetNdivisions(-18);
1052 OccupancySingleXtal->GetYaxis()->SetNdivisions(2);
1053 c[82]->SetLogy(0);
1054 c[82]->SetLogz(0);
1055 c[82]->SetGridx(1);
1056 c[82]->SetGridy(1);
1057 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_OccupancySingleXtal_%i.%s",dirName,runNumber,fileType); c[82]->Print(name); }
1058
1059 f->cd("EventTiming");
1060
1061 c[83]->cd();
1062 FrequencyAllEventsInTime->Draw();
1063 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEventsInTime->GetTitle());
1064 strcat(mytitle,runChar); FrequencyAllEventsInTime->SetTitle(mytitle);
1065 c[83]->SetLogy(0);
1066 c[83]->SetLogz(0);
1067 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEventsInTime_%i.%s",dirName,runNumber,fileType); c[83]->Print(name); }
1068
1069 c[84]->cd();
1070 FrequencyAllEventsInTimeVsPhi->Draw();
1071 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEventsInTimeVsPhi->GetTitle());
1072 strcat(mytitle,runChar); FrequencyAllEventsInTimeVsPhi->SetTitle(mytitle);
1073 c[84]->SetLogy(0);
1074 c[84]->SetLogz(0);
1075 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEventsInTimeVsPhi_%i.%s",dirName,runNumber,fileType); c[84]->Print(name); }
1076
1077 c[85]->cd();
1078 FrequencyAllEventsInTimeVsTTPhi->Draw();
1079 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEventsInTimeVsTTPhi->GetTitle());
1080 strcat(mytitle,runChar); FrequencyAllEventsInTimeVsTTPhi->SetTitle(mytitle);
1081 c[85]->SetLogy(0);
1082 c[85]->SetLogz(0);
1083 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEventsInTimeVsTTPhi_%i.%s",dirName,runNumber,fileType); c[85]->Print(name); }
1084
1085 c[86]->cd();
1086 FrequencyAllEventsInTimeVsEta->Draw();
1087 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEventsInTimeVsEta->GetTitle());
1088 strcat(mytitle,runChar); FrequencyAllEventsInTimeVsEta->SetTitle(mytitle);
1089 c[86]->SetLogy(0);
1090 c[86]->SetLogz(0);
1091 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEventsInTimeVsEta_%i.%s",dirName,runNumber,fileType); c[86]->Print(name); }
1092
1093 c[87]->cd();
1094 FrequencyAllEventsInTimeVsTTEta->Draw();
1095 char mytitle[100]; sprintf(mytitle,"%s",FrequencyAllEventsInTimeVsTTEta->GetTitle());
1096 strcat(mytitle,runChar); FrequencyAllEventsInTimeVsTTEta->SetTitle(mytitle);
1097 c[87]->SetLogy(0);
1098 c[87]->SetLogz(0);
1099 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_FrequencyAllEventsInTimeVsTTEta_%i.%s",dirName,runNumber,fileType); c[87]->Print(name); }
1100
1101 f->cd();
1102
1103
1104
1105 c[88]->cd();
1106 dccBXErrorByFED->GetXaxis()->SetTitle("FED Number");
1107 dccBXErrorByFED->Draw();
1108 char mytitle[100]; sprintf(mytitle,"%s",dccBXErrorByFED->GetTitle());
1109 strcat(mytitle,runChar); dccBXErrorByFED->SetTitle(mytitle);
1110 c[88]->SetLogy(0);
1111
1112 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccBXErrorByFED_%i.%s",dirName,runNumber,fileType); c[88]->Print(name); }
1113
1114 c[89]->cd();
1115 dccOrbitErrorByFED->GetXaxis()->SetTitle("FED Number");
1116 dccOrbitErrorByFED->Draw();
1117 char mytitle[100]; sprintf(mytitle,"%s",dccOrbitErrorByFED->GetTitle());
1118 strcat(mytitle,runChar); dccOrbitErrorByFED->SetTitle(mytitle);
1119 c[89]->SetLogy(0);
1120
1121 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccOrbitErrorByFED_%i.%s",dirName,runNumber,fileType); c[89]->Print(name); }
1122
1123 c[90]->cd();
1124 dccRuntypeErrorByFED->GetXaxis()->SetTitle("FED Number");
1125 dccRuntypeErrorByFED->Draw();
1126 char mytitle[100]; sprintf(mytitle,"%s",dccRuntypeErrorByFED->GetTitle());
1127 strcat(mytitle,runChar); dccRuntypeErrorByFED->SetTitle(mytitle);
1128 c[90]->SetLogy(0);
1129
1130 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccRuntypeErrorByFED_%i.%s",dirName,runNumber,fileType); c[90]->Print(name); }
1131
1132
1133 c[91]->cd();
1134 gStyle->SetOptStat(10);
1135 dccEventVsBx->GetYaxis()->SetBinLabel(1,"COSMIC");
1136 dccEventVsBx->GetYaxis()->SetBinLabel(2,"BEAMH4");
1137 dccEventVsBx->GetYaxis()->SetBinLabel(3,"BEAMH2");
1138 dccEventVsBx->GetYaxis()->SetBinLabel(4,"MTCC");
1139 dccEventVsBx->GetYaxis()->SetBinLabel(5,"LASER_STD");
1140 dccEventVsBx->GetYaxis()->SetBinLabel(6,"LASER_POWER_SCAN");
1141 dccEventVsBx->GetYaxis()->SetBinLabel(7,"LASER_DELAY_SCAN");
1142 dccEventVsBx->GetYaxis()->SetBinLabel(8,"TESTPULSE_SCAN_MEM");
1143 dccEventVsBx->GetYaxis()->SetBinLabel(9,"TESTPULSE_MGPA");
1144 dccEventVsBx->GetYaxis()->SetBinLabel(10,"PEDESTAL_STD");
1145 dccEventVsBx->GetYaxis()->SetBinLabel(11,"PEDESTAL_OFFSET_SCAN");
1146 dccEventVsBx->GetYaxis()->SetBinLabel(12,"PEDESTAL_25NS_SCAN");
1147 dccEventVsBx->GetYaxis()->SetBinLabel(13,"LED_STD");
1148 dccEventVsBx->GetYaxis()->SetBinLabel(14,"PHYSICS_GLOBAL");
1149 dccEventVsBx->GetYaxis()->SetBinLabel(15,"COSMICS_GLOBAL");
1150 dccEventVsBx->GetYaxis()->SetBinLabel(16,"HALO_GLOBAL");
1151 dccEventVsBx->GetYaxis()->SetBinLabel(17,"LASER_GAP");
1152 dccEventVsBx->GetYaxis()->SetBinLabel(18,"TESTPULSE_GAP");
1153 dccEventVsBx->GetYaxis()->SetBinLabel(19,"PEDESTAL_GAP");
1154 dccEventVsBx->GetYaxis()->SetBinLabel(20,"LED_GAP");
1155 dccEventVsBx->GetYaxis()->SetBinLabel(21,"PHYSICS_LOCAL");
1156 dccEventVsBx->GetYaxis()->SetBinLabel(22,"COSMICS_LOCAL");
1157 dccEventVsBx->GetYaxis()->SetBinLabel(23,"HALO_LOCAL");
1158 dccEventVsBx->GetYaxis()->SetBinLabel(24,"CALIB_LOCAL");
1159 dccEventVsBx->Draw("colz");
1160 char mytitle[100]; sprintf(mytitle,"%s",dccEventVsBx->GetTitle());
1161 strcat(mytitle,runChar); dccEventVsBx->SetTitle(mytitle);
1162
1163 c[91]->SetLogz(1);
1164 c[91]->SetCanvasSize(1200,500);
1165 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccEventVsBx_%i.%s",dirName,runNumber,fileType); c[91]->Print(name); }
1166
1167 c[92]->cd();
1168 gStyle->SetOptStat(10);
1169 dccErrorVsBX->GetYaxis()->SetBinLabel(1,"BX");
1170 dccErrorVsBX->GetYaxis()->SetBinLabel(2,"Orbit");
1171 dccErrorVsBX->GetYaxis()->SetBinLabel(3,"Runtype");
1172 dccErrorVsBX->Draw("colz");
1173 char mytitle[100]; sprintf(mytitle,"%s",dccErrorVsBX->GetTitle());
1174 strcat(mytitle,runChar); dccErrorVsBX->SetTitle(mytitle);
1175
1176 c[92]->SetLogz(1);
1177 c[92]->SetCanvasSize(1200,500);
1178 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccErrorVsBx_%i.%s",dirName,runNumber,fileType); c[92]->Print(name); }
1179
1180 c[93]->cd();
1181 dccRuntype->GetXaxis()->SetBinLabel(1,"COSMIC");
1182 dccRuntype->GetXaxis()->SetBinLabel(2,"BEAMH4");
1183 dccRuntype->GetXaxis()->SetBinLabel(3,"BEAMH2");
1184 dccRuntype->GetXaxis()->SetBinLabel(4,"MTCC");
1185 dccRuntype->GetXaxis()->SetBinLabel(5,"LASER_STD");
1186 dccRuntype->GetXaxis()->SetBinLabel(6,"LASER_POWER_SCAN");
1187 dccRuntype->GetXaxis()->SetBinLabel(7,"LASER_DELAY_SCAN");
1188 dccRuntype->GetXaxis()->SetBinLabel(8,"TESTPULSE_SCAN_MEM");
1189 dccRuntype->GetXaxis()->SetBinLabel(9,"TESTPULSE_MGPA");
1190 dccRuntype->GetXaxis()->SetBinLabel(10,"PEDESTAL_STD");
1191 dccRuntype->GetXaxis()->SetBinLabel(11,"PEDESTAL_OFFSET_SCAN");
1192 dccRuntype->GetXaxis()->SetBinLabel(12,"PEDESTAL_25NS_SCAN");
1193 dccRuntype->GetXaxis()->SetBinLabel(13,"LED_STD");
1194 dccRuntype->GetXaxis()->SetBinLabel(14,"PHYSICS_GLOBAL");
1195 dccRuntype->GetXaxis()->SetBinLabel(15,"COSMICS_GLOBAL");
1196 dccRuntype->GetXaxis()->SetBinLabel(16,"HALO_GLOBAL");
1197 dccRuntype->GetXaxis()->SetBinLabel(17,"LASER_GAP");
1198 dccRuntype->GetXaxis()->SetBinLabel(18,"TESTPULSE_GAP");
1199 dccRuntype->GetXaxis()->SetBinLabel(19,"PEDESTAL_GAP");
1200 dccRuntype->GetXaxis()->SetBinLabel(20,"LED_GAP");
1201 dccRuntype->GetXaxis()->SetBinLabel(21,"PHYSICS_LOCAL");
1202 dccRuntype->GetXaxis()->SetBinLabel(22,"COSMICS_LOCAL");
1203 dccRuntype->GetXaxis()->SetBinLabel(23,"HALO_LOCAL");
1204 dccRuntype->GetXaxis()->SetBinLabel(24,"CALIB_LOCAL");
1205 dccRuntype->Draw();
1206 char mytitle[100]; sprintf(mytitle,"%s",dccRuntype->GetTitle());
1207 strcat(mytitle,runChar); dccRuntype->SetTitle(mytitle);
1208 c[93]->SetLogy(1);
1209
1210 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_dccRuntype_%i.%s",dirName,runNumber,fileType); c[93]->Print(name); }
1211
1212
1213 c[20]->cd();
1214 numberofCosmicsPerEvent_EB->Draw();
1215 char mytitle[100]; sprintf(mytitle,"%s",numberofCosmicsPerEvent_EB->GetTitle());
1216 strcat(mytitle,runChar); numberofCosmicsPerEvent_EB->SetTitle(mytitle);
1217 c[20]->SetLogy(0);
1218 c[20]->SetLogz(0);
1219 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_numberofCosmicsPerEventEB_%i.%s",dirName,runNumber,fileType); c[20]->Print(name); }
1220
1221 if (doWait) {
1222 if (Wait()) return;
1223 }
1224
1225
1226
1227 gStyle->SetOptStat(10);
1228
1229 cTiming = new TCanvas("cTiming","(phi,eta,timing)",900,600);
1230 cTiming->cd(1);
1231 cTiming->SetGridx();
1232 cTiming->SetGridy();
1233
1234 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs");
1235 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1236 ayx->Draw("colz");
1237 ayx->GetXaxis()->SetTitle("i#phi");
1238 ayx->GetYaxis()->SetTitle("i#eta");
1239
1240 ayx->GetXaxis()->SetNdivisions(-18);
1241 ayx->GetYaxis()->SetNdivisions(2);
1242
1243 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1244 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1245
1246 int nxb = ayx->GetNbinsX();
1247 int nyb = ayx->GetNbinsY();
1248
1249 char tempErr[200];
1250 for (int i=1; i<=nxb; i++ ) {
1251 for (int j=1; j<=nyb; j++ ) {
1252
1253
1254 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1255 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1256 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1257 int nBin = ayx->GetBin(i,j,0);
1258 int nBinEntries = ayx->GetBinEntries(nBin);
1259
1260
1261
1262
1263
1264 if (nBinEntries!=0) {
1265 tex = new TLatex(xcorr,ycorr,tempErr);
1266 tex->SetTextAlign(23);
1267 tex->SetTextFont(42);
1268 tex->SetTextSize(0.025);
1269 tex->SetLineWidth(2);
1270 tex->Draw();
1271 }
1272
1273
1274 sprintf(tempErr,"%i",nBinEntries);
1275 if (nBinEntries!=0) {
1276 tex = new TLatex(xcorr,ycorr,tempErr);
1277 tex->SetTextAlign(21);
1278 tex->SetTextFont(42);
1279 tex->SetTextSize(0.025);
1280 tex->SetLineWidth(2);
1281 tex->Draw();
1282 }
1283 }
1284 }
1285 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_%i.%s",dirName,runNumber,fileType); cTiming->Print(name); }
1286
1287
1288
1289
1290 gStyle->SetOptStat(10);
1291
1292 cTiming_TT = new TCanvas("cTiming_TT TT bin","(phi,eta,timing)",900,600);
1293 cTiming_TT->cd(1);
1294 cTiming_TT->SetGridx();
1295 cTiming_TT->SetGridy();
1296
1297 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs");
1298 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1299 ayx->Draw("colz");
1300 ayx->GetXaxis()->SetTitle("i#phi");
1301 ayx->GetYaxis()->SetTitle("i#eta");
1302
1303 ayx->GetXaxis()->SetNdivisions(-18);
1304 ayx->GetYaxis()->SetNdivisions(2);
1305
1306 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1307 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_%i.%s",dirName,runNumber,fileType); cTiming_TT->Print(name); }
1344
1345
1346
1347
1348
1349 gStyle->SetOptStat(10);
1350
1351 cTiming_ECAL = new TCanvas("cTiming_ECAL","(phi,eta,timing)",900,600);
1352 cTiming_ECAL->cd(1);
1353 cTiming_ECAL->SetGridx();
1354 cTiming_ECAL->SetGridy();
1355
1356 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs_ECAL");
1357 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1358 ayx->Draw("colz");
1359 ayx->GetXaxis()->SetTitle("i#phi");
1360 ayx->GetYaxis()->SetTitle("i#eta");
1361
1362 ayx->GetXaxis()->SetNdivisions(-18);
1363 ayx->GetYaxis()->SetNdivisions(2);
1364
1365 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1366 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1367
1368 int nxb = ayx->GetNbinsX();
1369 int nyb = ayx->GetNbinsY();
1370
1371 char tempErr[200];
1372 for (int i=1; i<=nxb; i++ ) {
1373 for (int j=1; j<=nyb; j++ ) {
1374
1375 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1376 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1377 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1378 int nBin = ayx->GetBin(i,j,0);
1379 int nBinEntries = ayx->GetBinEntries(nBin);
1380
1381
1382 if (nBinEntries!=0) {
1383 tex = new TLatex(xcorr,ycorr,tempErr);
1384 tex->SetTextAlign(23);
1385 tex->SetTextFont(42);
1386 tex->SetTextSize(0.025);
1387 tex->SetLineWidth(2);
1388 tex->Draw();
1389 }
1390
1391
1392 sprintf(tempErr,"%i",nBinEntries);
1393 if (nBinEntries!=0) {
1394 tex = new TLatex(xcorr,ycorr,tempErr);
1395 tex->SetTextAlign(21);
1396 tex->SetTextFont(42);
1397 tex->SetTextSize(0.025);
1398 tex->SetLineWidth(2);
1399 tex->Draw();
1400 }
1401 }
1402 }
1403 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_ECAL_%i.%s",dirName,runNumber,fileType); cTiming_ECAL->Print(name); }
1404
1405
1406
1407
1408 gStyle->SetOptStat(10);
1409
1410 cTiming_TT_ECAL = new TCanvas("cTiming_TT_ECAL TT bin","(phi,eta,timing)",900,600);
1411 cTiming_TT_ECAL->cd(1);
1412 cTiming_TT_ECAL->SetGridx();
1413 cTiming_TT_ECAL->SetGridy();
1414
1415 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs_ECAL");
1416 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1417 ayx->Draw("colz");
1418 ayx->GetXaxis()->SetTitle("i#phi");
1419 ayx->GetYaxis()->SetTitle("i#eta");
1420
1421 ayx->GetXaxis()->SetNdivisions(-18);
1422 ayx->GetYaxis()->SetNdivisions(2);
1423
1424 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1425 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1426
1427 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_ECAL_%i.%s",dirName,runNumber,fileType); cTiming_TT_ECAL->Print(name); }
1428
1429
1430
1431
1432
1433 gStyle->SetOptStat(10);
1434
1435 cTiming_HCAL = new TCanvas("cTiming_HCAL","(phi,eta,timing)",900,600);
1436 cTiming_HCAL->cd(1);
1437 cTiming_HCAL->SetGridx();
1438 cTiming_HCAL->SetGridy();
1439
1440 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs_HCAL");
1441 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1442 ayx->Draw("colz");
1443 ayx->GetXaxis()->SetTitle("i#phi");
1444 ayx->GetYaxis()->SetTitle("i#eta");
1445
1446 ayx->GetXaxis()->SetNdivisions(-18);
1447 ayx->GetYaxis()->SetNdivisions(2);
1448
1449 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1450 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1451
1452 int nxb = ayx->GetNbinsX();
1453 int nyb = ayx->GetNbinsY();
1454
1455 char tempErr[200];
1456 for (int i=1; i<=nxb; i++ ) {
1457 for (int j=1; j<=nyb; j++ ) {
1458
1459 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1460 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1461 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1462 int nBin = ayx->GetBin(i,j,0);
1463 int nBinEntries = ayx->GetBinEntries(nBin);
1464
1465
1466 if (nBinEntries!=0) {
1467 tex = new TLatex(xcorr,ycorr,tempErr);
1468 tex->SetTextAlign(23);
1469 tex->SetTextFont(42);
1470 tex->SetTextSize(0.025);
1471 tex->SetLineWidth(2);
1472 tex->Draw();
1473 }
1474
1475
1476 sprintf(tempErr,"%i",nBinEntries);
1477 if (nBinEntries!=0) {
1478 tex = new TLatex(xcorr,ycorr,tempErr);
1479 tex->SetTextAlign(21);
1480 tex->SetTextFont(42);
1481 tex->SetTextSize(0.025);
1482 tex->SetLineWidth(2);
1483 tex->Draw();
1484 }
1485 }
1486 }
1487 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_HCAL_%i.%s",dirName,runNumber,fileType); cTiming_HCAL->Print(name); }
1488
1489
1490
1491
1492 gStyle->SetOptStat(10);
1493
1494 cTiming_TT_HCAL = new TCanvas("cTiming_TT_HCAL TT bin","(phi,eta,timing)",900,600);
1495 cTiming_TT_HCAL->cd(1);
1496 cTiming_TT_HCAL->SetGridx();
1497 cTiming_TT_HCAL->SetGridy();
1498
1499 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs_HCAL");
1500 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1501 ayx->Draw("colz");
1502 ayx->GetXaxis()->SetTitle("i#phi");
1503 ayx->GetYaxis()->SetTitle("i#eta");
1504
1505 ayx->GetXaxis()->SetNdivisions(-18);
1506 ayx->GetYaxis()->SetNdivisions(2);
1507
1508 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1509 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1510
1511 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_HCAL_%i.%s",dirName,runNumber,fileType); cTiming_TT_HCAL->Print(name); }
1512
1513
1514
1515
1516
1517 gStyle->SetOptStat(10);
1518
1519 cTiming_DT = new TCanvas("cTiming_DT","(phi,eta,timing)",900,600);
1520 cTiming_DT->cd(1);
1521 cTiming_DT->SetGridx();
1522 cTiming_DT->SetGridy();
1523
1524 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs_DT");
1525 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1526 ayx->Draw("colz");
1527 ayx->GetXaxis()->SetTitle("i#phi");
1528 ayx->GetYaxis()->SetTitle("i#eta");
1529
1530 ayx->GetXaxis()->SetNdivisions(-18);
1531 ayx->GetYaxis()->SetNdivisions(2);
1532
1533 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1534 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1535
1536 int nxb = ayx->GetNbinsX();
1537 int nyb = ayx->GetNbinsY();
1538
1539 char tempErr[200];
1540 for (int i=1; i<=nxb; i++ ) {
1541 for (int j=1; j<=nyb; j++ ) {
1542
1543 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1544 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1545 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1546 int nBin = ayx->GetBin(i,j,0);
1547 int nBinEntries = ayx->GetBinEntries(nBin);
1548
1549
1550 if (nBinEntries!=0) {
1551 tex = new TLatex(xcorr,ycorr,tempErr);
1552 tex->SetTextAlign(23);
1553 tex->SetTextFont(42);
1554 tex->SetTextSize(0.025);
1555 tex->SetLineWidth(2);
1556 tex->Draw();
1557 }
1558
1559
1560 sprintf(tempErr,"%i",nBinEntries);
1561 if (nBinEntries!=0) {
1562 tex = new TLatex(xcorr,ycorr,tempErr);
1563 tex->SetTextAlign(21);
1564 tex->SetTextFont(42);
1565 tex->SetTextSize(0.025);
1566 tex->SetLineWidth(2);
1567 tex->Draw();
1568 }
1569 }
1570 }
1571 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_DT_%i.%s",dirName,runNumber,fileType); cTiming_DT->Print(name); }
1572
1573
1574
1575
1576 gStyle->SetOptStat(10);
1577
1578 cTiming_TT_DT = new TCanvas("cTiming_TT_DT TT bin","(phi,eta,timing)",900,600);
1579 cTiming_TT_DT->cd(1);
1580 cTiming_TT_DT->SetGridx();
1581 cTiming_TT_DT->SetGridy();
1582
1583 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs_DT");
1584 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1585 ayx->Draw("colz");
1586 ayx->GetXaxis()->SetTitle("i#phi");
1587 ayx->GetYaxis()->SetTitle("i#eta");
1588
1589 ayx->GetXaxis()->SetNdivisions(-18);
1590 ayx->GetYaxis()->SetNdivisions(2);
1591
1592 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1593 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1594
1595 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_DT_%i.%s",dirName,runNumber,fileType); cTiming_TT_DT->Print(name); }
1596
1597
1598
1599
1600 gStyle->SetOptStat(10);
1601
1602 cTiming_RPC = new TCanvas("cTiming_RPC","(phi,eta,timing)",900,600);
1603 cTiming_RPC->cd(1);
1604 cTiming_RPC->SetGridx();
1605 cTiming_RPC->SetGridy();
1606
1607 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs_RPC");
1608 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1609 ayx->Draw("colz");
1610 ayx->GetXaxis()->SetTitle("i#phi");
1611 ayx->GetYaxis()->SetTitle("i#eta");
1612
1613 ayx->GetXaxis()->SetNdivisions(-18);
1614 ayx->GetYaxis()->SetNdivisions(2);
1615
1616 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1617 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1618
1619 int nxb = ayx->GetNbinsX();
1620 int nyb = ayx->GetNbinsY();
1621
1622 char tempErr[200];
1623 for (int i=1; i<=nxb; i++ ) {
1624 for (int j=1; j<=nyb; j++ ) {
1625
1626 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1627 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1628 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1629 int nBin = ayx->GetBin(i,j,0);
1630 int nBinEntries = ayx->GetBinEntries(nBin);
1631
1632
1633 if (nBinEntries!=0) {
1634 tex = new TLatex(xcorr,ycorr,tempErr);
1635 tex->SetTextAlign(23);
1636 tex->SetTextFont(42);
1637 tex->SetTextSize(0.025);
1638 tex->SetLineWidth(2);
1639 tex->Draw();
1640 }
1641
1642
1643 sprintf(tempErr,"%i",nBinEntries);
1644 if (nBinEntries!=0) {
1645 tex = new TLatex(xcorr,ycorr,tempErr);
1646 tex->SetTextAlign(21);
1647 tex->SetTextFont(42);
1648 tex->SetTextSize(0.025);
1649 tex->SetLineWidth(2);
1650 tex->Draw();
1651 }
1652 }
1653 }
1654 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_RPC_%i.%s",dirName,runNumber,fileType); cTiming_RPC->Print(name); }
1655
1656
1657
1658
1659 gStyle->SetOptStat(10);
1660
1661 cTiming_TT_RPC = new TCanvas("cTiming_TT_RPC TT bin","(phi,eta,timing)",900,600);
1662 cTiming_TT_RPC->cd(1);
1663 cTiming_TT_RPC->SetGridx();
1664 cTiming_TT_RPC->SetGridy();
1665
1666 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs_RPC");
1667 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1668 ayx->Draw("colz");
1669 ayx->GetXaxis()->SetTitle("i#phi");
1670 ayx->GetYaxis()->SetTitle("i#eta");
1671
1672 ayx->GetXaxis()->SetNdivisions(-18);
1673 ayx->GetYaxis()->SetNdivisions(2);
1674
1675 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1676 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1677
1678 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_RPC_%i.%s",dirName,runNumber,fileType); cTiming_TT_RPC->Print(name); }
1679
1680
1681
1682
1683 gStyle->SetOptStat(10);
1684
1685 cTiming_CSC = new TCanvas("cTiming_CSC","(phi,eta,timing)",900,600);
1686 cTiming_CSC->cd(1);
1687 cTiming_CSC->SetGridx();
1688 cTiming_CSC->SetGridy();
1689
1690 TH3F* h1 = (TH3F*)f->Get("timePhiEtaAllFEDs_CSC");
1691 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1692 ayx->Draw("colz");
1693 ayx->GetXaxis()->SetTitle("i#phi");
1694 ayx->GetYaxis()->SetTitle("i#eta");
1695
1696 ayx->GetXaxis()->SetNdivisions(-18);
1697 ayx->GetYaxis()->SetNdivisions(2);
1698
1699 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1700 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1701
1702 int nxb = ayx->GetNbinsX();
1703 int nyb = ayx->GetNbinsY();
1704
1705 char tempErr[200];
1706 for (int i=1; i<=nxb; i++ ) {
1707 for (int j=1; j<=nyb; j++ ) {
1708
1709 double xcorr = ayx->GetXaxis()->GetBinCenter(i);
1710 double ycorr = ayx->GetYaxis()->GetBinCenter(j);
1711 sprintf(tempErr,"%0.2f",ayx->GetBinError(i,j));
1712 int nBin = ayx->GetBin(i,j,0);
1713 int nBinEntries = ayx->GetBinEntries(nBin);
1714
1715
1716 if (nBinEntries!=0) {
1717 tex = new TLatex(xcorr,ycorr,tempErr);
1718 tex->SetTextAlign(23);
1719 tex->SetTextFont(42);
1720 tex->SetTextSize(0.025);
1721 tex->SetLineWidth(2);
1722 tex->Draw();
1723 }
1724
1725
1726 sprintf(tempErr,"%i",nBinEntries);
1727 if (nBinEntries!=0) {
1728 tex = new TLatex(xcorr,ycorr,tempErr);
1729 tex->SetTextAlign(21);
1730 tex->SetTextFont(42);
1731 tex->SetTextSize(0.025);
1732 tex->SetLineWidth(2);
1733 tex->Draw();
1734 }
1735 }
1736 }
1737 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timePhiEtaAllFEDs_CSC_%i.%s",dirName,runNumber,fileType); cTiming_CSC->Print(name); }
1738
1739
1740
1741
1742 gStyle->SetOptStat(10);
1743
1744 cTiming_TT_CSC = new TCanvas("cTiming_TT_CSC TT bin","(phi,eta,timing)",900,600);
1745 cTiming_TT_CSC->cd(1);
1746 cTiming_TT_CSC->SetGridx();
1747 cTiming_TT_CSC->SetGridy();
1748
1749 TH3F* h1 = (TH3F*)f->Get("timeTTAllFEDs_CSC");
1750 TProfile2D* ayx = (TProfile2D*) h1->Project3DProfile("yx");
1751 ayx->Draw("colz");
1752 ayx->GetXaxis()->SetTitle("i#phi");
1753 ayx->GetYaxis()->SetTitle("i#eta");
1754
1755 ayx->GetXaxis()->SetNdivisions(-18);
1756 ayx->GetYaxis()->SetNdivisions(2);
1757
1758 char mytitle[100]; sprintf(mytitle,"%s",ayx->GetTitle());
1759 strcat(mytitle,runChar); ayx->SetTitle(mytitle);
1760
1761 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeTTAllFEDs_CSC_%i.%s",dirName,runNumber,fileType); cTiming_TT_CSC->Print(name); }
1762
1763
1764
1765
1766 gStyle->SetOptStat(1110);
1767
1768 TCanvas* cTiming_EBM = new TCanvas("cTiming_EBM","timing SM EB-",1500,600);
1769 cTiming_EBM->Divide(6,3);
1770
1771 cTiming_EBM->cd(1);
1772 TH1F* hT = (TH1F*)f->Get("EB-01/TimeFED610"); if ( hT ) { hT->Draw();}
1773 cTiming_EBM->cd(2);
1774 TH1F* hT = (TH1F*)f->Get("EB-02/TimeFED611"); if ( hT ) { hT->Draw();}
1775 cTiming_EBM->cd(3);
1776 TH1F* hT = (TH1F*)f->Get("EB-03/TimeFED612"); if ( hT ) { hT->Draw();}
1777 cTiming_EBM->cd(4);
1778 TH1F* hT = (TH1F*)f->Get("EB-04/TimeFED613"); if ( hT ) { hT->Draw();}
1779 cTiming_EBM->cd(5);
1780 TH1F* hT = (TH1F*)f->Get("EB-05/TimeFED614"); if ( hT ) { hT->Draw();}
1781 cTiming_EBM->cd(6);
1782 TH1F* hT = (TH1F*)f->Get("EB-06/TimeFED615"); if ( hT ) { hT->Draw();}
1783 cTiming_EBM->cd(7);
1784 TH1F* hT = (TH1F*)f->Get("EB-07/TimeFED616"); if ( hT ) { hT->Draw();}
1785 cTiming_EBM->cd(8);
1786 TH1F* hT = (TH1F*)f->Get("EB-08/TimeFED617"); if ( hT ) { hT->Draw();}
1787 cTiming_EBM->cd(9);
1788 TH1F* hT = (TH1F*)f->Get("EB-09/TimeFED618"); if ( hT ) { hT->Draw();}
1789 cTiming_EBM->cd(10);
1790 TH1F* hT = (TH1F*)f->Get("EB-10/TimeFED619"); if ( hT ) { hT->Draw();}
1791 cTiming_EBM->cd(11);
1792 TH1F* hT = (TH1F*)f->Get("EB-11/TimeFED620"); if ( hT ) { hT->Draw();}
1793 cTiming_EBM->cd(12);
1794 TH1F* hT = (TH1F*)f->Get("EB-12/TimeFED621"); if ( hT ) { hT->Draw();}
1795 cTiming_EBM->cd(13);
1796 TH1F* hT = (TH1F*)f->Get("EB-13/TimeFED622"); if ( hT ) { hT->Draw();}
1797 cTiming_EBM->cd(14);
1798 TH1F* hT = (TH1F*)f->Get("EB-14/TimeFED623"); if ( hT ) { hT->Draw();}
1799 cTiming_EBM->cd(15);
1800 TH1F* hT = (TH1F*)f->Get("EB-15/TimeFED624"); if ( hT ) { hT->Draw();}
1801 cTiming_EBM->cd(16);
1802 TH1F* hT = (TH1F*)f->Get("EB-16/TimeFED625"); if ( hT ) { hT->Draw();}
1803 cTiming_EBM->cd(17);
1804 TH1F* hT = (TH1F*)f->Get("EB-17/TimeFED626"); if ( hT ) { hT->Draw();}
1805 cTiming_EBM->cd(18);
1806 TH1F* hT = (TH1F*)f->Get("EB-18/TimeFED627"); if ( hT ) { hT->Draw();}
1807
1808
1809 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBMFEDbyFED_%i.%s",dirName,runNumber,fileType); cTiming_EBM->Print(name); }
1810 cout << name << endl;
1811
1812
1813 TCanvas* cTiming_EBP = new TCanvas("cTiming_EBP","timing SM EB+",1500,600);
1814 cTiming_EBP->Divide(6,3);
1815
1816 cTiming_EBP->cd(1);
1817 TH1F* hT = (TH1F*)f->Get("EB+01/TimeFED628"); if ( hT ) { hT->Draw();}
1818 cTiming_EBP->cd(2);
1819 TH1F* hT = (TH1F*)f->Get("EB+02/TimeFED629"); if ( hT ) { hT->Draw();}
1820 cTiming_EBP->cd(3);
1821 TH1F* hT = (TH1F*)f->Get("EB+03/TimeFED630"); if ( hT ) { hT->Draw();}
1822 cTiming_EBP->cd(4);
1823 TH1F* hT = (TH1F*)f->Get("EB+04/TimeFED631"); if ( hT ) { hT->Draw();}
1824 cTiming_EBP->cd(5);
1825 TH1F* hT = (TH1F*)f->Get("EB+05/TimeFED632"); if ( hT ) { hT->Draw();}
1826 cTiming_EBP->cd(6);
1827 TH1F* hT = (TH1F*)f->Get("EB+06/TimeFED633"); if ( hT ) { hT->Draw();}
1828 cTiming_EBP->cd(7);
1829 TH1F* hT = (TH1F*)f->Get("EB+07/TimeFED634"); if ( hT ) { hT->Draw();}
1830 cTiming_EBP->cd(8);
1831 TH1F* hT = (TH1F*)f->Get("EB+08/TimeFED635"); if ( hT ) { hT->Draw();}
1832 cTiming_EBP->cd(9);
1833 TH1F* hT = (TH1F*)f->Get("EB+09/TimeFED636"); if ( hT ) { hT->Draw();}
1834 cTiming_EBP->cd(10);
1835 TH1F* hT = (TH1F*)f->Get("EB+10/TimeFED637"); if ( hT ) { hT->Draw();}
1836 cTiming_EBP->cd(11);
1837 TH1F* hT = (TH1F*)f->Get("EB+11/TimeFED638"); if ( hT ) { hT->Draw();}
1838 cTiming_EBP->cd(12);
1839 TH1F* hT = (TH1F*)f->Get("EB+12/TimeFED639"); if ( hT ) { hT->Draw();}
1840 cTiming_EBP->cd(13);
1841 TH1F* hT = (TH1F*)f->Get("EB+13/TimeFED640"); if ( hT ) { hT->Draw();}
1842 cTiming_EBP->cd(14);
1843 TH1F* hT = (TH1F*)f->Get("EB+14/TimeFED641"); if ( hT ) { hT->Draw();}
1844 cTiming_EBP->cd(15);
1845 TH1F* hT = (TH1F*)f->Get("EB+15/TimeFED642"); if ( hT ) { hT->Draw();}
1846 cTiming_EBP->cd(16);
1847 TH1F* hT = (TH1F*)f->Get("EB+16/TimeFED643"); if ( hT ) { hT->Draw();}
1848 cTiming_EBP->cd(17);
1849 TH1F* hT = (TH1F*)f->Get("EB+17/TimeFED644"); if ( hT ) { hT->Draw();}
1850 cTiming_EBP->cd(18);
1851 TH1F* hT = (TH1F*)f->Get("EB+18/TimeFED645"); if ( hT ) { hT->Draw();}
1852
1853 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_timeEBPFEDbyFED_%i.%s",dirName,runNumber,fileType); cTiming_EBP->Print(name); }
1854
1855
1856 int EBFEDID[36] = {
1857 627,
1858 626,
1859 625,
1860 624,
1861 623,
1862 622,
1863 621,
1864 620,
1865 619,
1866 618,
1867 617,
1868 616,
1869 615,
1870 614,
1871 613,
1872 612,
1873 611,
1874 610,
1875 628,
1876 629,
1877 630,
1878 631,
1879 632,
1880 633,
1881 634,
1882 635,
1883 636,
1884 637,
1885 638,
1886 639,
1887 640,
1888 641,
1889 642,
1890 643,
1891 644,
1892 645,
1893 };
1894
1895 int EEFEDID[18] = {
1896 603,
1897 602,
1898 601,
1899 609,
1900 608,
1901 607,
1902 606,
1903 605,
1904 604,
1905 649,
1906 650,
1907 651,
1908 652,
1909 653,
1910 654,
1911 646,
1912 647,
1913 648,
1914 };
1915
1916
1917 const int mnHistsEB=36;
1918 TCanvas* dccCanvasEB[mnHistsEB];
1919 char apname[100];
1920 for (int i=0; i<mnHistsEB; i++) {
1921 sprintf(apname,"can%i",i);
1922 int x = (i%3)*600;
1923 int y = (i/3)*100;
1924 dccCanvasEB[i] = new TCanvas(apname,apname,x,y,600,400);
1925 cout << "Hists " << i << " : " << x << " , " << y << endl;
1926 }
1927
1928 int iEBFED = 0;
1929 for (int iEB=-18; iEB <19; iEB++) {
1930
1931 if (iEB==0) iEB++;
1932 char SMstr[100];
1933 if (iEB < 0) {
1934 if (abs(iEB)<10) {
1935 sprintf(SMstr,"-0%d",abs(iEB));
1936 } else {
1937 sprintf(SMstr,"%d",iEB);
1938 }
1939 } else {
1940 if (abs(iEB)<10) {
1941 sprintf(SMstr,"+0%d",iEB);
1942 } else {
1943 sprintf(SMstr,"+%d",iEB);
1944 }
1945 }
1946
1947 sprintf(SMstr,"EB%s",SMstr);
1948
1949
1950 char fname[100];
1951 sprintf(fname,"%s/DCCRuntypeVsBxFED_%i",SMstr,EBFEDID[iEBFED]);
1952 TH1F *dccHist = (TH1F*) f->Get(fname) ;
1953
1954
1955 if (dccHist){
1956 dccCanvasEB[iEBFED]->cd();
1957
1958 dccHist->GetYaxis()->SetBinLabel(1,"BX");
1959 dccHist->GetYaxis()->SetBinLabel(2,"Orbit");
1960 dccHist->GetYaxis()->SetBinLabel(3,"Runtype");
1961 dccHist->Draw("colz");
1962 char mytitle[100]; sprintf(mytitle,"%s",dccHist->GetTitle());
1963 strcat(mytitle,runChar); dccErrorVsBX->SetTitle(mytitle);
1964
1965 dccCanvasEB[iEBFED]->SetLogz(1);
1966 dccCanvasEB[iEBFED]->SetCanvasSize(1200,500);
1967
1968
1969 sprintf(name,"%s/cosmicsAnalysis_DCCRuntypeVsBxFED_%s_%i.%s", dirName,SMstr,runNumber,fileType);
1970 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_DCCRuntypeVsBxFED_%s_%i.%s", dirName,SMstr,runNumber,fileType); dccCanvasEB[iEBFED]->Print(name); }
1971 }
1972
1973
1974 iEBFED++;
1975
1976 }
1977
1978
1979 const int mnHistsEE=18;
1980 TCanvas* dccCanvasEE[mnHistsEE];
1981 char apname[100];
1982 for (int i=0; i<mnHistsEE; i++) {
1983 sprintf(apname,"can%i",i);
1984 int x = (i%3)*600;
1985 int y = (i/3)*100;
1986 dccCanvasEE[i] = new TCanvas(apname,apname,x,y,600,400);
1987 cout << "Hists " << i << " : " << x << " , " << y << endl;
1988 }
1989
1990 int iEEFED = 0;
1991 for (int iEE=-9; iEE <10; iEE++) {
1992
1993 if (iEE==0) iEE++;
1994 char SMstr[100];
1995 if (iEE < 0) {
1996 if (abs(iEE)<10) {
1997 sprintf(SMstr,"-0%d",abs(iEE));
1998 } else {
1999 sprintf(SMstr,"%d",iEE);
2000 }
2001 } else {
2002 if (abs(iEE)<10) {
2003 sprintf(SMstr,"+0%d",iEE);
2004 } else {
2005 sprintf(SMstr,"+%d",iEE);
2006 }
2007 }
2008
2009 sprintf(SMstr,"EE%s",SMstr);
2010 cout << SMstr << " " << iEEFED << " " << EEFEDID[iEEFED] << endl;
2011
2012 char fname[100];
2013 sprintf(fname,"%s/DCCRuntypeVsBxFED_%i",SMstr,EEFEDID[iEEFED]);
2014 TH1F *dccHist = (TH1F*) f->Get(fname) ;
2015 cout << fname << " " << dccHist << endl;
2016
2017 if (dccHist){
2018 cout << "found histo in EE" << endl;
2019 dccCanvasEE[iEEFED]->cd();
2020
2021 dccHist->GetYaxis()->SetBinLabel(1,"BX");
2022 dccHist->GetYaxis()->SetBinLabel(2,"Orbit");
2023 dccHist->GetYaxis()->SetBinLabel(3,"Runtype");
2024 dccHist->Draw("colz");
2025 char mytitle[100]; sprintf(mytitle,"%s",dccHist->GetTitle());
2026 strcat(mytitle,runChar); dccErrorVsBX->SetTitle(mytitle);
2027
2028 dccCanvasEE[iEEFED]->SetLogz(1);
2029 dccCanvasEE[iEEFED]->SetCanvasSize(1200,500);
2030
2031 cout << dirName << " " << SMstr << " " << runNumber << " " << fileType << endl;
2032 sprintf(name,"%s/cosmicsAnalysis_DCCRuntypeVsBxFED_%s_%i.%s", dirName,SMstr,runNumber,fileType);
2033 if (printPics) { sprintf(name,"%s/cosmicsAnalysis_DCCRuntypeVsBxFED_%s_%i.%s", dirName,SMstr,runNumber,fileType); dccCanvasEE[iEEFED]->Print(name); }
2034 }
2035
2036
2037 iEEFED++;
2038
2039 }
2040
2041
2042
2043 return;
2044
2045 }
2046
2047
2048