g4analyze.C
Go to the documentation of this file.00001
00002
00003 void g4analyze() {
00004
00005
00006 const Int_t NUM_VOLS = 7;
00007 const Int_t NUM_Z = 6;
00008
00009 Double_t vol_num[NUM_VOLS] = {31,41,42,43,44,71,1};
00010
00011 Double_t z_mother[NUM_Z] = {4745,5000,6340,9080,10420,14000};
00012
00013
00014
00015 TCanvas *c1 = new TCanvas("washers_part1","",0);
00016 c1->Divide(3,3);
00017 TCanvas *c2 = new TCanvas("washers_part2","",0);
00018 c2->Divide(2,3);
00019
00020 for (Int_t i=0 ; i<NUM_VOLS ; i++) {
00021
00022 TString vol = "volume==";
00023 vol+=vol_num[i];
00024 vol+="&&ion";
00025 vol+="&&kineE0>2750";
00026
00027 TString htitle = "Exit of volume #";
00028 htitle+=vol_num[i];
00029 TString hname = "xy";
00030 hname+=vol_num[i];
00031
00032 TString draw = "x:y>>xy";
00033 draw+=vol_num[i];
00034
00035 TH2F *xy = new TH2F(hname,htitle,1000,-200,200,1000,-200,200);
00036
00037 c1->cd(i+1);
00038 xy->SetStats(0);
00039 xy->GetXaxis()->SetLabelSize(0.055);
00040 xy->GetYaxis()->SetLabelSize(0.055);
00041 geant->Draw(draw,vol);
00042
00043 }
00044
00045
00046 for (Int_t i=0 ; i<NUM_Z ; i++) {
00047
00048 TString cut = "z==";
00049 cut+=z_mother[i];
00050 cut+="&&ion";
00051 cut+="&&kineE0>2750";
00052
00053 TString htitle = "Entrance of Volume at z=";
00054 htitle+=z_mother[i];
00055 TString hname = "xy";
00056 hname+=z_mother[i];
00057
00058 TString draw = "x:y>>xy";
00059 draw+=z_mother[i];
00060
00061 TH2F *xy = new TH2F(hname,htitle,1000,-200,200,1000,-200,200);
00062
00063 c2->cd(i+1);
00064 xy->SetStats(0);
00065 xy->GetXaxis()->SetLabelSize(0.055);
00066 xy->GetYaxis()->SetLabelSize(0.055);
00067 geant->Draw(draw,cut);
00068
00069 }
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 }