A ROOT/GEANT4 geometry driver. More...
#include <ROOTGeomAnalyzer.h>
Public Member Functions | |
ROOTGeomAnalyzer (string geometry_filename) | |
ROOTGeomAnalyzer (TGeoManager *gm) | |
ROOTGeomAnalyzer () | |
~ROOTGeomAnalyzer () | |
virtual const PDGCodeList & | ListOfTargetNuclei (void) |
implement the GeomAnalyzerI interface More... | |
virtual const PathLengthList & | ComputeMaxPathLengths (void) |
virtual const PathLengthList & | ComputePathLengths (const TLorentzVector &x, const TLorentzVector &p) |
virtual const TVector3 & | GenerateVertex (const TLorentzVector &x, const TLorentzVector &p, int tgtpdg) |
virtual void | SetScannerNPoints (int np) |
set geometry driver's configuration options More... | |
virtual void | SetScannerNRays (int nr) |
virtual void | SetScannerNParticles (int np) |
virtual void | SetScannerFlux (GFluxI *f) |
virtual void | SetWeightWithDensity (bool wt) |
virtual void | SetMixtureWeightsSum (double sum) |
virtual void | SetLengthUnits (double lu) |
virtual void | SetDensityUnits (double du) |
virtual void | SetMaxPlSafetyFactor (double sf) |
virtual void | SetTopVolName (string nm) |
virtual void | SetKeepSegPath (bool keep) |
virtual void | SetDebugFlags (int flgs) |
virtual int | ScannerNPoints (void) const |
retrieve geometry driver's configuration options More... | |
virtual int | ScannerNRays (void) const |
virtual int | ScannerNParticles (void) const |
virtual bool | WeightWithDensity (void) const |
virtual double | LengthUnits (void) const |
virtual double | DensityUnits (void) const |
virtual double | MixtureWeightsSum (void) const |
virtual double | MaxPlSafetyFactor (void) const |
virtual string | TopVolName (void) const |
virtual TGeoManager * | GetGeometry (void) const |
virtual bool | GetKeepSegPath (void) const |
virtual const PathLengthList & | GetMaxPathLengths (void) const |
virtual void | Local2SI (PathLengthList &pl) const |
access to geometry coordinate/unit transforms for validation/test purposes More... | |
virtual void | Local2SI (TVector3 &v) const |
virtual void | SI2Local (TVector3 &v) const |
virtual void | Master2Top (TVector3 &v) const |
virtual void | Master2TopDir (TVector3 &v) const |
virtual void | Top2Master (TVector3 &v) const |
virtual void | Top2MasterDir (TVector3 &v) const |
virtual GeomVolSelectorI * | AdoptGeomVolSelector (GeomVolSelectorI *selector) |
configure processing to perform path segment trimming More... | |
Public Member Functions inherited from genie::GeomAnalyzerI | |
virtual | ~GeomAnalyzerI () |
Protected Member Functions | |
virtual void | Initialize (void) |
virtual void | CleanUp (void) |
virtual void | Load (string geometry_filename) |
virtual void | Load (TGeoManager *gm) |
virtual void | BuildListOfTargetNuclei (void) |
virtual int | GetTargetPdgCode (const TGeoMaterial *const m) const |
virtual int | GetTargetPdgCode (const TGeoMixture *const m, int ielement) const |
virtual double | GetWeight (const TGeoMaterial *mat, int pdgc) |
virtual double | GetWeight (const TGeoMixture *mixt, int pdgc) |
virtual double | GetWeight (const TGeoMixture *mixt, int ielement, int pdgc) |
virtual void | MaxPathLengthsFluxMethod (void) |
virtual void | MaxPathLengthsBoxMethod (void) |
virtual bool | GenBoxRay (int indx, TLorentzVector &x4, TLorentzVector &p4) |
virtual double | ComputePathLengthPDG (const TVector3 &r, const TVector3 &udir, int pdgc) |
virtual void | SwimOnce (const TVector3 &r, const TVector3 &udir) |
virtual bool | FindMaterialInCurrentVol (int pdgc) |
virtual bool | WillNeverEnter (double step) |
virtual double | StepToNextBoundary (void) |
virtual double | Step (void) |
virtual double | StepUntilEntering (void) |
Protected Member Functions inherited from genie::GeomAnalyzerI | |
GeomAnalyzerI () | |
Protected Attributes | |
int | fMaterial |
input selected material for vertex generation More... | |
TGeoManager * | fGeometry |
input detector geometry More... | |
string | fTopVolumeName |
input top vol [other than TGeoManager::GetTopVolume()] More... | |
int | fNPoints |
max path length scanner (box method): points/surface [def:200] More... | |
int | fNRays |
max path length scanner (box method): rays/point [def:200] More... | |
int | fNParticles |
max path length scanner (flux method): particles in [def:10000] More... | |
GFluxI * | fFlux |
a flux objects that can be used to scan the max path lengths More... | |
bool | fDensWeight |
if true pathlengths are weighted with density [def:true] More... | |
double | fLengthScale |
conversion factor: input geometry length units -> meters More... | |
double | fDensityScale |
conversion factor: input geometry density units -> kgr/meters^3 More... | |
double | fMaxPlSafetyFactor |
factor that can multiply the computed max path lengths More... | |
double | fMixtWghtSum |
norm of relative weights (<0 if explicit summing required) More... | |
TVector3 * | fCurrVertex |
current generated vertex More... | |
PathLengthList * | fCurrPathLengthList |
current list of path-lengths More... | |
PathLengthList * | fCurrMaxPathLengthList |
current list of max path-lengths More... | |
PDGCodeList * | fCurrPDGCodeList |
current list of target nuclei More... | |
TGeoVolume * | fTopVolume |
top volume More... | |
TGeoHMatrix * | fMasterToTop |
matrix connecting master coordinates to top volume coordinates More... | |
bool | fMasterToTopIsIdentity |
is fMasterToTop matrix the identity matrix? More... | |
bool | fKeepSegPath |
need to fill path segment "path" More... | |
PathSegmentList * | fCurrPathSegmentList |
current list of path-segments More... | |
GeomVolSelectorI * | fGeomVolSelector |
optional path seg trimmer (owned) More... | |
TVector3 | fGenBoxRayPos |
TVector3 | fGenBoxRayDir |
int | fiface |
int | fipoint |
int | firay |
bool | fnewpnt |
double | fdx |
double | fdy |
double | fdz |
double | fox |
double | foy |
double | foz |
top vol size/origin (top vol units) More... | |
double | fmxddist |
double | fmxdstep |
max errors in pathsegmentlist More... | |
int | fDebugFlags |
A ROOT/GEANT4 geometry driver.
Costas Andreopoulos <constantinos.andreopoulos cern.ch> University of Liverpool & STFC Rutherford Appleton Laboratory
Robert Hatcher <rhatcher fnal.gov> Fermilab
May 24, 2005
Copyright (c) 2003-2020, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org
Definition at line 54 of file ROOTGeomAnalyzer.h.
ROOTGeomAnalyzer::ROOTGeomAnalyzer | ( | string | geometry_filename | ) |
Constructor from a geometry file
Definition at line 71 of file ROOTGeomAnalyzer.cxx.
ROOTGeomAnalyzer::ROOTGeomAnalyzer | ( | TGeoManager * | gm | ) |
Constructor from a TGeoManager
Definition at line 84 of file ROOTGeomAnalyzer.cxx.
|
inline |
Definition at line 59 of file ROOTGeomAnalyzer.h.
ROOTGeomAnalyzer::~ROOTGeomAnalyzer | ( | ) |
Definition at line 97 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
configure processing to perform path segment trimming
take ownership, return old
Definition at line 114 of file ROOTGeomAnalyzer.h.
|
protectedvirtual |
Determine possible target PDG codes. Note: If one is using a top volume other than the master level then the final list might include PDG codes that will never be seen during swimming through the volumes if those code are only found in materials outside the top volume.
Definition at line 765 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 682 of file ROOTGeomAnalyzer.cxx.
|
virtual |
Computes the maximum path lengths for all materials in the input geometry. The computed path lengths are in SI units (kgr/m^2, if density weighting is enabled)
Implements genie::GeomAnalyzerI.
Definition at line 118 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Compute the path length for the material with pdg-code = pdc, staring from the input position r (top vol coord & units) and moving along the direction of the unit vector udir (top vol coord).
Definition at line 1300 of file ROOTGeomAnalyzer.cxx.
|
virtual |
Computes the path-length within each detector material for a neutrino starting from point x (master coord) and travelling along the direction of p (master coord). The computed path lengths are in SI units (kgr/m^2, if density weighting is enabled)
Implements genie::GeomAnalyzerI.
Definition at line 149 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 94 of file ROOTGeomAnalyzer.h.
|
protectedvirtual |
Definition at line 1550 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Generate points in the geometry's bounding box and for each point generate random rays – a pseudo-flux – in master coordinates and SI units
Definition at line 1120 of file ROOTGeomAnalyzer.cxx.
|
virtual |
Generates a random vertex, within the detector material with the input PDG code, for a neutrino starting from point x (master coord) and travelling along the direction of p (master coord).
Implements genie::GeomAnalyzerI.
Definition at line 207 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 98 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 99 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 100 of file ROOTGeomAnalyzer.h.
|
protectedvirtual |
Definition at line 830 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 841 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Get the weight of the input material. Return the weight only if the material's pdg code matches the input code. If the material is found to be a mixture, call the corresponding method for mixtures. Weight is in the curr geom density units.
Definition at line 853 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Loop over the mixture elements, find the one matching the input pdgc and return its weight. Weight is in the curr geom density units.
Definition at line 914 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Get the weight of the input ith element of the input material. Return the weight only if the element's pdg code matches the input code. Weight is in the curr geom density units.
Definition at line 953 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 649 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 93 of file ROOTGeomAnalyzer.h.
|
virtual |
implement the GeomAnalyzerI interface
Implements genie::GeomAnalyzerI.
Definition at line 112 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Load the detector geometry from the input ROOT file
Definition at line 694 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Load the detector geometry from the input TGeoManager
Definition at line 722 of file ROOTGeomAnalyzer.cxx.
|
virtual |
access to geometry coordinate/unit transforms for validation/test purposes
convert path lengths from current geometry units to SI units
Definition at line 494 of file ROOTGeomAnalyzer.cxx.
|
virtual |
convert position vector from current geometry units to SI units
Definition at line 518 of file ROOTGeomAnalyzer.cxx.
|
virtual |
transform the input position vector from the master volume coordinate system to the specified top volume coordinate system, but not change the units.
Definition at line 555 of file ROOTGeomAnalyzer.cxx.
|
virtual |
transform the input direction vector from the master volume coordinate system to the specified top volume coordinate system, but not change the units.
Definition at line 578 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Generate points in the geometry's bounding box and for each point generate random rays, follow them through the detector and figure out the maximum path length for each material
Definition at line 1048 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Use the input flux driver to generate "rays", and then follow them through the detector and figure out the maximum path length for each material
Definition at line 984 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 96 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 95 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 91 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
retrieve geometry driver's configuration options
Definition at line 89 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 90 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 85 of file ROOTGeomAnalyzer.h.
|
virtual |
Like SetLengthUnits, but for density (default units = kgr/m3)
Definition at line 403 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 84 of file ROOTGeomAnalyzer.h.
|
virtual |
Use the units of the input geometry, e.g. SetLengthUnits(genie::units::centimeter) GENIE uses the physical system of units (hbar=c=1) almost throughtout so everything is expressed in GeV but when analyzing detector geometries use meters. Setting input geometry units will allow the code to compute the conversion factor. As input, use one of the constants in $GENIE/src/Conventions/Units.h
Definition at line 386 of file ROOTGeomAnalyzer.cxx.
|
virtual |
Set a factor that can multiply the computed max path lengths. The maximum path lengths are computed by performing an MC scanning of the input geometry. If you configure the scanner with a low number of points or rays you might understimate the path lengths, so you might want to 'inflate' them a little bit using this method. Do not set this number too high, because the max interaction probability will be grossly overestimated and you would need lots of attempts before getting a flux neutrino to interact...
Definition at line 414 of file ROOTGeomAnalyzer.cxx.
|
virtual |
Set it to x, if the relative weight proportions of elements in a mixture add up to x (eg x=1, 100, etc). Set it to a negative value to explicitly compute the correct weight normalization.
Definition at line 432 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 77 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 76 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
set geometry driver's configuration options
Definition at line 74 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 75 of file ROOTGeomAnalyzer.h.
|
virtual |
Set the name of the top volume. This driver would ask the TGeoManager::GetTopVolume() for the top volume. Use this method for changing this if for example you want to set a smaller volume as the top one so as to generate events only in a specific part of your detector.
Definition at line 442 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 78 of file ROOTGeomAnalyzer.h.
|
virtual |
convert position vector from SI units to current geometry units
Definition at line 537 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 1579 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 1572 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Definition at line 1586 of file ROOTGeomAnalyzer.cxx.
|
protectedvirtual |
Swim through the geometry from the from the input position r0 (top vol coord & units) and moving along the direction of the unit vector udir (topvol coord) to create a filled PathSegmentList
Definition at line 1340 of file ROOTGeomAnalyzer.cxx.
|
virtual |
transform the input position vector from the specified top volume coordinate system to the master volume coordinate system, but not change the units.
Definition at line 601 of file ROOTGeomAnalyzer.cxx.
|
virtual |
transform the input direction vector from the specified top volume coordinate system to the master volume coordinate system.
Definition at line 624 of file ROOTGeomAnalyzer.cxx.
|
inlinevirtual |
Definition at line 97 of file ROOTGeomAnalyzer.h.
|
inlinevirtual |
Definition at line 92 of file ROOTGeomAnalyzer.h.
|
protectedvirtual |
Definition at line 1609 of file ROOTGeomAnalyzer.cxx.
|
protected |
current list of max path-lengths
Definition at line 161 of file ROOTGeomAnalyzer.h.
|
protected |
current list of path-lengths
Definition at line 160 of file ROOTGeomAnalyzer.h.
|
protected |
current list of path-segments
Definition at line 168 of file ROOTGeomAnalyzer.h.
|
protected |
current list of target nuclei
Definition at line 162 of file ROOTGeomAnalyzer.h.
|
protected |
current generated vertex
Definition at line 159 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 180 of file ROOTGeomAnalyzer.h.
|
protected |
conversion factor: input geometry density units -> kgr/meters^3
Definition at line 156 of file ROOTGeomAnalyzer.h.
|
protected |
if true pathlengths are weighted with density [def:true]
Definition at line 154 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
a flux objects that can be used to scan the max path lengths
Definition at line 153 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 173 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 172 of file ROOTGeomAnalyzer.h.
|
protected |
input detector geometry
Definition at line 148 of file ROOTGeomAnalyzer.h.
|
protected |
optional path seg trimmer (owned)
Definition at line 169 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 174 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 174 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 174 of file ROOTGeomAnalyzer.h.
|
protected |
need to fill path segment "path"
Definition at line 167 of file ROOTGeomAnalyzer.h.
|
protected |
conversion factor: input geometry length units -> meters
Definition at line 155 of file ROOTGeomAnalyzer.h.
|
protected |
matrix connecting master coordinates to top volume coordinates
Definition at line 164 of file ROOTGeomAnalyzer.h.
|
protected |
is fMasterToTop matrix the identity matrix?
Definition at line 165 of file ROOTGeomAnalyzer.h.
|
protected |
input selected material for vertex generation
Definition at line 147 of file ROOTGeomAnalyzer.h.
|
protected |
factor that can multiply the computed max path lengths
Definition at line 157 of file ROOTGeomAnalyzer.h.
|
protected |
norm of relative weights (<0 if explicit summing required)
Definition at line 158 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 179 of file ROOTGeomAnalyzer.h.
|
protected |
max errors in pathsegmentlist
Definition at line 179 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 175 of file ROOTGeomAnalyzer.h.
|
protected |
max path length scanner (flux method): particles in [def:10000]
Definition at line 152 of file ROOTGeomAnalyzer.h.
|
protected |
max path length scanner (box method): points/surface [def:200]
Definition at line 150 of file ROOTGeomAnalyzer.h.
|
protected |
max path length scanner (box method): rays/point [def:200]
Definition at line 151 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
top vol size/origin (top vol units)
Definition at line 176 of file ROOTGeomAnalyzer.h.
|
protected |
top volume
Definition at line 163 of file ROOTGeomAnalyzer.h.
|
protected |
input top vol [other than TGeoManager::GetTopVolume()]
Definition at line 149 of file ROOTGeomAnalyzer.h.