From 4026d5cfd658408625d061ec72d082369834a384 Mon Sep 17 00:00:00 2001 From: e657 <a.matta@surrey.ac.uk> Date: Thu, 27 Feb 2014 22:45:47 +0100 Subject: [PATCH] TExogamPhysics modified to read beta and angles of Exogam files in the configs directory of your Analysis --- NPLib/Exogam/TExogamPhysics.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/NPLib/Exogam/TExogamPhysics.cxx b/NPLib/Exogam/TExogamPhysics.cxx index ad8cd36e7..66c0198e2 100644 --- a/NPLib/Exogam/TExogamPhysics.cxx +++ b/NPLib/Exogam/TExogamPhysics.cxx @@ -397,10 +397,15 @@ void TExogamPhysics::BuildPhysicalEvent() double TExogamPhysics::DopplerCorrection(double E, double Theta) { double Pi = 3.141592654 ; + TString filename = "configs/beta.txt"; + ifstream file; + cout << filename << endl; + file.open(filename); + if(!file) cout << filename << " was not opened" << endl; double E_corr = 0; - //double beta = 0.197; // baptiste value - double beta = 0.17; //e628 test + double beta = 0.; + file>>beta; double gamma = 1./ sqrt(1-beta*beta); E_corr = gamma * E * ( 1. - beta * cos(Theta*Pi/180.)); @@ -567,7 +572,7 @@ void TExogamPhysics::AddClover(string AngleFile) // TString filename = Form("posz42_simu50mm/angles_exogam_clover%d.txt",NumberOfClover); // TString filename = Form("posz42_exp_stat_demiring/angles_exogam_clover%d.txt",NumberOfClover); - string path = "posz42_exp_stat_demiring/"; + string path = "configs/"; TString filename = path + AngleFile; cout << filename << endl; -- GitLab