Belle II Software  release-08-01-10
MaterialScanBase Class Referenceabstract

Base class for Material Scans. More...

#include <MaterialScan.h>

Inheritance diagram for MaterialScanBase:
Collaboration diagram for MaterialScanBase:

Public Member Functions

 MaterialScanBase (TFile *rootFile, const std::string &name, const std::string &axisLabel)
 This is indeed the constructor and it creates a TDirectory in the output root file and sets all variables.
 
std::string getName () const
 Return the name of the scan.
 
virtual int getNRays () const =0
 Return the number of rays necessary to perform the scan.
 
virtual bool createNext (G4ThreeVector &origin, G4ThreeVector &direction)=0
 Belle2::MaterialScanBase::createNext() implemention Get the origin and direction for the next scan particle. More...
 

Protected Member Functions

bool checkStep (const G4Step *step)
 check for stuck tracks by looking at the step length
 

Protected Attributes

TFile * m_rootFile
 Pointer to the root file for the histograms.
 
std::string m_name
 Name of the scan, will be prefixed to all histogram names.
 
std::string m_axisLabel
 Labels for the coordinate axes.
 

Private Attributes

int m_zeroSteps {0}
 Count the number of steps with (almost) zero length.
 

Static Private Attributes

static constexpr double c_zeroTolerance = 1e-6
 maximum Step length to be considered zero
 
static constexpr int c_maxZeroStepsNudge = 10
 maximum number of consecutive zero steps before nudging the track along
 
static constexpr int c_maxZeroStepsKill = 20
 maximum number of consecutive zero steps before killing the track
 

Detailed Description

Base class for Material Scans.

Definition at line 33 of file MaterialScan.h.

Member Function Documentation

◆ createNext()

virtual bool createNext ( G4ThreeVector &  origin,
G4ThreeVector &  direction 
)
pure virtual

Belle2::MaterialScanBase::createNext() implemention Get the origin and direction for the next scan particle.

Parameters
originOrigin of the next scan particle
directionDirection of the next scan particle
Returns
false if the scan is finished

Implemented in MaterialScanRay, and MaterialScan2D.


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