LArSoft  v09_90_00
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 20 of file ISTPC.cxx.

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

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

References geo::BoxBoundedGeo::ExtendToInclude(), geo::GeometryCore::Iterate(), and geo::GeometryCore::Ncryostats().

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

46  {
47  std::vector<geo::BoxBoundedGeo> activeVolumes;
48  activeVolumes.reserve(geom.Ncryostats());
49 
50  for (geo::CryostatGeo const& cryo : geom.Iterate<geo::CryostatGeo>()) {
51 
52  // can't use it default-constructed since it would always include origin
53 
54  geo::BoxBoundedGeo box{cryo.TPC(0).ActiveBoundingBox()};
55 
56  for (geo::TPCGeo const& TPC : cryo.IterateTPCs())
57  box.ExtendToInclude(TPC.ActiveBoundingBox());
58 
59  activeVolumes.push_back(std::move(box));
60 
61  } // for cryostats
62 
63  return activeVolumes;
64  }
Geometry information for a single TPC.
Definition: TPCGeo.h:36
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
A base class aware of world box coordinatesAn object describing a simple shape can inherit from this ...
Definition: BoxBoundedGeo.h:33
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 36 of file ISTPC.cxx.

References fActiveVolumes.

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

37  {
38  for (auto const& box : fActiveVolumes) {
39  if (box.ContainsPosition(ScintPoint)) { return true; }
40  }
41  return false;
42  }
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: