File indexing completed on 2023-10-25 09:40:36
0001 #include <TChain.h>
0002 #include <TH1D.h>
0003 #include <TH2D.h>
0004 #include <TProfile.h>
0005 #include <TFitResult.h>
0006 #include <TFitResultPtr.h>
0007 #include <TPaveStats.h>
0008 #include <vector>
0009 #include <string>
0010 #include <iomanip>
0011
0012 #include <iostream>
0013 #include <fstream>
0014 #include "TH1.h"
0015 #include "TH2.h"
0016 #include "TCanvas.h"
0017 #include "TROOT.h"
0018 #include <TMath.h>
0019 #include "TStyle.h"
0020 #include "TSystem.h"
0021 #include "TLegend.h"
0022 #include "TText.h"
0023 #include "TAxis.h"
0024 #include "TFile.h"
0025 #include "TLine.h"
0026 #include "TGraph.h"
0027 #include <TPaveText.h>
0028 #include <TPostScript.h>
0029 #include <TClass.h>
0030
0031
0032 using namespace std;
0033
0034
0035
0036
0037
0038 int main(int argc, char *argv[]) {
0039 std::string dirnm = "Analyzer";
0040
0041 printf("reco: gROOT Reset \n");
0042 gROOT->Reset();
0043 gROOT->SetStyle("Plain");
0044
0045
0046
0047
0048
0049
0050 gStyle->SetOptStat(101110);
0051
0052
0053
0054
0055 gStyle->SetOptFit(0010);
0056
0057
0058
0059
0060
0061
0062
0063
0064 gStyle->SetStatX(0.91);
0065 gStyle->SetStatY(0.75);
0066 gStyle->SetStatW(0.20);
0067 gStyle->SetStatH(0.10);
0068
0069
0070
0071
0072
0073 Float_t LeftOffset = 0.12;
0074 Float_t TopOffset = 0.22;
0075
0076 gStyle->SetLineWidth(1);
0077 gStyle->SetErrorX(0);
0078
0079
0080 gStyle->SetOptTitle(0);
0081
0082 gStyle->SetTitleColor(1);
0083
0084 gStyle->SetTitleX(0.15);
0085 gStyle->SetTitleH(0.15);
0086
0087 gStyle->SetTitleW(0.60);
0088 gStyle->SetTitleFont(42);
0089 gStyle->SetTitleFontSize(0.07);
0090
0091 gStyle->SetPalette(1);
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104 gStyle->SetPadTopMargin(TopOffset);
0105 gStyle->SetPadBottomMargin(LeftOffset);
0106 gStyle->SetPadRightMargin(TopOffset);
0107 gStyle->SetPadLeftMargin(LeftOffset);
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 TFile *hfile1 = new TFile("Global_362365.root", "READ");
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167 TPostScript psfile("zadcampltest.ps", 111);
0168
0169
0170
0171 TCanvas *c1 = new TCanvas("c1", "Hcal4test", 200, 10, 700, 900);
0172
0173 hfile1->ls();
0174 TDirectory *dir = (TDirectory *)hfile1->FindObjectAny(dirnm.c_str());
0175
0176
0177
0178
0179
0180
0181 c1->Clear();
0182 c1->Divide(2, 4);
0183
0184 c1->cd(1);
0185
0186 TH2F *Zzzdepth1hef1 = (TH2F *)dir->FindObjectAny("h_mapDepth1_HE");
0187 gPad->SetGridy();
0188 gPad->SetGridx();
0189 gPad->SetLogz();
0190 Zzzdepth1hef1->SetXTitle("#eta \b");
0191 Zzzdepth1hef1->SetYTitle("#phi \b");
0192 Zzzdepth1hef1->SetZTitle("h_mapDepth1_HE \b");
0193 Zzzdepth1hef1->Draw("COLZ");
0194
0195 c1->cd(2);
0196 TH2F *Zzzdepth1hef2 = (TH2F *)dir->FindObjectAny("h_mapDepth2_HE");
0197 gPad->SetGridy();
0198 gPad->SetGridx();
0199 gPad->SetLogz();
0200 Zzzdepth1hef2->SetXTitle("#eta \b");
0201 Zzzdepth1hef2->SetYTitle("#phi \b");
0202 Zzzdepth1hef2->SetZTitle("h_mapDepth2_HE \b");
0203 Zzzdepth1hef2->Draw("COLZ");
0204
0205 c1->cd(3);
0206 TH2F *Zzzdepth1hef3 = (TH2F *)dir->FindObjectAny("h_mapDepth3_HE");
0207 gPad->SetGridy();
0208 gPad->SetGridx();
0209 gPad->SetLogz();
0210 Zzzdepth1hef3->SetXTitle("#eta \b");
0211 Zzzdepth1hef3->SetYTitle("#phi \b");
0212 Zzzdepth1hef3->SetZTitle("h_mapDepth3_HE \b");
0213 Zzzdepth1hef3->Draw("COLZ");
0214
0215 c1->cd(4);
0216 TH2F *Zzzdepth1hef4 = (TH2F *)dir->FindObjectAny("h_mapDepth4_HE");
0217 gPad->SetGridy();
0218 gPad->SetGridx();
0219 gPad->SetLogz();
0220 Zzzdepth1hef4->SetXTitle("#eta \b");
0221 Zzzdepth1hef4->SetYTitle("#phi \b");
0222 Zzzdepth1hef4->SetZTitle("h_mapDepth4_HE \b");
0223 Zzzdepth1hef4->Draw("COLZ");
0224
0225 c1->cd(5);
0226 TH2F *Zzzdepth1hef5 = (TH2F *)dir->FindObjectAny("h_mapDepth5_HE");
0227 gPad->SetGridy();
0228 gPad->SetGridx();
0229 gPad->SetLogz();
0230 Zzzdepth1hef5->SetXTitle("#eta \b");
0231 Zzzdepth1hef5->SetYTitle("#phi \b");
0232 Zzzdepth1hef5->SetZTitle("h_mapDepth5_HE \b");
0233 Zzzdepth1hef5->Draw("COLZ");
0234
0235 c1->cd(6);
0236 TH2F *Zzzdepth1hef6 = (TH2F *)dir->FindObjectAny("h_mapDepth6_HE");
0237 gPad->SetGridy();
0238 gPad->SetGridx();
0239 gPad->SetLogz();
0240 Zzzdepth1hef6->SetXTitle("#eta \b");
0241 Zzzdepth1hef6->SetYTitle("#phi \b");
0242 Zzzdepth1hef6->SetZTitle("h_mapDepth6_HE \b");
0243 Zzzdepth1hef6->Draw("COLZ");
0244
0245 c1->cd(7);
0246 TH2F *Zzzdepth1hef7 = (TH2F *)dir->FindObjectAny("h_mapDepth7_HE");
0247 gPad->SetGridy();
0248 gPad->SetGridx();
0249 gPad->SetLogz();
0250 Zzzdepth1hef7->SetXTitle("#eta \b");
0251 Zzzdepth1hef7->SetYTitle("#phi \b");
0252 Zzzdepth1hef7->SetZTitle("h_mapDepth7_HE \b");
0253 Zzzdepth1hef7->Draw("COLZ");
0254
0255 c1->cd(8);
0256 TH1F *jdjswi8 = (TH1F *)dir->FindObjectAny("h_ADCAmpl_HE");
0257 gPad->SetLogy(kFALSE);
0258
0259 jdjswi8->SetMarkerStyle(20);
0260 jdjswi8->SetMarkerSize(0.8);
0261 jdjswi8->GetYaxis()->SetLabelSize(0.04);
0262 jdjswi8->SetXTitle("h_ADCAmpl_HE \b");
0263 jdjswi8->SetMarkerColor(2);
0264 jdjswi8->SetLineColor(2);
0265 jdjswi8->Draw("");
0266
0267 c1->Update();
0268
0269
0270
0271
0272
0273
0274 c1->Clear();
0275 c1->Divide(2, 4);
0276
0277 c1->cd(1);
0278 TH1F *wqwhef1 = (TH1F *)dir->FindObjectAny("h_mapDepth1ADCAmpl_HE");
0279 gPad->SetGridy();
0280 gPad->SetGridx();
0281 gPad->SetLogz();
0282 wqwhef1->SetZTitle("h_mapDepth1ADCAmpl_HE \b");
0283 wqwhef1->Draw("COLZ");
0284
0285 c1->cd(2);
0286 TH1F *wqwhef2 = (TH1F *)dir->FindObjectAny("h_mapDepth2ADCAmpl_HE");
0287 gPad->SetGridy();
0288 gPad->SetGridx();
0289 gPad->SetLogz();
0290 wqwhef2->SetZTitle("h_mapDepth2ADCAmpl_HE \b");
0291 wqwhef2->Draw("COLZ");
0292
0293 c1->cd(3);
0294 TH1F *wqwhef3 = (TH1F *)dir->FindObjectAny("h_mapDepth3ADCAmpl_HE");
0295 gPad->SetGridy();
0296 gPad->SetGridx();
0297 gPad->SetLogz();
0298 wqwhef3->SetZTitle("h_mapDepth3ADCAmpl_HE \b");
0299 wqwhef3->Draw("COLZ");
0300
0301 c1->cd(4);
0302 TH1F *wqwhef4 = (TH1F *)dir->FindObjectAny("h_mapDepth4ADCAmpl_HE");
0303 gPad->SetGridy();
0304 gPad->SetGridx();
0305 gPad->SetLogz();
0306 wqwhef4->SetZTitle("h_mapDepth4ADCAmpl_HE \b");
0307 wqwhef4->Draw("COLZ");
0308
0309 c1->cd(5);
0310 TH1F *wqwhef5 = (TH1F *)dir->FindObjectAny("h_mapDepth5ADCAmpl_HE");
0311 gPad->SetGridy();
0312 gPad->SetGridx();
0313 gPad->SetLogz();
0314 wqwhef5->SetZTitle("h_mapDepth5ADCAmpl_HE \b");
0315 wqwhef5->Draw("COLZ");
0316
0317 c1->cd(6);
0318 TH1F *wqwhef6 = (TH1F *)dir->FindObjectAny("h_mapDepth6ADCAmpl_HE");
0319 gPad->SetGridy();
0320 gPad->SetGridx();
0321 gPad->SetLogz();
0322 wqwhef6->SetZTitle("h_mapDepth6ADCAmpl_HE \b");
0323 wqwhef6->Draw("COLZ");
0324
0325 c1->cd(7);
0326 TH1F *wqwhef7 = (TH1F *)dir->FindObjectAny("h_mapDepth7ADCAmpl_HE");
0327 gPad->SetGridy();
0328 gPad->SetGridx();
0329 gPad->SetLogz();
0330 wqwhef7->SetZTitle("h_mapDepth7ADCAmpl_HE \b");
0331 wqwhef7->Draw("COLZ");
0332
0333 c1->Update();
0334
0335
0336
0337
0338
0339
0340 c1->Clear();
0341 c1->Divide(2, 4);
0342
0343 c1->cd(1);
0344 TH1F *azzdepth1hef1 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLS3");
0345 gPad->SetGridy();
0346 gPad->SetGridx();
0347 azzdepth1hef1->SetZTitle("h_sumADCAmplperLS3 \b");
0348 azzdepth1hef1->Draw("");
0349
0350 c1->cd(2);
0351 TH1F *azzdepth1hef2 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLS4");
0352 gPad->SetGridy();
0353 gPad->SetGridx();
0354 azzdepth1hef2->SetZTitle("h_sumADCAmplperLS3 \b");
0355 azzdepth1hef2->Draw("");
0356
0357 c1->cd(3);
0358 TH1F *azzdepth1hef3 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLS5");
0359 gPad->SetGridy();
0360 gPad->SetGridx();
0361 azzdepth1hef3->SetZTitle("h_sumADCAmplperLS3 \b");
0362 azzdepth1hef3->Draw("");
0363
0364 c1->cd(4);
0365 TH1F *azzdepth1hef4 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLSdepth4HEu");
0366 gPad->SetGridy();
0367 gPad->SetGridx();
0368 azzdepth1hef4->SetZTitle("h_sumADCAmplperLS3 \b");
0369 azzdepth1hef4->Draw("");
0370
0371 c1->cd(5);
0372 TH1F *azzdepth1hef5 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLSdepth5HEu");
0373 gPad->SetGridy();
0374 gPad->SetGridx();
0375 azzdepth1hef5->SetZTitle("h_sumADCAmplperLS3 \b");
0376 azzdepth1hef5->Draw("");
0377
0378 c1->cd(6);
0379 TH1F *azzdepth1hef6 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLSdepth6HEu");
0380 gPad->SetGridy();
0381 gPad->SetGridx();
0382 azzdepth1hef6->SetZTitle("h_sumADCAmplperLS3 \b");
0383 azzdepth1hef6->Draw("");
0384
0385 c1->cd(7);
0386 TH1F *azzdepth1hef7 = (TH1F *)dir->FindObjectAny("h_sumADCAmplperLSdepth7HEu");
0387 gPad->SetGridy();
0388 gPad->SetGridx();
0389 azzdepth1hef7->SetZTitle("h_sumADCAmplperLS3 \b");
0390 azzdepth1hef7->Draw("");
0391
0392 c1->Update();
0393
0394
0395
0396
0397
0398
0399 c1->Clear();
0400 c1->Divide(2, 4);
0401
0402 c1->cd(1);
0403 TH1F *poqw1 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLS3");
0404 gPad->SetGridy();
0405 gPad->SetGridx();
0406 poqw1->SetZTitle("h_sumCutADCAmplperLS3 \b");
0407 poqw1->Draw("");
0408
0409 c1->cd(2);
0410 TH1F *poqw2 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLS4");
0411 gPad->SetGridy();
0412 gPad->SetGridx();
0413 poqw2->SetZTitle("h_sumCutADCAmplperLS3 \b");
0414 poqw2->Draw("");
0415
0416 c1->cd(3);
0417 TH1F *poqw3 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLS5");
0418 gPad->SetGridy();
0419 gPad->SetGridx();
0420 poqw3->SetZTitle("h_sumCutADCAmplperLS3 \b");
0421 poqw3->Draw("");
0422
0423 c1->cd(4);
0424 TH1F *poqw4 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLSdepth4HEu");
0425 gPad->SetGridy();
0426 gPad->SetGridx();
0427 poqw4->SetZTitle("h_sumCutADCAmplperLS3 \b");
0428 poqw4->Draw("");
0429
0430 c1->cd(5);
0431 TH1F *poqw5 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLSdepth5HEu");
0432 gPad->SetGridy();
0433 gPad->SetGridx();
0434 poqw5->SetZTitle("h_sumCutADCAmplperLS3 \b");
0435 poqw5->Draw("");
0436
0437 c1->cd(6);
0438 TH1F *poqw6 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLSdepth6HEu");
0439 gPad->SetGridy();
0440 gPad->SetGridx();
0441 poqw6->SetZTitle("h_sumCutADCAmplperLS3 \b");
0442 poqw6->Draw("");
0443
0444 c1->cd(7);
0445 TH1F *poqw7 = (TH1F *)dir->FindObjectAny("h_sumCutADCAmplperLSdepth7HEu");
0446 gPad->SetGridy();
0447 gPad->SetGridx();
0448 poqw7->SetZTitle("h_sumCutADCAmplperLS3 \b");
0449 poqw7->Draw("");
0450
0451 c1->Update();
0452
0453
0454
0455
0456
0457
0458 c1->Clear();
0459 c1->Divide(2, 4);
0460
0461 c1->cd(1);
0462 TH1F *cdew1 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLS3");
0463 gPad->SetGridy();
0464 gPad->SetGridx();
0465 cdew1->SetZTitle("h_sum0ADCAmplperLS3 \b");
0466 cdew1->Draw("");
0467
0468 c1->cd(2);
0469 TH1F *cdew2 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLS4");
0470 gPad->SetGridy();
0471 gPad->SetGridx();
0472 cdew2->SetZTitle("h_sum0ADCAmplperLS3 \b");
0473 cdew2->Draw("");
0474
0475 c1->cd(3);
0476 TH1F *cdew3 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLS5");
0477 gPad->SetGridy();
0478 gPad->SetGridx();
0479 cdew3->SetZTitle("h_sum0ADCAmplperLS3 \b");
0480 cdew3->Draw("");
0481
0482 c1->cd(4);
0483 TH1F *cdew4 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLSdepth4HEu");
0484 gPad->SetGridy();
0485 gPad->SetGridx();
0486 cdew4->SetZTitle("h_sum0ADCAmplperLS3 \b");
0487 cdew4->Draw("");
0488
0489 c1->cd(5);
0490 TH1F *cdew5 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLSdepth5HEu");
0491 gPad->SetGridy();
0492 gPad->SetGridx();
0493 cdew5->SetZTitle("h_sum0ADCAmplperLS3 \b");
0494 cdew5->Draw("");
0495
0496 c1->cd(6);
0497 TH1F *cdew6 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLSdepth6HEu");
0498 gPad->SetGridy();
0499 gPad->SetGridx();
0500 cdew6->SetZTitle("h_sum0ADCAmplperLS3 \b");
0501 cdew6->Draw("");
0502
0503 c1->cd(7);
0504 TH1F *cdew7 = (TH1F *)dir->FindObjectAny("h_sum0ADCAmplperLSdepth7HEu");
0505 gPad->SetGridy();
0506 gPad->SetGridx();
0507 cdew7->SetZTitle("h_sum0ADCAmplperLS3 \b");
0508 cdew7->Draw("");
0509
0510 c1->Update();
0511
0512
0513
0514
0515
0516
0517
0518
0519 psfile.Close();
0520
0521 hfile1->Close();
0522
0523 hfile1->Close();
0524
0525
0526
0527 gSystem->Exit(0);
0528
0529 }