30 double crossTime = -99999;
32 double minDist = 99999;
33 double startX = track.
Vertex().X();
34 double endX = track.
End().X();
40 return std::make_pair(minDist, crossTime);
48 double apa_X = (drift_direction_x == 1) ? tpc.
MaxX() : tpc.
MinX();
52 return std::make_pair(minDist, crossTime);
55 if (drift_direction_x == 1) {
56 point = endX < startX ? track.
End() : track.
Vertex();
59 point = endX > startX ? track.
End() : track.
Vertex();
63 for(
auto const&
t0 : t0List){
67 double shiftedX = point.X() +
shift;
79 return std::make_pair(minDist, crossTime);
90 std::pair<double, double> min =
MinApaDistance(track, t_zeros.at(tpc), tpc);
102 std::vector<double> t0List {t0};
106 std::pair<double, double> min =
MinApaDistance(track, t0List, tpc);
115 if(crossTimeThrough != -99999 && (crossTimeThrough < fBeamTimeMin || crossTimeThrough >
fBeamTimeMax))
return true;
ApaCrossCosmicIdAlg(const core::ProviderManager &manager, const Config &config)
void reconfigure(const core::ProviderManager &manager, const Config &config)
CryostatGeo const & GetElement(geo::CryostatID const &cryoid) const
geo::TPCID DetectedInTPC(const std::vector< art::Ptr< recob::Hit >> &hits)
geo::GeometryCore const * fGeometry
Drift towards positive values.
double MinX() const
Returns the world x coordinate of the start of the box.
const detinfo::DetectorPropertiesStandard * GetDetectorPropertiesProvider() const
Geometry information for a single TPC.
std::pair< double, double > MinApaDistance(const recob::Track &track, std::vector< double > &t0List, geo::TPCID &tpcid)
double MaxX() const
Returns the world x coordinate of the end of the box.
bool ApaCrossCosmicId(const recob::Track &track, std::vector< art::Ptr< recob::Hit >> &hits, std::map< geo::CryostatID, std::vector< double >> &t_zeros)
process_name use argoneut_mc_hitfinder track
fhicl::Atom< double > MaxApaDistance
process_name opflashCryoW ana
const geo::GeometryCore * GetGeometryProvider() const
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Interface to LArSoft services.
detinfo::DetectorPropertiesStandard const * fDetectorProperties
Point_t const & Vertex() const
The data type to uniquely identify a TPC.
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
double ApaDistance(recob::Track track, double t0, std::vector< art::Ptr< recob::Hit >> hits)
double DriftVelocity(double efield=0., double temperature=0.) const override
cm/us
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
Point_t const & End() const
double T0FromApaCross(const recob::Track &track, std::vector< art::Ptr< recob::Hit >> hits, std::map< geo::CryostatID, std::vector< double >> &t_zeros)
fhicl::Atom< double > DistanceLimit
fhicl::Table< BeamTime > BeamTimeLimits
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< double >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space.
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
The data type to uniquely identify a cryostat.