12 #ifndef TrackShowerSeparationAlg_hxx 13 #define TrackShowerSeparationAlg_hxx 32 class TrackShowerSeparationAlg;
61 fSpacePoints = spacePoints;
66 if (std::find(fForwardConeTracks.begin(), fForwardConeTracks.end(),
track) ==
67 fForwardConeTracks.end())
68 fForwardConeTracks.push_back(track);
72 if (std::find(fBackwardConeTracks.begin(), fBackwardConeTracks.end(),
track) ==
73 fBackwardConeTracks.end())
74 fBackwardConeTracks.push_back(track);
84 fIsolationSpacePoints[spacePoint] = distance;
88 int ID()
const {
return fID; }
89 TVector3
Vertex()
const {
return fVertex; }
90 TVector3
End()
const {
return fEnd; }
91 double Length()
const {
return fLength; }
94 const std::vector<art::Ptr<recob::Hit>>&
Hits()
const {
return fHits; }
95 const std::vector<art::Ptr<recob::SpacePoint>>&
SpacePoints()
const {
return fSpacePoints; }
108 this->MakeShowerTrack();
110 this->MakeShowerCone();
123 fShowerTrack =
false;
130 fShowerTrack =
false;
142 return (
int)fForwardConeTracks.size() - (int)fBackwardConeTracks.size();
150 return (
int)fForwardSpacePoints.size() - (int)fBackwardSpacePoints.size();
156 return (
double)fCylinderSpacePoints.size() / (double)fSpacePoints.size();
161 return (
double)fSphereSpacePoints.size() /
162 (4 * TMath::Pi() * TMath::Power((scale * fLength / 2.), 3) / 3.);
166 std::vector<double> distances;
167 std::transform(fIsolationSpacePoints.begin(),
168 fIsolationSpacePoints.end(),
169 std::back_inserter(distances),
170 [](
const std::pair<int, double>& p) {
return p.second; });
171 return TMath::Mean(distances.begin(), distances.end());
181 std::vector<art::Ptr<recob::Hit>>
fHits;
207 std::vector<art::Ptr<recob::Hit>> SelectShowerHits(
219 std::vector<int> InitialTrackLikeSegment(
220 std::map<
int, std::unique_ptr<ReconTrack>>& reconTracks)
const;
223 TVector3 Gradient(
const std::vector<TVector3>& points,
224 const std::unique_ptr<TVector3>&
dir)
const;
234 TVector3 ProjPoint(
const TVector3& point,
235 const TVector3& direction,
236 const TVector3&
origin = TVector3(0, 0, 0))
const;
void SetDirection(TVector3 direction)
bool ShowerTrackCandidate() const
const std::vector< art::Ptr< recob::SpacePoint > > & SpacePoints() const
void SetEnd(TVector3 end)
const std::vector< int > & ForwardConeTracks() const
double CylinderSpacePointRatio() const
const std::vector< int > & ShowerTracks() const
void AddForwardSpacePoint(int spacePoint)
Declaration of signal hit object.
void SetLength(double length)
void AddBackwardTrack(int track)
double IsolationSpacePointDistance() const
int NumCylinderSpacePoints() const
int ForwardSpacePoints() const
void AddForwardTrack(int track)
std::vector< int > fBackwardSpacePoints
bool IsShowerTrack() const
std::map< int, double > fIsolationSpacePoints
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void SetSpacePoints(std::vector< art::Ptr< recob::SpacePoint >> spacePoints)
void SetVertex(TVector3 vertex)
std::vector< int > fForwardConeTracks
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
const std::vector< art::Ptr< recob::Hit > > & Hits() const
Provides recob::Track data product.
std::vector< int > fSphereSpacePoints
void SetVertexDir(TVector3 vertexDir)
void AddCylinderSpacePoint(int spacePoint)
std::vector< int > fShowerTracks
std::vector< int > fForwardSpacePoints
TVector3 VertexDirection() const
bool IsUndetermined() const
double SphereSpacePointDensity(double scale) const
std::vector< art::Ptr< recob::Hit > > fHits
void AddSphereSpacePoint(int spacePoint)
void AddIsolationSpacePoint(int spacePoint, double distance)
int TrackConeSize() const
TVector3 Direction() const
void AddShowerTrack(int track)
void SetHits(std::vector< art::Ptr< recob::Hit >> hits)
void AddBackwardSpacePoint(int spacePoint)
bool IsShowerCone() const
std::vector< int > fCylinderSpacePoints
constexpr Point origin()
Returns a origin position with a point of the specified type.
Event finding and building.
std::vector< int > fBackwardConeTracks
int NumSphereSpacePoints() const