From 7c25bbeb460be2b260058cad2a8b0fe6b5e946b1 Mon Sep 17 00:00:00 2001 From: Alex Buts Date: Sun, 2 Feb 2014 16:41:02 +0000 Subject: [PATCH] refs #8810 should be working MDRange function at least assuming that the Transf matrix is a rotation. --- .../MDEvents/inc/MantidMDEvents/MDTransfModQ.h | 2 -- Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h b/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h index fd41cad7d23b..4f9d7a2b02ce 100644 --- a/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h +++ b/Code/Mantid/Framework/MDEvents/inc/MantidMDEvents/MDTransfModQ.h @@ -109,8 +109,6 @@ class DLLExport MDTransfModQ: public MDTransfInterface float *m_pEfixedArray; // pointer to the array which contains detectors masks. TODO: It is here untill Mantid masks spectra by 0 instead of NaNs, when switched to NaN-s -- remove int *m_pDetMasks; - // vector of precalculated cos^2(Theta) values for all detectors, used for identifying extremums - std::vector m_CosThetaSq; private: /// how to transform workspace data in elastic case inline bool calcMatrixCoordElastic(const double &k0,std::vector &Coored)const; diff --git a/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp b/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp index e509a780f7b6..0104e3c56a06 100644 --- a/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp +++ b/Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp @@ -218,14 +218,14 @@ namespace Mantid if(m_pEfixedArray) ei = double(*(m_pEfixedArray+det_num)); - double eps_extr = ei*m_CosThetaSq[det_num]; + double ez = (m_Det+det_num)->Z(); + double eps_extr = ei*(1-ez*ez); if (eps_extr>eMin && eps_extrgetColVector("SinSq"); - size_t nDetectors = SinSq.size(); - m_CosThetaSq.resize(nDetectors); - for(size_t i=0;i