Skip to content

Commit 5e6c3dc

Browse files
committed
Use passed xshift
1 parent 56fd8be commit 5e6c3dc

1 file changed

Lines changed: 1 addition & 24 deletions

File tree

sbncode/Calibration/TrackCaloSkimmer_module.cc

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,29 +1458,6 @@ sbn::TrackHitInfo sbn::TrackCaloSkimmer::MakeHit(const recob::Hit &hit,
14581458
}
14591459
}
14601460

1461-
// If T0 provided CRT then we should appropriately shift the drift position (already done for pandora T0)
1462-
double recoX = std::numeric_limits<float>::signaling_NaN();
1463-
1464-
if(!t0Info.hasT0Pandora && (t0Info.hasT0CRTTrack || t0Info.hasT0CRTHit || t0Info.hasT0CRTSpacePoint))
1465-
{
1466-
int driftDir = geo->TPC(hit.WireID()).DriftDir().X();
1467-
const double driftv(dprop.DriftVelocity(dprop.Efield(), dprop.Temperature()));
1468-
1469-
double time = std::numeric_limits<float>::signaling_NaN();
1470-
1471-
if(t0Info.hasT0CRTTrack)
1472-
time = t0Info.t0CRTTrack*1e-3;
1473-
else if(t0Info.hasT0CRTHit)
1474-
time = t0Info.t0CRTHit*1e-3;
1475-
else if(t0Info.hasT0CRTSpacePoint)
1476-
time = t0Info.t0CRTSpacePoint*1e-3;
1477-
1478-
double anodeDistance = (hit.PeakTime()-dclock.Time2Tick(dclock.TriggerTime())-time/dclock.TPCClock().TickPeriod())*dclock.TPCClock().TickPeriod()*driftv;
1479-
double wirePlaneX = wireReadout->Plane(geo::PlaneID(hit.WireID().Cryostat, hit.WireID().TPC, hit.WireID().Plane)).GetCenter().X();
1480-
1481-
recoX = wirePlaneX - driftDir*anodeDistance;
1482-
}
1483-
14841461
// Information from the TrackHitMeta
14851462
bool badhit = (thm.Index() == std::numeric_limits<unsigned int>::max()) ||
14861463
(!trk.HasValidPoint(thm.Index()));
@@ -1493,7 +1470,7 @@ sbn::TrackHitInfo sbn::TrackCaloSkimmer::MakeHit(const recob::Hit &hit,
14931470

14941471
// The tp X coordinate is reconstructed only if it does not have a PandoraT0.
14951472
hinfo.tp.x = loc.X();
1496-
if((t0Info.hasT0CRTTrack || t0Info.hasT0CRTHit || t0Info.hasT0CRTSpacePoint) && !t0Info.hasT0Pandora && !isnan(hinfo.tp.x)) hinfo.tp.x = recoX;
1473+
if((t0Info.hasT0CRTTrack || t0Info.hasT0CRTHit || t0Info.hasT0CRTSpacePoint) && !t0Info.hasT0Pandora && !isnan(hinfo.tp.x)) hinfo.tp.x = loc.X() + xshift;
14971474
hinfo.tp.y = loc.Y();
14981475
hinfo.tp.z = loc.Z();
14991476

0 commit comments

Comments
 (0)