Class SCBoundary¶
- Defined in File SCBoundary.h
Class Documentation¶
-
class
SCBoundary
¶ Calculate Distances to Space Charge Boundary.
Ions accumulating in the TPC volume create distortions in the electric field. This causes distortions in the reconstructed location of charge. For tracks entering the detector, instead of charge appearing at the edge of the TPC volume, space charge effects will make that track look as if it started some distance inside the TPC. Measurements of the space charge effect has allowed the experiment to define a “space charge boundary”. This is apparent boundary inside the detector where entering tracks appear to start. (Or where exiting tracks seem to stop.)
More info on the boundary implemented can be found at: https://microboone-docdb.fnal.gov/cgi-bin/private/ShowDocument?docid=26423
Public Types
Public Functions
-
SCBoundary
()¶
-
virtual
~SCBoundary
()¶
-
template<class
T
>
Tdist2boundary
(const std::vector<T> &pos, Boundary_t &btype) const¶ calculate distance to boundary
This function assumes the query point is inside the TPC. If a query point is given outside the TPC, the distance returned will be from the active volume TPC boundary.
The active TPC boundary is assumed to be:
- x: [0,256]
- y: [116,-115]
- z: [0.0,1037.0]
- Return
- distance in cm
- Parameters
pos
: 3D test position in cm (assumed inside the TPC)boundary_type
: Returns Boundary_t label indicated boundary the test point was closest to and for which the calculation is made.
-
float
dist2boundary
(float x, float y, float z) const¶ explicit float implementation of dist2boundary without boundary type return
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test point
-
double
dist2boundary
(double x, double y, double z) const¶ explicit double implementation of dist2boundary without boundary type return
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test point
-
float
dist2boundary
(float x, float y, float z, int &ibtype) const¶ explicit float implementation of dist2boundary with boundary type return
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test pointibtype
: boundary type as integer corresponding to Boundary_t
-
double
dist2boundary
(double x, double y, double z, int &ibtype) const¶ explicit double implementation of dist2boundary with boundary type return
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test pointibtype
: boundary type as integer corresponding to Boundary_t
-
template<class
T
>
TXatBoundary
(const std::vector<T> &pos) const¶ The x position if one pushes test point to space charge boundary.
Given a test point (x,y,z) what is the x-position if we pushed the point to the space charge boundary along the x-direction only. In otherwords, given the (y,z) coordinages, what is the x position on the space charge boundary?
This method will work as long as (y,z) are within bounds.
- y: [-115,116]
- z: [0,1036]
- Return
- x-position at space charge boundary in cm
- Parameters
pos
: 3D test point in cm
-
float
XatBoundary
(float x, float y, float z) const¶ explicit float implementation of XatBoundary
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test point
-
double
XatBoundary
(double x, double y, double z) const¶ explicit double implementation of XatBoundary
used for python bindings
- Return
- x-position in cm
- Parameters
x
: x-position in cm of test pointy
: y-position in cm of test pointz
: z-position in cm of test point
Protected Functions
-
template<class
T
>
TpointLineDistance
(const std::vector<T> &linept1, const std::vector<T> &linept2, const std::vector<T> &testpt) const¶ distance from line defined by two points
formula from: http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html
This will return the distance the line defined by two points.
- Return
- The distance from the line
- Parameters
linept1
: 3D position on one end of segmentlinept2
: 3D position on the other end of the segmentpt
: 3D position of test point
Protected Static Attributes
-
constexpr double
YX_TOP_y1_array
= 116¶ y-position defining start of top space charge boundary
-
double
YX_TOP_x1_array
= {150.00, 132.56, 122.86, 119.46, 114.22, 110.90, 115.85, 113.48, 126.36, 144.21}¶ x-position defining start of top space charge boundary for 10 subsections
-
double
YX_TOP_y2_array
= {110.00, 108.14, 106.77, 105.30, 103.40, 102.18, 101.76, 102.27, 102.75, 105.10}¶ y-position defining end of top space charge boundary for 10 subsections
-
constexpr double
YX_TOP_x2_array
= 256¶ x-position defining end of top space charge boundary
-
constexpr double
YX_BOT_y1_array
= -115¶ y-position defining start of bottom space charge boundary
-
double
YX_BOT_x1_array
= {115.71, 98.05, 92.42, 91.14, 92.25, 85.38, 78.19, 74.46, 78.86, 108.90}¶ x-position defining start of bottom space charge boundary for 10 z-subsections
-
double
YX_BOT_y2_array
= {-101.72, -99.46, -99.51, -100.43, -99.55, -98.56, -98.00, -98.30, -99.32, -104.20}¶ y-position defining start of bottom space charge boundary for 10 z-subsections
-
constexpr double
YX_BOT_x2_array
= 256¶ x-position defining end of bottom space charge boundary
-
constexpr double
ZX_Up_z1_array
= 0¶ ZX view has Y dependence: Y sub-range from -116 to 116cm per 24cm.
z-position defining start of upstream space charge boundary
-
constexpr double
ZX_Up_x1_array
= 120¶ x-position defining start of upstream space charge boundary
-
constexpr double
ZX_Up_z2_array
= 10¶ z-position defining end of upstream space charge boundary
-
constexpr double
ZX_Up_x2_array
= 256¶ x-position defining end of upstream space charge boundary
-
constexpr double
ZX_Dw_z1_array
= 1037¶ z-position defining start of downstream space charge boundary
-
double
ZX_Dw_x1_array
= {120.00, 115.24, 108.50, 110.67, 120.90, 126.43, 140.51, 157.15, 120.00, 120.00}¶ x-position defining start of downstream space charge boundary in 10 y-subsections
-
double
ZX_Dw_z2_array
= {1029.00, 1029.12, 1027.21, 1026.01, 1024.91, 1025.27, 1025.32, 1027.61, 1026.00, 1026.00}¶ z-position defining end of downstream space charge boundary in 10 y-subsections
-
constexpr double
ZX_Dw_x2_array
= 256¶ x-position defining end of downstream space charge boundary
-