k4SimGeant4
Loading...
Searching...
No Matches
MagFieldScanner Class Reference

Service probes the Geant4 magnetic field on initialize. More...

#include <MagFieldScanner.h>

Inheritance diagram for MagFieldScanner:
Collaboration diagram for MagFieldScanner:

Classes

struct  TubeProbe
 
struct  XYPlaneProbe
 
struct  ZPlaneProbe
 

Public Member Functions

 MagFieldScanner (const std::string &name, ISvcLocator *svcLoc)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual ~MagFieldScanner ()
 

Private Attributes

ServiceHandle< IGeoSvc > m_geoSvc
 Handle to the geometry service.
 
ServiceHandle< ISimG4Svcm_simG4Svc
 Handle to the Geant4 service.
 
Gaudi::Property< std::string > m_outFilePath
 Path to the output file.
 
Gaudi::Property< std::vector< std::vector< double > > > m_xyPlaneProbes
 Probes.
 
Gaudi::Property< std::vector< std::vector< double > > > m_zPlaneProbes
 
Gaudi::Property< std::vector< std::vector< double > > > m_tubeProbes
 

Friends

std::ostream & operator<< (std::ostream &outStream, const XYPlaneProbe &probe)
 
std::ostream & operator<< (std::ostream &outStream, const ZPlaneProbe &probe)
 
std::ostream & operator<< (std::ostream &outStream, const TubeProbe &probe)
 

Detailed Description

Service probes the Geant4 magnetic field on initialize.

This service outputs a ROOT file containing resulting histograms.

There are three probe types:

  • XYPlane probe with parameters: xMax, yMax and z
  • ZPlane probe with parameters: zMin, zMax, rMax and phi (angle from x-axis)
  • Tube probe with parameters: zMin, zMax and r
Author
J. Smiesko
Date
2023-06-23

Constructor & Destructor Documentation

◆ MagFieldScanner()

MagFieldScanner::MagFieldScanner ( const std::string & name,
ISvcLocator * svcLoc )
explicit

◆ ~MagFieldScanner()

virtual MagFieldScanner::~MagFieldScanner ( )
inlinevirtual

Member Function Documentation

◆ finalize()

StatusCode MagFieldScanner::finalize ( )
virtual

◆ initialize()

StatusCode MagFieldScanner::initialize ( )
virtual

Friends And Related Symbol Documentation

◆ operator<< [1/3]

std::ostream & operator<< ( std::ostream & outStream,
const TubeProbe & probe )
friend

◆ operator<< [2/3]

std::ostream & operator<< ( std::ostream & outStream,
const XYPlaneProbe & probe )
friend

◆ operator<< [3/3]

std::ostream & operator<< ( std::ostream & outStream,
const ZPlaneProbe & probe )
friend

Member Data Documentation

◆ m_geoSvc

ServiceHandle<IGeoSvc> MagFieldScanner::m_geoSvc
private

Handle to the geometry service.

◆ m_outFilePath

Gaudi::Property<std::string> MagFieldScanner::m_outFilePath
private
Initial value:
{this,
"outFilePath",
"magFieldProbes.root",
"Output file path"}

Path to the output file.

◆ m_simG4Svc

ServiceHandle<ISimG4Svc> MagFieldScanner::m_simG4Svc
private

Handle to the Geant4 service.

◆ m_tubeProbes

Gaudi::Property<std::vector<std::vector<double> > > MagFieldScanner::m_tubeProbes
private
Initial value:
{
this,
"tubeProbes",
{},
"Tube probe definitions"}

◆ m_xyPlaneProbes

Gaudi::Property<std::vector<std::vector<double> > > MagFieldScanner::m_xyPlaneProbes
private
Initial value:
{
this,
"xyPlaneProbes",
{},
"xy-plane probe definitions"}

Probes.

◆ m_zPlaneProbes

Gaudi::Property<std::vector<std::vector<double> > > MagFieldScanner::m_zPlaneProbes
private
Initial value:
{
this,
"zPlaneProbes",
{},
"z-plane probe definitions"}

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