// // population4_container.cpp // mc_electron // // Created by Christian Reiling on 11.06.19. // Copyright © 2019 Christian Reiling. All rights reserved. // #include "population4_container.hpp" #include using namespace std; Pop4_Container::Pop4_Container(int num_z_bins, int num_r_bins, int num_phi_bins, int num_E_bins) { z_scale = Lin_Scale(z_RW_m, z_WGTS_end_m, num_z_bins); r_scale = Lin_Scale(0,r_WGTS_m, num_r_bins); phi_scale = Lin_Scale(0, 2*pi, num_phi_bins); E_scale = Log_Scale(scale_start, scale_end, num_E_bins); phi_offset = num_E_bins; r_offset = phi_offset * num_phi_bins; z_offset = r_offset*num_r_bins; total_data_size = num_z_bins*z_offset; data = new double[total_data_size]; } Pop4_Container::~Pop4_Container() { delete[] data; } Pop4_Container::Pop4_Container(const Pop4_Container& other) { z_scale = other.z_scale; r_scale = other.r_scale; phi_scale = other.phi_scale; E_scale = other.E_scale; z_offset = other.z_offset; r_offset = other.r_offset; phi_offset = other.phi_offset; total_data_size = other.total_data_size; for (int i=0; i