Skip to content

Commit

Permalink
refs #8810 should be working MDRange function
Browse files Browse the repository at this point in the history
at least assuming that the Transf matrix is a rotation.
  • Loading branch information
abuts committed Feb 2, 2014
1 parent 7ed3d0a commit 7c25bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Expand Up @@ -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<double> m_CosThetaSq;
private:
/// how to transform workspace data in elastic case
inline bool calcMatrixCoordElastic(const double &k0,std::vector<coord_t> &Coored)const;
Expand Down
10 changes: 2 additions & 8 deletions Code/Mantid/Framework/MDEvents/src/MDTransfModQ.cpp
Expand Up @@ -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_extr<eMax)
{
rez.resize(3);
rez[0]=eMin;
rez[1]=eps_extr;
rez[2]=eMax;

}
else
{
Expand Down Expand Up @@ -286,12 +286,6 @@ namespace Mantid
}catch(...)
{}

// define cos(theta)^2 array used to find modQ limits;
auto &SinSq = ConvParams.m_PreprDetTable->getColVector<double>("SinSq");
size_t nDetectors = SinSq.size();
m_CosThetaSq.resize(nDetectors);
for(size_t i=0;i<nDetectors;i++)
m_CosThetaSq[i] = 1-SinSq[i];
}

// the wave vector of incident neutrons;
Expand Down

0 comments on commit 7c25bbe

Please sign in to comment.