File indexing completed on 2024-04-06 12:30:03
0001 {
0002
0003
0004 printf("z1: gROOT Reset \n");
0005 gROOT->Reset();
0006 gROOT->SetStyle("Plain");
0007
0008 gStyle->SetOptStat(11111111);
0009
0010 gStyle->SetStatX(0.98);
0011 gStyle->SetStatY(0.99);
0012 gStyle->SetStatW(0.30);
0013 gStyle->SetStatH(0.25);
0014
0015
0016 Float_t LeftOffset = 0.12;
0017 Float_t TopOffset = 0.12;
0018
0019 gStyle->SetLineWidth(1);
0020 gStyle->SetErrorX(0);
0021
0022
0023 gStyle->SetOptTitle(0);
0024
0025 gStyle->SetTitleColor(1);
0026
0027 gStyle->SetTitleX(0.15);
0028 gStyle->SetTitleH(0.15);
0029
0030 gStyle->SetTitleW(0.60);
0031 gStyle->SetTitleFont(42);
0032 gStyle->SetTitleFontSize(0.07);
0033
0034
0035
0036 gStyle->SetFrameFillColor(41);
0037
0038
0039 gStyle->SetPadTopMargin(TopOffset);
0040 gStyle->SetPadBottomMargin(LeftOffset);
0041 gStyle->SetPadRightMargin(TopOffset);
0042 gStyle->SetPadLeftMargin(LeftOffset);
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 TFile *hfile = new TFile("TheAnlysis.root", "READ");
0056 printf("z1: root file TheAnlysis is Open \n");
0057 hfile.ls();
0058 hfile->Print();
0059
0060
0061
0062
0063
0064 TPostScript psfile ("z1.ps", 111);
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106 TCanvas* c1 = new TCanvas("c1", "FP420Analysis", 600, 800);
0107 hfile.cd();
0108
0109 c1->Update();
0110 c1->Clear();
0111 c1->Divide(1,3);
0112 c1->cd(1);
0113 SumEDep->Draw();
0114
0115 c1->cd(2);
0116 TrackL->Draw();
0117
0118 c1->cd(3);
0119 NumberOfHits->Draw();
0120
0121 c1->Update();
0122
0123
0124 c1->Clear();
0125 c1->Divide(3,2);
0126 c1->cd(1);
0127 TH1F *mpelec = (TH1F*)hfile->Get("VtxX");
0128 mpelec->SetLineColor(3);
0129 mpelec->SetMarkerStyle(20);
0130 mpelec->SetMarkerSize(0.4);
0131 mpelec->GetYaxis()->SetLabelSize(0.04);
0132 mpelec->SetMarkerColor(kBlue);
0133 mpelec->Draw("Error");
0134
0135 c1->cd(2);
0136 TH1F *mpelec1= (TH1F*)hfile->Get("VtxY");
0137 mpelec1->SetMarkerStyle(20);
0138 mpelec1->SetMarkerSize(0.4);
0139 mpelec1->GetYaxis()->SetLabelSize(0.04);
0140 mpelec1->SetMarkerColor(kBlue);
0141 mpelec1->SetLineColor(3);
0142 mpelec1->Draw("Error");
0143
0144 c1->cd(3);
0145 TH1F *mpelec2= (TH1F*)hfile->Get("VtxZ");
0146 mpelec2->SetMarkerStyle(20);
0147 mpelec2->SetMarkerSize(0.4);
0148 mpelec2->GetYaxis()->SetLabelSize(0.04);
0149 mpelec2->SetMarkerColor(kBlue);
0150 mpelec2->SetLineColor(3);
0151 mpelec2->Draw("Error");
0152
0153 c1->cd(4);
0154 TH1F *mpelec3= (TH1F*)hfile->Get("PrimaryEta");
0155 mpelec3->SetMarkerStyle(20);
0156 mpelec3->SetMarkerSize(0.4);
0157 mpelec3->GetYaxis()->SetLabelSize(0.04);
0158 mpelec3->SetMarkerColor(kBlue);
0159 mpelec3->SetLineColor(3);
0160 mpelec3->Draw("Error");
0161
0162 c1->cd(5);
0163 TH1F *mpelec3= (TH1F*)hfile->Get("PrimaryPhigrad");
0164 mpelec3->SetMarkerStyle(20);
0165 mpelec3->SetMarkerSize(0.4);
0166 mpelec3->GetYaxis()->SetLabelSize(0.04);
0167 mpelec3->SetMarkerColor(kBlue);
0168 mpelec3->SetLineColor(3);
0169 mpelec3->Draw("Error");
0170
0171 c1->cd(6);
0172 TH1F *mpelec3= (TH1F*)hfile->Get("PrimaryTh");
0173 mpelec3->SetMarkerStyle(20);
0174 mpelec3->SetMarkerSize(0.4);
0175 mpelec3->GetYaxis()->SetLabelSize(0.04);
0176 mpelec3->SetMarkerColor(kBlue);
0177 mpelec3->SetLineColor(3);
0178 mpelec3->Draw("Error");
0179
0180
0181 c1->Update();
0182
0183
0184
0185
0186
0187 c1->Clear();
0188 c1->Divide(1,3);
0189 c1->cd(1);
0190 TH1F *mpelec = (TH1F*)hfile->Get("PrimaryLastpoX");
0191 mpelec->SetLineColor(3);
0192 mpelec->SetMarkerStyle(20);
0193 mpelec->SetMarkerSize(0.4);
0194 mpelec->GetYaxis()->SetLabelSize(0.04);
0195 mpelec->SetMarkerColor(kBlue);
0196 mpelec->Draw("Error");
0197
0198
0199 c1->cd(2);
0200 TH1F *mpelec1= (TH1F*)hfile->Get("PrimaryLastpoY");
0201 mpelec1->SetMarkerStyle(20);
0202 mpelec1->SetMarkerSize(0.4);
0203 mpelec1->GetYaxis()->SetLabelSize(0.04);
0204 mpelec1->SetMarkerColor(kBlue);
0205 mpelec1->SetLineColor(3);
0206 mpelec1->Draw("Error");
0207
0208 c1->cd(3);
0209 TH1F *mpelec2= (TH1F*)hfile->Get("PrimaryLastpoZ");
0210 mpelec2->SetMarkerStyle(20);
0211 mpelec2->SetMarkerSize(0.4);
0212 mpelec2->GetYaxis()->SetLabelSize(0.04);
0213 mpelec2->SetMarkerColor(kBlue);
0214 mpelec2->SetLineColor(3);
0215 mpelec2->Draw("Error");
0216
0217
0218 c1->Update();
0219
0220
0221 c1->Clear();
0222 c1->Divide(1,3);
0223 c1->cd(1);
0224 TH1F *mpelec2= (TH1F*)hfile->Get("zHits");
0225 mpelec2->SetMarkerStyle(20);
0226 mpelec2->SetMarkerSize(0.4);
0227 mpelec2->GetYaxis()->SetLabelSize(0.04);
0228 mpelec2->SetMarkerColor(kBlue);
0229 mpelec2->SetLineColor(3);
0230 mpelec2->Draw("Error");
0231
0232 c1->cd(2);
0233 TH1F *mpelec2= (TH1F*)hfile->Get("zHitsnoMI");
0234 mpelec2->SetMarkerStyle(20);
0235 mpelec2->SetMarkerSize(0.4);
0236 mpelec2->GetYaxis()->SetLabelSize(0.04);
0237 mpelec2->SetMarkerColor(kBlue);
0238 mpelec2->SetLineColor(3);
0239 mpelec2->Draw("Error");
0240
0241
0242 c1->cd(3);
0243 TH1F *mpelec2= (TH1F*)hfile->Get("zHitsTrLoLe");
0244 mpelec2->SetMarkerStyle(20);
0245 mpelec2->SetMarkerSize(0.4);
0246 mpelec2->GetYaxis()->SetLabelSize(0.04);
0247 mpelec2->SetMarkerColor(kBlue);
0248 mpelec2->SetLineColor(3);
0249 mpelec2->Draw("Error");
0250
0251
0252 c1->Update();
0253
0254
0255
0256
0257
0258
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271 psfile->Close();
0272 hfile->Close();
0273
0274
0275 gSystem->Exit(0);
0276
0277 }