94 #include <TGeoVolume.h> 95 #include <TGeoManager.h> 96 #include <TGeoShape.h> 97 #include <TGeoMedium.h> 98 #include <TGeoMaterial.h> 99 #include <TGeoMatrix.h> 100 #include <TGeoNode.h> 101 #include <TObjArray.h> 102 #include <TLorentzVector.h> 106 #include <TPolyMarker3D.h> 107 #include <TGeoBBox.h> 123 using namespace genie;
133 long int mxsegments = 0;
134 long int curface = 0;
135 long int nswims[6] = { 0, 0, 0, 0, 0, 0};
136 long int nnever[6] = { 0, 0, 0, 0, 0, 0};
137 double dnvols[6] = { 0, 0, 0, 0, 0, 0};
138 double dnvols2[6] = { 0, 0, 0, 0, 0, 0};
139 bool accum_vol_stat =
false;
150 <<
"ROOTGeomAnalyzer ctor \"" << geometry_filename <<
"\"";
152 this->
Load(geometry_filename);
163 <<
"ROOTGeomAnalyzer ctor passed TGeoManager*";
175 <<
"ROOTGeomAnalyzer " 197 <<
"Computing the maximum path lengths for all materials";
200 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
222 const TLorentzVector &
x,
const TLorentzVector &
p)
233 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 245 TVector3 udir = p.Vect().Unit();
246 TVector3
pos = x.Vect();
258 vector<int>::iterator itr;
266 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 268 <<
"Calculated path length for material: " << pdgc <<
" = " <<
pl;
280 const TLorentzVector &
x,
const TLorentzVector &
p,
int tgtpdg)
287 <<
"Generating vtx in material: " << tgtpdg
288 <<
" along the input neutrino direction";
297 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 304 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
310 TVector3 udir = p.Vect().Unit();
311 TVector3
pos = x.Vect();
320 if ( maxwgt_dist <= 0 ) {
322 <<
"The current trajectory does not cross the selected material!!";
328 double genwgt_dist(maxwgt_dist * rnd->
RndGeom().Rndm());
334 <<
"Max {L x Density x Weight} given (init,dir) = " << maxwgt_dist;
336 <<
"Generated 'distance' in selected material = " << genwgt_dist;
341 double mxddist = 0, mxdstep = 0;
356 for ( ; mitr != mitr_end; ++mitr ) {
357 const TGeoMaterial*
mat = mitr->first;
363 <<
" wgtmap[" << mat->GetName() <<
"] pdg " << tgtpdg <<
" wgt " << Form(
"%.6f",wgt);
373 for ( sitr = segments.begin(); sitr != segments.end(); ++sitr) {
377 double wgtstep = trimmed_step * wgtmap[
mat];
378 double beyond = walked + wgtstep;
382 <<
" beyond " << beyond <<
" genwgt_dist " << genwgt_dist
383 <<
" trimmed_step " << trimmed_step <<
" wgtstep " << wgtstep;
386 if ( beyond > genwgt_dist ) {
391 <<
"Choose vertex pos walked=" << walked
392 <<
" beyond=" << beyond
393 <<
" wgtstep " << wgtstep
394 <<
" ( " << trimmed_step <<
"*" << wgtmap[
mat] <<
")" 395 <<
" look for " << genwgt_dist
396 <<
" in " << seg.
fVolume->GetName() <<
" " 401 double frac = ( genwgt_dist - walked ) / wgtstep;
404 <<
"Hey, frac = " << frac <<
" ( > 1.0 ) " 405 << genwgt_dist <<
" " << walked <<
" " << wgtstep;
408 fGeometry -> SetCurrentPoint (pos[0],pos[1],pos[2]);
411 <<
"Choose vertex position in " << seg.
fVolume->GetName() <<
" " 419 <<
"The vertex was placed in volume: " 420 <<
fGeometry->GetCurrentVolume()->GetName()
427 <<
"Geometry volume was probably overshot";
429 <<
"No material with code = " << tgtpdg <<
" could be found at genwgt_dist=" 430 << genwgt_dist <<
" (maxwgt_dist=" << maxwgt_dist <<
")";
433 <<
"retry placing vertex";
446 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 470 <<
"Geometry length units scale factor (geom units -> m): " 481 <<
"Geometry density units scale factor (geom units -> kgr/m3): " 522 if (name.size() == 0)
return;
529 LOG(
"GROOTGeom",
pWARN) <<
"Could not find volume: " << name.c_str();
530 LOG(
"GROOTGeom",
pWARN) <<
"Will not change the current top volume";
545 TString nodeName, volNameStr;
547 while ((node =
next())) {
548 nodeName = node->GetVolume()->GetName();
549 if (nodeName == volName) {
574 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 576 <<
"Scaling path-lengths from local units -> meters " 578 <<
" - scale = " << scaling_factor;
581 PathLengthList::iterator pliter;
582 for(pliter = pl.begin(); pliter != pl.end(); ++pliter)
584 int pdgc = pliter->first;
595 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 602 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 613 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 620 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 633 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 638 Double_t mast[3],
top[3];
641 vec.SetXYZ(top[0], top[1], top[2]);
643 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 656 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 661 Double_t mast[3],
top[3];
664 vec.SetXYZ(top[0], top[1], top[2]);
666 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 679 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 684 Double_t mast[3],
top[3];
687 vec.SetXYZ(mast[0], mast[1], mast[2]);
689 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 701 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 706 Double_t mast[3],
top[3];
709 vec.SetXYZ(mast[0], mast[1], mast[2]);
711 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 724 <<
"Initializing ROOT geometry driver & setting defaults";
756 LOG(
"GROOTGeom",
pNOTICE) <<
"Cleaning up...";
772 bool is_accessible = ! (gSystem->AccessPathName( filename.c_str() ));
773 if (!is_accessible) {
775 <<
"The ROOT geometry doesn't exist! Initialization failed!";
778 TGeoManager *
gm = TGeoManager::Import(filename.c_str());
789 <<
"A TGeoManager is being loaded to the geometry driver";
793 LOG(
"GROOTGeom",
pFATAL) <<
"Null TGeoManager! Aborting";
810 LOG(
"GROOTGeom",
pFATAL) <<
"Could not get top volume!!!";
819 #ifdef PRINT_MATERIALS 820 fGeometry->GetListOfMaterials()->Print();
838 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
842 TObjArray * volume_list =
fGeometry->GetListOfVolumes();
845 <<
"Null list of geometry volumes. Can not find build target list!";
849 std::set<Int_t> seen_mat;
850 std::vector<TGeoVolume*> volvec;
852 int numVol = volume_list->GetEntries();
853 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 854 LOG(
"GROOTGeom",
pDEBUG) <<
"Number of volumes found: " << numVol;
857 for (
int ivol = 0; ivol < numVol; ivol++) {
858 TGeoVolume *
volume = dynamic_cast <TGeoVolume *>(volume_list->At(ivol));
861 <<
"Got a null geometry volume!! Skiping current list element";
864 TGeoMaterial *
mat = volume->GetMedium()->GetMaterial();
867 Int_t mat_indx = mat->GetIndex();
868 if ( seen_mat.find(mat_indx) != seen_mat.end() )
continue;
869 seen_mat.insert(mat_indx);
870 volvec.push_back(volume);
872 if (mat->IsMixture()) {
873 TGeoMixture * mixt = dynamic_cast <TGeoMixture*> (
mat);
874 int Nelements = mixt->GetNelements();
875 for (
int i=0;
i<Nelements;
i++) {
894 int A = TMath::Nint(m->GetA());
895 int Z = TMath::Nint(m->GetZ());
904 const TGeoMixture *
const m,
int ielement)
const 906 int A = TMath::Nint(m->GetAmixt()[ielement]);
907 int Z = TMath::Nint(m->GetZmixt()[ielement]);
924 LOG(
"GROOTGeom",
pERROR) <<
"Null input material. Return weight = 0.";
930 LOG(
"GROOTGeom",
pERROR) <<
"Target doesn't exist. Return weight = 0.";
934 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 936 <<
"Curr. material: A/Z = " << mat->GetA() <<
" / " << mat->GetZ();
942 if (mat->IsMixture()) {
943 const TGeoMixture * mixt = dynamic_cast <
const TGeoMixture*> (
mat);
945 LOG(
"GROOTGeom",
pERROR) <<
"Null input mixture. Return weight = 0.";
948 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 950 <<
"Material : " << mat->GetName()
951 <<
" is a mixture with " << mixt->GetNelements() <<
" elements";
960 if (ion_pdgc != pdgc)
return 0.;
963 weight = mat->GetDensity();
967 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 969 <<
"Weight[mat:" << mat->GetName() <<
"] = " <<
weight;
985 for (
int i = 0;
i < mixt->GetNelements();
i++) {
992 for (
int j = 0;
j < mixt->GetNelements();
j++) {
994 <<
"[" <<
j <<
"] Z = " << mixt->GetZmixt()[
j]
995 <<
", A = " << mixt->GetAmixt()[
j]
997 <<
"), w = " << mixt->GetWmixt()[
j];
1000 <<
"Material pdgc = " << pdgc <<
" appears " << nm
1001 <<
" times (>1) in mixture = " << mixt->GetName();
1003 <<
"Your geometry must be incorrect - Aborting";
1023 if (ion_pdgc != pdgc)
return 0.;
1025 double d = mixt->GetDensity();
1026 double w = mixt->GetWmixt()[ielement];
1033 for (
int i = 0;
i < mixt->GetNelements();
i++) {
1034 wtot += (mixt->GetWmixt()[
i]);
1052 <<
"Computing the maximum path lengths using the FLUX method";
1055 PathLengthList::const_iterator pl_iter;
1066 <<
"max path lengths with FLUX method forcing Enu=" <<
emax;
1069 while (iparticle < nparticles ) {
1073 LOG(
"GROOTGeom",
pWARN) <<
"Couldn't generate a flux neutrino";
1079 double ecurr = nup4.E();
1080 if ( ecurr > 0 ) nup4 *= (emax/ecurr);
1091 bool enters =
false;
1093 for (pl_iter = pl.begin(); pl_iter != pl.end(); ++pl_iter) {
1094 int pdgc = pl_iter->first;
1095 double pathlength = pl_iter->second;
1097 if ( pathlength > 0 ) {
1105 if (enters) iparticle++;
1117 <<
"Computing the maximum path lengths using the BOX method";
1118 #ifdef RWH_COUNTVOLS 1119 accum_vol_stat =
true;
1124 TLorentzVector nux4;
1125 TLorentzVector nup4;
1127 PathLengthList::const_iterator pl_iter;
1129 while ( (ok = this->
GenBoxRay(iparticle++,nux4,nup4)) ) {
1138 for (pl_iter = pllst.begin(); pl_iter != pllst.end(); ++pl_iter) {
1139 int pdgc = pl_iter->first;
1140 double pl = pl_iter->second;
1153 <<
"DensWeight \"" << (
fDensWeight?
"true":
"false")
1155 LOG(
"GROOTGeom",
pDEBUG) <<
"CurrMaxPathLengthList: " 1158 #ifdef RWH_COUNTVOLS 1162 for (
int j = 0;
j < 6; ++
j ) {
1163 long int ns = nswims[
j];
1164 double x = dnvols[
j];
1165 double x2 = dnvols2[
j];
1166 if ( ns == 0 ) ns = 1;
1167 double avg = x / (double)ns;
1170 <<
"RWH: nswim after BOX face " <<
j <<
" is " << ns
1171 <<
" avg " << avg <<
" rms " << rms
1172 <<
" never " << nnever[
j];
1175 <<
"RWH: Max PathSegmentList size " << mxsegments;
1176 accum_vol_stat =
false;
1196 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: " << indx <<
" points/rays";
1204 TGeoBBox * box = (TGeoBBox *)TS;
1209 fox = (box->GetOrigin())[0];
1210 foy = (box->GetOrigin())[1];
1211 foz = (box->GetOrigin())[2];
1214 <<
"Box size (GU) :" 1215 <<
" x = " << 2*
fdx <<
", y = " << 2*
fdy <<
", z = " << 2*
fdz;
1217 <<
"Box origin (GU) :" 1218 <<
" x = " <<
fox <<
", y = " <<
foy <<
", z = " <<
foz;
1220 <<
"Will generate [" <<
fNPoints <<
"] random points / box surface";
1222 <<
"Will generate [" <<
fNRays <<
"] rays / point";
1224 #ifdef VALIDATE_CORNERS 1226 for (
int sz = -1; sz <= +1; ++sz) {
1227 for (
int sy = -1; sy <= +1; ++sy) {
1228 for (
int sx = -1; sx <= +1; ++sx) {
1229 if (sx == 0 || sy == 0 || sz == 0 )
continue;
1235 TVector3 pos2(master);
1240 <<
" [" << pos[0] <<
"," << pos[1] <<
"," << pos[2] <<
"] " 1242 <<
" [" << master[0] <<
"," << master[1] <<
"," << master[2] <<
"] " 1244 <<
" [" << pos2[0] <<
"," << pos2[1] <<
"," << pos2[2] <<
"] ";
1261 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [TOP]";
1275 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [LEFT]";
1289 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [FRONT]";
1324 #ifdef RWH_COUNTVOLS 1328 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1331 <<
"GenBoxRay(topvol) " 1333 <<
" newpnt " << (
fnewpnt?
"true":
"false")
1349 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1351 <<
"GenBoxRay(master) " 1353 <<
" newpnt " << (
fnewpnt?
"true":
"false")
1363 const TVector3 & r0,
const TVector3 & udir,
int pdgc)
1378 const TGeoMaterial *
mat = 0;
1385 for ( ; itr != itr_end; ++itr ) {
1387 if ( ! mat )
continue;
1393 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1395 <<
"PathLength[" << pdgc <<
"] = " << pl <<
" in curr geom units";
1423 bool found_vol (
false);
1424 bool keep_on (
true);
1429 const TGeoVolume * vol = 0;
1430 const TGeoMedium * med = 0;
1431 const TGeoMaterial *
mat = 0;
1437 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1439 <<
"SwimOnce x [" << r0[0] <<
"," << r0[1] <<
"," << r0[2]
1440 <<
"] udir [" << udir[0] <<
"," << udir[1] <<
"," << udir[2];
1443 fGeometry -> SetCurrentDirection (udir[0],udir[1],udir[2]);
1444 fGeometry -> SetCurrentPoint (r0[0], r0[1], r0[2] );
1446 while (!found_vol || keep_on) {
1453 med = vol->GetMedium();
1454 mat = med->GetMaterial();
1455 ps_curr.
SetGeo(vol,med,mat);
1456 #ifdef PATHSEG_KEEP_PATH 1460 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1462 LOG(
"GROOTGeom",
pDEBUG) <<
"Current volume: " << vol->GetName()
1463 <<
" pos " <<
fGeometry->GetCurrentPoint()[0]
1464 <<
" " <<
fGeometry->GetCurrentPoint()[1]
1465 <<
" " <<
fGeometry->GetCurrentPoint()[2]
1466 <<
" dir " <<
fGeometry->GetCurrentDirection()[0]
1467 <<
" " <<
fGeometry->GetCurrentDirection()[1]
1468 <<
" " <<
fGeometry->GetCurrentDirection()[2]
1469 <<
"[path: " <<
fGeometry->GetPath() <<
"]";
1476 if (found_vol)
break;
1482 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1483 LOG(
"GROOTGeom",
pDEBUG) <<
"Outside ToNextBoundary step: " << step
1484 <<
" raydist: " << raydist;
1489 step = this->
Step();
1492 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1494 <<
"Stepping... [step size = " << step <<
"]";
1495 LOG(
"GROOTGeom",
pDEBUG) <<
"Outside step: " << step
1496 <<
" raydist: " << raydist;
1500 #ifdef RWH_COUNTVOLS 1501 if ( accum_vol_stat ) {
1506 if ( nnever[curface]%21 == 0 )
1508 <<
"curface " << curface <<
" " << nswims[curface]
1509 <<
" never " << nnever[curface]
1510 <<
" x [" << r0[0] <<
"," << r0[1] <<
"," << r0[2] <<
"] " 1511 <<
" p [" << udir[0] <<
"," << udir[1] <<
"," << udir[2] <<
"]";
1527 <<
"debug: step towards top volume: " << ps_curr;
1534 if (!found_vol) found_vol =
true;
1546 LOG(
"GROOTGeom",
pDEBUG) <<
"Current volume: " << vol->GetName()
1547 <<
" step " << step <<
" in " << mat->GetName();
1550 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1552 <<
"Cur med.: " << med->GetName() <<
", mat.: " << mat->GetName();
1554 <<
"Step = " <<
step;
1559 #ifdef RWH_COUNTVOLS 1560 if ( accum_vol_stat ) {
1562 dnvols[curface] += (double)nvolswim;
1563 dnvols2[curface] += (double)nvolswim * (
double)nvolswim;
1565 if ( ns > mxsegments ) mxsegments =
ns;
1570 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1579 double mxddist = 0, mxdstep = 0;
1614 TGeoVolume * vol =
fGeometry -> GetCurrentVolume();
1616 TGeoMaterial *
mat = vol->GetMedium()->GetMaterial();
1617 if(mat->IsMixture()) {
1618 TGeoMixture * mixt = dynamic_cast <TGeoMixture*> (
mat);
1619 for(
int i = 0;
i < mixt->GetNelements();
i++) {
1621 if(tgtpdg == pdg)
return true;
1625 if(tgtpdg == pdg)
return true;
1628 LOG(
"GROOTGeom",
pWARN) <<
"Current volume is null!";
1654 step += this->
Step();
1657 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1665 <<
", Step = " <<
step;
1678 if (step > 9.99E29) {
1680 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1681 LOG(
"GROOTGeom",
pINFO) <<
"Wow! Current step is dr = " <<
step;
1682 LOG(
"GROOTGeom",
pINFO) <<
"This trajectory isn't entering the detector";
virtual double MaxEnergy(void)=0
declare the max flux neutrino energy that can be generated (for init. purposes)
void ScalePathLength(int pdgc, double scale)
virtual int ScannerNParticles(void) const
virtual void SetMaxPlSafetyFactor(double sf)
TGeoManager * fGeometry
input detector geometry
double PathLength(int pdgc) const
void SetEnter(const TVector3 &p3enter, double raydist)
point of entry to geometry element
virtual double StepUntilEntering(void)
virtual double GetWeight(const TGeoMaterial *mat, int pdgc)
void SetPrintVerbose(bool doit=true)
string P4AsShortString(const TLorentzVector *p)
virtual void MaxPathLengthsFluxMethod(void)
virtual bool WeightWithDensity(void) const
virtual const PathLengthList & ComputeMaxPathLengths(void)
THE MAIN GENIE PROJECT NAMESPACE
static RandomGen * Instance()
Access instance.
void CrossCheck(double &mxddist, double &mxdstep) const
virtual void CleanUp(void)
void SetPath(const char *path)
string BoolAsYNString(bool b)
StepRangeSet fStepRangeSet
collection of {steplo,stephi} pairs
bool fDensWeight
if true pathlengths are weighted with density [def:true]
virtual const TLorentzVector & Position(void)=0
returns the flux neutrino 4-position (note: expect SI rather than physical units) ...
void AddSegment(const PathSegment &ps)
virtual double StepToNextBoundary(void)
GFluxI * fFlux
a flux objects that can be used to scan the max path lengths
static constexpr Double_t nm
string P3AsString(const TVector3 *vec)
xmlNodePtr FindNode(xmlDocPtr xml_doc, string node_path)
virtual void Top2Master(TVector3 &v) const
double fLengthScale
conversion factor: input geometry length units -> meters
Object to be filled with the neutrino path-segments representing geometry volume steps (generally bou...
void SetPathLength(int pdgc, double pl)
bool ExistsInPDGCodeList(int pdg_code) const
int fNRays
max path length scanner (box method): rays/point [def:200]
TVector3 * fCurrVertex
current generated vertex
bool IsSameStart(const TVector3 &pos, const TVector3 &dir) const
double fMaxPlSafetyFactor
factor that can multiply the computed max path lengths
virtual void SetScannerNParticles(int np)
string fTopVolumeName
input top vol [other than TGeoManager::GetTopVolume()]
void SetStep(Double_t step, bool setlimits=true)
step taken in the geometry element
A singleton holding random number generator classes. All random number generation in GENIE should tak...
virtual void SetDensityUnits(double du)
virtual const PDGCodeList & ListOfTargetNuclei(void)
implement the GeomAnalyzerI interface
virtual bool FindMaterialInCurrentVol(int pdgc)
virtual double MixtureWeightsSum(void) const
virtual double Step(void)
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
virtual const PathLengthList & ComputePathLengths(const TLorentzVector &x, const TLorentzVector &p)
Object to be filled with the neutrino path-length, for all detector geometry materials, when starting from a position x and travelling along the direction of the neutrino 4-momentum.
const TGeoMaterial * fMaterial
ref only ptr to TGeoMaterial
virtual int GetTargetPdgCode(const TGeoMaterial *const m) const
double foz
top vol size/origin (top vol units)
double fDensityScale
conversion factor: input geometry density units -> kgr/meters^3
virtual void MaxPathLengthsBoxMethod(void)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
int fNPoints
max path length scanner (box method): points/surface [def:200]
PathSegmentV_t::const_iterator PathSegVCItr_t
virtual bool GenBoxRay(int indx, TLorentzVector &x4, TLorentzVector &p4)
virtual double LengthUnits(void) const
virtual void SetScannerNRays(int nr)
const TGeoVolume * fVolume
ref only ptr to TGeoVolume
PDGCodeList * fCurrPDGCodeList
current list of target nuclei
virtual void SetWeightWithDensity(bool wt)
PathSegmentList * fCurrPathSegmentList
current list of path-segments
PathLengthList * fCurrMaxPathLengthList
current list of max path-lengths
static const double meter
static const double kilogram
void SetStartInfo(const TVector3 &pos=TVector3(0, 0, 1e37), const TVector3 &dir=TVector3(0, 0, 0))
virtual void Load(string geometry_filename)
double frac(double x)
Fractional part.
Double_t GetSummedStepRange() const
get the sum of all the step range (in case step has been trimmed or split)
TRandom3 & RndGeom(void) const
rnd number generator used by geometry drivers
virtual double ComputePathLengthPDG(const TVector3 &r, const TVector3 &udir, int pdgc)
virtual void Local2SI(PathLengthList &pl) const
access to geometry coordinate/unit transforms for validation/test purposes
GeomVolSelectorI * fGeomVolSelector
optional path seg trimmer (owned)
const PathSegmentV_t & GetPathSegmentV(void) const
static const double ns
Module that plots metrics from reconstructed cosmic ray data.
double fmxdstep
max errors in pathsegmentlist
Misc GENIE control constants.
virtual double DensityUnits(void) const
virtual void Initialize(void)
virtual void Master2TopDir(TVector3 &v) const
virtual void Clear(Option_t *opt)=0
reset state variables based on opt
virtual bool GenerateNext(void)=0
generate the next flux neutrino (return false in err)
virtual const TVector3 & GenerateVertex(const TLorentzVector &x, const TLorentzVector &p, int tgtpdg)
bool GetNeedPath() const
allow toggle on only
MaterialMap_t::const_iterator MaterialMapCItr_t
void SetCurrentRay(const TLorentzVector &x4, const TLorentzVector &p4)
configure for individual neutrino ray
PathLengthList * fCurrPathLengthList
current list of path-lengths
virtual PathSegmentList * GenerateTrimmedList(const PathSegmentList *untrimmed) const
virtual void SetTopVolName(string nm)
void SetDoCrossCheck(bool doit=true)
TGeoHMatrix * fMasterToTop
matrix connecting master coordinates to top volume coordinates
bool fMasterToTopIsIdentity
is fMasterToTop matrix the identity matrix?
void SetGeo(const TGeoVolume *gvol, const TGeoMedium *gmed, const TGeoMaterial *gmat)
info about the geometry element
Var Sqrt(const Var &v)
Use to take sqrt of a var.
std::map< const TGeoMaterial *, Double_t > MaterialMap_t
TVector3 GetPosition(Double_t frac) const
calculate position within allowed ranges passed on fraction of total
virtual void SetScannerNPoints(int np)
set geometry driver's configuration options
virtual void SetScannerFlux(GFluxI *f)
const MaterialMap_t & GetMatStepSumMap(void) const
virtual void SetMixtureWeightsSum(double sum)
static const double meter3
int IonPdgCode(int A, int Z)
virtual const TLorentzVector & Momentum(void)=0
returns the flux neutrino 4-momentum
void SetExit(const TVector3 &p3exit)
point of exit from geometry element
TGeoVolume * fTopVolume
top volume
assert(nhit_max >=nhit_nbins)
virtual double MaxPlSafetyFactor(void) const
virtual void SetLengthUnits(double lu)
void AddPathLength(int pdgc, double pl)
virtual void Top2MasterDir(TVector3 &v) const
double fMixtWghtSum
norm of relative weights (<0 if explicit summing required)
Defines the GENIE Geometry Analyzer Interface.
virtual void BuildListOfTargetNuclei(void)
string X4AsString(const TLorentzVector *x)
virtual void SI2Local(TVector3 &v) const
bool fKeepSegPath
need to fill path segment "path"
std::list< PathSegment > PathSegmentV_t
string Vec3AsString(const TVector3 *vec)
void SetSI2Local(double scale)
set scale factor for SI to "raydist" units of PathSegmentList
virtual void SwimOnce(const TVector3 &r, const TVector3 &udir)
virtual void Master2Top(TVector3 &v) const
void push_back(int pdg_code)
void FillMatStepSum(void)
virtual bool WillNeverEnter(double step)