Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mantid::Algorithms::MCInteractionStatistics Class Reference

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< ScatterPointStatm_envScatterPoints
 
ScatterPointStat m_sampleScatterPoints = {"Sample", 0, 0}
 
double m_scatterAngleM2 = 0
 
double m_scatterAngleMean = 0
 
double m_scatterAngleSD = 0
 

Detailed Description

Stores statistics relating to the tracks generated in MCInteractionVolume for a specific detector.

Definition at line 32 of file MCInteractionStatistics.h.

Constructor & Destructor Documentation

◆ MCInteractionStatistics()

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

Parameters
detectorIDID of the detector that is the end points of the tracks that this object is measuring statistics on
sampleA 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().

Member Function Documentation

◆ generateScatterPointStats()

std::string Mantid::Algorithms::MCInteractionStatistics::generateScatterPointStats ( )

◆ UpdateScatterAngleStats()

void Mantid::Algorithms::MCInteractionStatistics::UpdateScatterAngleStats ( const Kernel::V3D toStart,
const Kernel::V3D scatteredDirec 
)

Update the scattering angle statistics.

Parameters
toStartVector from scatter point to point on beam profile where
scatteredDirecVector 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().

◆ UpdateScatterPointCounts()

void Mantid::Algorithms::MCInteractionStatistics::UpdateScatterPointCounts ( int  componentIndex,
bool  pointUsed 
)

Update the scatter point counts.

Parameters
componentIndexIndex of the sample/environment component where the sample is -1
pointUsedWhether 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().

Member Data Documentation

◆ m_detectorID

detid_t Mantid::Algorithms::MCInteractionStatistics::m_detectorID
private

Definition at line 40 of file MCInteractionStatistics.h.

Referenced by generateScatterPointStats().

◆ m_envScatterPoints

std::vector<ScatterPointStat> Mantid::Algorithms::MCInteractionStatistics::m_envScatterPoints
private

◆ m_sampleScatterPoints

ScatterPointStat Mantid::Algorithms::MCInteractionStatistics::m_sampleScatterPoints = {"Sample", 0, 0}
private

◆ m_scatterAngleM2

double Mantid::Algorithms::MCInteractionStatistics::m_scatterAngleM2 = 0
private

Definition at line 44 of file MCInteractionStatistics.h.

Referenced by UpdateScatterAngleStats().

◆ m_scatterAngleMean

double Mantid::Algorithms::MCInteractionStatistics::m_scatterAngleMean = 0
private

Definition at line 43 of file MCInteractionStatistics.h.

Referenced by generateScatterPointStats(), and UpdateScatterAngleStats().

◆ m_scatterAngleSD

double Mantid::Algorithms::MCInteractionStatistics::m_scatterAngleSD = 0
private

Definition at line 45 of file MCInteractionStatistics.h.

Referenced by generateScatterPointStats(), and UpdateScatterAngleStats().


The documentation for this class was generated from the following files: