17 #include "cetlib_except/exception.h" 86 throw cet::exception(
"SpacePointAlg") <<
"Filter and Merge flags are both true.\n";
91 <<
"SpacePointAlg configured with the following parameters:\n" 92 <<
" MaxDT = " <<
fMaxDT <<
"\n" 93 <<
" MaxS = " << fMaxS <<
"\n" 94 <<
" MinViews = " << fMinViews <<
"\n" 95 <<
" EnableU = " << fEnableU <<
"\n" 96 <<
" EnableV = " << fEnableV <<
"\n" 97 <<
" EnableW = " << fEnableW <<
"\n" 98 <<
" Filter = " << fFilter <<
"\n" 109 static bool first =
true;
121 mf::LogInfo(
"SpacePointAlg") <<
"Updating geometry constants.\n";
124 for(
unsigned int cstat = 0; cstat < geom->
Ncryostats(); ++cstat){
130 for(
unsigned int tpc = 0; tpc < ntpc; ++tpc) {
135 unsigned int const nplane = tpcgeom.
Nplanes();
137 for(
unsigned int plane = 0; plane < nplane; ++plane) {
144 std::string viewname =
"?";
158 std::string sigtypename =
"?";
161 sigtypename =
"Induction";
163 sigtypename =
"Collection";
168 std::string orientname =
"?";
171 orientname =
"Vertical";
173 orientname =
"Horizontal";
180 mf::LogInfo(
"SpacePointAlg") <<
"\nCryostat, TPC, Plane: " 184 <<
" View: " << viewname <<
"\n" 185 <<
" SignalType: " << sigtypename <<
"\n" 186 <<
" Orientation: " << orientname <<
"\n" 187 <<
" Plane location: " << xyz[0] <<
"\n" 192 <<
" Wire pitch: " << tpcgeom.
WirePitch() <<
"\n" 199 <<
"Horizontal wire geometry not implemented.\n";
238 if(hits.
size() > 3) {
239 mf::LogError(
"SpacePointAlg") <<
"Method separation called with more than three htis.";
247 double dist[3] = {0., 0., 0.};
248 double sinth[3] = {0., 0., 0.};
249 double costh[3] = {0., 0., 0.};
250 unsigned int cstats[3];
251 unsigned int tpcs[3];
252 unsigned int planes[3];
254 for(
int i=0; i<3; ++i) {
266 for(
int j=0; j<i; ++j) {
269 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from multiple cryostats..";
274 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from multiple tpcs..";
279 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from the same plane..";
286 double hl = wgeom.
HalfL();
291 double s = (xyz1[1] - xyz[1]) / hl;
292 double c = (xyz1[2] - xyz[2]) / hl;
295 dist[hit.
WireID().
Plane] = xyz[2] * s - xyz[1] * c;
298 double S = ((sinth[1] * costh[2] - costh[1] * sinth[2]) * dist[0]
299 +(sinth[2] * costh[0] - costh[2] * sinth[0]) * dist[1]
300 +(sinth[0] * costh[1] - costh[0] * sinth[1]) * dist[2]);
316 int nhits = hits.
size();
320 bool result = nhits >= 2 && nhits <= 3;
322 unsigned int tpc = 0;
323 unsigned int cstat = 0;
330 for(
int ihit1 = 0; result && ihit1 < nhits-1; ++ihit1) {
342 const std::vector<int>& tid1 = mcinfo1.
trackIDs;
343 bool only_neg1 = tid1.size() > 0 && tid1.back() < 0;
347 for(
int ihit2 = ihit1+1; result && ihit2 < nhits; ++ihit2) {
354 result = result && hit1WireID.
TPC == hit2WireID.
TPC && view1 != view2 && hit1WireID.
Cryostat == hit2WireID.
Cryostat;
359 tpc = hit1WireID.
TPC;
366 result = result && std::abs(t1-t2) <=
fMaxDT;
370 if(result && useMC) {
375 std::vector<int> tid2 = mcinfo2.
trackIDs;
376 bool only_neg2 = tid2.size() > 0 && tid2.back() < 0;
378 std::set_intersection(tid1.begin(), tid1.end(),
379 tid2.begin(), tid2.end(),
381 tid2.resize(it - tid2.begin());
388 bool only_neg3 = tid2.size() > 0 && tid2.back() < 0;
389 mc_ok = tid2.size() > 0 && (!only_neg3 || (only_neg1 && only_neg2));
390 result = result && mc_ok;
396 result = mcinfo1.
pchit[hit2WireID.
Plane] == &hit2 ||
407 if(result && nhits == 3) {
411 double dist[3] = {0., 0., 0.};
412 double sinth[3] = {0., 0., 0.};
413 double costh[3] = {0., 0., 0.};
415 for(
int i=0; i<3; ++i) {
423 if ((hitWireID.
TPC != tpc) || (hitWireID.
Cryostat != cstat))
424 throw cet::exception(
"SpacePointAlg") <<
"compatible(): geometry mismatch\n";
428 double hl = wgeom.
HalfL();
433 double s = (xyz1[1] - xyz[1]) / hl;
434 double c = (xyz1[2] - xyz[2]) / hl;
437 dist[hit.
WireID().
Plane] = xyz[2] * s - xyz[1] * c;
442 double S = ((sinth[1] * costh[2] - costh[1] * sinth[2]) * dist[0]
443 +(sinth[2] * costh[0] - costh[2] * sinth[0]) * dist[1]
444 +(sinth[0] * costh[1] - costh[0] * sinth[1]) * dist[2]);
446 result = result && std::abs(S) <
fMaxS;
460 std::vector<recob::SpacePoint> &sptv,
470 int nhits = hits.
size();
475 throw cet::exception(
"SpacePointAlg") <<
"fillSpacePoint(): hit already present!\n";
480 double xyz[3] = {0., 0., 0.};
481 double errxyz[6] = {0.,
495 ihit != hits.
end(); ++ihit) {
505 double w = 1./(et*et);
512 double drift_time = 0.;
513 double var_time = 0.;
516 drift_time = sumtw / sumw;
518 var_time = 1. / sumw;
521 chisq = sumt2w - sumtw * drift_time;
525 xyz[0] = drift_time * timePitch;
526 errxyz[0] = var_time * timePitch * timePitch;
544 ihit != hits.
end(); ++ihit) {
552 double hl = wgeom.
HalfL();
557 double s = (cen1[1] - cen[1]) / hl;
558 double c = (cen1[2] - cen[2]) / hl;
559 double u = cen[2] * s - cen[1] * c;
561 double w = 1. / (eu * eu);
575 double denom = sc2 * ss2 - ssc * ssc;
577 xyz[1] = (-suc * ss2 + sus * ssc) / denom;
578 xyz[2] = (sus * sc2 - suc * ssc) / denom;
579 errxyz[2] = ss2 / denom;
580 errxyz[4] = ssc / denom;
581 errxyz[5] = sc2 / denom;
611 std::multimap<double, KHitTrack>
const& trackMap)
const 618 it != trackMap.end(); ++it) {
623 const std::shared_ptr<const KHitBase>&
hit = track.
getHit();
638 if(compatible_hits.
size() >= 2) {
640 compatible_hits.
clear();
651 compatible_hits =
hits;
657 if(compatible_hits.
size() >= 2) {
670 std::vector<recob::SpacePoint>& sptv,
684 unsigned int tpc0 = 0;
685 unsigned int cstat0 = 0;
686 int nhits = hits.
size();
688 tpc0 = hits.
front()->WireID().TPC;
689 cstat0=hits.
front()->WireID().Cryostat;
695 throw cet::exception(
"SpacePointAlg") <<
"fillComplexSpacePoint(): hit already present!\n";
702 std::vector<int> numhits(nplanes, 0);
703 std::vector<double>
weight(nplanes, 0.);
706 ihit != hits.
end(); ++ihit) {
718 assert(hitWireID.
Cryostat == cstat0);
719 assert(hitWireID.
TPC == tpc0);
720 assert(hitWireID.
Plane < nplanes);
721 ++numhits[hitWireID.
Plane];
724 for(
unsigned int plane = 0; plane < nplanes; ++plane) {
725 double np = numhits[plane];
727 weight[plane] = 1. / (np*np*np);
732 double xyz[3] = {0., 0., 0.};
733 double errxyz[6] = {0.,
746 ihit != hits.
end(); ++ihit) {
756 double w = weight[hitWireID.
Plane]/(et*et);
763 double drift_time = 0.;
764 double var_time = 0.;
767 drift_time = sumtw / sumw;
768 var_time = sumt2w / sumw - drift_time * drift_time;
771 chisq = sumt2w - sumtw * drift_time;
775 xyz[0] = drift_time * timePitch;
776 errxyz[0] = var_time * timePitch * timePitch;
794 ihit != hits.
end(); ++ihit) {
802 double hl = wgeom.
HalfL();
807 double s = (cen1[1] - cen[1]) / hl;
808 double c = (cen1[2] - cen[2]) / hl;
809 double u = cen[2] * s - cen[1] * c;
811 double w = weight[hitWireID.
Plane] / (eu * eu);
825 double denom = sc2 * ss2 - ssc * ssc;
827 xyz[1] = (-suc * ss2 + sus * ssc) / denom;
828 xyz[2] = (sus * sc2 - suc * ssc) / denom;
829 errxyz[2] = ss2 / denom;
830 errxyz[4] = ssc / denom;
831 errxyz[5] = sc2 / denom;
847 std::vector<recob::SpacePoint>& spts)
const 857 std::vector<recob::SpacePoint>& spts)
const 867 std::vector<recob::SpacePoint>& spts,
885 spts.erase(spts.begin(), spts.end());
898 std::vector< std::vector<std::vector<std::multimap<unsigned int, art::Ptr<recob::Hit> > > > > hitmap;
902 hitmap.resize(ncstat);
903 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
905 hitmap[cstat].resize(ntpc);
906 for(
unsigned int tpc = 0; tpc < ntpc; ++tpc) {
908 hitmap[cstat][tpc].resize(nplane);
919 hitmap[phitWireID.
Cryostat][phitWireID.
TPC][phitWireID.
Plane].insert(std::make_pair(phitWireID.
Wire, phit));
931 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
932 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
934 for(
int plane = 0; plane < nplane; ++plane) {
936 ihit != hitmap[cstat][tpc][plane].end(); ++ihit) {
943 mcinfo.
pchit.resize(nplane, 0);
944 mcinfo.
dist2.resize(nplane, 1.e20);
952 mcinfo.
trackIDs.reserve(ides.size());
954 i != ides.end(); ++i)
955 mcinfo.
trackIDs.push_back(i->trackID);
972 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
973 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
975 for(
int plane = 0; plane < nplane; ++plane) {
977 ihit != hitmap[cstat][tpc][plane].end(); ++ihit) {
981 if(mcinfo.
xyz.size() != 0) {
982 assert(mcinfo.
xyz.size() == 3);
986 for(
int plane2 = 0; plane2 < nplane; ++plane2) {
988 jhit != hitmap[cstat][tpc][plane2].end(); ++jhit) {
994 if(mcinfo2.
xyz.size() != 0) {
995 assert(mcinfo2.
xyz.size() == 3);
996 double dx = mcinfo.
xyz[0] - mcinfo2.
xyz[0];
997 double dy = mcinfo.
xyz[1] - mcinfo2.
xyz[1];
998 double dz = mcinfo.
xyz[2] - mcinfo2.
xyz[2];
999 double dist2 = dx*dx + dy*dy + dz*dz;
1000 if(dist2 < mcinfo.
dist2[plane2]) {
1001 mcinfo.
dist2[plane2] = dist2;
1002 mcinfo.
pchit[plane2] = &hit2;
1018 debug <<
"Total hits = " << hits.
size() <<
"\n\n";
1020 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
1021 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
1022 int nplane = hitmap[cstat][tpc].size();
1023 for(
int plane = 0; plane < nplane; ++plane) {
1024 debug <<
"TPC, Plane: " << tpc <<
", " << plane
1025 <<
", hits = " << hitmap[cstat][tpc][plane].size() <<
"\n";
1037 std::multimap<sptkey_type, recob::SpacePoint> sptmap;
1038 std::set<sptkey_type> sptkeys;
1041 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
1042 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
1057 int nplane = hitmap[cstat][tpc].size();
1058 std::vector<int> index(nplane);
1060 for(
int i=0; i<nplane; ++i)
1063 for(
int i=0; i<nplane-1; ++i) {
1065 for(
int j=i+1; j<nplane; ++j) {
1070 if((hitmap[cstat][tpc][index[i]].size() > hitmap[cstat][tpc][index[j]].size() &&
1072 int temp = index[i];
1073 index[i] = index[j];
1082 std::vector<std::multimap<unsigned int, art::Ptr<recob::Hit>>>& hitsByPlaneVec = hitmap[cstat][tpc];
1083 int nViewsWithHits(0);
1085 for(
int i = 0; i < nplane; i++)
1087 if (hitsByPlaneVec[index[i]].size() > 0) nViewsWithHits++;
1093 if((nViewsWithHits == 2 || nplane == 2) &&
fMinViews <= 2) {
1096 for(
int i=0; i<nplane-1; ++i) {
1097 unsigned int plane1 = index[i];
1099 if (hitmap[cstat][tpc][plane1].empty())
continue;
1101 for(
int j=i+1; j<nplane; ++j) {
1102 unsigned int plane2 = index[j];
1104 if (hitmap[cstat][tpc][plane2].empty())
continue;
1108 double hl2 = wgeo2.
HalfL();
1113 double s2 = (xyz22[1] - xyz21[1]) / (2.*hl2);
1114 double c2 = (xyz22[2] - xyz21[2]) / (2.*hl2);
1115 double dist2 = -xyz21[1] * c2 + xyz21[2] * s2;
1116 double pitch2 = geom->
WirePitch(plane2, tpc, cstat);
1118 if(!
fPreferColl && hitmap[cstat][tpc][plane1].size() > hitmap[cstat][tpc][plane2].size())
1119 throw cet::exception(
"SpacePointAlg") <<
"makeSpacePoints(): hitmaps with incompatible size\n";
1128 ihit1 = hitmap[cstat][tpc][plane1].
begin();
1129 ihit1 != hitmap[cstat][tpc][plane1].end(); ++ihit1) {
1137 assert(phit1WireID.
Cryostat == cstat);
1138 assert(phit1WireID.
TPC == tpc);
1139 assert(phit1WireID.
Plane == plane1);
1140 double hl1 = wgeo.
HalfL();
1148 double wire21 = (-xyz1[1] * c2 + xyz1[2] * s2 - dist2) / pitch2;
1149 double wire22 = (-xyz2[1] * c2 + xyz2[2] * s2 - dist2) / pitch2;
1155 ihit2 = hitmap[cstat][tpc][plane2].lower_bound(wmin),
1156 ihit2end = hitmap[cstat][tpc][plane2].upper_bound(wmax);
1158 for(; ihit2 != ihit2end; ++ihit2) {
1183 std::vector<recob::SpacePoint> sptv;
1185 sptkey_type key = &*phit2;
1186 sptmap.insert(std::pair<sptkey_type, recob::SpacePoint>(key, sptv.back()));
1187 sptkeys.insert(key);
1205 unsigned int plane1 = index[0];
1206 unsigned int plane2 = index[1];
1207 unsigned int plane3 = index[2];
1212 double hl1 = wgeo1.
HalfL();
1217 double s1 = (xyz12[1] - xyz11[1]) / (2.*hl1);
1218 double c1 = (xyz12[2] - xyz11[2]) / (2.*hl1);
1219 double dist1 = -xyz11[1] * c1 + xyz11[2] * s1;
1220 double pitch1 = geom->
WirePitch(plane1, tpc, cstat);
1221 const double TicksOffset1 = detprop->
GetXTicksOffset(plane1,tpc,cstat);
1226 double hl2 = wgeo2.
HalfL();
1231 double s2 = (xyz22[1] - xyz21[1]) / (2.*hl2);
1232 double c2 = (xyz22[2] - xyz21[2]) / (2.*hl2);
1233 double dist2 = -xyz21[1] * c2 + xyz21[2] * s2;
1234 double pitch2 = geom->
WirePitch(plane2, tpc, cstat);
1235 const double TicksOffset2 = detprop->
GetXTicksOffset(plane2,tpc,cstat);
1240 double hl3 = wgeo3.
HalfL();
1245 double s3 = (xyz32[1] - xyz31[1]) / (2.*hl3);
1246 double c3 = (xyz32[2] - xyz31[2]) / (2.*hl3);
1247 double dist3 = -xyz31[1] * c3 + xyz31[2] * s3;
1248 double pitch3 = geom->
WirePitch(plane3, tpc, cstat);
1249 const double TicksOffset3 = detprop->
GetXTicksOffset(plane3,tpc,cstat);
1253 double s12 = s1 * c2 - s2 *
c1;
1254 double s23 = s2 * c3 - s3 *
c2;
1255 double s31 = s3 * c1 - s1 * c3;
1260 ihit1 = hitmap[cstat][tpc][plane1].begin(),
1261 ihit1end = hitmap[cstat][tpc][plane1].end();
1262 for(; ihit1 != ihit1end; ++ihit1) {
1264 unsigned int wire1 = ihit1->first;
1271 assert(phit1WireID.
Cryostat == cstat);
1272 assert(phit1WireID.
TPC == tpc);
1273 assert(phit1WireID.
Plane == plane1);
1274 assert(phit1WireID.
Wire == wire1);
1275 double hl1 = wgeo.
HalfL();
1283 double t1 = phit1->
PeakTime() - TicksOffset1;
1284 double u1 = wire1 * pitch1 + dist1;
1288 double wire21 = (-xyz1[1] * c2 + xyz1[2] * s2 - dist2) / pitch2;
1289 double wire22 = (-xyz2[1] * c2 + xyz2[2] * s2 - dist2) / pitch2;
1295 ihit2 = hitmap[cstat][tpc][plane2].lower_bound(wmin),
1296 ihit2end = hitmap[cstat][tpc][plane2].upper_bound(wmax);
1298 for(; ihit2 != ihit2end; ++ihit2) {
1300 int wire2 = ihit2->first;
1305 double t2 = phit2->
PeakTime() - TicksOffset2;
1309 bool dt12ok = std::abs(t1-t2) <=
fMaxDT;
1323 double u2 = wire2 * pitch2 + dist2;
1327 double u3pred = (-u1*s23 - u2*s31) / s12;
1328 double w3pred = (u3pred - dist3) / pitch3;
1329 double w3delta = std::abs(
fMaxS / (s12 * pitch3));
1330 int w3min =
std::max(0., std::ceil(w3pred - w3delta));
1331 int w3max =
std::max(0., std::floor(w3pred + w3delta));
1334 ihit3 = hitmap[cstat][tpc][plane3].lower_bound(w3min),
1335 ihit3end = hitmap[cstat][tpc][plane3].upper_bound(w3max);
1337 for(; ihit3 != ihit3end; ++ihit3) {
1339 int wire3 = ihit3->first;
1344 double t3 = phit3->
PeakTime() - TicksOffset3;
1348 bool dt123ok = std::abs(t1-t3) <=
fMaxDT && std::abs(t2-t3) <=
fMaxDT;
1353 double u3 = wire3 * pitch3 + dist3;
1354 double S = s23 * u1 + s31 * u2 + s12 * u3;
1355 bool sok = std::abs(S) <=
fMaxS;
1378 std::vector<recob::SpacePoint> sptv;
1380 sptkey_type key = &*phit3;
1381 sptmap.insert(std::pair<sptkey_type, recob::SpacePoint>(key, sptv.back()));
1382 sptkeys.insert(key);
1399 spts.reserve(spts.size() + sptkeys.size());
1405 i != sptkeys.end(); ++i) {
1406 sptkey_type key = *i;
1411 double best_chisq = 0.;
1415 j != sptmap.upper_bound(key); ++j) {
1417 if(best_spt == 0 || spt.
Chisq() < best_chisq) {
1419 best_chisq = spt.
Chisq();
1426 throw cet::exception(
"SpacePointAlg") <<
"makeSpacePoints(): no best point\n";
1427 spts.push_back(*best_spt);
1441 spts.reserve(spts.size() + sptkeys.size());
1447 i != sptkeys.end(); ++i) {
1448 sptkey_type key = *i;
1455 jSPT = sptmap.lower_bound(key), jSPTend = sptmap.upper_bound(key);
1458 for(; jSPT != jSPTend; ++jSPT) {
1467 k != spt_hits.
end(); ++k) {
1475 std::sort(merged_hits.
begin(), merged_hits.
end());
1477 std::unique(merged_hits.
begin(), merged_hits.
end());
1478 merged_hits.
erase(it, merged_hits.
end());
1497 spts.reserve(spts.size() + sptkeys.size());
1502 j != sptmap.end(); ++j) {
1504 spts.push_back(spt);
1516 debug <<
"\n2-hit space points = " << n2 <<
"\n" 1517 <<
"3-hit space points = " << n3 <<
"\n" 1518 <<
"2-hit filtered/merged space points = " << n2filt <<
"\n" 1519 <<
"3-hit filtered/merged space points = " << n3filt;
1536 throw cet::exception(
"SpacePointAlg") <<
"No Hits associated with space point.\n";
1538 return (*it).second;
code to link reconstructed objects back to the MC truth information
double correctedTime(const recob::Hit &hit) const
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
void reserve(size_type n)
Basic Kalman filter track class, plus one measurement on same surface.
const std::shared_ptr< const KHitBase > & getHit() const
Measurement.
const std::vector< double > SimIDEsToXYZ(std::vector< sim::IDE > const &ides)
std::vector< const recob::Hit * > pchit
Pointer to nearest neighbor hit (indexed by plane).
std::map< const recob::Hit *, HitMCInfo > fHitMCMap
Encapsulate the construction of a single cyostat.
double fMaxDT
Maximum time difference between planes.
WireGeo const & Wire(unsigned int iwire) const
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
geo::WireID WireID() const
Initial tdc tick for hit.
enum geo::_plane_orient Orient_t
Enumerate the possible plane projections.
unsigned int Nplanes() const
Number of planes in this tpc.
Declaration of signal hit object.
Kalman filter wire-time measurement on a SurfWireX surface.
The data type to uniquely identify a Plane.
std::vector< double > dist2
Distance to nearest neighbor hit (indexed by plane).
Geometry information for a single TPC.
bool fEnableW
Enable flag (W).
iterator erase(iterator position)
std::vector< int > trackIDs
Parent trackIDs.
const art::Ptr< recob::Hit > & getHit() const
Get original hit.
CryostatID_t Cryostat
Index of cryostat.
Planes which measure Z direction.
geo::View_t View() const
View for the plane of the hit.
WireID_t Wire
Index of the wire within its plane.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
geo::Length_t WirePitch(geo::PlaneID const &planeid) const
Returns the distance between two consecutive wires.
const art::PtrVector< recob::Hit > & getAssociatedHits(const recob::SpacePoint &spt) const
void makeMCTruthSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
double separation(const art::PtrVector< recob::Hit > &hits) const
void fillSpacePoints(std::vector< recob::SpacePoint > &spts, std::multimap< double, KHitTrack > const &trackMap) const
Fill a collection of space points.
View_t View() const
Which coordinate does this plane measure.
Planes that are in the horizontal plane.
SpacePointAlg(const fhicl::ParameterSet &pset)
bool fEnableU
Enable flag (U).
void push_back(Ptr< U > const &p)
Signal from induction planes.
std::map< int, art::PtrVector< recob::Hit > > fSptHitMap
Planes that are in the vertical plane (e.g. ArgoNeuT).
std::vector< double > xyz
Location of ionization (all tracks).
virtual double GetXTicksCoefficient(int t, int c) const =0
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
T get(std::string const &key) const
std::vector< evd::details::RawDigitInfo_t >::const_iterator begin(RawDigitCacheDataClass const &cache)
void fillSpacePoint(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &sptv, int sptid) const
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
unsigned int NTPC() const
Number of TPCs in this cryostat.
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
double WirePitch(unsigned plane=0) const
Returns the center of the TPC volume in world coordinates [cm].
double fMaxS
Maximum space separation between wires.
The data type to uniquely identify a TPC.
PlaneID_t Plane
Index of the plane within its TPC.
bool fPreferColl
Sort by collection wire.
double Plane0Pitch(unsigned int p) const
Returns the center of the TPC volume in world coordinates [cm].
data_t::iterator iterator
Detector simulation of raw signals on wires.
void reconfigure(const fhicl::ParameterSet &pset)
Orient_t Orientation() const
What is the orientation of the plane.
Encapsulate the geometry of a wire.
data_t::const_iterator const_iterator
double HalfL() const
Returns half the length of the wire [cm].
void makeSpacePoints(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &spts) const
float PeakTime() const
Time of the signal peak, in tick units.
Encapsulate the construction of a single detector plane.
const TPCGeo & TPC(unsigned int itpc) const
Return the itpc'th TPC in the cryostat.
void fillComplexSpacePoint(const art::PtrVector< recob::Hit > &hits, std::vector< recob::SpacePoint > &sptv, int sptid) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
int fMinViews
Mininum number of views per space point.
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
PlaneGeo const & Plane(geo::View_t view) const
Return the plane in the tpc with View_t view.
2D representation of charge deposited in the TDC/wire plane
void GetCenter(double *xyz, double localz=0.0) const
Fills the world coordinate of a point on the wire.
bool compatible(const art::PtrVector< recob::Hit > &hits, bool useMC=false) const
TPCID_t TPC
Index of the TPC within its cryostat.
Algorithm for generating space points from hits.
const double * PlaneLocation(unsigned int p) const
Returns the coordinates of the center of the specified plane [cm].
const std::vector< sim::IDE > HitToAvgSimIDEs(recob::Hit const &hit)
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception
Encapsulate the construction of a single detector plane.
Signal from collection planes.
bool fEnableV
Enable flag (V).
WireGeo const & WireIDToWireGeo(geo::WireID const &wireid) const
Returns the specified wire.
virtual double GetXTicksOffset(int p, int t, int c) const =0