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];
96 std::vector<sim::TrackIDE> tides;
98 for(
auto itide = tides.begin(); itide != tides.end(); ++itide) {
107 for (
auto & i : omap){
108 if (i.second > maxe){
std::vector< float > cr_pfpyzmindis
art::Ptr< recob::Hit > ArtPtr
std::vector< float > cr_pfpxmax
geo::WireID WireID() const
Initial tdc tick for hit.
simb::Origin_t Origin() const
Geometry information for a single TPC.
CryostatID_t Cryostat
Index of cryostat.
WireID_t Wire
Index of the wire within its plane.
std::array< Point3_t, 2 > XYZ
const geo::GeometryCore * geom
std::vector< TrajPoint > Pts
Trajectory points.
std::vector< Trajectory > allTraj
vector of all trajectories in each plane
double MinZ() const
Returns the world z coordinate of the start of the box.
std::vector< int > cr_origin
void SaveCRInfo(TjStuff &tjs, PFPStruct &pfp, bool prt, bool fIsRealData)
int GetOrigin(TjStuff &tjs, PFPStruct &pfp)
PlaneID_t Plane
Index of the plane within its TPC.
Detector simulation of raw signals on wires.
double MaxY() const
Returns the world y coordinate of the end of the box.
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
std::vector< TCHit > fHits
double MaxZ() const
Returns the world z coordinate of the end of the box.
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.
TPCID_t TPC
Index of the TPC within its cryostat.
void ClearCRInfo(TjStuff &tjs)
double MinY() const
Returns the world y coordinate of the start of the box.
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)