12 #ifndef TrackShowerSeparationAlg_hxx 13 #define TrackShowerSeparationAlg_hxx 17 #include "canvas/Persistency/Common/FindManyP.h" 18 namespace fhicl {
class ParameterSet; }
30 class TrackShowerSeparationAlg;
54 void AddForwardTrack(
int track) {
if (std::find(fForwardConeTracks.begin(), fForwardConeTracks.end(), track) == fForwardConeTracks.end()) fForwardConeTracks.push_back(track); }
55 void AddBackwardTrack(
int track) {
if (std::find(fBackwardConeTracks.begin(), fBackwardConeTracks.end(), track) == fBackwardConeTracks.end()) fBackwardConeTracks.push_back(track); }
65 int ID()
const {
return fID; }
66 TVector3
Vertex()
const {
return fVertex; }
67 TVector3
End()
const {
return fEnd; }
71 const std::vector<art::Ptr<recob::Hit> >&
Hits()
const {
return fHits; }
72 const std::vector<art::Ptr<recob::SpacePoint> >&
SpacePoints()
const {
return fSpacePoints; }
83 this->MakeShowerTrack();
85 this->MakeShowerCone();
102 fShowerTrack =
false;
112 int TrackConeSize()
const {
return (
int)fForwardConeTracks.size() - (
int)fBackwardConeTracks.size(); }
117 int ConeSize()
const {
return (
int)fForwardSpacePoints.size() - (
int)fBackwardSpacePoints.size(); }
124 std::transform(fIsolationSpacePoints.begin(), fIsolationSpacePoints.end(), std::back_inserter(distances), [](
const std::pair<int,double>&
p){
return p.second;});
125 return TMath::Mean(distances.begin(), distances.end()); }
135 std::vector<art::Ptr<recob::Hit> >
fHits;
163 std::vector<art::Ptr<recob::Hit> > SelectShowerHits(
int event,
167 const art::FindManyP<recob::Hit>& fmht,
168 const art::FindManyP<recob::Track>& fmth,
169 const art::FindManyP<recob::SpacePoint>& fmspt,
170 const art::FindManyP<recob::Track>& fmtsp)
const;
175 std::vector<int> InitialTrackLikeSegment(std::map<
int,std::unique_ptr<ReconTrack> >& reconTracks)
const;
178 TVector3 Gradient(
const std::vector<TVector3>& points,
const std::unique_ptr<TVector3>&
dir)
const;
188 TVector3 ProjPoint(
const TVector3& point,
const TVector3&
direction,
const TVector3&
origin = TVector3(0,0,0))
const;
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
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)
void SetLength(double length)
void AddBackwardTrack(int track)
double IsolationSpacePointDistance() const
int NumCylinderSpacePoints() const
int ForwardSpacePoints() const
std::map< int, double > fIsolationSpacePoints
void SetSpacePoints(std::vector< art::Ptr< recob::SpacePoint > > spacePoints)
void AddForwardTrack(int track)
std::vector< int > fBackwardSpacePoints
bool IsShowerTrack() const
void SetVertex(TVector3 vertex)
virtual void reconfigure(fhicl::ParameterSet const &pset)
std::vector< int > fForwardConeTracks
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
const std::vector< art::Ptr< recob::Hit > > & Hits() const
std::vector< int > fSphereSpacePoints
double distance(double x1, double y1, double z1, double x2, double y2, double z2)
void SetVertexDir(TVector3 vertexDir)
void AddCylinderSpacePoint(int spacePoint)
Declaration of signal hit object.
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
Provides recob::Track data product.
void AddSphereSpacePoint(int spacePoint)
void AddIsolationSpacePoint(int spacePoint, double distance)
void SetHits(std::vector< art::Ptr< recob::Hit > > hits)
int TrackConeSize() const
TVector3 Direction() const
void AddShowerTrack(int track)
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
static TemplateFilterFactory::AutoRegister< FilterLength > fLength("length")