22 #include <TGeoVolume.h> 23 #include <TGeoManager.h> 24 #include <TGeoShape.h> 25 #include <TGeoMedium.h> 26 #include <TGeoMaterial.h> 27 #include <TGeoMatrix.h> 29 #include <TObjArray.h> 30 #include <TLorentzVector.h> 34 #include <TPolyMarker3D.h> 37 #include "Framework/Conventions/GBuild.h" 51 using namespace genie;
61 long int mxsegments = 0;
63 long int nswims[6] = { 0, 0, 0, 0, 0, 0};
64 long int nnever[6] = { 0, 0, 0, 0, 0, 0};
65 double dnvols[6] = { 0, 0, 0, 0, 0, 0};
66 double dnvols2[6] = { 0, 0, 0, 0, 0, 0};
67 bool accum_vol_stat =
false;
78 <<
"ROOTGeomAnalyzer ctor \"" << geometry_filename <<
"\"";
80 this->
Load(geometry_filename);
91 <<
"ROOTGeomAnalyzer ctor passed TGeoManager*";
103 <<
"ROOTGeomAnalyzer " 125 <<
"Computing the maximum path lengths for all materials";
128 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
150 const TLorentzVector &
x,
const TLorentzVector &
p)
161 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 173 TVector3 udir = p.Vect().Unit();
174 TVector3
pos = x.Vect();
194 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 196 <<
"Calculated path length for material: " << pdgc <<
" = " << pl;
208 const TLorentzVector &
x,
const TLorentzVector &
p,
int tgtpdg)
215 <<
"Generating vtx in material: " << tgtpdg
216 <<
" along the input neutrino direction";
225 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 232 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
238 TVector3 udir = p.Vect().Unit();
239 TVector3
pos = x.Vect();
248 if ( maxwgt_dist <= 0 ) {
250 <<
"The current trajectory does not cross the selected material!!";
256 double genwgt_dist(maxwgt_dist * rnd->
RndGeom().Rndm());
262 <<
"Max {L x Density x Weight} given (init,dir) = " << maxwgt_dist;
264 <<
"Generated 'distance' in selected material = " << genwgt_dist;
269 double mxddist = 0, mxdstep = 0;
284 for ( ; mitr != mitr_end; ++mitr ) {
285 const TGeoMaterial* mat = mitr->first;
286 double wgt = ( mat ) ? this->
GetWeight(mat,tgtpdg) : 0;
291 <<
" wgtmap[" << mat->GetName() <<
"] pdg " << tgtpdg <<
" wgt " << Form(
"%.6f",wgt);
301 for ( sitr = segments.begin(); sitr != segments.end(); ++sitr) {
305 double wgtstep = trimmed_step * wgtmap[mat];
306 double beyond = walked + wgtstep;
310 <<
" beyond " << beyond <<
" genwgt_dist " << genwgt_dist
311 <<
" trimmed_step " << trimmed_step <<
" wgtstep " << wgtstep;
314 if ( beyond > genwgt_dist ) {
319 <<
"Choose vertex pos walked=" << walked
320 <<
" beyond=" << beyond
321 <<
" wgtstep " << wgtstep
322 <<
" ( " << trimmed_step <<
"*" << wgtmap[mat] <<
")" 323 <<
" look for " << genwgt_dist
324 <<
" in " << seg.
fVolume->GetName() <<
" " 329 double frac = ( genwgt_dist - walked ) / wgtstep;
332 <<
"Hey, frac = " << frac <<
" ( > 1.0 ) " 333 << genwgt_dist <<
" " << walked <<
" " << wgtstep;
336 fGeometry -> SetCurrentPoint (pos[0],pos[1],pos[2]);
339 <<
"Choose vertex position in " << seg.
fVolume->GetName() <<
" " 347 <<
"The vertex was placed in volume: " 348 <<
fGeometry->GetCurrentVolume()->GetName()
355 <<
"Geometry volume was probably overshot";
357 <<
"No material with code = " << tgtpdg <<
" could be found at genwgt_dist=" 358 << genwgt_dist <<
" (maxwgt_dist=" << maxwgt_dist <<
")";
361 <<
"retry placing vertex";
374 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 398 <<
"Geometry length units scale factor (geom units -> m): " 409 <<
"Geometry density units scale factor (geom units -> kgr/m3): " 450 if (name.size() == 0)
return;
457 LOG(
"GROOTGeom",
pWARN) <<
"Could not find volume: " << name.c_str();
458 LOG(
"GROOTGeom",
pWARN) <<
"Will not change the current top volume";
471 TGeoIterator next(
fGeometry->GetMasterVolume());
473 TString nodeName, volNameStr;
475 while ((node = next())) {
476 nodeName = node->GetVolume()->GetName();
477 if (nodeName == volName) {
479 fMasterToTop =
new TGeoHMatrix(*next.GetCurrentMatrix());
502 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 504 <<
"Scaling path-lengths from local units -> meters " 506 <<
" - scale = " << scaling_factor;
510 for(pliter = pl.begin(); pliter != pl.end(); ++pliter)
512 int pdgc = pliter->first;
523 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 530 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 541 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 548 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 561 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 566 Double_t mast[3],
top[3];
569 vec.SetXYZ(top[0], top[1], top[2]);
571 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 584 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 589 Double_t mast[3],
top[3];
592 vec.SetXYZ(top[0], top[1], top[2]);
594 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 607 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 612 Double_t mast[3],
top[3];
615 vec.SetXYZ(mast[0], mast[1], mast[2]);
617 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 629 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 634 Double_t mast[3],
top[3];
637 vec.SetXYZ(mast[0], mast[1], mast[2]);
639 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 652 <<
"Initializing ROOT geometry driver & setting defaults";
684 LOG(
"GROOTGeom",
pNOTICE) <<
"Cleaning up...";
700 bool is_accessible = ! (gSystem->AccessPathName( filename.c_str() ));
701 if (!is_accessible) {
703 <<
"The ROOT geometry doesn't exist! Initialization failed!";
708 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,16,0) 709 if (TGeoManager::GetDefaultUnits() != TGeoManager::kRootUnits) {
710 TGeoManager::LockDefaultUnits(
false);
711 TGeoManager::SetDefaultUnits(TGeoManager::kRootUnits);
712 TGeoManager::LockDefaultUnits(
true);
727 <<
"A TGeoManager is being loaded to the geometry driver";
731 LOG(
"GROOTGeom",
pFATAL) <<
"Null TGeoManager! Aborting";
748 LOG(
"GROOTGeom",
pFATAL) <<
"Could not get top volume!!!";
757 #ifdef PRINT_MATERIALS 758 fGeometry->GetListOfMaterials()->Print();
776 LOG(
"GROOTGeom",
pFATAL) <<
"No ROOT geometry is loaded!!";
780 TObjArray * volume_list =
fGeometry->GetListOfVolumes();
783 <<
"Null list of geometry volumes. Can not find build target list!";
787 std::set<Int_t> seen_mat;
788 std::vector<TGeoVolume*> volvec;
790 int numVol = volume_list->GetEntries();
791 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 792 LOG(
"GROOTGeom",
pDEBUG) <<
"Number of volumes found: " << numVol;
795 for (
int ivol = 0; ivol < numVol; ivol++) {
796 TGeoVolume *
volume = dynamic_cast <TGeoVolume *>(volume_list->At(ivol));
799 <<
"Got a null geometry volume!! Skiping current list element";
802 TGeoMaterial * mat = volume->GetMedium()->GetMaterial();
805 Int_t mat_indx = mat->GetIndex();
806 if ( seen_mat.find(mat_indx) != seen_mat.end() )
continue;
807 seen_mat.insert(mat_indx);
808 volvec.push_back(volume);
810 if (mat->IsMixture()) {
811 TGeoMixture * mixt = dynamic_cast <TGeoMixture*> (mat);
812 int Nelements = mixt->GetNelements();
813 for (
int i=0; i<Nelements; i++) {
832 int A = TMath::Nint(m->GetA());
833 int Z = TMath::Nint(m->GetZ());
842 const TGeoMixture *
const m,
int ielement)
const 844 int A = TMath::Nint(m->GetAmixt()[ielement]);
845 int Z = TMath::Nint(m->GetZmixt()[ielement]);
862 LOG(
"GROOTGeom",
pERROR) <<
"Null input material. Return weight = 0.";
868 LOG(
"GROOTGeom",
pERROR) <<
"Target doesn't exist. Return weight = 0.";
872 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 874 <<
"Curr. material: A/Z = " << mat->GetA() <<
" / " << mat->GetZ();
880 if (mat->IsMixture()) {
881 const TGeoMixture * mixt = dynamic_cast <
const TGeoMixture*> (mat);
883 LOG(
"GROOTGeom",
pERROR) <<
"Null input mixture. Return weight = 0.";
886 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 888 <<
"Material : " << mat->GetName()
889 <<
" is a mixture with " << mixt->GetNelements() <<
" elements";
898 if (ion_pdgc != pdgc)
return 0.;
901 weight = mat->GetDensity();
905 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 907 <<
"Weight[mat:" << mat->GetName() <<
"] = " <<
weight;
923 for (
int i = 0; i < mixt->GetNelements(); i++) {
924 double dw = (this->
GetWeight(mixt,i,pdgc));
930 for (
int j = 0; j < mixt->GetNelements(); j++) {
932 <<
"[" << j <<
"] Z = " << mixt->GetZmixt()[j]
933 <<
", A = " << mixt->GetAmixt()[j]
935 <<
"), w = " << mixt->GetWmixt()[j];
938 <<
"Material pdgc = " << pdgc <<
" appears " << nm
939 <<
" times (>1) in mixture = " << mixt->GetName();
941 <<
"Your geometry must be incorrect - Aborting";
961 if (ion_pdgc != pdgc)
return 0.;
963 double d = mixt->GetDensity();
964 double w = mixt->GetWmixt()[ielement];
971 for (
int i = 0; i < mixt->GetNelements(); i++) {
972 wtot += (mixt->GetWmixt()[i]);
990 <<
"Computing the maximum path lengths using the FLUX method";
1004 <<
"max path lengths with FLUX method forcing Enu=" << emax;
1007 while (iparticle < nparticles ) {
1011 LOG(
"GROOTGeom",
pWARN) <<
"Couldn't generate a flux neutrino";
1017 double ecurr = nup4.E();
1018 if ( ecurr > 0 ) nup4 *= (emax/ecurr);
1029 bool enters =
false;
1031 for (pl_iter = pl.begin(); pl_iter != pl.end(); ++pl_iter) {
1032 int pdgc = pl_iter->first;
1033 double pathlength = pl_iter->second;
1035 if ( pathlength > 0 ) {
1043 if (enters) iparticle++;
1055 <<
"Computing the maximum path lengths using the BOX method";
1056 #ifdef RWH_COUNTVOLS 1057 accum_vol_stat =
true;
1062 TLorentzVector nux4;
1063 TLorentzVector nup4;
1067 while ( (ok = this->
GenBoxRay(iparticle++,nux4,nup4)) ) {
1076 for (pl_iter = pllst.begin(); pl_iter != pllst.end(); ++pl_iter) {
1077 int pdgc = pl_iter->first;
1078 double pl = pl_iter->second;
1091 <<
"DensWeight \"" << (
fDensWeight?
"true":
"false")
1093 LOG(
"GROOTGeom",
pDEBUG) <<
"CurrMaxPathLengthList: " 1096 #ifdef RWH_COUNTVOLS 1100 for (
int j = 0; j < 6; ++j ) {
1101 long int ns = nswims[j];
1102 double x = dnvols[j];
1103 double x2 = dnvols2[j];
1104 if ( ns == 0 ) ns = 1;
1105 double avg = x / (double)ns;
1106 double rms = TMath::Sqrt((x2/(
double)ns) - avg*avg);
1108 <<
"RWH: nswim after BOX face " << j <<
" is " << ns
1109 <<
" avg " << avg <<
" rms " << rms
1110 <<
" never " << nnever[j];
1113 <<
"RWH: Max PathSegmentList size " << mxsegments;
1114 accum_vol_stat =
false;
1134 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: " << indx <<
" points/rays";
1142 TGeoBBox * box = (TGeoBBox *)TS;
1147 fox = (box->GetOrigin())[0];
1148 foy = (box->GetOrigin())[1];
1149 foz = (box->GetOrigin())[2];
1152 <<
"Box size (GU) :" 1153 <<
" x = " << 2*
fdx <<
", y = " << 2*
fdy <<
", z = " << 2*
fdz;
1155 <<
"Box origin (GU) :" 1156 <<
" x = " <<
fox <<
", y = " <<
foy <<
", z = " <<
foz;
1158 <<
"Will generate [" <<
fNPoints <<
"] random points / box surface";
1160 <<
"Will generate [" <<
fNRays <<
"] rays / point";
1162 #ifdef VALIDATE_CORNERS 1164 for (
int sz = -1; sz <= +1; ++sz) {
1165 for (
int sy = -1; sy <= +1; ++sy) {
1166 for (
int sx = -1; sx <= +1; ++sx) {
1167 if (sx == 0 || sy == 0 || sz == 0 )
continue;
1173 TVector3 pos2(master);
1178 <<
" [" << pos[0] <<
"," << pos[1] <<
"," << pos[2] <<
"] " 1180 <<
" [" << master[0] <<
"," << master[1] <<
"," << master[2] <<
"] " 1182 <<
" [" << pos2[0] <<
"," << pos2[1] <<
"," << pos2[2] <<
"] ";
1199 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [TOP]";
1213 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [LEFT]";
1227 LOG(
"GROOTGeom",
pINFO) <<
"Box surface scanned: [FRONT]";
1262 #ifdef RWH_COUNTVOLS 1266 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1269 <<
"GenBoxRay(topvol) " 1271 <<
" newpnt " << (
fnewpnt?
"true":
"false")
1287 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1289 <<
"GenBoxRay(master) " 1291 <<
" newpnt " << (
fnewpnt?
"true":
"false")
1301 const TVector3 & r0,
const TVector3 & udir,
int pdgc)
1316 const TGeoMaterial * mat = 0;
1323 for ( ; itr != itr_end; ++itr ) {
1325 if ( ! mat )
continue;
1331 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1333 <<
"PathLength[" << pdgc <<
"] = " << pl <<
" in curr geom units";
1361 bool found_vol (
false);
1362 bool keep_on (
true);
1367 const TGeoVolume * vol = 0;
1368 const TGeoMedium * med = 0;
1369 const TGeoMaterial * mat = 0;
1375 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1377 <<
"SwimOnce x [" << r0[0] <<
"," << r0[1] <<
"," << r0[2]
1378 <<
"] udir [" << udir[0] <<
"," << udir[1] <<
"," << udir[2];
1381 fGeometry -> SetCurrentDirection (udir[0],udir[1],udir[2]);
1382 fGeometry -> SetCurrentPoint (r0[0], r0[1], r0[2] );
1384 while (!found_vol || keep_on) {
1391 med = vol->GetMedium();
1392 mat = med->GetMaterial();
1393 ps_curr.
SetGeo(vol,med,mat);
1394 #ifdef PATHSEG_KEEP_PATH 1398 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1400 LOG(
"GROOTGeom",
pDEBUG) <<
"Current volume: " << vol->GetName()
1401 <<
" pos " <<
fGeometry->GetCurrentPoint()[0]
1402 <<
" " <<
fGeometry->GetCurrentPoint()[1]
1403 <<
" " <<
fGeometry->GetCurrentPoint()[2]
1404 <<
" dir " <<
fGeometry->GetCurrentDirection()[0]
1405 <<
" " <<
fGeometry->GetCurrentDirection()[1]
1406 <<
" " <<
fGeometry->GetCurrentDirection()[2]
1407 <<
"[path: " <<
fGeometry->GetPath() <<
"]";
1414 if (found_vol)
break;
1420 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1421 LOG(
"GROOTGeom",
pDEBUG) <<
"Outside ToNextBoundary step: " << step
1422 <<
" raydist: " << raydist;
1427 step = this->
Step();
1430 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1432 <<
"Stepping... [step size = " << step <<
"]";
1433 LOG(
"GROOTGeom",
pDEBUG) <<
"Outside step: " << step
1434 <<
" raydist: " << raydist;
1438 #ifdef RWH_COUNTVOLS 1439 if ( accum_vol_stat ) {
1444 if ( nnever[curface]%21 == 0 )
1446 <<
"curface " << curface <<
" " << nswims[curface]
1447 <<
" never " << nnever[curface]
1448 <<
" x [" << r0[0] <<
"," << r0[1] <<
"," << r0[2] <<
"] " 1449 <<
" p [" << udir[0] <<
"," << udir[1] <<
"," << udir[2] <<
"]";
1465 <<
"debug: step towards top volume: " << ps_curr;
1472 if (!found_vol) found_vol =
true;
1484 LOG(
"GROOTGeom",
pDEBUG) <<
"Current volume: " << vol->GetName()
1485 <<
" step " << step <<
" in " << mat->GetName();
1488 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1490 <<
"Cur med.: " << med->GetName() <<
", mat.: " << mat->GetName();
1492 <<
"Step = " <<
step;
1497 #ifdef RWH_COUNTVOLS 1498 if ( accum_vol_stat ) {
1500 dnvols[curface] += (double)nvolswim;
1501 dnvols2[curface] += (double)nvolswim * (
double)nvolswim;
1503 if ( ns > mxsegments ) mxsegments =
ns;
1508 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1517 double mxddist = 0, mxdstep = 0;
1552 TGeoVolume * vol =
fGeometry -> GetCurrentVolume();
1554 TGeoMaterial * mat = vol->GetMedium()->GetMaterial();
1555 if(mat->IsMixture()) {
1556 TGeoMixture * mixt = dynamic_cast <TGeoMixture*> (mat);
1557 for(
int i = 0; i < mixt->GetNelements(); i++) {
1559 if(tgtpdg == pdg)
return true;
1563 if(tgtpdg == pdg)
return true;
1566 LOG(
"GROOTGeom",
pWARN) <<
"Current volume is null!";
1592 step += this->
Step();
1595 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1603 <<
", Step = " <<
step;
1616 if (step > 9.99E29) {
1618 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 1619 LOG(
"GROOTGeom",
pINFO) <<
"Wow! Current step is dr = " <<
step;
1620 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
double rms(sqlite3 *db, std::string const &table_name, std::string const &column_name)
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 const std::string volume[nvol]
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)
virtual const PathLengthList & ComputePathLengths(const TLorentzVector &x, const TLorentzVector &p)
bool exists(std::string path)
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...
static constexpr double kilogram
int fNPoints
max path length scanner (box method): points/surface [def:200]
PathSegmentV_t::const_iterator PathSegVCItr_t
void swap(Handle< T > &a, Handle< T > &b)
virtual bool GenBoxRay(int indx, TLorentzVector &x4, TLorentzVector &p4)
virtual double LengthUnits(void) const
virtual void SetScannerNRays(int nr)
static constexpr double meter3
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
void SetStartInfo(const TVector3 &pos=TVector3(0, 0, 1e37), const TVector3 &dir=TVector3(0, 0, 0))
virtual void Load(string geometry_filename)
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
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
static constexpr double meter
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
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)
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
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)