/** * Magnitude.hh * * Created on: 31 oct. 2012 * Author: AKKA IS */ #ifndef MAGNITUDE_HH_ #define MAGNITUDE_HH_ #include /** * @bried Compute the magnitude of el * @return sqrtf(vec[0] * vec[0] + vec[1] * vec[1] + vec[2] * vec[2]); */ typedef std::vector FloatVector; typedef const FloatVector& RCFloatVector; FloatVector els_calculate(const std::vector& ELS,const double& TimeCompres, const double& EnergyCompres,const std::vector& vex_els_energy,unsigned int Angle) { FloatVector lElsCalculate; for (unsigned int iEn = 0; iEn < 128; iEn++) {// 128 Energy Steps lElsCalculate.push_back(((double)ELS[iEn + Angle *128])/TimeCompres/EnergyCompres/vex_els_energy[iEn]); } return lElsCalculate; } #endif /* MAGNITUDE_HH_ */