LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
larg4::ISTPC Class Reference

#include "ISTPC.h"

Public Member Functions

 ISTPC (geo::GeometryCore const &geom)
 
bool isScintInActiveVolume (geo::Point_t const &ScintPoint)
 

Static Public Member Functions

static std::vector< geo::BoxBoundedGeoextractActiveLArVolume (geo::GeometryCore const &geom)
 

Private Attributes

std::vector< geo::BoxBoundedGeofActiveVolumes
 

Detailed Description

Definition at line 22 of file ISTPC.h.

Constructor & Destructor Documentation

larg4::ISTPC::ISTPC ( geo::GeometryCore const &  geom)
explicit

Definition at line 21 of file ISTPC.cxx.

References util::enumerate(), extractActiveLArVolume(), and fActiveVolumes.

22  {
23  mf::LogTrace("IonAndScint") << "IonizationAndScintillation/ISTPC Initialize.\n"
24  << "Initializing the geometry of the detector.";
25 
26  {
27  auto log = mf::LogTrace("IonAndScint") << "IonAndScint: active volume boundaries from "
28  << fActiveVolumes.size() << " volumes:";
29  for (auto const& [iCryo, box] : fActiveVolumes | ranges::views::enumerate) {
30  log << "\n - C:" << iCryo << ": " << box.Min() << " -- " << box.Max() << " cm";
31  }
32  } // local scope
33  }
static std::vector< geo::BoxBoundedGeo > extractActiveLArVolume(geo::GeometryCore const &geom)
Definition: ISTPC.cxx:46
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
Definition: enumerate.h:49
MaybeLogger_< ELseverityLevel::ELsev_success, true > LogTrace
std::vector< geo::BoxBoundedGeo > fActiveVolumes
Definition: ISTPC.h:29

Member Function Documentation

std::vector< geo::BoxBoundedGeo > larg4::ISTPC::extractActiveLArVolume ( geo::GeometryCore const &  geom)
static

Definition at line 46 of file ISTPC.cxx.

References geo::BoxBoundedGeo::ExtendToInclude(), geo::Iterable< IterationPolicy, Transform >::Iterate(), and geo::GeometryCore::Ncryostats().

Referenced by phot::PropagationTimeModel::cathodeCentre(), ISTPC(), phot::PDFastSimPAR::PDFastSimPAR(), and phot::SemiAnalyticalModel::SemiAnalyticalModel().

47  {
48  std::vector<geo::BoxBoundedGeo> activeVolumes;
49  activeVolumes.reserve(geom.Ncryostats());
50 
51  for (geo::CryostatGeo const& cryo : geom.Iterate<geo::CryostatGeo>()) {
52 
53  // can't use it default-constructed since it would always include origin
54 
55  geo::BoxBoundedGeo box{cryo.TPC(0).ActiveBoundingBox()};
56 
57  for (geo::TPCGeo const& TPC : cryo.IterateTPCs())
58  box.ExtendToInclude(TPC.ActiveBoundingBox());
59 
60  activeVolumes.push_back(std::move(box));
61 
62  } // for cryostats
63 
64  return activeVolumes;
65  }
Geometry information for a single TPC.
Definition: TPCGeo.h:33
Geometry information for a single cryostat.
Definition: CryostatGeo.h:42
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition: BoxBoundedGeo.h:31
void ExtendToInclude(Coord_t x, Coord_t y, Coord_t z)
Extends the current box to also include the specified point.
bool larg4::ISTPC::isScintInActiveVolume ( geo::Point_t const &  ScintPoint)

Definition at line 37 of file ISTPC.cxx.

References fActiveVolumes.

Referenced by larg4::ISCalcCorrelated::AngleToEFieldAtStep(), larg4::ISCalcCorrelated::EFieldAtStep(), and phot::PDFastSimPAR::produce().

38  {
39  for (auto const& box : fActiveVolumes) {
40  if (box.ContainsPosition(ScintPoint)) { return true; }
41  }
42  return false;
43  }
std::vector< geo::BoxBoundedGeo > fActiveVolumes
Definition: ISTPC.h:29

Member Data Documentation

std::vector<geo::BoxBoundedGeo> larg4::ISTPC::fActiveVolumes
private

Definition at line 29 of file ISTPC.h.

Referenced by isScintInActiveVolume(), and ISTPC().


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