LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
genf::GFGeoMatManager Class Reference

#include "GFGeoMatManager.h"

Inheritance diagram for genf::GFGeoMatManager:
genf::GFAbsGeoMatManager

Public Member Functions

virtual ~GFGeoMatManager ()
 
void getMaterialParameters (double &matDensity, double &matZ, double &matA, double &radiationLength, double &mEE)
 Gets material parameters (density, Z, A, radiation length, mean excitation energy) More...
 
void initTrack (const double &posx, const double &posy, const double &posz, const double &dirx, const double &diry, const double &dirz)
 Initializes the track. More...
 
double stepOrNextBoundary (const double &maxDist)
 Makes a step, limited to next material boundary. More...
 

Detailed Description

Definition at line 42 of file GFGeoMatManager.h.

Constructor & Destructor Documentation

virtual genf::GFGeoMatManager::~GFGeoMatManager ( )
inlinevirtual

Definition at line 44 of file GFGeoMatManager.h.

References getMaterialParameters(), initTrack(), and stepOrNextBoundary().

44 {}

Member Function Documentation

void genf::GFGeoMatManager::getMaterialParameters ( double &  matDensity,
double &  matZ,
double &  matA,
double &  radiationLength,
double &  mEE 
)
virtual

Gets material parameters (density, Z, A, radiation length, mean excitation energy)

Implements genf::GFAbsGeoMatManager.

Definition at line 32 of file GFGeoMatManager.cxx.

References mat, MeanExcEnergy_get(), and GFException::setFatal().

Referenced by ~GFGeoMatManager().

37 {
38  if (!gGeoManager->GetCurrentVolume()->GetMedium())
39  throw GFException(
40  "genf::GFGeoMatManager::getMaterialParameters(): no medium in volume!", __LINE__, __FILE__)
41  .setFatal();
42  TGeoMaterial* mat = gGeoManager->GetCurrentVolume()->GetMedium()->GetMaterial();
43  //std::cout << "GFGeoMatManager::getMaterialParameters: CurrentVolume is " << std::endl;
44  //gGeoManager->GetCurrentVolume()->Print();
45  //std::cout << "GFGeoMatManager::getMaterialParameters: Material is " << std::endl;
46  //gGeoManager->GetCurrentVolume()->GetMedium()->GetMaterial()->Print();
47 
48  matDensity = mat->GetDensity();
49  matZ = mat->GetZ();
50  matA = mat->GetA();
51  radiationLength = mat->GetRadLen();
52  mEE = MeanExcEnergy_get(mat);
53 }
float MeanExcEnergy_get(int Z)
Float_t mat
Definition: plot.C:38
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
Definition: GFException.h:47
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
Definition: GFException.h:75
void genf::GFGeoMatManager::initTrack ( const double &  posx,
const double &  posy,
const double &  posz,
const double &  dirx,
const double &  diry,
const double &  dirz 
)
virtual

Initializes the track.

Implements genf::GFAbsGeoMatManager.

Definition at line 55 of file GFGeoMatManager.cxx.

Referenced by ~GFGeoMatManager().

61 {
62  gGeoManager->InitTrack(posx, posy, posz, dirx, diry, dirz);
63 }
double genf::GFGeoMatManager::stepOrNextBoundary ( const double &  maxDist)
virtual

Makes a step, limited to next material boundary.

Tries to make a step with length maxDist along the track. If there is a material boundary, the step is made to that boundary and the distance to that boundary is returned. Otherwise the step is made with maxDist.

Implements genf::GFAbsGeoMatManager.

Definition at line 65 of file GFGeoMatManager.cxx.

Referenced by ~GFGeoMatManager().

66 {
67  gGeoManager->FindNextBoundaryAndStep(maxStep);
68  return gGeoManager->GetStep();
69 }

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