Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
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 15 of file ISTPC.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file ISTPC.cxx.

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

Member Function Documentation

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

Definition at line 49 of file ISTPC.cxx.

50 {
51  std::vector<geo::BoxBoundedGeo> activeVolumes;
52  activeVolumes.reserve(geom.Ncryostats());
53 
54  for (geo::CryostatGeo const& cryo : geom.IterateCryostats()) {
55 
56  // can't use it default-constructed since it would always include origin
57 
58  geo::BoxBoundedGeo box{cryo.TPC(0).ActiveBoundingBox()};
59 
60  for (geo::TPCGeo const& TPC : cryo.IterateTPCs())
61  box.ExtendToInclude(TPC.ActiveBoundingBox());
62 
63  activeVolumes.push_back(std::move(box));
64 
65  } // for cryostats
66 
67  return activeVolumes;
68 }
Geometry information for a single TPC.
Definition: TPCGeo.h:38
Geometry information for a single cryostat.
Definition: CryostatGeo.h:43
def move(depos, offset)
Definition: depos.py:107
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 41 of file ISTPC.cxx.

42  {
43  return fActiveVolumes[0].ContainsPosition(ScintPoint);
44  }
std::vector< geo::BoxBoundedGeo > fActiveVolumes
Definition: ISTPC.h:24

Member Data Documentation

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

Definition at line 24 of file ISTPC.h.


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