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] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/medical/dna/neuron/plotDend.C (Version 11.3.0) and /examples/extended/medical/dna/neuron/plotDend.C (Version 10.5.p1)


  1 // -------------------------------------------      1 // -------------------------------------------------------------------
  2 // -------------------------------------------      2 // -------------------------------------------------------------------
  3 //                                                  3 //
  4 // *******************************************      4 // *********************************************************************
  5 // To execute this macro under ROOT,                5 // To execute this macro under ROOT, 
  6 // launch ROOT (usually type 'root' at your ma      6 // launch ROOT (usually type 'root' at your machine's prompt)
  7 // This macro needs Dend3DEdep.out file :           7 // This macro needs Dend3DEdep.out file : 
  8 // *******************************************      8 // *********************************************************************
  9 {                                                   9 { 
 10 gROOT->Reset();                                    10 gROOT->Reset();
 11 gStyle->SetOptStat(0000);                          11 gStyle->SetOptStat(0000);
 12                                                    12 
 13 c1 = new TCanvas ("c1","",20,20,1200,600);         13 c1 = new TCanvas ("c1","",20,20,1200,600);
 14 c1->Divide(2,1);                                   14 c1->Divide(2,1); 
 15                                                    15 
 16 Int_t ncols=0;                                     16 Int_t ncols=0;
 17 Int_t nlines = 0;                                  17 Int_t nlines = 0;
 18                                                    18 
 19 FILE * fp = fopen("Dend3DEdep.out","r");           19 FILE * fp = fopen("Dend3DEdep.out","r");
 20 Float_t posX, posY, posZ ;                         20 Float_t posX, posY, posZ ;
 21 Float_t distB, distA, EdepR, DoseR;                21 Float_t distB, distA, EdepR, DoseR;
 22 Float_t distMaxA = -1e-9;                          22 Float_t distMaxA = -1e-9;
 23 Float_t distMaxB = -1e-9;                          23 Float_t distMaxB = -1e-9;
 24 Float_t edepMax = -1e-9;                           24 Float_t edepMax = -1e-9;
 25 Float_t doseMax = -1e-9;                           25 Float_t doseMax = -1e-9;
 26 Float_t edepMin = 1e9;                             26 Float_t edepMin = 1e9;
 27 Float_t doseMin = 1e9;                             27 Float_t doseMin = 1e9;
 28                                                    28 
 29 h1 = new TProfile("Energy", "Energy deposits (     29 h1 = new TProfile("Energy", "Energy deposits (keV) in dendritic compartments",1000,-1000,1000,0.001,1000);  
 30 h2 = new TProfile("Dose", "Dose deposits (Gy)      30 h2 = new TProfile("Dose", "Dose deposits (Gy) in dendritic compartments",1000,-1000,1000,0.001,1000);  
 31 while (1)                                          31 while (1) 
 32    {                                               32    {
 33       ncols = fscanf(fp," %f %f %f %f %f %f %f     33       ncols = fscanf(fp," %f %f %f %f %f %f %f",&posX, &posY, &posZ, &distA, &distB, &EdepR, &DoseR);
 34       if (ncols < 0) break;                        34       if (ncols < 0) break;
 35       if (distMaxA < distA ) distMaxA = distA      35       if (distMaxA < distA ) distMaxA = distA ;
 36       if (distMaxB < distB ) distMaxB = distB      36       if (distMaxB < distB ) distMaxB = distB ;
 37       if (edepMax < EdepR ) edepMax = EdepR ;      37       if (edepMax < EdepR ) edepMax = EdepR ;
 38       if (doseMax < DoseR ) doseMax = DoseR ;      38       if (doseMax < DoseR ) doseMax = DoseR ;
 39       if (edepMin > EdepR ) edepMin = EdepR ;      39       if (edepMin > EdepR ) edepMin = EdepR ;
 40       if (doseMin > DoseR ) doseMin = DoseR ;      40       if (doseMin > DoseR ) doseMin = DoseR ;
 41       // ....                                      41       // ....  
 42       h1->Fill(-distB, EdepR);  // Basal dendr     42       h1->Fill(-distB, EdepR);  // Basal dendrite
 43       h1->Fill(distA, EdepR); // Apical dendri     43       h1->Fill(distA, EdepR); // Apical dendrite
 44       h2->Fill(-distB, DoseR);                     44       h2->Fill(-distB, DoseR);
 45       h2->Fill(distA, DoseR);                      45       h2->Fill(distA, DoseR);
 46       nlines++;                                    46       nlines++; 
 47    }                                               47    }
 48 fclose(fp);                                        48 fclose(fp);
 49 cout << " Max and Min Energy deposits (keV) ==     49 cout << " Max and Min Energy deposits (keV) ==  " << edepMax << " ; "<< edepMin<<endl;
 50 cout << " Max and Min Dose deposits (Gy) ==  "     50 cout << " Max and Min Dose deposits (Gy) ==  " << doseMax << " ; "<< doseMin<<endl;
 51 cout << " Maximum Basal Distance (um) == " <<      51 cout << " Maximum Basal Distance (um) == " << distMaxB << " "<<endl;
 52 cout << " Maximum Apical Distance (um) == " <<     52 cout << " Maximum Apical Distance (um) == " << distMaxA << " "<<endl;
 53                                                    53 
 54 c1->cd(1);                                         54 c1->cd(1); 
 55 h1->Draw("P");                                     55 h1->Draw("P"); 
 56 //gPad->SetLogy();                                 56 //gPad->SetLogy();
 57 h1->SetMarkerSize(2);                              57 h1->SetMarkerSize(2);
 58 h1->SetMarkerColor(4);                             58 h1->SetMarkerColor(4);
 59 h1->SetMarkerStyle(27);                            59 h1->SetMarkerStyle(27); 
 60 h1->SetFillStyle(3005);                            60 h1->SetFillStyle(3005);
 61 //h1->GetYaxis()->SetTitle("Energy deposits in     61 //h1->GetYaxis()->SetTitle("Energy deposits in basal and apical dendrite (keV)");
 62 h1->GetXaxis()->SetTitle("Distance from Soma (     62 h1->GetXaxis()->SetTitle("Distance from Soma (um)");
 63 h1->GetYaxis()->SetRangeUser(edepMin, edepMax+     63 h1->GetYaxis()->SetRangeUser(edepMin, edepMax+3.);
 64 if (distMaxB > 0.)                                 64 if (distMaxB > 0.)
 65 {                                                  65 {
 66     TLatex text(-distMaxB,edepMax-1.,"Basal");     66     TLatex text(-distMaxB,edepMax-1.,"Basal");
 67     text.DrawClone();                              67     text.DrawClone();
 68 }                                                  68 }
 69 if (distMaxA > 0.)                                 69 if (distMaxA > 0.)
 70 {                                                  70 {
 71     TLatex text(distMaxA/3.,edepMax-2.,"Apical     71     TLatex text(distMaxA/3.,edepMax-2.,"Apical");
 72     text.DrawClone();                              72     text.DrawClone();
 73 }                                                  73 }
 74 h1->GetXaxis()->SetRangeUser(-distMaxB-10., di     74 h1->GetXaxis()->SetRangeUser(-distMaxB-10., distMaxA+10.);
 75 //h1->Fit("gaus");                                 75 //h1->Fit("gaus");
 76                                                    76 
 77 c1->cd(2);                                         77 c1->cd(2);
 78 h2->Draw("P");                                     78 h2->Draw("P");  
 79 //gPad->SetLogy();                                 79 //gPad->SetLogy();
 80 h2->SetMarkerSize(2);                              80 h2->SetMarkerSize(2);
 81 h2->SetMarkerColor(kRed);                          81 h2->SetMarkerColor(kRed);
 82 h2->SetMarkerStyle(27);                            82 h2->SetMarkerStyle(27); 
 83 h2->SetFillStyle(3005);                            83 h2->SetFillStyle(3005);
 84 //h2->GetYaxis()->SetTitle("Dose deposits in b     84 //h2->GetYaxis()->SetTitle("Dose deposits in basal and apical dendrite (Gy)");
 85 h2->GetXaxis()->SetTitle("Distance from Soma (     85 h2->GetXaxis()->SetTitle("Distance from Soma (um)");
 86 h2->GetYaxis()->SetRangeUser(doseMin, doseMax+     86 h2->GetYaxis()->SetRangeUser(doseMin, doseMax+0.3);
 87 if (distMaxB > 0.)                                 87 if (distMaxB > 0.)
 88 {                                                  88 {
 89     TLatex text(-distMaxB,doseMax-0.1,"Basal")     89     TLatex text(-distMaxB,doseMax-0.1,"Basal");
 90     text.DrawClone();                              90     text.DrawClone();
 91 }                                                  91 }
 92 if (distMaxA > 0.)                                 92 if (distMaxA > 0.)
 93 {                                                  93 {
 94     TLatex text(distMaxA/3.,doseMax-0.2,"Apica     94     TLatex text(distMaxA/3.,doseMax-0.2,"Apical");
 95     text.DrawClone();                              95     text.DrawClone();
 96 }                                                  96 }
 97 h2->GetXaxis()->SetRangeUser(-distMaxB-10., di     97 h2->GetXaxis()->SetRangeUser(-distMaxB-10., distMaxA+10.);
 98                                                    98 
 99 }                                                  99 }
100                                                   100 
101                                                   101