HighLAND
Public Member Functions | Protected Attributes | List of all members
P0DGeometryManager Class Reference

#include <P0DGeometryManager.hxx>

Public Member Functions

void SetupGeometryRecurseGeomId (std::vector< std::string > &names)
 Internal function. A routine to recurse through the TGeoManager geometry.
 
Bool_t Notify ()
 Called when the geometry has changed.
 
TVector3 GeomIdPosition (int geomId)
 

Protected Attributes

SetupGeometryP0DFindergSetupGeometry_P0DFinder
 
std::map< ND::TGeometryId, int > gGeometrySetup_GeomIdMap
 
std::map< int, ND::TGeometryId > gGeometrySetup_RootIdMap
 

Detailed Description

A class to update the local state when the input TFile changes. This is added to the gBasicHeader_GeometryNotify vector.

Definition at line 134 of file P0DGeometryManager.hxx.

Member Function Documentation

§ GeomIdPosition()

TVector3 P0DGeometryManager::GeomIdPosition ( int  geomId)

Translate a geometry id into a position. If the geometry id doesn't exist in the P0D, then this returns a value that is beyond the boundary of the observable universe.

Definition at line 87 of file P0DGeometryManager.cxx.

87  {
88 //****************************************************************
89 
90  std::map<ND::TGeometryId,int>::const_iterator pair = gGeometrySetup_GeomIdMap.find(geomId);
91  if (pair == gGeometrySetup_GeomIdMap.end()) {
92  return TVector3(9E+99,9E+99,9E+99);
93  }
94  int nodeId = pair->second;
95  gGeoManager->PushPath();
96  gGeoManager->CdNode(nodeId);
97  // Find the global position
98  double local[3] = {0,0,0};
99  double master[3] = {0,0,0};
100  gGeoManager->LocalToMaster(local,master);
101  gGeoManager->PopPath();
102  return TVector3(master[0],master[1],master[2]);
103 }
std::map< ND::TGeometryId, int > gGeometrySetup_GeomIdMap

Member Data Documentation

§ gGeometrySetup_GeomIdMap

std::map<ND::TGeometryId,int> P0DGeometryManager::gGeometrySetup_GeomIdMap
protected

Internal map. A map of the geometry nodes index by the TGeometryId values.

Definition at line 157 of file P0DGeometryManager.hxx.

§ gGeometrySetup_RootIdMap

std::map<int,ND::TGeometryId> P0DGeometryManager::gGeometrySetup_RootIdMap
protected

Internal map. A map of the TGeometryId values index by the geometry node.

Definition at line 161 of file P0DGeometryManager.hxx.

§ gSetupGeometry_P0DFinder

SetupGeometryP0DFinder* P0DGeometryManager::gSetupGeometry_P0DFinder
protected

Internal pointer. A pointer to the instantiation of the P0D geometry id finder.

Definition at line 153 of file P0DGeometryManager.hxx.


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