#include <TPCGeoAlg.h>
|
| TPCGeoAlg () |
|
| ~TPCGeoAlg () |
|
double | MinX () const |
|
double | MinY () const |
|
double | MinZ () const |
|
double | MaxX () const |
|
double | MaxY () const |
|
double | MaxZ () const |
|
double | CpaWidth () const |
|
bool | InFiducial (geo::Point_t point, double fiducial) |
|
bool | InFiducial (geo::Point_t point, double fiducial, double fiducialTop) |
|
bool | InFiducial (geo::Point_t point, double minXCut, double minYCut, double minZCut, double maxXCut, double maxYCut, double maxZCut) |
|
bool | InsideTPC (geo::Point_t point, const geo::TPCGeo &tpc, double buffer=0.) |
|
int | DetectedInTPC (std::vector< art::Ptr< recob::Hit >> hits) |
|
int | DriftDirectionFromHits (std::vector< art::Ptr< recob::Hit >> hits) |
|
std::pair< double, double > | XLimitsFromHits (std::vector< art::Ptr< recob::Hit >> hits) |
|
double | MinDistToWall (geo::Point_t point) const |
|
bool | InVolume (const simb::MCParticle &particle) |
|
bool | IsContained (const simb::MCParticle &particle) |
|
bool | EntersVolume (const simb::MCParticle &particle) |
|
bool | CrossesVolume (const simb::MCParticle &particle) |
|
bool | CrossesApa (const simb::MCParticle &particle) |
|
std::pair< TVector3, TVector3 > | CrossingPoints (const simb::MCParticle &particle) |
|
double | TpcLength (const simb::MCParticle &particle) |
|
sbn::TPCGeoAlg::TPCGeoAlg |
( |
| ) |
|
Definition at line 7 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
22 for (
size_t tpc_i = 0; tpc_i < cryostat.
NTPC(); tpc_i++)
double MinX() const
Returns the world x coordinate of the start of the box.
Geometry information for a single TPC.
double MaxX() const
Returns the world x coordinate of the end of the box.
Geometry information for a single cryostat.
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
double MinZ() const
Returns the world z coordinate of the start of the box.
unsigned int NTPC() const
Number of TPCs in this cryostat.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
double MaxY() const
Returns the world y coordinate of the end of the box.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
double MaxZ() const
Returns the world z coordinate of the end of the box.
double MinY() const
Returns the world y coordinate of the start of the box.
geo::GeometryCore const * fGeometryService
sbn::TPCGeoAlg::~TPCGeoAlg |
( |
| ) |
|
double sbn::TPCGeoAlg::CpaWidth |
( |
| ) |
const |
bool sbn::TPCGeoAlg::CrossesApa |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 237 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
238 for(
size_t i = 0; i < particle.NumberTrajectoryPoints()-1; i++){
239 double x = particle.Vx(i);
240 double y = particle.Vy(i);
241 double z = particle.Vz(i);
242 double x1 = particle.Vx(i+1);
243 double y1 = particle.Vy(i+1);
244 double z1 = particle.Vz(i+1);
247 if(x <= fMinX && x1 >=
fMinX)
return true;
249 if(x <= fMaxX && x1 >=
fMaxX)
return true;
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
bool sbn::TPCGeoAlg::CrossesVolume |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 217 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
219 bool startOutside =
false;
220 bool endOutside =
false;
221 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
222 double x = particle.Vx(i);
223 double y = particle.Vy(i);
224 double z = particle.Vz(i);
228 else if(i == 0) startOutside =
true;
229 else if(i == particle.NumberTrajectoryPoints()-1) endOutside =
true;
231 if(startOutside && enters && endOutside)
return true;
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
std::pair< TVector3, TVector3 > sbn::TPCGeoAlg::CrossingPoints |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 256 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
258 TVector3 start (-99999, -99999, -99999);
259 TVector3
end (-99999, -99999, -99999);
260 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
261 double x = particle.Vx(i);
262 double y = particle.Vy(i);
263 double z = particle.Vz(i);
267 start.SetXYZ(x, y, z);
272 return std::make_pair(start,
end);
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
auto end(FixedBins< T, C > const &) noexcept
int sbn::TPCGeoAlg::DetectedInTPC |
( |
std::vector< art::Ptr< recob::Hit >> |
hits | ) |
|
Definition at line 101 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
103 if(hits.size() == 0)
return -1;
104 int tpc = hits[0]->WireID().TPC;
105 for(
size_t i = 0; i < hits.size(); i++){
106 if((
int)hits[i]->WireID().TPC != tpc)
return -1;
int sbn::TPCGeoAlg::DriftDirectionFromHits |
( |
std::vector< art::Ptr< recob::Hit >> |
hits | ) |
|
Definition at line 112 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
114 if(hits.size() == 0)
return 0;
120 geo::TPCID tpcID = hits[0]->WireID().asTPCID();
123 if(
std::abs(driftDirection) != 1) driftDirection = 0;
124 return driftDirection;
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
Geometry information for a single TPC.
int DetectedInTPC(std::vector< art::Ptr< recob::Hit >> hits)
The data type to uniquely identify a TPC.
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
geo::GeometryCore const * fGeometryService
bool sbn::TPCGeoAlg::EntersVolume |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 197 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
199 bool startOutside =
false;
200 bool endOutside =
false;
201 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
202 double x = particle.Vx(i);
203 double y = particle.Vy(i);
204 double z = particle.Vz(i);
208 else if(i == 0) startOutside =
true;
209 else if(i == particle.NumberTrajectoryPoints()-1) endOutside =
true;
211 if(enters && (startOutside || endOutside))
return true;
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
bool sbn::TPCGeoAlg::InFiducial |
( |
geo::Point_t |
point, |
|
|
double |
fiducial |
|
) |
| |
bool sbn::TPCGeoAlg::InFiducial |
( |
geo::Point_t |
point, |
|
|
double |
fiducial, |
|
|
double |
fiducialTop |
|
) |
| |
bool sbn::TPCGeoAlg::InFiducial |
( |
geo::Point_t |
point, |
|
|
double |
minXCut, |
|
|
double |
minYCut, |
|
|
double |
minZCut, |
|
|
double |
maxXCut, |
|
|
double |
maxYCut, |
|
|
double |
maxZCut |
|
) |
| |
Definition at line 81 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
85 double xmax =
fMaxX - maxXCut;
86 double ymin =
fMinY + minYCut;
87 double ymax =
fMaxY - maxYCut;
88 double zmin =
fMinZ + minZCut;
89 double zmax =
fMaxZ - maxZCut;
94 if(x>xmin && x<xmax && y>ymin && y<ymax && z>zmin && z<zmax)
return true;
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
process_name opflash particleana ie ie y
Definition at line 142 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
143 if(point.X() < (tpc.
MinX()-buffer) || point.X() > (tpc.
MaxX()+buffer)
144 || point.Y() < (tpc.
MinY()-buffer) || point.Y() > (tpc.
MaxY()+buffer)
145 || point.Z() < (tpc.
MinZ()-buffer) || point.Z() > (tpc.
MaxZ()+buffer))
return false;
double MinX() const
Returns the world x coordinate of the start of the box.
double MaxX() const
Returns the world x coordinate of the end of the box.
double MinZ() const
Returns the world z coordinate of the start of the box.
double MaxY() const
Returns the world y coordinate of the end of the box.
double MaxZ() const
Returns the world z coordinate of the end of the box.
double MinY() const
Returns the world y coordinate of the start of the box.
bool sbn::TPCGeoAlg::InVolume |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 169 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
170 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
171 double x = particle.Vx(i);
172 double y = particle.Vy(i);
173 double z = particle.Vz(i);
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
bool sbn::TPCGeoAlg::IsContained |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 183 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
184 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
185 double x = particle.Vx(i);
186 double y = particle.Vy(i);
187 double z = particle.Vz(i);
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
double sbn::TPCGeoAlg::MaxX |
( |
| ) |
const |
double sbn::TPCGeoAlg::MaxY |
( |
| ) |
const |
double sbn::TPCGeoAlg::MaxZ |
( |
| ) |
const |
double sbn::TPCGeoAlg::MinDistToWall |
( |
geo::Point_t |
point | ) |
const |
double sbn::TPCGeoAlg::MinX |
( |
| ) |
const |
double sbn::TPCGeoAlg::MinY |
( |
| ) |
const |
double sbn::TPCGeoAlg::MinZ |
( |
| ) |
const |
double sbn::TPCGeoAlg::TpcLength |
( |
const simb::MCParticle & |
particle | ) |
|
Definition at line 275 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
278 TVector3 point, disp;
279 for(
size_t i = 0; i < particle.NumberTrajectoryPoints(); i++){
280 double x = particle.Vx(i);
281 double y = particle.Vy(i);
282 double z = particle.Vz(i);
284 point.SetXYZ(x, y, z);
287 length += disp.Mag();
process_name opflash particleana ie ie ie z
process_name opflash particleana ie x
process_name opflash particleana ie ie y
std::pair< double, double > sbn::TPCGeoAlg::XLimitsFromHits |
( |
std::vector< art::Ptr< recob::Hit >> |
hits | ) |
|
Definition at line 128 of file sbncode/sbncode/GeometryTools/TPCGeoAlg.cc.
130 if(hits.size() == 0)
return std::make_pair(0, 0);
136 geo::TPCID tpcID = hits[0]->WireID().asTPCID();
138 return std::make_pair(tpcGeo.
MinX(), tpcGeo.
MaxX());
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
double MinX() const
Returns the world x coordinate of the start of the box.
Geometry information for a single TPC.
double MaxX() const
Returns the world x coordinate of the end of the box.
int DetectedInTPC(std::vector< art::Ptr< recob::Hit >> hits)
The data type to uniquely identify a TPC.
geo::GeometryCore const * fGeometryService
double sbn::TPCGeoAlg::fCpaWidth |
|
private |
double sbn::TPCGeoAlg::fMaxX |
|
private |
double sbn::TPCGeoAlg::fMaxY |
|
private |
double sbn::TPCGeoAlg::fMaxZ |
|
private |
double sbn::TPCGeoAlg::fMinX |
|
private |
double sbn::TPCGeoAlg::fMinY |
|
private |
double sbn::TPCGeoAlg::fMinZ |
|
private |
The documentation for this class was generated from the following files: