Skip to content
Snippets Groups Projects
Commit 39e5ce41 authored by tiwillia's avatar tiwillia Committed by tiwillia
Browse files

Bug fix to correctly calculate uncertainties on theta0 parameter

git-svn-id: svn+ssh://svn.cern.ch/reps/lhcb/Geant4/trunk@202377 4525493e-7705-40b1-a816-d608a930855b
parent ea2b4173
Branches
Tags
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
! Responsible : Timothy Williams ! Responsible : Timothy Williams
! Purpose : Standalone Geant4 example used to test and validate multiple cattering ! Purpose : Standalone Geant4 example used to test and validate multiple cattering
!----------------------------------------------------------------------------- !-----------------------------------------------------------------------------
! 2016-03-01 - Timothy Williams
Bug fix to correctly calculate uncertainy on theta0 parameter
! 2015-11-02 - Marco Clemencic ! 2015-11-02 - Marco Clemencic
- Added .gitignore file - Added .gitignore file
......
...@@ -46,6 +46,7 @@ TGraphErrors* RMSPlotter::MakePlots(){ ...@@ -46,6 +46,7 @@ TGraphErrors* RMSPlotter::MakePlots(){
std::ofstream outt("Results_Table.txt"); std::ofstream outt("Results_Table.txt");
outt<<"Energy/MeV "<<"RMS of Scattering Angle/mRad "<<" Uncertainty/mRad" <<std::endl; outt<<"Energy/MeV "<<"RMS of Scattering Angle/mRad "<<" Uncertainty/mRad" <<std::endl;
int D= DataPoints.size(); int D= DataPoints.size();
double dD=D;
Double_t* E=new Double_t[D]; Double_t* E=new Double_t[D];
Double_t* R=new Double_t[D]; Double_t* R=new Double_t[D];
Double_t* RU=new Double_t[D]; Double_t* RU=new Double_t[D];
...@@ -55,7 +56,7 @@ TGraphErrors* RMSPlotter::MakePlots(){ ...@@ -55,7 +56,7 @@ TGraphErrors* RMSPlotter::MakePlots(){
for(;Di!=DataPoints.end();++Di,++a){ for(;Di!=DataPoints.end();++Di,++a){
E[a]=(*Di).Energy; E[a]=(*Di).Energy;
R[a]=(*Di).rms=(*Di).Distribution->GetMean(); R[a]=(*Di).rms=(*Di).Distribution->GetMean();
RU[a]=(*Di).rmsUncert=(*Di).Distribution->GetRMS(); RU[a]=(*Di).rmsUncert=((*Di).Distribution->GetRMS())/dD;
EU[a]=0; EU[a]=0;
outt<<E[a]<<" , "<<R[a]<<" , "<<RU[a]<<std::endl; outt<<E[a]<<" , "<<R[a]<<" , "<<RU[a]<<std::endl;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment