#include <ProtoDUNEDPCRPGeo.h>
Definition at line 45 of file ProtoDUNEDPCRPGeo.h.
protoana::ProtoDUNEDPCRPGeo::ProtoDUNEDPCRPGeo |
( |
| ) |
|
protoana::ProtoDUNEDPCRPGeo::~ProtoDUNEDPCRPGeo |
( |
| ) |
|
Definition at line 32 of file ProtoDUNEDPCRPGeo.cxx.
34 const string myname =
"protoana::ProtoDUNEDPCRPGeo::GetCRPGeoInfo: ";
47 if( not tpc )
return crp_geo_info;
48 crp_geo_info.
crpid = tpc->ID().TPC;
51 int dcoord =
std::abs(tpc->DetectDriftDirection())-1;
66 cout<<myname<<
"Bad drift direction "<<dcoord<<
endl;
71 double xyz[3] = {pnt.X(), pnt.Y(), pnt.Z()};
72 crp_geo_info.
danode = tpc->PlaneLocation(0)[dcoord] - xyz[dcoord];
75 float planeX = xyz[ tcoord2 ] - tpc->PlaneLocation(0)[ tcoord2 ];
76 float planeY = xyz[ tcoord1 ] - tpc->PlaneLocation(0)[ tcoord1 ];
89 (activeHalfWidth -
std::abs(planeY)) );
90 if( crp_geo_info.
dedge < 0 || crp_geo_info.
dedge > activeHalfWidth ){
91 cout<<myname<<
"Bad distance to CRP edge "<<crp_geo_info.
dedge<<
endl;
97 int icol =
int(planeX / fLemWidth);
98 if( planeX < 0 ) icol += (LemsHalfRow - 1);
99 else icol += (LemsHalfRow);
101 int irow =
int(planeY / fLemWidth);
102 if( planeY < 0 ) irow += (LemsHalfRow - 1);
103 else irow += (LemsHalfRow);
108 cout<<myname<<
"Bad LEM index "<<crp_geo_info.
lemid<<
endl;
113 float lemX = (icol + 0.5) * fLemWidth - activeHalfWidth;
114 float lemY = (irow + 0.5) * fLemWidth - activeHalfWidth;
117 float inlemX = planeX - lemX;
118 float inlemY = planeY - lemY;
120 (0.5 * fLemWidth -
std::abs(inlemY)) );
126 if( crp_geo_info.
dlem < 0 || crp_geo_info.
dlem > 0.5*fLemWidth ){
127 cout<<myname<<
"Bad distance to LEM border "<<crp_geo_info.
dlem<<
endl;
131 crp_geo_info.
valid =
true;
Geometry information for a single TPC.
geo::TPCGeo const * PositionToTPCptr(geo::Point_t const &point) const
Returns the TPC at specified location.
geo::Geometry const * fGeom
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
int protoana::ProtoDUNEDPCRPGeo::GetLemsPerCRP |
( |
| ) |
const |
|
inline |
int protoana::ProtoDUNEDPCRPGeo::fLemsPerRow |
|
private |
float protoana::ProtoDUNEDPCRPGeo::fLemWidth |
|
private |
The documentation for this class was generated from the following files: