#include <vector>
Go to the source code of this file.
|
| cout<< "Reading file \ "<< doseFileExp<< "\ ... ";Long64_t nlines=ntupleExperimental -> | ReadFile (doseFileExp, "depthExp:EdepExp") |
| |
| | if (nlines<=0) |
| |
| | printf ("%d Experimental points found\, nlines) |
| |
| ntupleExperimental | SetBranchAddress ("EdepExp", &EdepExp) |
| |
| ntupleExperimental | SetBranchAddress ("depthExp", &depthExp) |
| |
| ntupleExperimental | GetEntry (0) |
| |
| | for (Int_t l=0;l< nentries;l++) |
| |
| ntupleExperimental | Reset () |
| |
| in | open (doseFileSim) |
| |
| | if (!in.is_open()) |
| |
| TNtupleSim | Fill (f1, f2, f3, f4) |
| |
| | while (in.good()) |
| |
| in | close () |
| |
| TNtupleSim | SetBranchAddress ("dose", &dose) |
| |
| TNtupleSim | SetBranchAddress ("iX", &iX) |
| |
| vec_iX | clear () |
| |
| | printf ("%d Simulated points found\, vec_iX.size()) |
| |
| TNtupleSim | SetMarkerStyle (26) |
| |
| TNtupleSim | SetMarkerSize (0.8) |
| |
| ntupleExperimental | SetMarkerStyle (4) |
| |
| ntupleExperimental | SetMarkerColor (2) |
| |
| ntupleExperimental | Draw ("EdepExp:depthExp") |
| |
| TNtupleSim | Draw ("dose:iX","","same") |
| |
| leg | SetTextSize (0.035) |
| |
| leg | SetFillColor (0) |
| |
| leg | AddEntry (ntupleExperimental, "Experiment", "P") |
| |
| leg | AddEntry (TNtupleSim, "Simulation", "P") |
| |
| leg | Draw () |
| |
|
| ifstream | in |
| |
| TFile * | file = new TFile("Dose.root","RECREATE") |
| |
| TNtuple * | ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp") |
| |
| vector< Float_t > | vec_dose |
| |
| vector< Float_t > | vec_iX |
| |
| TString | doseFileExp = "../../../experimentalData/proton/BraggPeak/62MeVInWater.out" |
| |
| Float_t | depthExp |
| |
| Float_t | EdepExp |
| |
| Int_t | nentries = (Int_t)ntupleExperimental -> GetEntries() |
| |
| Float_t | normFactor = EdepExp |
| |
| TString | doseFileSim = "../../../SimulationOutputs/proton/BraggPeak/Dose.out" |
| |
| TNtuple * | TNtupleSim = new TNtuple("SimTree","dose from ascii file", "iX:jY:kZ:dose") |
| |
| Char_t | n [5] |
| |
| Float_t | f1 |
| |
| Float_t | f2 |
| |
| Float_t | f3 |
| |
| Float_t | f4 |
| |
| | nlines = 0 |
| |
| | do |
| |
| Float_t | iX |
| |
| Float_t | dose |
| |
| Float_t | sumDose = 0. |
| |
| Float_t | norm = 0. |
| |
| Int_t | oldX = iX |
| |
| TCanvas * | c1 = new TCanvas ("c1","c1",200,10,600,400) |
| |
| | leg = new TLegend(0.50,0.60,0.20,0.70) |
| |
◆ AddEntry() [1/2]
◆ AddEntry() [2/2]
◆ clear()
◆ close()
◆ Draw() [1/3]
◆ Draw() [2/3]
◆ Draw() [3/3]
◆ Fill()
◆ for()
Definition at line 32 of file comparison_ascii.C.
vector< Float_t > vec_dose
TNtuple * ntupleExperimental
ntupleExperimental GetEntry(0)
◆ GetEntry()
◆ if() [1/2]
◆ if() [2/2]
◆ open()
◆ printf() [1/2]
| printf |
( |
"%d Experimental points found\ |
, |
|
|
nlines |
|
|
) |
| |
◆ printf() [2/2]
| printf |
( |
"%d Simulated points found\ |
, |
|
|
vec_iX. |
size() |
|
) |
| |
◆ ReadFile()
◆ Reset()
◆ SetBranchAddress() [1/4]
◆ SetBranchAddress() [2/4]
◆ SetBranchAddress() [3/4]
◆ SetBranchAddress() [4/4]
◆ SetFillColor()
◆ SetMarkerColor()
◆ SetMarkerSize()
◆ SetMarkerStyle() [1/2]
◆ SetMarkerStyle() [2/2]
◆ SetTextSize()
| leg SetTextSize |
( |
0. |
035 | ) |
|
◆ while()
◆ c1
| TCanvas* c1 = new TCanvas ("c1","c1",200,10,600,400) |
◆ depthExp
◆ do
◆ dose
◆ doseFileExp
| TString doseFileExp = "../../../experimentalData/proton/BraggPeak/62MeVInWater.out" |
◆ doseFileSim
| TString doseFileSim = "../../../SimulationOutputs/proton/BraggPeak/Dose.out" |
◆ EdepExp
◆ f1
◆ f2
◆ f3
◆ f4
◆ file
| TFile* file = new TFile("Dose.root","RECREATE") |
◆ in
◆ iX
◆ leg
| leg = new TLegend(0.50,0.60,0.20,0.70) |
◆ nentries
◆ nlines
◆ norm
◆ normFactor
◆ ntupleExperimental
| TNtuple* ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp") |
◆ oldX
◆ sumDose
◆ TNtupleSim
| TNtuple* TNtupleSim = new TNtuple("SimTree","dose from ascii file", "iX:jY:kZ:dose") |
◆ vec_dose
◆ vec_iX