DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dd4hep::rec::MaterialScan Class Reference

Class to perform material scans along a straight line. More...

#include <MaterialScan.h>

Public Member Functions

 MaterialScan (Detector &description)
 Standard constructor for the master instance. More...
 
virtual ~MaterialScan ()
 Default destructor. More...
 
void setDetector (DetElement detector)
 Set a specific detector volume to limit the scan (resets other selection criteria) More...
 
void setDetector (const char *detector)
 Set a specific detector volume to limit the scan (resets other selection criteria) More...
 
void setMaterial (const char *material)
 Set a specific volume material to limit the scan (resets other selection criteria) More...
 
void setMaterial (Material material)
 Set a specific volume material to limit the scan (resets other selection criteria) More...
 
void setRegion (const char *region)
 Set a specific region to limit the scan (resets other selection criteria) More...
 
void setRegion (Region region)
 Set a specific region to limit the scan (resets other selection criteria) More...
 
const MaterialVecscan (double x0, double y0, double z0, double x1, double y1, double z1, double epsilon=1e-4) const
 Scan along a line and store the matrials internally. More...
 
void print (const Vector3D &start, const Vector3D &end, double epsilon=1e-4) const
 Scan along a line and print the materials traversed. More...
 
void print (double x0, double y0, double z0, double x1, double y1, double z1, double epsilon=1e-4) const
 Scan along a line and print the materials traversed. More...
 

Private Member Functions

 MaterialScan ()
 Default constructor. More...
 

Private Attributes

Detectorm_detector
 Reference to detector setup. More...
 
std::unique_ptr< MaterialManagerm_materialMgr
 Material manager. More...
 
std::set< const TGeoNode * > m_placements
 Local cache: subdetector placements. More...
 

Detailed Description

Class to perform material scans along a straight line.

Examples: from DDDetectors/compact/SiD.xml $> materialScan file:checkout/DDDetectors/compact/SiD.xml -interactive

1) Simple scan: root [0] gMaterialScan->print(5,5,0,5,5,400) 2) Scan a given subdetector: root [0] de=gDD4hepUI->instance()->detector("LumiCal"); root [1] gMaterialScan->setDetector(de); root [2] gMaterialScan->print(5,5,0,5,5,400) 3) Scan by material: root [0] gMaterialScan->setMaterial("Silicon"); root [1] gMaterialScan->print(5,5,0,5,5,400) 4) Scan by region: root [0] gMaterialScan->setRegion("SiTrackerBarrelRegion"); root [1] gMaterialScan->print(0,0,0,100,100,0)

Author
M.Frank
Version
1.0

Definition at line 52 of file MaterialScan.h.

Constructor & Destructor Documentation

◆ MaterialScan() [1/2]

MaterialScan::MaterialScan ( )
private

Default constructor.

Definition at line 34 of file MaterialScan.cpp.

◆ MaterialScan() [2/2]

MaterialScan::MaterialScan ( Detector description)

Standard constructor for the master instance.

Default constructor.

Definition at line 41 of file MaterialScan.cpp.

◆ ~MaterialScan()

MaterialScan::~MaterialScan ( )
virtual

Default destructor.

Definition at line 48 of file MaterialScan.cpp.

Member Function Documentation

◆ print() [1/2]

void MaterialScan::print ( const Vector3D start,
const Vector3D end,
double  epsilon = 1e-4 
) const

Scan along a line and print the materials traversed.

Definition at line 177 of file MaterialScan.cpp.

◆ print() [2/2]

void MaterialScan::print ( double  x0,
double  y0,
double  z0,
double  x1,
double  y1,
double  z1,
double  epsilon = 1e-4 
) const

Scan along a line and print the materials traversed.

Definition at line 275 of file MaterialScan.cpp.

◆ scan()

const MaterialVec & MaterialScan::scan ( double  x0,
double  y0,
double  z0,
double  x1,
double  y1,
double  z1,
double  epsilon = 1e-4 
) const

Scan along a line and store the matrials internally.

Definition at line 171 of file MaterialScan.cpp.

◆ setDetector() [1/2]

void MaterialScan::setDetector ( const char *  detector)

Set a specific detector volume to limit the scan (resets other selection criteria)

Set a specific detector volume to limit the scan.

Definition at line 96 of file MaterialScan.cpp.

◆ setDetector() [2/2]

void MaterialScan::setDetector ( DetElement  detector)

Set a specific detector volume to limit the scan (resets other selection criteria)

Set a specific detector volume to limit the scan.

Definition at line 105 of file MaterialScan.cpp.

◆ setMaterial() [1/2]

void MaterialScan::setMaterial ( const char *  material)

Set a specific volume material to limit the scan (resets other selection criteria)

Set a specific volume material to limit the scan.

Definition at line 134 of file MaterialScan.cpp.

◆ setMaterial() [2/2]

void MaterialScan::setMaterial ( Material  material)

Set a specific volume material to limit the scan (resets other selection criteria)

Set a specific volume material to limit the scan.

Definition at line 143 of file MaterialScan.cpp.

◆ setRegion() [1/2]

void MaterialScan::setRegion ( const char *  region)

Set a specific region to limit the scan (resets other selection criteria)

Set a specific region to limit the scan (resets the subdetector selection)

Definition at line 53 of file MaterialScan.cpp.

◆ setRegion() [2/2]

void MaterialScan::setRegion ( Region  region)

Set a specific region to limit the scan (resets other selection criteria)

Set a specific region to limit the scan (resets the subdetector selection)

Definition at line 62 of file MaterialScan.cpp.

Member Data Documentation

◆ m_detector

Detector& dd4hep::rec::MaterialScan::m_detector
private

Reference to detector setup.

Definition at line 56 of file MaterialScan.h.

◆ m_materialMgr

std::unique_ptr<MaterialManager> dd4hep::rec::MaterialScan::m_materialMgr
private

Material manager.

Definition at line 58 of file MaterialScan.h.

◆ m_placements

std::set<const TGeoNode*> dd4hep::rec::MaterialScan::m_placements
private

Local cache: subdetector placements.

Definition at line 60 of file MaterialScan.h.


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