EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHGeomUtility Class Reference

Toolsets to do geometry operations. More...

#include <fun4all_coresoftware/blob/master/offline/packages/PHGeometry/PHGeomUtility.h>

+ Collaboration diagram for PHGeomUtility:

Static Public Member Functions

static TGeoManager * GetTGeoManager (PHCompositeNode *topNode)
 Main user interface: DST node -> TGeoManager for downstream use.
 
static int ImportGeomFile (PHCompositeNode *topNode, const std::string &geometry_file)
 TGeo ROOT/GDML/Macro file -> DST node with automatic file type discrimination based on file names.
 
static int ImportCurrentTGeoManager (PHCompositeNode *topNode)
 gGeoManager -> DST node
 
static void ExportGeomtry (PHCompositeNode *topNode, const std::string &geometry_file)
 DST node -> TGeoManager -> export files, like gdml, .root or .C formats.
 
static PHGeomTGeoGetGeomTGeoNode (PHCompositeNode *topNode, bool build_new=true)
 Get non-persistent PHGeomTGeo from DST nodes. If not found, make a new one.
 
static PHGeomIOTGeoGetGeomIOTGeoNode (PHCompositeNode *topNode, bool build_new=true)
 Get persistent PHGeomIOTGeo from DST nodes. If not found, make a new one.
 
static PHGeomIOTGeoUpdateIONode (PHCompositeNode *topNode)
 
static PHGeomTGeoLoadFromIONode (PHCompositeNode *topNode)
 
static std::string GenerateGeometryFileName (const std::string &filename_extension="gdml")
 
static bool RemoveGeometryFile (const std::string &file_name)
 delete the geometry file after use
 
static void SetVerbosity (int v)
 Verbosity for geometry IO like, TGeoMangers.
 
static int GetVerbosity ()
 Verbosity for geometry IO like, TGeoMangers.
 
static std::string GetDSTNodeName ()
 DST node name for RunTime geometry object.
 
static std::string GetDSTIONodeName ()
 DST node name for persistent geometry storage node.
 
static void SetGenerateGeometryFileNameBase (const std::string &base)
 

Private Member Functions

 PHGeomUtility ()=delete
 
 ~PHGeomUtility ()=delete
 

Static Private Attributes

static std::string mg_GenerateGeometryFileNameBase = "/tmp"
 

Detailed Description

Toolsets to do geometry operations.

Definition at line 12 of file PHGeomUtility.h.

View newest version in sPHENIX GitHub at line 12 of file PHGeomUtility.h

Constructor & Destructor Documentation

PHGeomUtility::PHGeomUtility ( )
privatedelete
PHGeomUtility::~PHGeomUtility ( )
privatedelete

Member Function Documentation

void PHGeomUtility::ExportGeomtry ( PHCompositeNode topNode,
const std::string &  geometry_file 
)
static

DST node -> TGeoManager -> export files, like gdml, .root or .C formats.

Definition at line 55 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 55 of file PHGeomUtility.cc

Referenced by MakeActsGeometry::buildAllGeometry(), Fun4All_ExportGeom(), and Fun4All_ImportGeom().

+ Here is the caller graph for this function:

std::string PHGeomUtility::GenerateGeometryFileName ( const std::string &  filename_extension = "gdml")
static

Make a name for tmp geometry file Geometry files gain a size of ~10MB and it used in translation from Geant4 to DST format. This tmp file should be on a local file system (/tmp/) and write/deletable

Definition at line 170 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 170 of file PHGeomUtility.cc

References eicpy.qaplots::file.

Referenced by PHG4Reco::InitRun().

+ Here is the caller graph for this function:

static std::string PHGeomUtility::GetDSTIONodeName ( )
inlinestatic

DST node name for persistent geometry storage node.

Definition at line 74 of file PHGeomUtility.h.

View newest version in sPHENIX GitHub at line 74 of file PHGeomUtility.h

static std::string PHGeomUtility::GetDSTNodeName ( )
inlinestatic

DST node name for RunTime geometry object.

Definition at line 67 of file PHGeomUtility.h.

View newest version in sPHENIX GitHub at line 67 of file PHGeomUtility.h

PHGeomIOTGeo * PHGeomUtility::GetGeomIOTGeoNode ( PHCompositeNode topNode,
bool  build_new = true 
)
static

Get persistent PHGeomIOTGeo from DST nodes. If not found, make a new one.

Definition at line 138 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 138 of file PHGeomUtility.cc

References PHNodeIterator::findFirst().

Referenced by MakeActsGeometry::editTPCGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHGeomTGeo * PHGeomUtility::GetGeomTGeoNode ( PHCompositeNode topNode,
bool  build_new = true 
)
static

Get non-persistent PHGeomTGeo from DST nodes. If not found, make a new one.

Definition at line 105 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 105 of file PHGeomUtility.cc

References PHNodeIterator::findFirst().

Referenced by MakeActsGeometry::editTPCGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TGeoManager * PHGeomUtility::GetTGeoManager ( PHCompositeNode topNode)
static

Main user interface: DST node -> TGeoManager for downstream use.

DST node -> TGeoManager for downstream use.

Definition at line 33 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 33 of file PHGeomUtility.cc

References exit(), PHGeomTGeo::GetGeometry(), and PHGeomTGeo::isValid().

Referenced by MakeActsGeometry::getNodes(), PHGenFitTrkProp::InitializePHGenFit(), PHGenFitTrackProjection::InitRun(), PHRaveVertexing::InitRun(), PHG4TrackFastSim::InitRun(), B0TrackFastSim::InitRun(), PHGenFitTrkFitter::InitRun(), PHGeom_DSTInspection(), and PHTpcTracker::Process().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PHGeomUtility::GetVerbosity ( )
static

Verbosity for geometry IO like, TGeoMangers.

Definition at line 281 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 281 of file PHGeomUtility.cc

References PHFlag::FlagExist(), PHFlag::get_IntFlag(), and recoConsts::instance().

+ Here is the call graph for this function:

int PHGeomUtility::ImportCurrentTGeoManager ( PHCompositeNode topNode)
static

gGeoManager -> DST node

Definition at line 88 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 88 of file PHGeomUtility.cc

References Fun4AllReturnCodes::EVENT_OK, PHGeomTGeo::GetGeometry(), PHGeomTGeo::isValid(), and PHGeomTGeo::SetGeometry().

+ Here is the call graph for this function:

int PHGeomUtility::ImportGeomFile ( PHCompositeNode topNode,
const std::string &  geometry_file 
)
static

TGeo ROOT/GDML/Macro file -> DST node with automatic file type discrimination based on file names.

Definition at line 65 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 65 of file PHGeomUtility.cc

References Fun4AllReturnCodes::ABORTRUN, Fun4AllReturnCodes::EVENT_OK, PHGeomTGeo::GetGeometry(), PHGeomTGeo::Reset(), and PHGeomTGeo::SetGeometry().

Referenced by PHGeomFileImport::InitRun(), and PHG4Reco::InitRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PHGeomTGeo * PHGeomUtility::LoadFromIONode ( PHCompositeNode topNode)
static

Build or update PHGeomTGeo node RUN/GEOMETRY based on the persistent PHGeomIOTGeo node RUN/GEOMETRY_IO

Returns
the updated PHGeomTGeo from DST tree

Definition at line 242 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 242 of file PHGeomUtility.cc

References PHGeomTGeo::SetGeometry().

+ Here is the call graph for this function:

bool PHGeomUtility::RemoveGeometryFile ( const std::string &  file_name)
static

delete the geometry file after use

Definition at line 189 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 189 of file PHGeomUtility.cc

References in.

Referenced by PHG4Reco::InitRun().

+ Here is the caller graph for this function:

static void PHGeomUtility::SetGenerateGeometryFileNameBase ( const std::string &  base)
inlinestatic

Base path name for temp geometry GDML file used in GenerateGeometryFileName(). User can overwrite it to e.g. local directory with PHGeomUtility::SetGenerateGeometryFileNameBase('./');

Definition at line 81 of file PHGeomUtility.h.

View newest version in sPHENIX GitHub at line 81 of file PHGeomUtility.h

References mg_GenerateGeometryFileNameBase.

void PHGeomUtility::SetVerbosity ( int  v)
static

Verbosity for geometry IO like, TGeoMangers.

Definition at line 274 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 274 of file PHGeomUtility.cc

References recoConsts::instance(), and PHFlag::set_IntFlag().

+ Here is the call graph for this function:

PHGeomIOTGeo * PHGeomUtility::UpdateIONode ( PHCompositeNode topNode)
static

Update persistent PHGeomIOTGeo node RUN/GEOMETRY_IO based on run-time object PHGeomTGeo at RUN/GEOMETRY

Returns
the updated PHGeomIOTGeo from DST tree

Definition at line 212 of file PHGeomUtility.cc.

View newest version in sPHENIX GitHub at line 212 of file PHGeomUtility.cc

References PHGeomIOTGeo::SetGeometry().

Referenced by MakeActsGeometry::editTPCGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::string PHGeomUtility::mg_GenerateGeometryFileNameBase = "/tmp"
staticprivate

Base path name for temp geometry GDML file used in GenerateGeometryFileName(). User can overwrite it to e.g. local directory with PHGeomUtility::SetGenerateGeometryFileNameBase('./');

Definition at line 89 of file PHGeomUtility.h.

View newest version in sPHENIX GitHub at line 89 of file PHGeomUtility.h

Referenced by SetGenerateGeometryFileNameBase().


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