Loading src/modules/CSADigitizer/CSADigitizerModule.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -167,10 +167,9 @@ CSADigitizerModule::CSADigitizerModule(Configuration& config, Messenger* messeng } LOG(DEBUG) << "Response function successfully initialized with " << parameters.size() << " parameters"; } else if(model_ == DigitizerType::LUT) { // Take the file (type to be determined) containing normalized electronics response and establish interpolation for every timestep //} excel -> csv, import, change to tgraph, add if statement for eval function } else if(model_ == DigitizerType::GRAPH) { auto graph_path = config_.getPath("graph_file", true); //perhaps change auto later graph_impulse_response_ = new TGraph(graph_path.c_str(), "%lg,%lg"); } output_plots_ = config_.get<bool>("output_plots"); Loading Loading @@ -251,11 +250,10 @@ void CSADigitizerModule::run(Event* event) { // initialize impulse response function - assume all time bins are equal impulse_response_function_.reserve(ntimepoints); for(size_t itimepoint = 0; itimepoint < ntimepoints; ++itimepoint) { impulse_response_function_.push_back( if(model_ != DigitizerType::LUT) { calculate_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); impulse_response_function_.push_back(calculate_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); } else { graph_impulse_response_->Eval(timestep * static_cast<double>(itimepoint)); impulse_response_function_.push_back(graph_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); } } Loading Loading
src/modules/CSADigitizer/CSADigitizerModule.cpp +8 −10 Original line number Diff line number Diff line Loading @@ -167,10 +167,9 @@ CSADigitizerModule::CSADigitizerModule(Configuration& config, Messenger* messeng } LOG(DEBUG) << "Response function successfully initialized with " << parameters.size() << " parameters"; } else if(model_ == DigitizerType::LUT) { // Take the file (type to be determined) containing normalized electronics response and establish interpolation for every timestep //} excel -> csv, import, change to tgraph, add if statement for eval function } else if(model_ == DigitizerType::GRAPH) { auto graph_path = config_.getPath("graph_file", true); //perhaps change auto later graph_impulse_response_ = new TGraph(graph_path.c_str(), "%lg,%lg"); } output_plots_ = config_.get<bool>("output_plots"); Loading Loading @@ -251,11 +250,10 @@ void CSADigitizerModule::run(Event* event) { // initialize impulse response function - assume all time bins are equal impulse_response_function_.reserve(ntimepoints); for(size_t itimepoint = 0; itimepoint < ntimepoints; ++itimepoint) { impulse_response_function_.push_back( if(model_ != DigitizerType::LUT) { calculate_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); impulse_response_function_.push_back(calculate_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); } else { graph_impulse_response_->Eval(timestep * static_cast<double>(itimepoint)); impulse_response_function_.push_back(graph_impulse_response_->Eval(timestep * static_cast<double>(itimepoint))); } } Loading