Mantid
|
Stores statistics relating to the tracks generated in MCInteractionVolume for a specific detector. More...
#include <MCInteractionStatistics.h>
Public Member Functions | |
std::string | generateScatterPointStats () |
Log a debug string summarising which parts of the environment the simulated scatter points occurred in. More... | |
MCInteractionStatistics (detid_t detectorID, const API::Sample &sample) | |
Construct the statistics object. More... | |
void | UpdateScatterAngleStats (const Kernel::V3D &toStart, const Kernel::V3D &scatteredDirec) |
Update the scattering angle statistics. More... | |
void | UpdateScatterPointCounts (int componentIndex, bool pointUsed) |
Update the scatter point counts. More... | |
Private Attributes | |
detid_t | m_detectorID |
std::vector< ScatterPointStat > | m_envScatterPoints |
ScatterPointStat | m_sampleScatterPoints = {"Sample", 0, 0} |
double | m_scatterAngleM2 = 0 |
double | m_scatterAngleMean = 0 |
double | m_scatterAngleSD = 0 |
Stores statistics relating to the tracks generated in MCInteractionVolume for a specific detector.
Definition at line 32 of file MCInteractionStatistics.h.
Mantid::Algorithms::MCInteractionStatistics::MCInteractionStatistics | ( | detid_t | detectorID, |
const API::Sample & | sample | ||
) |
Construct the statistics object.
Look up the environment component names from the supplied sample
detectorID | ID of the detector that is the end points of the tracks that this object is measuring statistics on |
sample | A reference to a sample object that defines a valid shape & material |
Definition at line 27 of file MCInteractionStatistics.cpp.
References Mantid::Geometry::SampleEnvironment::getComponent(), Mantid::API::Sample::getEnvironment(), m_envScatterPoints, and Mantid::Geometry::SampleEnvironment::nelements().
std::string Mantid::Algorithms::MCInteractionStatistics::generateScatterPointStats | ( | ) |
Log a debug string summarising which parts of the environment the simulated scatter points occurred in.
Definition at line 89 of file MCInteractionStatistics.cpp.
References Mantid::Algorithms::ScatterPointStat::generatedPointCount, m_detectorID, m_envScatterPoints, m_sampleScatterPoints, m_scatterAngleMean, m_scatterAngleSD, and Mantid::Algorithms::ScatterPointStat::usedPointCount.
Referenced by Mantid::Algorithms::MonteCarloAbsorption::doSimulation(), and Mantid::Algorithms::AddAbsorptionWeightedPathLengths::exec().
void Mantid::Algorithms::MCInteractionStatistics::UpdateScatterAngleStats | ( | const Kernel::V3D & | toStart, |
const Kernel::V3D & | scatteredDirec | ||
) |
Update the scattering angle statistics.
toStart | Vector from scatter point to point on beam profile where |
scatteredDirec | Vector from scatter point to detector |
Definition at line 74 of file MCInteractionStatistics.cpp.
References Mantid::Kernel::V3D::angle(), Mantid::Kernel::delta, m_envScatterPoints, m_sampleScatterPoints, m_scatterAngleM2, m_scatterAngleMean, m_scatterAngleSD, and Mantid::Algorithms::ScatterPointStat::usedPointCount.
Referenced by Mantid::Algorithms::MCInteractionVolume::calculateBeforeAfterTrack().
void Mantid::Algorithms::MCInteractionStatistics::UpdateScatterPointCounts | ( | int | componentIndex, |
bool | pointUsed | ||
) |
Update the scatter point counts.
componentIndex | Index of the sample/environment component where the sample is -1 |
pointUsed | Whether the generated point is actually used in the simulation. If no valid tracks before and after scatter are generated the point will be discarded |
Definition at line 55 of file MCInteractionStatistics.cpp.
References Mantid::Algorithms::ScatterPointStat::generatedPointCount, m_envScatterPoints, m_sampleScatterPoints, and Mantid::Algorithms::ScatterPointStat::usedPointCount.
Referenced by Mantid::Algorithms::MCInteractionVolume::calculateBeforeAfterTrack().
|
private |
Definition at line 40 of file MCInteractionStatistics.h.
Referenced by generateScatterPointStats().
|
private |
Definition at line 42 of file MCInteractionStatistics.h.
Referenced by generateScatterPointStats(), MCInteractionStatistics(), UpdateScatterAngleStats(), and UpdateScatterPointCounts().
|
private |
Definition at line 41 of file MCInteractionStatistics.h.
Referenced by generateScatterPointStats(), UpdateScatterAngleStats(), and UpdateScatterPointCounts().
|
private |
Definition at line 44 of file MCInteractionStatistics.h.
Referenced by UpdateScatterAngleStats().
|
private |
Definition at line 43 of file MCInteractionStatistics.h.
Referenced by generateScatterPointStats(), and UpdateScatterAngleStats().
|
private |
Definition at line 45 of file MCInteractionStatistics.h.
Referenced by generateScatterPointStats(), and UpdateScatterAngleStats().