17 #include "cetlib_except/exception.h" 92 throw cet::exception(
"SpacePointAlg") <<
"Filter and Merge flags are both true.\n";
96 std::cout <<
"SpacePointAlg configured with the following parameters:\n" 97 <<
" MaxDT = " <<
fMaxDT <<
"\n" 98 <<
" MaxS = " << fMaxS <<
"\n" 99 <<
" MinViews = " << fMinViews <<
"\n" 100 <<
" EnableU = " << fEnableU <<
"\n" 101 <<
" EnableV = " << fEnableV <<
"\n" 102 <<
" EnableW = " << fEnableW <<
"\n" 103 <<
" Filter = " << fFilter <<
"\n" 104 <<
" Merge = " << fMerge <<
"\n" 105 <<
" PreferColl = " << fPreferColl <<
"\n" 106 <<
" TickOffsetU = " << fTickOffsetU <<
"\n" 118 static bool first =
true;
130 mf::LogInfo(
"SpacePointAlg") <<
"Updating geometry constants.\n";
133 for(
unsigned int cstat = 0; cstat < geom->
Ncryostats(); ++cstat){
139 for(
unsigned int tpc = 0; tpc < ntpc; ++tpc) {
144 unsigned int const nplane = tpcgeom.
Nplanes();
146 for(
unsigned int plane = 0; plane < nplane; ++plane) {
153 std::string viewname =
"?";
167 std::string sigtypename =
"?";
170 sigtypename =
"Induction";
172 sigtypename =
"Collection";
177 std::string orientname =
"?";
180 orientname =
"Vertical";
182 orientname =
"Horizontal";
189 mf::LogInfo(
"SpacePointAlg") <<
"\nCryostat, TPC, Plane: " 193 <<
" View: " << viewname <<
"\n" 194 <<
" SignalType: " << sigtypename <<
"\n" 195 <<
" Orientation: " << orientname <<
"\n" 196 <<
" Plane location: " << xyz[0] <<
"\n" 201 <<
" Wire pitch: " << tpcgeom.
WirePitch() <<
"\n" 208 <<
"Horizontal wire geometry not implemented.\n";
253 if(hits.
size() > 3) {
254 mf::LogError(
"SpacePointAlg") <<
"Method separation called with more than three htis.";
262 double dist[3] = {0., 0., 0.};
263 double sinth[3] = {0., 0., 0.};
264 double costh[3] = {0., 0., 0.};
265 unsigned int cstats[3];
266 unsigned int tpcs[3];
267 unsigned int planes[3];
269 for(
int i=0; i<3; ++i) {
281 for(
int j=0; j<i; ++j) {
284 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from multiple cryostats..";
289 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from multiple tpcs..";
294 mf::LogError(
"SpacePointAlg") <<
"Method separation called with hits from the same plane..";
301 double hl = wgeom.
HalfL();
306 double s = (xyz1[1] - xyz[1]) / hl;
307 double c = (xyz1[2] - xyz[2]) / hl;
310 dist[hit.
WireID().
Plane] = xyz[2] * s - xyz[1] * c;
313 double S = ((sinth[1] * costh[2] - costh[1] * sinth[2]) * dist[0]
314 +(sinth[2] * costh[0] - costh[2] * sinth[0]) * dist[1]
315 +(sinth[0] * costh[1] - costh[0] * sinth[1]) * dist[2]);
331 int nhits = hits.
size();
335 bool result = nhits >= 2 && nhits <= 3;
337 unsigned int tpc = 0;
338 unsigned int cstat = 0;
345 for(
int ihit1 = 0; result && ihit1 < nhits-1; ++ihit1) {
357 const std::vector<int>& tid1 = mcinfo1.
trackIDs;
358 bool only_neg1 = tid1.size() > 0 && tid1.back() < 0;
362 for(
int ihit2 = ihit1+1; result && ihit2 < nhits; ++ihit2) {
369 result = result && hit1WireID.
TPC == hit2WireID.
TPC && view1 != view2 && hit1WireID.
Cryostat == hit2WireID.
Cryostat;
374 tpc = hit1WireID.
TPC;
381 result = result && std::abs(t1-t2) <=
fMaxDT;
385 if(result && useMC) {
390 std::vector<int> tid2 = mcinfo2.
trackIDs;
391 bool only_neg2 = tid2.size() > 0 && tid2.back() < 0;
393 std::set_intersection(tid1.begin(), tid1.end(),
394 tid2.begin(), tid2.end(),
396 tid2.resize(it - tid2.begin());
403 bool only_neg3 = tid2.size() > 0 && tid2.back() < 0;
404 mc_ok = tid2.size() > 0 && (!only_neg3 || (only_neg1 && only_neg2));
405 result = result && mc_ok;
411 result = mcinfo1.
pchit[hit2WireID.
Plane] == &hit2 ||
422 if(result && nhits == 3) {
426 double dist[3] = {0., 0., 0.};
427 double sinth[3] = {0., 0., 0.};
428 double costh[3] = {0., 0., 0.};
430 for(
int i=0; i<3; ++i) {
438 if ((hitWireID.
TPC != tpc) || (hitWireID.
Cryostat != cstat))
439 throw cet::exception(
"SpacePointAlg") <<
"compatible(): geometry mismatch\n";
443 double hl = wgeom.
HalfL();
448 double s = (xyz1[1] - xyz[1]) / hl;
449 double c = (xyz1[2] - xyz[2]) / hl;
452 dist[hit.
WireID().
Plane] = xyz[2] * s - xyz[1] * c;
457 double S = ((sinth[1] * costh[2] - costh[1] * sinth[2]) * dist[0]
458 +(sinth[2] * costh[0] - costh[2] * sinth[0]) * dist[1]
459 +(sinth[0] * costh[1] - costh[0] * sinth[1]) * dist[2]);
461 result = result && std::abs(S) <
fMaxS;
475 std::vector<recob::SpacePoint> &sptv,
485 int nhits = hits.
size();
490 throw cet::exception(
"SpacePointAlg") <<
"fillSpacePoint(): hit already present!\n";
495 double xyz[3] = {0., 0., 0.};
496 double errxyz[6] = {0.,
510 ihit != hits.
end(); ++ihit) {
520 double w = 1./(et*et);
527 double drift_time = 0.;
528 double var_time = 0.;
531 drift_time = sumtw / sumw;
533 var_time = 1. / sumw;
536 chisq = sumt2w - sumtw * drift_time;
540 xyz[0] = drift_time * timePitch;
541 errxyz[0] = var_time * timePitch * timePitch;
559 ihit != hits.
end(); ++ihit) {
567 double hl = wgeom.
HalfL();
572 double s = (cen1[1] - cen[1]) / hl;
573 double c = (cen1[2] - cen[2]) / hl;
574 double u = cen[2] * s - cen[1] * c;
576 double w = 1. / (eu * eu);
590 double denom = sc2 * ss2 - ssc * ssc;
592 xyz[1] = (-suc * ss2 + sus * ssc) / denom;
593 xyz[2] = (sus * sc2 - suc * ssc) / denom;
594 errxyz[2] = ss2 / denom;
595 errxyz[4] = ssc / denom;
596 errxyz[5] = sc2 / denom;
626 std::multimap<double, KHitTrack>
const& trackMap)
const 633 it != trackMap.end(); ++it) {
638 const std::shared_ptr<const KHitBase>&
hit = track.
getHit();
653 if(compatible_hits.
size() >= 2) {
655 compatible_hits.
clear();
666 compatible_hits =
hits;
672 if(compatible_hits.
size() >= 2) {
685 std::vector<recob::SpacePoint>& sptv,
699 unsigned int tpc0 = 0;
700 unsigned int cstat0 = 0;
701 int nhits = hits.
size();
703 tpc0 = hits.
front()->WireID().TPC;
704 cstat0=hits.
front()->WireID().Cryostat;
710 throw cet::exception(
"SpacePointAlg") <<
"fillComplexSpacePoint(): hit already present!\n";
717 std::vector<int> numhits(nplanes, 0);
718 std::vector<double>
weight(nplanes, 0.);
721 ihit != hits.
end(); ++ihit) {
733 assert(hitWireID.
Cryostat == cstat0);
734 assert(hitWireID.
TPC == tpc0);
735 assert(hitWireID.
Plane < nplanes);
736 ++numhits[hitWireID.
Plane];
739 for(
unsigned int plane = 0; plane < nplanes; ++plane) {
740 double np = numhits[plane];
742 weight[plane] = 1. / (np*np*np);
747 double xyz[3] = {0., 0., 0.};
748 double errxyz[6] = {0.,
761 ihit != hits.
end(); ++ihit) {
771 double w = weight[hitWireID.
Plane]/(et*et);
778 double drift_time = 0.;
779 double var_time = 0.;
782 drift_time = sumtw / sumw;
783 var_time = sumt2w / sumw - drift_time * drift_time;
786 chisq = sumt2w - sumtw * drift_time;
790 xyz[0] = drift_time * timePitch;
791 errxyz[0] = var_time * timePitch * timePitch;
809 ihit != hits.
end(); ++ihit) {
817 double hl = wgeom.
HalfL();
822 double s = (cen1[1] - cen[1]) / hl;
823 double c = (cen1[2] - cen[2]) / hl;
824 double u = cen[2] * s - cen[1] * c;
826 double w = weight[hitWireID.
Plane] / (eu * eu);
840 double denom = sc2 * ss2 - ssc * ssc;
842 xyz[1] = (-suc * ss2 + sus * ssc) / denom;
843 xyz[2] = (sus * sc2 - suc * ssc) / denom;
844 errxyz[2] = ss2 / denom;
845 errxyz[4] = ssc / denom;
846 errxyz[5] = sc2 / denom;
862 std::vector<recob::SpacePoint>& spts)
const 872 std::vector<recob::SpacePoint>& spts)
const 882 std::vector<recob::SpacePoint>& spts,
900 spts.erase(spts.begin(), spts.end());
913 std::vector< std::vector<std::vector<std::multimap<unsigned int, art::Ptr<recob::Hit> > > > > hitmap;
917 hitmap.resize(ncstat);
918 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
920 hitmap[cstat].resize(ntpc);
921 for(
unsigned int tpc = 0; tpc < ntpc; ++tpc) {
923 hitmap[cstat][tpc].resize(nplane);
934 hitmap[phitWireID.
Cryostat][phitWireID.
TPC][phitWireID.
Plane].insert(std::make_pair(phitWireID.
Wire, phit));
946 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
947 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
949 for(
int plane = 0; plane < nplane; ++plane) {
951 ihit != hitmap[cstat][tpc][plane].end(); ++ihit) {
958 mcinfo.
pchit.resize(nplane, 0);
959 mcinfo.
dist2.resize(nplane, 1.e20);
967 mcinfo.
trackIDs.reserve(ides.size());
969 i != ides.end(); ++i)
970 mcinfo.
trackIDs.push_back(i->trackID);
987 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
988 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
990 for(
int plane = 0; plane < nplane; ++plane) {
992 ihit != hitmap[cstat][tpc][plane].end(); ++ihit) {
996 if(mcinfo.
xyz.size() != 0) {
997 assert(mcinfo.
xyz.size() == 3);
1001 for(
int plane2 = 0; plane2 < nplane; ++plane2) {
1003 jhit != hitmap[cstat][tpc][plane2].end(); ++jhit) {
1009 if(mcinfo2.
xyz.size() != 0) {
1010 assert(mcinfo2.
xyz.size() == 3);
1011 double dx = mcinfo.
xyz[0] - mcinfo2.
xyz[0];
1012 double dy = mcinfo.
xyz[1] - mcinfo2.
xyz[1];
1013 double dz = mcinfo.
xyz[2] - mcinfo2.
xyz[2];
1014 double dist2 = dx*dx + dy*dy + dz*dz;
1015 if(dist2 < mcinfo.
dist2[plane2]) {
1016 mcinfo.
dist2[plane2] = dist2;
1017 mcinfo.
pchit[plane2] = &hit2;
1033 debug <<
"Total hits = " << hits.
size() <<
"\n\n";
1035 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
1036 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
1037 int nplane = hitmap[cstat][tpc].size();
1038 for(
int plane = 0; plane < nplane; ++plane) {
1039 debug <<
"TPC, Plane: " << tpc <<
", " << plane
1040 <<
", hits = " << hitmap[cstat][tpc][plane].size() <<
"\n";
1052 std::multimap<sptkey_type, recob::SpacePoint> sptmap;
1053 std::set<sptkey_type> sptkeys;
1056 for(
unsigned int cstat = 0; cstat < ncstat; ++cstat){
1057 for(
unsigned int tpc = 0; tpc < geom->
Cryostat(cstat).
NTPC(); ++tpc) {
1072 int nplane = hitmap[cstat][tpc].size();
1073 std::vector<int> index(nplane);
1075 for(
int i=0; i<nplane; ++i)
1078 for(
int i=0; i<nplane-1; ++i) {
1080 for(
int j=i+1; j<nplane; ++j) {
1085 if((hitmap[cstat][tpc][index[i]].size() > hitmap[cstat][tpc][index[j]].size() &&
1087 int temp = index[i];
1088 index[i] = index[j];
1097 std::vector<std::multimap<unsigned int, art::Ptr<recob::Hit>>>& hitsByPlaneVec = hitmap[cstat][tpc];
1098 int nViewsWithHits(0);
1100 for(
int i = 0; i < nplane; i++)
1102 if (hitsByPlaneVec[index[i]].size() > 0) nViewsWithHits++;
1108 if((nViewsWithHits == 2 || nplane == 2) &&
fMinViews <= 2) {
1111 for(
int i=0; i<nplane-1; ++i) {
1112 unsigned int plane1 = index[i];
1114 if (hitmap[cstat][tpc][plane1].empty())
continue;
1116 for(
int j=i+1; j<nplane; ++j) {
1117 unsigned int plane2 = index[j];
1119 if (hitmap[cstat][tpc][plane2].empty())
continue;
1123 double hl2 = wgeo2.
HalfL();
1128 double s2 = (xyz22[1] - xyz21[1]) / (2.*hl2);
1129 double c2 = (xyz22[2] - xyz21[2]) / (2.*hl2);
1130 double dist2 = -xyz21[1] * c2 + xyz21[2] * s2;
1131 double pitch2 = geom->
WirePitch(plane2, tpc, cstat);
1133 if(!
fPreferColl && hitmap[cstat][tpc][plane1].size() > hitmap[cstat][tpc][plane2].size())
1134 throw cet::exception(
"SpacePointAlg") <<
"makeSpacePoints(): hitmaps with incompatible size\n";
1143 ihit1 = hitmap[cstat][tpc][plane1].
begin();
1144 ihit1 != hitmap[cstat][tpc][plane1].end(); ++ihit1) {
1152 assert(phit1WireID.
Cryostat == cstat);
1153 assert(phit1WireID.
TPC == tpc);
1154 assert(phit1WireID.
Plane == plane1);
1155 double hl1 = wgeo.
HalfL();
1163 double wire21 = (-xyz1[1] * c2 + xyz1[2] * s2 - dist2) / pitch2;
1164 double wire22 = (-xyz2[1] * c2 + xyz2[2] * s2 - dist2) / pitch2;
1170 ihit2 = hitmap[cstat][tpc][plane2].lower_bound(wmin),
1171 ihit2end = hitmap[cstat][tpc][plane2].upper_bound(wmax);
1173 for(; ihit2 != ihit2end; ++ihit2) {
1198 std::vector<recob::SpacePoint> sptv;
1200 sptkey_type key = &*phit2;
1201 sptmap.insert(std::pair<sptkey_type, recob::SpacePoint>(key, sptv.back()));
1202 sptkeys.insert(key);
1220 unsigned int plane1 = index[0];
1221 unsigned int plane2 = index[1];
1222 unsigned int plane3 = index[2];
1227 double hl1 = wgeo1.
HalfL();
1232 double s1 = (xyz12[1] - xyz11[1]) / (2.*hl1);
1233 double c1 = (xyz12[2] - xyz11[2]) / (2.*hl1);
1234 double dist1 = -xyz11[1] * c1 + xyz11[2] * s1;
1235 double pitch1 = geom->
WirePitch(plane1, tpc, cstat);
1236 const double TicksOffset1 = detprop->
GetXTicksOffset(plane1,tpc,cstat);
1241 double hl2 = wgeo2.
HalfL();
1246 double s2 = (xyz22[1] - xyz21[1]) / (2.*hl2);
1247 double c2 = (xyz22[2] - xyz21[2]) / (2.*hl2);
1248 double dist2 = -xyz21[1] * c2 + xyz21[2] * s2;
1249 double pitch2 = geom->
WirePitch(plane2, tpc, cstat);
1250 const double TicksOffset2 = detprop->
GetXTicksOffset(plane2,tpc,cstat);
1255 double hl3 = wgeo3.
HalfL();
1260 double s3 = (xyz32[1] - xyz31[1]) / (2.*hl3);
1261 double c3 = (xyz32[2] - xyz31[2]) / (2.*hl3);
1262 double dist3 = -xyz31[1] * c3 + xyz31[2] * s3;
1263 double pitch3 = geom->
WirePitch(plane3, tpc, cstat);
1264 const double TicksOffset3 = detprop->
GetXTicksOffset(plane3,tpc,cstat);
1268 double s12 = s1 * c2 - s2 *
c1;
1269 double s23 = s2 * c3 - s3 *
c2;
1270 double s31 = s3 * c1 - s1 * c3;
1275 ihit1 = hitmap[cstat][tpc][plane1].begin(),
1276 ihit1end = hitmap[cstat][tpc][plane1].end();
1277 for(; ihit1 != ihit1end; ++ihit1) {
1279 unsigned int wire1 = ihit1->first;
1286 assert(phit1WireID.
Cryostat == cstat);
1287 assert(phit1WireID.
TPC == tpc);
1288 assert(phit1WireID.
Plane == plane1);
1289 assert(phit1WireID.
Wire == wire1);
1290 double hl1 = wgeo.
HalfL();
1298 double t1 = phit1->
PeakTime() - TicksOffset1;
1299 double u1 = wire1 * pitch1 + dist1;
1303 double wire21 = (-xyz1[1] * c2 + xyz1[2] * s2 - dist2) / pitch2;
1304 double wire22 = (-xyz2[1] * c2 + xyz2[2] * s2 - dist2) / pitch2;
1310 ihit2 = hitmap[cstat][tpc][plane2].lower_bound(wmin),
1311 ihit2end = hitmap[cstat][tpc][plane2].upper_bound(wmax);
1313 for(; ihit2 != ihit2end; ++ihit2) {
1315 int wire2 = ihit2->first;
1320 double t2 = phit2->
PeakTime() - TicksOffset2;
1324 bool dt12ok = std::abs(t1-t2) <=
fMaxDT;
1338 double u2 = wire2 * pitch2 + dist2;
1342 double u3pred = (-u1*s23 - u2*s31) / s12;
1343 double w3pred = (u3pred - dist3) / pitch3;
1344 double w3delta = std::abs(
fMaxS / (s12 * pitch3));
1345 int w3min =
std::max(0., std::ceil(w3pred - w3delta));
1346 int w3max =
std::max(0., std::floor(w3pred + w3delta));
1349 ihit3 = hitmap[cstat][tpc][plane3].lower_bound(w3min),
1350 ihit3end = hitmap[cstat][tpc][plane3].upper_bound(w3max);
1352 for(; ihit3 != ihit3end; ++ihit3) {
1354 int wire3 = ihit3->first;
1359 double t3 = phit3->
PeakTime() - TicksOffset3;
1363 bool dt123ok = std::abs(t1-t3) <=
fMaxDT && std::abs(t2-t3) <=
fMaxDT;
1368 double u3 = wire3 * pitch3 + dist3;
1369 double S = s23 * u1 + s31 * u2 + s12 * u3;
1370 bool sok = std::abs(S) <=
fMaxS;
1393 std::vector<recob::SpacePoint> sptv;
1395 sptkey_type key = &*phit3;
1396 sptmap.insert(std::pair<sptkey_type, recob::SpacePoint>(key, sptv.back()));
1397 sptkeys.insert(key);
1414 spts.reserve(spts.size() + sptkeys.size());
1420 i != sptkeys.end(); ++i) {
1421 sptkey_type key = *i;
1426 double best_chisq = 0.;
1430 j != sptmap.upper_bound(key); ++j) {
1432 if(best_spt == 0 || spt.
Chisq() < best_chisq) {
1434 best_chisq = spt.
Chisq();
1441 throw cet::exception(
"SpacePointAlg") <<
"makeSpacePoints(): no best point\n";
1442 spts.push_back(*best_spt);
1456 spts.reserve(spts.size() + sptkeys.size());
1462 i != sptkeys.end(); ++i) {
1463 sptkey_type key = *i;
1470 jSPT = sptmap.lower_bound(key), jSPTend = sptmap.upper_bound(key);
1473 for(; jSPT != jSPTend; ++jSPT) {
1482 k != spt_hits.
end(); ++k) {
1490 std::sort(merged_hits.
begin(), merged_hits.
end());
1492 std::unique(merged_hits.
begin(), merged_hits.
end());
1493 merged_hits.
erase(it, merged_hits.
end());
1512 spts.reserve(spts.size() + sptkeys.size());
1517 j != sptmap.end(); ++j) {
1519 spts.push_back(spt);
1531 debug <<
"\n2-hit space points = " << n2 <<
"\n" 1532 <<
"3-hit space points = " << n3 <<
"\n" 1533 <<
"2-hit filtered/merged space points = " << n2filt <<
"\n" 1534 <<
"3-hit filtered/merged space points = " << n3filt;
1551 throw cet::exception(
"SpacePointAlg") <<
"No Hits associated with space point.\n";
1553 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
double fTickOffsetU
Tick offset for plane U.
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.
double fTickOffsetV
Tick offset for plane V.
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
double fTickOffsetW
Tick offset for plane W.
int fMinViews
Mininum number of views per space point.
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
Planes which measure W (third view for Bo, MicroBooNE, etc).
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