Skip to content
Snippets Groups Projects
Commit 696f04d5 authored by Benoit's avatar Benoit
Browse files

debugging GEFreader

parent c2cd35fd
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #353870 passed
......@@ -5,9 +5,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GEFReader
GEFversion= 2023.33
EnergyLow= 0.01
EnergyHigh= 20
InputDataFile= /home/benoit/Physics/nptool/nptoolv3/Inputs/InputData/test_ng.txt
InputDataFile= /home/benoit/Physics/nptool/nptoolv3/Inputs/InputData/test.lmd
x0= 0
y0= 0
z0= 0 mm
......
......@@ -83,14 +83,19 @@ void EventGeneratorGEFReader::ReadConfiguration(NPL::InputParser parser){
m_Parameters.push_back(SourceParameters());
const vector<SourceParameters>::reverse_iterator it = m_Parameters.rbegin();
/* if(blocks[i]->HasToken("GEFversion"))
if(blocks[i]->HasToken("GEFversion"))
{
it->m_GEFversion=blocks[i]->GetDouble("GEFversion");
if(version>=2023.32 && version<=2023.33) version_shift=0;
}*/
it->m_GEFversion=blocks[i]->GetDouble("GEFversion","");
if(it->m_GEFversion>=2023.32 && it->m_GEFversion<=2023.33) version_shift=0;
else if (it->m_GEFversion>=2023.11 && it->m_GEFversion<=2023.12) version_shift=1;
else {
cout << "!!!!!!!!!!!!!!!!! ERROR: GEF version not verified !!!!!!!!!!!!!!!!!!" << endl;
cout << "Check the column positions of your GEF file and" << endl;
cout << "add the version to the shift needed in EventGeneratorGEFReader.cc" << endl;
}
}
if(blocks[i]->HasToken("InputDataFile")){
vector<string> file = blocks[i]->GetVectorString("InputDataFile");
cout << "Input file to read: " << file[0] << endl;
fInputDataFile.open(file.at(0).c_str());
HasInputDataFile = true;
......@@ -105,7 +110,6 @@ void EventGeneratorGEFReader::ReadConfiguration(NPL::InputParser parser){
iss >> data;
comment=to_string(data);
cout << "comment=" << comment << " data=" << data << endl;
if(comment!="*" && data>0)
{// Storing the first line to be read by GenerateEvent
LastLine.push_back(data);
......@@ -195,7 +199,7 @@ void EventGeneratorGEFReader::GenerateEvent(G4Event*){
while(iss >> data) LastLine.push_back(data);
if(DataLine.size()>=26 && DataLine.at(1)==92)
if(DataLine.size()>=26 && DataLine.at(1)>50)
{
// Fragment emission
for(int frag=0;frag<2;frag++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment