76 const double pi = acos(-1.0);
77 const double piOver2 = 0.5*
pi;
93 if ( driftSize <
driftMin() )
continue;
94 if ( driftSize >=
driftMax() )
continue;
102 double planeWireAngle = gpla.
ThetaZ() - piOver2;
103 double dang = planeWireAngle -
wireAngle();
104 while ( dang < -piOver2 ) dang +=
pi;
105 while ( dang > piOver2 ) dang -=
pi;
118 const string myname =
"WireSelector::fillData: ";
119 const double piOver2 = 0.5*acos(-1.0);
127 double driftOffset = fabs(xThisPlane - xLastPlane);
132 TVector3 xyzWire = pgwir->
GetCenter<TVector3>();
133 xyzWire.RotateX(wireAngle);
135 if ( fabs(fabs(driftSign) - 1.0) > 0.001 ) {
136 cout << myname <<
"ERROR: Plane normal is not along x." <<
endl;
140 m_data.emplace_back(xyzWire.x(), xyzWire.y(), xyzWire.z(),
173 ws.
xWire.resize(nwir);
175 ws.
zWire.resize(nwir);
176 for (
Index iwir=0; iwir<nwir; ++iwir ) {
geo::WirePtr WirePtr(unsigned int iwire) const
Returns the wire number iwire from this plane.
double wireAngleTolerance() const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
std::vector< float > xWire
double Length() const
Returns the wire length in centimeters.
const PlaneIDVector & planeIDs() const
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
const WireInfoVector & data() const
Vector GetNormalDirection() const
Returns the direction normal to the plane.
const GeometryCore * geometry() const
readout::TPCsetID TPCtoTPCset(geo::TPCID const &tpcid) const
Returns the ID of the TPC set tpcid belongs to.
art framework interface to geometry description
std::vector< Index > IndexVector
double ThetaZ() const
Angle of the wires from positive z axis; .
void selectView(View view)
void selectWireAngle(double wireAngle, double tol=0.001)
View_t View() const
Which coordinate does this plane measure.
void selectTpcSets(const IndexVector &itpss)
const WireGeo & MiddleWire() const
Return the middle wire in the plane.
std::vector< WireInfo > WireInfoVector
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
void selectDrift(double dmin, double dmax=1.e20)
std::vector< float > zWire
The data type to uniquely identify a TPC.
Description of geometry of one entire detector.
const GeometryCore * m_pgeo
TPCsetID_t TPCset
Index of the TPC set within its cryostat.
void selectTpcSet(Index itps)
const WireSummary & fillWireSummary()
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
double m_wireAngleTolerance
double DriftDistance() const
const WireInfoVector & fillData()
std::vector< float > xCathode
std::multimap< Index, const WireInfo * > WireInfoMap
geo::PlaneGeo const & LastPlane() const
Returns the last wire plane (the farther from TPC center).
unsigned int Nwires() const
Number of wires in this plane.
WireSelector(Index icry=0)
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
const WireInfoMap & fillDataMap()
const IndexVector & cryostats() const
double WirePitch() const
Return the wire pitch (in centimeters). It is assumed constant.
QTextStream & endl(QTextStream &s)
The data type to uniquely identify a cryostat.
void selectCryostats(const IndexVector &a_icrys)
WireSummary m_wireSummary