From 6e39d77bfc91f0a8119f63b9567e83e69ce89975 Mon Sep 17 00:00:00 2001 From: Vickie Lynch <lynchve@ornl.gov> Date: Mon, 7 Mar 2011 14:31:49 +0000 Subject: [PATCH] Refs #2320 Added masking to execEvent in DiffractionFocussing in same way as spectra not in a group --- .../Algorithms/src/DiffractionFocussing2.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Code/Mantid/Framework/Algorithms/src/DiffractionFocussing2.cpp b/Code/Mantid/Framework/Algorithms/src/DiffractionFocussing2.cpp index cad8ab093ea..e8689d9b980 100644 --- a/Code/Mantid/Framework/Algorithms/src/DiffractionFocussing2.cpp +++ b/Code/Mantid/Framework/Algorithms/src/DiffractionFocussing2.cpp @@ -295,8 +295,25 @@ void DiffractionFocussing2::execEvent() // ------------- Pre-allocate Event Lists ---------------------------- std::vector< std::vector<int> > ws_indices(nGroups); std::vector<size_t> size_required(nGroups,0); + Geometry::IInstrument_const_sptr instrument = eventW->getInstrument(); + Geometry::IObjComponent_const_sptr source; + Geometry::IObjComponent_const_sptr sample; + if (instrument != NULL) + { + source = instrument->getSource(); + sample = instrument->getSample(); + } + for (int wi=0;wi<nHist;wi++) { + if (instrument != NULL) + { + if ( source != NULL && sample != NULL ) + { + Geometry::IDetector_const_sptr det = eventW->getDetector(static_cast<size_t>(wi)); + if ( det->isMasked() ) continue; + } + } //i is the workspace index (of the input) const int group = groupAtWorkspaceIndex[wi]; if (group < 1) // Not in a group -- GitLab