File indexing completed on 2025-02-23 09:22:04
0001
0002
0003
0004
0005
0006
0007
0008
0009 {
0010 gROOT->Reset();
0011 gStyle->SetOptStat(0000);
0012
0013 c1 = new TCanvas ("c1","",20,20,1200,600);
0014 c1->Divide(2,1);
0015
0016 Int_t ncols=0;
0017 Int_t nlines = 0;
0018
0019 FILE * fp = fopen("Dend3DEdep.out","r");
0020 Float_t posX, posY, posZ ;
0021 Float_t distB, distA, EdepR, DoseR;
0022 Float_t distMaxA = -1e-9;
0023 Float_t distMaxB = -1e-9;
0024 Float_t edepMax = -1e-9;
0025 Float_t doseMax = -1e-9;
0026 Float_t edepMin = 1e9;
0027 Float_t doseMin = 1e9;
0028
0029 h1 = new TProfile("Energy", "Energy deposits (keV) in dendritic compartments",1000,-1000,1000,0.001,1000);
0030 h2 = new TProfile("Dose", "Dose deposits (Gy) in dendritic compartments",1000,-1000,1000,0.001,1000);
0031 while (1)
0032 {
0033 ncols = fscanf(fp," %f %f %f %f %f %f %f",&posX, &posY, &posZ, &distA, &distB, &EdepR, &DoseR);
0034 if (ncols < 0) break;
0035 if (distMaxA < distA ) distMaxA = distA ;
0036 if (distMaxB < distB ) distMaxB = distB ;
0037 if (edepMax < EdepR ) edepMax = EdepR ;
0038 if (doseMax < DoseR ) doseMax = DoseR ;
0039 if (edepMin > EdepR ) edepMin = EdepR ;
0040 if (doseMin > DoseR ) doseMin = DoseR ;
0041
0042 h1->Fill(-distB, EdepR);
0043 h1->Fill(distA, EdepR);
0044 h2->Fill(-distB, DoseR);
0045 h2->Fill(distA, DoseR);
0046 nlines++;
0047 }
0048 fclose(fp);
0049 cout << " Max and Min Energy deposits (keV) == " << edepMax << " ; "<< edepMin<<endl;
0050 cout << " Max and Min Dose deposits (Gy) == " << doseMax << " ; "<< doseMin<<endl;
0051 cout << " Maximum Basal Distance (um) == " << distMaxB << " "<<endl;
0052 cout << " Maximum Apical Distance (um) == " << distMaxA << " "<<endl;
0053
0054 c1->cd(1);
0055 h1->Draw("P");
0056
0057 h1->SetMarkerSize(2);
0058 h1->SetMarkerColor(4);
0059 h1->SetMarkerStyle(27);
0060 h1->SetFillStyle(3005);
0061
0062 h1->GetXaxis()->SetTitle("Distance from Soma (um)");
0063 h1->GetYaxis()->SetRangeUser(edepMin, edepMax+3.);
0064 if (distMaxB > 0.)
0065 {
0066 TLatex text(-distMaxB,edepMax-1.,"Basal");
0067 text.DrawClone();
0068 }
0069 if (distMaxA > 0.)
0070 {
0071 TLatex text(distMaxA/3.,edepMax-2.,"Apical");
0072 text.DrawClone();
0073 }
0074 h1->GetXaxis()->SetRangeUser(-distMaxB-10., distMaxA+10.);
0075
0076
0077 c1->cd(2);
0078 h2->Draw("P");
0079
0080 h2->SetMarkerSize(2);
0081 h2->SetMarkerColor(kRed);
0082 h2->SetMarkerStyle(27);
0083 h2->SetFillStyle(3005);
0084
0085 h2->GetXaxis()->SetTitle("Distance from Soma (um)");
0086 h2->GetYaxis()->SetRangeUser(doseMin, doseMax+0.3);
0087 if (distMaxB > 0.)
0088 {
0089 TLatex text(-distMaxB,doseMax-0.1,"Basal");
0090 text.DrawClone();
0091 }
0092 if (distMaxA > 0.)
0093 {
0094 TLatex text(distMaxA/3.,doseMax-0.2,"Apical");
0095 text.DrawClone();
0096 }
0097 h2->GetXaxis()->SetRangeUser(-distMaxB-10., distMaxA+10.);
0098
0099 }
0100