Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DRootGeom Class Reference

#include <DRootGeom.h>

Public Member Functions

 DRootGeom (JApplication *japp, unsigned int run_number=1)
 
virtual ~DRootGeom ()
 
virtual const char * className (void)
 
int ReadMap (string namepath, int32_t runnumber)
 
void InitTable (void)
 
TGeoNode * GetCurrentNode ()
 
TGeoVolume * GetCurrentVolume ()
 
struct VolMat GetCurrentMat ()
 
TGeoNode * FindNode (double *x)
 
TGeoVolume * FindVolume (double *x)
 
struct VolMat FindMat (double *x)
 
jerror_t FindMat (DVector3 pos, double &rhoZ_overA, double &rhoZ_overA_logI, double &RadLen) const
 
jerror_t FindMat (DVector3 pos, double &density, double &A, double &Z, double &RadLen) const
 
jerror_t FindMatLL (DVector3 pos, double &rhoZ_overA, double &rhoZ_overA_logI, double &RadLen) const
 
jerror_t FindMatLL (DVector3 pos, double &density, double &A, double &Z, double &RadLen) const
 
jerror_t FindMatLL (DVector3 pos, double &density, double &A, double &Z, double &RadLen, double &LnI) const
 
jerror_t FindMatTable (DVector3 pos, double &rhoZ_overA, double &rhoZ_overA_logI, double &RadLen) const
 
jerror_t FindMatTable (DVector3 pos, double &density, double &A, double &Z, double &RadLen) const
 
jerror_t FindMat (const char *matname, double &rhoZ_overA, double &rhoZ_overA_logI, double &RadLen) const
 

Static Public Member Functions

static const char * static_className (void)
 

Private Member Functions

void InitDRGeom (void)
 

Private Attributes

TGeoManager * DRGeom
 
TGeoNode * Current_Node
 
TGeoVolume * Current_Volume
 
TGeoMaterial * Current_Material
 
JCalibration * jcalib
 
Int_t Mat_Index
 
struct VolMat Mat
 
pthread_mutex_t mutex
 
pthread_mutexattr_t mutex_attr
 
bool table_initialized
 
VolMat ** MatTable
 
VolMatbuff
 
int Nr
 
int Nz
 
double dr
 
double dz
 
double r0
 
double z0
 

Detailed Description

Definition at line 36 of file DRootGeom.h.

Constructor & Destructor Documentation

DRootGeom::DRootGeom ( JApplication *  japp,
unsigned int  run_number = 1 
)

Definition at line 17 of file DRootGeom.cc.

References _DBG_.

DRootGeom::~DRootGeom ( )
virtual

Definition at line 43 of file DRootGeom.cc.

Member Function Documentation

virtual const char* DRootGeom::className ( void  )
inlinevirtual

Definition at line 43 of file DRootGeom.h.

References static_className().

struct VolMat DRootGeom::FindMat ( double *  x)

Definition at line 518 of file DRootGeom.cc.

References x.

Referenced by DEventProcessor_bcalfcaltof_res_tree::brun(), and DParticleID::DParticleID().

jerror_t DRootGeom::FindMat ( DVector3  pos,
double &  rhoZ_overA,
double &  rhoZ_overA_logI,
double &  RadLen 
) const

Definition at line 291 of file DRootGeom.cc.

jerror_t DRootGeom::FindMat ( DVector3  pos,
double &  density,
double &  A,
double &  Z,
double &  RadLen 
) const

Definition at line 283 of file DRootGeom.cc.

jerror_t DRootGeom::FindMat ( const char *  matname,
double &  rhoZ_overA,
double &  rhoZ_overA_logI,
double &  RadLen 
) const

Definition at line 351 of file DRootGeom.cc.

References _DBG_, e, and I.

jerror_t DRootGeom::FindMatLL ( DVector3  pos,
double &  rhoZ_overA,
double &  rhoZ_overA_logI,
double &  RadLen 
) const

This is a wrapper for the other FindMatLL method that returns density, A, and Z. It is here to make easy comparisons between the LL and table methods.

Definition at line 402 of file DRootGeom.cc.

Referenced by main().

jerror_t DRootGeom::FindMatLL ( DVector3  pos,
double &  density,
double &  A,
double &  Z,
double &  RadLen 
) const

Definition at line 418 of file DRootGeom.cc.

References _DBG_.

jerror_t DRootGeom::FindMatLL ( DVector3  pos,
double &  density,
double &  A,
double &  Z,
double &  RadLen,
double &  LnI 
) const

Definition at line 456 of file DRootGeom.cc.

References _DBG_, e, and I.

jerror_t DRootGeom::FindMatTable ( DVector3  pos,
double &  rhoZ_overA,
double &  rhoZ_overA_logI,
double &  RadLen 
) const

Definition at line 327 of file DRootGeom.cc.

References Nr, Nz, VolMat::RadLen, VolMat::rhoZ_overA, and VolMat::rhoZ_overA_logI.

jerror_t DRootGeom::FindMatTable ( DVector3  pos,
double &  density,
double &  A,
double &  Z,
double &  RadLen 
) const

Definition at line 299 of file DRootGeom.cc.

References VolMat::A, VolMat::Density, Nr, Nz, VolMat::RadLen, and VolMat::Z.

TGeoNode * DRootGeom::FindNode ( double *  x)

Definition at line 250 of file DRootGeom.cc.

TGeoVolume * DRootGeom::FindVolume ( double *  x)

Definition at line 267 of file DRootGeom.cc.

struct VolMat DRootGeom::GetCurrentMat ( )
inline

Definition at line 51 of file DRootGeom.h.

References Mat.

TGeoNode* DRootGeom::GetCurrentNode ( )
inline

Definition at line 49 of file DRootGeom.h.

References Current_Node.

TGeoVolume* DRootGeom::GetCurrentVolume ( )
inline

Definition at line 50 of file DRootGeom.h.

References Current_Volume.

void DRootGeom::InitDRGeom ( void  )
private

Definition at line 225 of file DRootGeom.cc.

References hddsroot().

void DRootGeom::InitTable ( void  )
int DRootGeom::ReadMap ( string  namepath,
int32_t  runnumber 
)

Read the magnetic field map in from the calibration database. This will read in the map and figure out the number of grid points in each direction (x,y, and z) and the range in each. The gradiant of the field is calculated for all but the most exterior points and saved to use in later calls to GetField(...).

Definition at line 52 of file DRootGeom.cc.

References _DBG_, VolMat::A, VolMat::Density, Nr, Nz, VolMat::RadLen, VolMat::rhoZ_overA, VolMat::rhoZ_overA_logI, rmax, rmin, VolMat::Z, zmax, and zmin.

static const char* DRootGeom::static_className ( void  )
inlinestatic

Definition at line 44 of file DRootGeom.h.

Referenced by className().

Member Data Documentation

VolMat* DRootGeom::buff
private

Definition at line 86 of file DRootGeom.h.

TGeoMaterial* DRootGeom::Current_Material
private

Definition at line 77 of file DRootGeom.h.

TGeoNode* DRootGeom::Current_Node
private

Definition at line 75 of file DRootGeom.h.

Referenced by GetCurrentNode().

TGeoVolume* DRootGeom::Current_Volume
private

Definition at line 76 of file DRootGeom.h.

Referenced by GetCurrentVolume().

double DRootGeom::dr
private

Definition at line 88 of file DRootGeom.h.

TGeoManager* DRootGeom::DRGeom
private

Definition at line 74 of file DRootGeom.h.

double DRootGeom::dz
private

Definition at line 88 of file DRootGeom.h.

JCalibration* DRootGeom::jcalib
private

Definition at line 78 of file DRootGeom.h.

struct VolMat DRootGeom::Mat
private

Definition at line 80 of file DRootGeom.h.

Referenced by GetCurrentMat().

Int_t DRootGeom::Mat_Index
private

Definition at line 79 of file DRootGeom.h.

VolMat** DRootGeom::MatTable
private

Definition at line 85 of file DRootGeom.h.

pthread_mutex_t DRootGeom::mutex
private

Definition at line 81 of file DRootGeom.h.

pthread_mutexattr_t DRootGeom::mutex_attr
private

Definition at line 82 of file DRootGeom.h.

int DRootGeom::Nr
private

Definition at line 87 of file DRootGeom.h.

int DRootGeom::Nz
private

Definition at line 87 of file DRootGeom.h.

double DRootGeom::r0
private

Definition at line 89 of file DRootGeom.h.

bool DRootGeom::table_initialized
private

Definition at line 84 of file DRootGeom.h.

double DRootGeom::z0
private

Definition at line 89 of file DRootGeom.h.


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