Go to the source code of this file.
Functions | |
void | raytraces (Double_t min, Double_t max) |
void raytraces | ( | Double_t | min, | |
Double_t | max | |||
) |
Definition at line 3 of file raytraces.C.
00003 { 00004 00005 TString cut = "ion&&volume==71&&"; 00006 00007 cut+="kineE>"; 00008 cut+=min*1000; 00009 cut+="&&kineE<"; 00010 cut+=max*1000; 00011 00012 geant->Draw("theta0:kineE:num",cut,"goff"); 00013 00014 Double_t *id = geant->GetV3(); 00015 Double_t *en = geant->GetV2(); 00016 Double_t *th = geant->GetV1(); 00017 00018 Int_t tot = htemp->GetEntries(); 00019 const Int_t N = tot; 00020 00021 cout << N << endl; 00022 00023 Double_t index[N]; 00024 Double_t kineE[N]; 00025 Double_t theta[N]; 00026 00027 Double_t e_min=5000000, e_max=-500000, id_min=5000000, id_max=-5000000; 00028 00029 00030 for (int i=0; i<N; i++) { 00031 index[i]= *(id +i); 00032 theta[i]= *(th +i); 00033 kineE[i]= *(en +i); 00034 00035 if (kineE[i]>e_max) {e_max=kineE[i]; id_max=index[i];} 00036 if (kineE[i]<e_min) {e_min=kineE[i]; id_min=index[i];} 00037 00038 } 00039 00040 00041 00042 00043 00044 00045 TString cut = "num=="; 00046 cut+=id_max; 00047 00048 geant->Draw("r:z",cut,"*C"); 00049 00050 for (int i=1; i<N; i++) { 00051 00052 TString cut = "num=="; 00053 cut+=index[i]; 00054 00055 geant->Draw("r:z",cut,"*Csame"); 00056 00057 } 00058 00059 //htemp->GetXaxis()->SetRangeUser(-350,350); 00060 htemp->GetYaxis()->SetRangeUser(0,350); 00061 htemp->GetXaxis()->SetRangeUser(0,25000); 00062 00063 00064 }