All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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::BoxBoundedGeo
extractActiveLArVolume (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 23 of file ISTPC.cxx.

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

Member Function Documentation

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

Definition at line 51 of file ISTPC.cxx.

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

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

Member Data Documentation

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

Definition at line 31 of file ISTPC.h.


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