LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
larg4 Namespace Reference

Geant4 interface. More...

Classes

class  AllPhysicsLists
 
class  AuxDetReadout
 
class  AuxDetReadoutGeometry
 
class  AuxDetSD
 
class  CheckAuxDetHit
 
class  CheckMCParticle
 
class  CheckSimEnergyDeposit
 
class  CustomPhysicsFactory
 
class  CustomPhysicsFactory< OpticalPhysics >
 
class  CustomPhysicsFactoryBase
 
class  CustomPhysicsTable
 
class  FastOpticalPhysics
 
class  G4BadIdeaAction
 
class  G4PVPlacementWithID
 A G4PVPlacement with an additional identificator. More...
 
class  IonAndScint
 
class  IonizationAndScintillation
 
class  IonizationAndScintillationAction
 
class  ISCalc
 
class  ISCalcAna
 
class  ISCalcCorrelated
 
struct  ISCalcData
 
class  ISCalcNESTLAr
 
class  ISCalcSeparate
 
class  ISCalculation
 
class  ISCalculationCorrelated
 
class  ISCalculationNEST
 
class  ISCalculationSeparate
 
class  ISTPC
 
class  LArG4
 Runs Geant4 simulation and propagation of electrons and photons to readout. More...
 
class  LArG4Ana
 
class  LArG4DetectorService
 
class  larg4Main
 
class  LArVoxelReadout
 Transports energy depositions from GEANT4 to TPC channels. More...
 
class  LArVoxelReadoutGeometry
 
class  MaterialPropertyLoader
 Stores material properties and sends them to GEANT4 geometry. More...
 
class  MCTruthEventActionService
 
class  ModularPhysicsList
 
class  MuNuclearSplittingProcess
 
class  MuNuclearSplittingProcessXSecBias
 
class  OpBoundaryProcessSimple
 Discrete process for reflection and diffusion at optical interfaces. More...
 
class  OpDetLookup
 
class  OpDetPhotonTable
 
class  OpDetReadoutGeometry
 
class  OpDetSensitiveDetector
 
class  OpFastScintillation
 
class  OpParamAction
 
class  OpParamSD
 
class  OpticalPhysics
 
class  OverlaidWireplanesAction
 
class  ParticleListAction
 
class  ParticleListActionService
 
class  SimEnergyDepositSD
 
class  SimpleWireplaneAction
 
class  TConfigurablePhysicsList
 
struct  TPCID_t
 Simple structure holding a TPC and cryostat number. More...
 
class  TransparentPlaneAction
 
class  UpdateDaughterInformation
 
class  VisualizationAction
 

Typedefs

using ConfigurablePhysicsList = TConfigurablePhysicsList< G4VModularPhysicsList >
 
typedef G4PVPlacementWithID< TPCID_tG4PVPlacementInTPC
 A physical volume with a TPC ID. More...
 
using PhysicsList = TConfigurablePhysicsList< ModularPhysicsList >
 

Enumerations

enum  OpBoundaryProcessSimpleStatus {
  Undefined, NotAtBoundary, SimpleAbsorbedNoRefl, SimpleAbsorbed,
  SimpleDiffuse, SimpleSpecular, StepTooSmall, NoRINDEX
}
 

Functions

double finter_d (double *x, double *par)
 
double LandauPlusExpoFinal (double *x, double *par)
 
double finter_r (double *x, double *par)
 
double model_close (double *x, double *par)
 
double model_far (double *x, double *par)
 
double fast_acos (double x)
 
constexpr double acos_table (const double x)
 
template<typename TReal >
constexpr double dist (const TReal *x, const TReal *y, const unsigned int dimension)
 
template<typename TVector3 >
constexpr double dist (const std::array< double, 3 > x, const TVector3 y, const unsigned int dimension, const unsigned int start)
 
template<typename TReal >
static constexpr bool isApproximatelyEqual (TReal a, TReal b, TReal tolerance=std::numeric_limits< TReal >::epsilon())
 
template<typename TReal >
static constexpr bool isApproximatelyZero (TReal a, TReal tolerance=std::numeric_limits< TReal >::epsilon())
 
template<typename TReal >
static constexpr bool isDefinitelyLessThan (TReal a, TReal b, TReal tolerance=std::numeric_limits< TReal >::epsilon())
 
template<typename TReal >
static constexpr bool isDefinitelyGreaterThan (TReal a, TReal b, TReal tolerance=std::numeric_limits< TReal >::epsilon())
 

Variables

CustomPhysicsTableTheCustomPhysicsTable {nullptr}
 
static IonizationAndScintillationgInstance = 0
 
OpDetLookupTheOpDetLookup
 
OpDetPhotonTableTheOpDetPhotonTable
 
static const size_t acos_bins = 2000000
 

Detailed Description

Geant4 interface.

Framework includes.

Author
bjpjo.nosp@m.nes@.nosp@m.mit.e.nosp@m.du
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu

This a module. It has the following functions:

  • Initialize Geant4 physics, detector geometry, and other processing.
  • Accept sim::MCTruth objects from the MC branch of the FMWK Event structure.
  • Pass the primary particles to the Geant4 simulation to calculate "truth" information for the detector response.
  • Pass the truth information to the DetSim branch of the FMWK event.

Geant4 interface

Author
selig.nosp@m.man@.nosp@m.nevis.nosp@m..col.nosp@m.umbia.nosp@m..edu VisualizationAction.cc 19-Mar-2002 Bill Seligman

Use UserAction to implement the standard visualization control for a typical Geant4 job. Everything in this class comes from the Geant4 examples; the only difference is that it's put into an UserAction class.

25-Feb-2009 WGS: Revised for FMWK/LArSoft

Typedef Documentation

using larg4::ConfigurablePhysicsList = typedef TConfigurablePhysicsList<G4VModularPhysicsList>

Definition at line 47 of file ConfigurablePhysicsList.hh.

A physical volume with a TPC ID.

Definition at line 129 of file LArVoxelReadout.h.

This type alias is what defines the name "larg4::PhysicsList" in any class that includes this header.

Definition at line 83 of file PhysicsList.h.

Enumeration Type Documentation

Function Documentation

constexpr double larg4::acos_table ( const double  x)
template<typename TReal >
constexpr double larg4::dist ( const TReal *  x,
const TReal *  y,
const unsigned int  dimension 
)
inline

Definition at line 537 of file OpFastScintillation.hh.

References d, and geo::vect::details::dimension().

Referenced by geoalgo::GeoAlgo::_RemainingPoints_(), geoalgo::Vector::_SqDist_(), geoalgo::GeoAlgo::_SqDist_(), pma::ProjectionMatchingAlg::alignTracks(), vertex::AggregateVertexAna::analyze(), ems::MultiEMShowers::analyze(), trkf::KalmanFilterAlg::buildTrack(), ShowerRecoTools::ShowerTrackTrajToSpacePoint::CalculateElement(), ShowerRecoTools::ShowerIncrementalTrackHitFinder::CalculateElement(), ShowerRecoTools::ShowerTrajPointdEdx::CalculateElement(), trkf::SpacePointAlg::compatible(), trkf::SeedFinderAlgorithm::ConsolidateSeed(), ems::MultiEMShowers::convCluster(), phot::CreateHybridLibrary::CreateHybridLibrary(), pma::Track3D::Dist2(), cluster::HoughTransform::DoAddPointReturnMax(), trkf::TrackKalmanFitter::doFitWork(), trkf::Track3DKalmanSPS::dQdxCalc(), genf::GFMaterialEffects::effects(), trkf::KalmanFilterAlg::extendTrack(), genf::RKTrackRep::Extrap(), genf::SlTrackRep::extrapolate(), trkf::KGTrack::fillTrack(), phot::PhotonLibraryHybrid::GetCount(), ems::MultiEMShowers::getMinDist(), pma::Track3D::GetNearestElement(), pma::Track3D::GetNearestTrkInTree(), trkf::Geometric3DVertexFitter::getParsCovsOnPlane(), shower::TCShowerAlg::goodHit(), pma::Track3D::HasTPC(), genf::GFSpacepointHitPolicy::hitCov(), trkf::SurfXYZPlane::isEqual(), ems::EMShower3D::Link(), ems::EMShower3D::LinkCandidates(), trkf::KHit< N >::predict(), genf::GFKalman::processHit(), sim::MCTrackRecoAlg::Reconstruct(), sim::MCShowerRecoAlg::Reconstruct(), showerreco::ShowerRecoAlg::RecoOneShower(), ems::EMShower3D::Reoptimize(), genf::GFAbsRecoHit::residualVector(), util::GeometryUtilities::SelectPolygonHitList(), trkf::SpacePointAlg::separation(), nnet::TrainingDataAlg::setDataEventData(), pma::Track3D::SetMaxHitsPerSeg(), cmtool::CBAlgoPolyShortestDist::SetMinDistSquared(), cmtool::CBAlgoMergeTinyWithBig::SetMinDistSquared(), trkf::KalmanFilterAlg::smoothTrack(), trkf::KHitContainer::sort(), pma::Track3D::TestHits(), simb::MCTrajectory::TotalLength(), lar::util::TrackProjectedLength(), trkf::KalmanFilterAlg::updateMomentum(), trkf::Propagator::vec_prop(), larg4::OpFastScintillation::VISHits(), and larg4::OpFastScintillation::VUVHits().

538  {
539  double d = 0.;
540  for (unsigned int p = 0; p < dimension; ++p) {
541  d += (*(x + p) - *(y + p)) * (*(x + p) - *(y + p));
542  }
543  return std::sqrt(d);
544  }
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6
constexpr unsigned int dimension()
Float_t d
Definition: plot.C:235
template<typename TVector3 >
constexpr double larg4::dist ( const std::array< double, 3 >  x,
const TVector3  y,
const unsigned int  dimension,
const unsigned int  start 
)
inline

Definition at line 547 of file OpFastScintillation.hh.

References d, and geo::vect::details::dimension().

551  {
552  double d = 0.;
553  for (unsigned int p = start; p < dimension; ++p) {
554  d += (x[p] - y[p]) * (x[p] - y[p]);
555  }
556  return std::sqrt(d);
557  }
Float_t y
Definition: compare.C:6
constexpr unsigned int dimension()
Float_t d
Definition: plot.C:235
double larg4::fast_acos ( double  x)

Definition at line 2172 of file OpFastScintillation.cxx.

References util::abs(), and x.

Referenced by larg4::OpFastScintillation::getVISTimes(), main(), larg4::OpFastScintillation::propagationTime(), larg4::OpFastScintillation::Rectangle_SolidAngle(), larg4::OpFastScintillation::VISHits(), and larg4::OpFastScintillation::VUVHits().

2173  {
2174  double negate = double(x < 0);
2175  x = std::abs(x);
2176  x -= double(x > 1.0) * (x - 1.0); // <- equivalent to min(1.0,x), but faster
2177  double ret = -0.0187293;
2178  ret = ret * x;
2179  ret = ret + 0.0742610;
2180  ret = ret * x;
2181  ret = ret - 0.2121144;
2182  ret = ret * x;
2183  ret = ret + 1.5707288;
2184  ret = ret * std::sqrt(1.0 - x);
2185  ret = ret - 2. * negate * ret;
2186  return negate * 3.14159265358979 + ret;
2187  }
Float_t x
Definition: compare.C:6
constexpr auto abs(T v)
Returns the absolute value of the argument.
double larg4::finter_d ( double *  x,
double *  par 
)

Definition at line 1851 of file OpFastScintillation.cxx.

References y1, and y2.

Referenced by larg4::OpFastScintillation::generateParam().

1852  {
1853  double y1 = par[2] * TMath::Landau(x[0], par[0], par[1]);
1854  double y2 = TMath::Exp(par[3] + x[0] * par[4]);
1855  return TMath::Abs(y1 - y2);
1856  }
Float_t x
Definition: compare.C:6
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t y2[n_points_geant4]
Definition: compare.C:26
double larg4::finter_r ( double *  x,
double *  par 
)

Definition at line 1873 of file OpFastScintillation.cxx.

References y1, and y2.

1874  {
1875  double y1 = par[2] * TMath::Landau(x[0], par[0], par[1]);
1876  double y2 = par[5] * TMath::Landau(x[0], par[3], par[4]);
1877  return TMath::Abs(y1 - y2);
1878  }
Float_t x
Definition: compare.C:6
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t y2[n_points_geant4]
Definition: compare.C:26
template<typename TReal >
static constexpr bool larg4::isApproximatelyEqual ( TReal  a,
TReal  b,
TReal  tolerance = std::numeric_limits<TReal>::epsilon() 
)
inlinestatic

Definition at line 563 of file OpFastScintillation.hh.

Referenced by larg4::OpFastScintillation::Disk_SolidAngle().

564  {
565  TReal diff = std::fabs(a - b);
566  if (diff <= tolerance) return true;
567  if (diff < std::fmax(std::fabs(a), std::fabs(b)) * tolerance) return true;
568  return false;
569  }
template<typename TReal >
static constexpr bool larg4::isApproximatelyZero ( TReal  a,
TReal  tolerance = std::numeric_limits<TReal>::epsilon() 
)
inlinestatic

Definition at line 574 of file OpFastScintillation.hh.

Referenced by larg4::OpFastScintillation::Disk_SolidAngle(), and larg4::OpFastScintillation::Rectangle_SolidAngle().

577  {
578  if (std::fabs(a) <= tolerance) return true;
579  return false;
580  }
template<typename TReal >
static constexpr bool larg4::isDefinitelyGreaterThan ( TReal  a,
TReal  b,
TReal  tolerance = std::numeric_limits<TReal>::epsilon() 
)
inlinestatic

Definition at line 596 of file OpFastScintillation.hh.

Referenced by larg4::OpFastScintillation::Disk_SolidAngle(), and larg4::OpFastScintillation::Rectangle_SolidAngle().

597  {
598  TReal diff = a - b;
599  if (diff > tolerance) return true;
600  if (diff > std::fmax(std::fabs(a), std::fabs(b)) * tolerance) return true;
601  return false;
602  }
template<typename TReal >
static constexpr bool larg4::isDefinitelyLessThan ( TReal  a,
TReal  b,
TReal  tolerance = std::numeric_limits<TReal>::epsilon() 
)
inlinestatic

Definition at line 586 of file OpFastScintillation.hh.

Referenced by larg4::OpFastScintillation::Disk_SolidAngle().

587  {
588  TReal diff = a - b;
589  if (diff < tolerance) return true;
590  if (diff < std::fmax(std::fabs(a), std::fabs(b)) * tolerance) return true;
591  return false;
592  }
double larg4::LandauPlusExpoFinal ( double *  x,
double *  par 
)

Definition at line 1858 of file OpFastScintillation.cxx.

References y1, and y2.

1859  {
1860  // par0 = joining point
1861  // par1 = Landau MPV
1862  // par2 = Landau widt
1863  // par3 = normalization
1864  // par4 = Expo cte
1865  // par5 = Expo tau
1866  double y1 = par[3] * TMath::Landau(x[0], par[1], par[2]);
1867  double y2 = TMath::Exp(par[4] + x[0] * par[5]);
1868  if (x[0] > par[0]) y1 = 0.;
1869  if (x[0] < par[0]) y2 = 0.;
1870  return (y1 + y2);
1871  }
Float_t x
Definition: compare.C:6
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t y2[n_points_geant4]
Definition: compare.C:26
double larg4::model_close ( double *  x,
double *  par 
)

Definition at line 1880 of file OpFastScintillation.cxx.

References y1, and y2.

Referenced by larg4::OpFastScintillation::generateParam().

1881  {
1882  // par0 = joining point
1883  // par1 = Landau MPV
1884  // par2 = Landau width
1885  // par3 = normalization
1886  // par4 = Expo cte
1887  // par5 = Expo tau
1888  // par6 = t_min
1889  double y1 = par[3] * TMath::Landau(x[0], par[1], par[2]);
1890  double y2 = TMath::Exp(par[4] + x[0] * par[5]);
1891  if (x[0] <= par[6] || x[0] > par[0]) y1 = 0.;
1892  if (x[0] < par[0]) y2 = 0.;
1893  return (y1 + y2);
1894  }
Float_t x
Definition: compare.C:6
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t y2[n_points_geant4]
Definition: compare.C:26
double larg4::model_far ( double *  x,
double *  par 
)

Definition at line 1896 of file OpFastScintillation.cxx.

References y.

Referenced by larg4::OpFastScintillation::generateParam().

1897  {
1898  // par1 = Landau MPV
1899  // par2 = Landau width
1900  // par3 = normalization
1901  // par0 = t_min
1902  double y = par[3] * TMath::Landau(x[0], par[1], par[2]);
1903  if (x[0] <= par[0]) y = 0.;
1904  return y;
1905  }
Float_t x
Definition: compare.C:6
Float_t y
Definition: compare.C:6

Variable Documentation

const size_t larg4::acos_bins = 2000000
static

Definition at line 451 of file OpFastScintillation.hh.

OpDetLookup* larg4::TheOpDetLookup
OpDetPhotonTable* larg4::TheOpDetPhotonTable

Definition at line 20 of file OpDetPhotonTable.cxx.

Referenced by larg4::OpDetPhotonTable::Instance().