140 const string myname =
"util::CrpGainService::viewCharge: ";
142 double q = psc->
Charge(itck);
143 if(q <= 1.0
E-3)
return 0;
166 unsigned widother = 0;
167 if(wid.
Plane == 0 ) widother = 1;
175 if( drift == 0 ) tcoord = 1;
176 else if( drift == 1 ) tcoord = 0;
185 cout<<myname<<
"chan "<<psc->
Channel()
186 <<
" plane "<<wid.
Plane 188 <<
" view "<<pthis.
View()
189 <<
" viewother "<<pother.
View()
190 <<
" tcoord "<<tcoord<<
endl;
193 if( tcoord < 0 || (tcoord == 2 && pother.
View() !=
geo::kZ) )
195 cout<<myname<<
"WARNING cannot figure out the coordinate system\n";
205 cout<<myname<<
"WARNING could not get IDEs for tick "<<itck<<
endl;
209 unsigned tpcid = wid.
TPC;
218 if( wother < 0 || wother >= (
int)pother.
Nwires() )
220 cout<<myname<<
"WARNING the wire number appeares to be incorrect "<<wother<<
"\n";
235 qsum += (0.5 *
G) * ide.numElectrons;
double getCrpGain(unsigned crp, int chx, int chy) const
Planes which measure X direction.
Geometry information for a single TPC.
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
Planes which measure Z direction.
WireID_t Wire
Index of the wire within its plane.
Planes which measure Y direction.
View_t View() const
Which coordinate does this plane measure.
double Charge(TDC_t tdc) const
Returns the total number of ionization electrons on this channel in the specified TDC...
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
PlaneID_t Plane
Index of the plane within its TPC.
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
const geo::Geometry * m_geo
short int DetectDriftDirection() const
Returns the expected drift direction based on geometry.
std::vector< sim::IDE > TrackIDsAndEnergies(TDC_t startTDC, TDC_t endTDC) const
Return all the recorded energy deposition within a time interval.
unsigned int Nwires() const
Number of wires in this plane.
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
double WireCoordinate(Point const &point) const
Returns the coordinate of the point on the plane, in wire units.
TPCID_t TPC
Index of the TPC within its cryostat.
QTextStream & endl(QTextStream &s)