LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
comparison.C File Reference
#include "Riostream.h"

Go to the source code of this file.

Functions

experimentalTree SetBranchAddress ("EdepExp",&EdepExp)
 
experimentalTree SetBranchAddress ("depthExp",&depthExp)
 
 for (Int_t i=0;i< nentries;i++)
 
simulatedPeak Scale (1/simulationNormalisationFactor)
 
ntupleExperimental SetMarkerStyle (4)
 
simulatedPeak SetMarkerSize (2)
 
ntupleExperimental Draw ("EdepExp:depthExp")
 
simulatedPeak Draw ("same")
 
leg SetTextSize (0.035)
 
leg SetFillColor (0)
 
leg AddEntry (ntupleExperimental,"Experiment","P")
 
leg AddEntry (simulatedPeak,"Simulation")
 
leg Draw ()
 

Variables

ifstream in
 
TFile * experimentalFile = new TFile("../../../experimentalData/proton/BraggPeak/62MeVInWater.root","READ")
 
TTree * experimentalTree = (TTree*)experimentalFile -> Get("Experimental62MeVInWater")
 
Float_t depthExp
 
Float_t EdepExp
 
TNtuple * ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp")
 
Int_t nentries = (Int_t)experimentalTree -> GetEntries()
 
TFile * simulationFile = new TFile("../../../SimulationOutputs/proton/BraggPeak/protonBraggPeak.root","READ")
 
TH1D * simulatedPeak = (TH1D*) simulationFile -> Get("braggPeak")
 
Float_t simulationNormalisationFactor = simulatedPeak -> GetBinContent(1)
 
TCanvas * c1 = new TCanvas ("c1","c1",200,10,600,400)
 
 leg = new TLegend(0.50,0.60,0.20,0.70)
 

Function Documentation

leg AddEntry ( ntupleExperimental  ,
"Experiment"  ,
"P"   
)
leg AddEntry ( simulatedPeak  ,
"Simulation"   
)
ntupleExperimental Draw ( "EdepExp:depthExp"  )
h20 Draw ( "same"  )
leg Draw ( )
simulatedPeak Scale ( 1/  simulationNormalisationFactor)
experimentalTree SetBranchAddress ( "EdepExp"  ,
EdepExp 
)
experimentalTree SetBranchAddress ( "depthExp"  ,
depthExp 
)
leg SetFillColor ( )
h2 SetMarkerSize ( )
ntupleExperimental SetMarkerStyle ( )
leg SetTextSize ( 0.  035)

Variable Documentation

TCanvas* c1 = new TCanvas ("c1","c1",200,10,600,400)

Definition at line 51 of file comparison.C.

Float_t depthExp

Definition at line 22 of file comparison.C.

Float_t EdepExp

Definition at line 22 of file comparison.C.

Referenced by for().

TFile* experimentalFile = new TFile("../../../experimentalData/proton/BraggPeak/62MeVInWater.root","READ")

Definition at line 17 of file comparison.C.

TTree* experimentalTree = (TTree*)experimentalFile -> Get("Experimental62MeVInWater")

Definition at line 20 of file comparison.C.

leg = new TLegend(0.50,0.60,0.20,0.70)

Definition at line 61 of file comparison.C.

Int_t nentries = (Int_t)experimentalTree -> GetEntries()

Definition at line 29 of file comparison.C.

Referenced by ProcessSingleFile().

TNtuple* ntupleExperimental = new TNtuple("ntupleExperimental","Protons, exp. data", "depthExp:EdepExp")

Definition at line 28 of file comparison.C.

TH1D* simulatedPeak = (TH1D*) simulationFile -> Get("braggPeak")

Definition at line 45 of file comparison.C.

TFile* simulationFile = new TFile("../../../SimulationOutputs/proton/BraggPeak/protonBraggPeak.root","READ")

Definition at line 42 of file comparison.C.

Float_t simulationNormalisationFactor = simulatedPeak -> GetBinContent(1)

Definition at line 47 of file comparison.C.