26 float mindis0 = FLT_MAX;
27 float mindis1 = FLT_MAX;
28 if (std::abs(pfp.
XYZ[0][1] - tpc.
MinY())<mindis0) mindis0 = std::abs(pfp.
XYZ[0][1] - tpc.
MinY());
29 if (std::abs(pfp.
XYZ[0][1] - tpc.
MaxY())<mindis0) mindis0 = std::abs(pfp.
XYZ[0][1] - tpc.
MaxY());
30 if (std::abs(pfp.
XYZ[0][2] - tpc.
MinZ())<mindis0) mindis0 = std::abs(pfp.
XYZ[0][2] - tpc.
MinZ());
31 if (std::abs(pfp.
XYZ[0][2] - tpc.
MaxZ())<mindis0) mindis0 = std::abs(pfp.
XYZ[0][2] - tpc.
MaxZ());
32 if (std::abs(pfp.
XYZ[1][1] - tpc.
MinY())<mindis1) mindis1 = std::abs(pfp.
XYZ[1][1] - tpc.
MinY());
33 if (std::abs(pfp.
XYZ[1][1] - tpc.
MaxY())<mindis1) mindis1 = std::abs(pfp.
XYZ[1][1] - tpc.
MaxY());
34 if (std::abs(pfp.
XYZ[1][2] - tpc.
MinZ())<mindis1) mindis1 = std::abs(pfp.
XYZ[1][2] - tpc.
MinZ());
35 if (std::abs(pfp.
XYZ[1][2] - tpc.
MaxZ())<mindis1) mindis1 = std::abs(pfp.
XYZ[1][2] - tpc.
MaxZ());
82 std::map<int, float> omap;
84 for(
auto& tjID : pfp.
TjIDs) {
87 for(
auto& tp : tj.
Pts) {
88 for(
unsigned short ii = 0; ii < tp.Hits.size(); ++ii) {
89 if(!tp.UseHit[ii])
continue;
90 unsigned int iht = tp.Hits[ii];
94 double startTick =
hit.PeakTime() -
hit.RMS();
95 double endTick =
hit.PeakTime() +
hit.RMS();
97 std::vector<sim::TrackIDE> tides;
99 for(
auto itide = tides.begin(); itide != tides.end(); ++itide) {
108 for (
auto & i : omap){
109 if (i.second > maxe){
std::vector< Trajectory > tjs
vector of all trajectories in each plane
std::vector< float > cr_pfpyzmindis
std::vector< float > cr_pfpxmax
simb::Origin_t Origin() const
Geometry information for a single TPC.
std::array< Point3_t, 2 > XYZ
std::vector< TrajPoint > Pts
Trajectory points.
double MinZ() const
Returns the world z coordinate of the start of the box.
std::vector< int > cr_origin
void SaveCRInfo(TCSlice &slc, PFPStruct &pfp, bool prt, bool fIsRealData)
int GetOrigin(TCSlice &slc, PFPStruct &pfp)
const geo::GeometryCore * geom
Detector simulation of raw signals on wires.
double MaxY() const
Returns the world y coordinate of the end of the box.
std::bitset< 16 > modes
number of points to find AveChg
std::vector< TCHit > slHits
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
double MaxZ() const
Returns the world z coordinate of the end of the box.
std::vector< recob::Hit > const * allHits
std::vector< float > cr_pfpxmin
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
unsigned int allHitsIndex
double MinY() const
Returns the world y coordinate of the start of the box.
void ClearCRInfo(TCSlice &slc)
const std::vector< sim::TrackIDE > ChannelToTrackIDEs(raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time)
constexpr Point origin()
Returns a origin position with a point of the specified type.
const art::Ptr< simb::MCTruth > & TrackIdToMCTruth_P(int const &id)