16 std::ostream& operator<<(std::ostream& out, const std::vector<float>& vals) {
18 unsigned int nval = 0;
19 for (
float val : vals ) {
21 if ( ++nval < vals.size() ) out <<
", ";
34 fFirstCollectionChannel(9999999) {
65 fChargeWork.resize(
m_ntick, 0.0);
66 if ( psc ==
nullptr )
return 0;
68 string fname =
"Dune35tSimChannelExtractService::extract";
70 unsigned int chan = psc->
Channel();
72 fChargeWorkCollInd.clear();
73 fChargeWorkCollInd.resize(fChargeWork.size(), 0.);
74 for (
size_t t=0;
t<fChargeWork.size(); ++
t ) {
76 for (
auto const &ide : ides ) {
80 fChargeWork[
t] += ide.numElectrons;
98 throw cet::exception(fname) <<
"ILLEGAL VIEW Type: " << view <<
"\n";
118 throw cet::exception(fname) <<
"ILLEGAL VIEW Type: " << view <<
"\n";
138 throw cet::exception(fname) <<
"ILLEGAL VIEW Type: " << view <<
"\n";
158 throw cet::exception(fname) <<
"ILLEGAL VIEW Type: " << view <<
"\n";
170 for (
unsigned int itck=0; itck<
m_ntick; ++itck ) {
171 fChargeWork[itck] += fChargeWorkCollInd[itck];
179 out << prefix <<
"Dune35tSimChannelExtractService";
213 <<
"FFT size is not a power of 2.";
217 for ( uint32_t ichan=0; ichan<geo->
Nchannels(); ++ichan ) {
236 double xyzbeg[3],xyzend[3];
247 lastwire = geo->
Nwires(0,0,0)-1;
256 lastwire = geo->
Nwires(1,0,0)-1;
280 lastwire = geo->
Nwires(0,2,0)-1;
289 lastwire = geo->
Nwires(1,2,0)-1;
307 lastwire = geo->
Nwires(0,4,0)-1;
316 lastwire = geo->
Nwires(1,4,0)-1;
332 lastwire = geo->
Nwires(0,6,0)-1;
341 lastwire = geo->
Nwires(1,6,0)-1;
423 if ( y < ycomb12 && y >
ycomb7 && x > 0 && z < zcomb9 && z >
zcomb4 )
return 1;
Energy deposited on a readout channel by simulated tracks.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Planes which measure Z direction.
unsigned int Nwires(unsigned int p, unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wires in the specified plane.
art framework interface to geometry description
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
T get(std::string const &key) const
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
raw::ChannelID_t Channel() const
Returns the readout channel this object describes.
void Convolute(detinfo::DetectorClocksData const &clockData, Channel channel, std::vector< T > &func) const
Contains all timing reference information for the detector.
std::vector< sim::IDE > TrackIDsAndEnergies(TDC_t startTDC, TDC_t endTDC) const
Return all the recorded energy deposition within a time interval.
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
std::vector< AdcSignal > AdcSignalVector
LArSoft geometry interface.
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
#define DEFINE_ART_SERVICE_INTERFACE_IMPL(svc, iface)