LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
shower::ReconTrack Class Reference

#include "TrackShowerSeparationAlg.h"

Public Member Functions

 ReconTrack (int id)
 
void SetVertex (TVector3 vertex)
 
void SetEnd (TVector3 end)
 
void SetLength (double length)
 
void SetVertexDir (TVector3 vertexDir)
 
void SetDirection (TVector3 direction)
 
void SetHits (std::vector< art::Ptr< recob::Hit > > hits)
 
void SetSpacePoints (std::vector< art::Ptr< recob::SpacePoint > > spacePoints)
 
void AddForwardTrack (int track)
 
void AddBackwardTrack (int track)
 
void AddShowerTrack (int track)
 
void AddForwardSpacePoint (int spacePoint)
 
void AddBackwardSpacePoint (int spacePoint)
 
void AddCylinderSpacePoint (int spacePoint)
 
void AddSphereSpacePoint (int spacePoint)
 
void AddIsolationSpacePoint (int spacePoint, double distance)
 
int ID () const
 
TVector3 Vertex () const
 
TVector3 End () const
 
double Length () const
 
TVector3 VertexDirection () const
 
TVector3 Direction () const
 
const std::vector< art::Ptr< recob::Hit > > & Hits () const
 
const std::vector< art::Ptr< recob::SpacePoint > > & SpacePoints () const
 
void FlipTrack ()
 
void MakeShower ()
 
void MakeShowerTrack ()
 
void MakeShowerCone ()
 
void MakeTrack ()
 
bool IsShower () const
 
bool IsShowerTrack () const
 
bool IsShowerCone () const
 
bool IsTrack () const
 
bool IsUndetermined () const
 
int TrackConeSize () const
 
bool ShowerTrackCandidate () const
 
const std::vector< int > & ShowerTracks () const
 
const std::vector< int > & ForwardConeTracks () const
 
int ConeSize () const
 
int ForwardSpacePoints () const
 
int NumCylinderSpacePoints () const
 
double CylinderSpacePointRatio () const
 
int NumSphereSpacePoints () const
 
double SphereSpacePointDensity (double scale) const
 
double IsolationSpacePointDistance () const
 

Private Attributes

int fID
 
TVector3 fVertex
 
TVector3 fEnd
 
double fLength
 
TVector3 fVertexDir
 
TVector3 fDirection
 
std::vector< art::Ptr< recob::Hit > > fHits
 
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
 
std::vector< int > fForwardConeTracks
 
std::vector< int > fBackwardConeTracks
 
std::vector< int > fShowerTracks
 
std::vector< int > fForwardSpacePoints
 
std::vector< int > fBackwardSpacePoints
 
std::vector< int > fCylinderSpacePoints
 
std::vector< int > fSphereSpacePoints
 
std::map< int, double > fIsolationSpacePoints
 
bool fShower
 
bool fShowerTrack
 
bool fShowerCone
 
bool fTrack
 

Detailed Description

Definition at line 47 of file TrackShowerSeparationAlg.h.

Constructor & Destructor Documentation

shower::ReconTrack::ReconTrack ( int  id)
inline

Definition at line 50 of file TrackShowerSeparationAlg.h.

References fID, fShower, fShowerCone, fShowerTrack, and fTrack.

Member Function Documentation

void shower::ReconTrack::AddBackwardSpacePoint ( int  spacePoint)
inline

Definition at line 72 of file TrackShowerSeparationAlg.h.

References fBackwardSpacePoints.

72 { fBackwardSpacePoints.push_back(spacePoint); }
std::vector< int > fBackwardSpacePoints
void shower::ReconTrack::AddBackwardTrack ( int  track)
inline

Definition at line 68 of file TrackShowerSeparationAlg.h.

References fBackwardConeTracks, and track.

68 { if (std::find(fBackwardConeTracks.begin(), fBackwardConeTracks.end(), track) == fBackwardConeTracks.end()) fBackwardConeTracks.push_back(track); }
Float_t track
Definition: plot.C:34
std::vector< int > fBackwardConeTracks
void shower::ReconTrack::AddCylinderSpacePoint ( int  spacePoint)
inline

Definition at line 73 of file TrackShowerSeparationAlg.h.

References fCylinderSpacePoints.

73 { fCylinderSpacePoints.push_back(spacePoint); }
std::vector< int > fCylinderSpacePoints
void shower::ReconTrack::AddForwardSpacePoint ( int  spacePoint)
inline

Definition at line 71 of file TrackShowerSeparationAlg.h.

References fForwardSpacePoints.

71 { fForwardSpacePoints.push_back(spacePoint); }
std::vector< int > fForwardSpacePoints
void shower::ReconTrack::AddForwardTrack ( int  track)
inline

Definition at line 67 of file TrackShowerSeparationAlg.h.

References fForwardConeTracks, and track.

67 { if (std::find(fForwardConeTracks.begin(), fForwardConeTracks.end(), track) == fForwardConeTracks.end()) fForwardConeTracks.push_back(track); }
std::vector< int > fForwardConeTracks
Float_t track
Definition: plot.C:34
void shower::ReconTrack::AddIsolationSpacePoint ( int  spacePoint,
double  distance 
)
inline

Definition at line 75 of file TrackShowerSeparationAlg.h.

References fIsolationSpacePoints.

75 { fIsolationSpacePoints[spacePoint] = distance; }
std::map< int, double > fIsolationSpacePoints
void shower::ReconTrack::AddShowerTrack ( int  track)
inline

Definition at line 69 of file TrackShowerSeparationAlg.h.

References fShowerTracks.

69 { fShowerTracks.push_back(track); }
std::vector< int > fShowerTracks
Float_t track
Definition: plot.C:34
void shower::ReconTrack::AddSphereSpacePoint ( int  spacePoint)
inline

Definition at line 74 of file TrackShowerSeparationAlg.h.

References fSphereSpacePoints.

74 { fSphereSpacePoints.push_back(spacePoint); }
std::vector< int > fSphereSpacePoints
int shower::ReconTrack::ConeSize ( ) const
inline

Definition at line 130 of file TrackShowerSeparationAlg.h.

References fBackwardSpacePoints, and fForwardSpacePoints.

130 { return (int)fForwardSpacePoints.size() - (int)fBackwardSpacePoints.size(); }
std::vector< int > fBackwardSpacePoints
std::vector< int > fForwardSpacePoints
double shower::ReconTrack::CylinderSpacePointRatio ( ) const
inline

Definition at line 133 of file TrackShowerSeparationAlg.h.

References fCylinderSpacePoints, and fSpacePoints.

133 { return (double)fCylinderSpacePoints.size()/(double)fSpacePoints.size(); }
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
std::vector< int > fCylinderSpacePoints
TVector3 shower::ReconTrack::Direction ( ) const
inline

Definition at line 83 of file TrackShowerSeparationAlg.h.

References fDirection.

83 { return fDirection; }
TVector3 shower::ReconTrack::End ( void  ) const
inline

Definition at line 80 of file TrackShowerSeparationAlg.h.

References fEnd.

80 { return fEnd; }
void shower::ReconTrack::FlipTrack ( )
inline

Definition at line 87 of file TrackShowerSeparationAlg.h.

References fDirection, fEnd, fVertex, and tmp.

87  {
88  TVector3 tmp = fEnd;
89  fEnd = fVertex;
90  fVertex = tmp;
91  fDirection *= -1;
92  }
Float_t tmp
Definition: plot.C:37
const std::vector<int>& shower::ReconTrack::ForwardConeTracks ( ) const
inline

Definition at line 128 of file TrackShowerSeparationAlg.h.

References fForwardConeTracks.

128 { return fForwardConeTracks; }
std::vector< int > fForwardConeTracks
int shower::ReconTrack::ForwardSpacePoints ( ) const
inline

Definition at line 131 of file TrackShowerSeparationAlg.h.

References fForwardSpacePoints.

131 { return fForwardSpacePoints.size(); }
std::vector< int > fForwardSpacePoints
const std::vector<art::Ptr<recob::Hit> >& shower::ReconTrack::Hits ( void  ) const
inline

Definition at line 84 of file TrackShowerSeparationAlg.h.

References fHits.

84 { return fHits; }
std::vector< art::Ptr< recob::Hit > > fHits
int shower::ReconTrack::ID ( ) const
inline

Definition at line 78 of file TrackShowerSeparationAlg.h.

References fID.

double shower::ReconTrack::IsolationSpacePointDistance ( ) const
inline

Definition at line 137 of file TrackShowerSeparationAlg.h.

References fIsolationSpacePoints.

137  { std::vector<double> distances;
138  std::transform(fIsolationSpacePoints.begin(), fIsolationSpacePoints.end(), std::back_inserter(distances), [](const std::pair<int,double>& p){return p.second;});
139  return TMath::Mean(distances.begin(), distances.end()); }
std::map< int, double > fIsolationSpacePoints
bool shower::ReconTrack::IsShower ( ) const
inline

Definition at line 119 of file TrackShowerSeparationAlg.h.

References fShower.

119 { return fShower; }
bool shower::ReconTrack::IsShowerCone ( ) const
inline

Definition at line 121 of file TrackShowerSeparationAlg.h.

References fShowerCone.

bool shower::ReconTrack::IsShowerTrack ( ) const
inline

Definition at line 120 of file TrackShowerSeparationAlg.h.

References fShowerTrack.

bool shower::ReconTrack::IsTrack ( ) const
inline

Definition at line 122 of file TrackShowerSeparationAlg.h.

References fTrack.

122 { return fTrack; }
bool shower::ReconTrack::IsUndetermined ( ) const
inline

Definition at line 123 of file TrackShowerSeparationAlg.h.

References fShower, and fTrack.

double shower::ReconTrack::Length ( void  ) const
inline

Definition at line 81 of file TrackShowerSeparationAlg.h.

References fLength.

81 { return fLength; }
void shower::ReconTrack::MakeShower ( )
inline

Definition at line 94 of file TrackShowerSeparationAlg.h.

References fTrack, MakeShowerCone(), and MakeShowerTrack().

94  {
95  if (fTrack)
96  this->MakeShowerTrack();
97  else
98  this->MakeShowerCone();
99  }
void shower::ReconTrack::MakeShowerCone ( )
inline

Definition at line 106 of file TrackShowerSeparationAlg.h.

References fShower, fShowerCone, fShowerTrack, and fTrack.

Referenced by MakeShower().

106  {
107  fShower = true;
108  fShowerCone = true;
109  fShowerTrack = false;
110  fTrack = false;
111  }
void shower::ReconTrack::MakeShowerTrack ( )
inline

Definition at line 100 of file TrackShowerSeparationAlg.h.

References fShower, fShowerCone, fShowerTrack, and fTrack.

Referenced by MakeShower().

100  {
101  fShower = true;
102  fShowerTrack = true;
103  fShowerCone = false;
104  fTrack = false;
105  }
void shower::ReconTrack::MakeTrack ( )
inline

Definition at line 112 of file TrackShowerSeparationAlg.h.

References fShower, fShowerCone, fShowerTrack, and fTrack.

112  {
113  fTrack = true;
114  fShower = false;
115  fShowerTrack = false;
116  fShowerCone = false;
117  }
int shower::ReconTrack::NumCylinderSpacePoints ( ) const
inline

Definition at line 132 of file TrackShowerSeparationAlg.h.

References fCylinderSpacePoints.

132 { return fCylinderSpacePoints.size(); }
std::vector< int > fCylinderSpacePoints
int shower::ReconTrack::NumSphereSpacePoints ( ) const
inline

Definition at line 134 of file TrackShowerSeparationAlg.h.

References fSphereSpacePoints.

134 { return fSphereSpacePoints.size(); }
std::vector< int > fSphereSpacePoints
void shower::ReconTrack::SetDirection ( TVector3  direction)
inline

Definition at line 63 of file TrackShowerSeparationAlg.h.

References fDirection.

63 { fDirection = direction; }
void shower::ReconTrack::SetEnd ( TVector3  end)
inline

Definition at line 60 of file TrackShowerSeparationAlg.h.

References evd::details::end(), and fEnd.

60 { fEnd = end; }
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
void shower::ReconTrack::SetHits ( std::vector< art::Ptr< recob::Hit > >  hits)
inline

Definition at line 64 of file TrackShowerSeparationAlg.h.

References fHits, and hits().

64 { fHits = hits; }
void hits()
Definition: readHits.C:15
std::vector< art::Ptr< recob::Hit > > fHits
void shower::ReconTrack::SetLength ( double  length)
inline

Definition at line 61 of file TrackShowerSeparationAlg.h.

References fLength.

61 { fLength = length; }
void shower::ReconTrack::SetSpacePoints ( std::vector< art::Ptr< recob::SpacePoint > >  spacePoints)
inline

Definition at line 65 of file TrackShowerSeparationAlg.h.

References fSpacePoints.

65 { fSpacePoints = spacePoints; }
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
void shower::ReconTrack::SetVertex ( TVector3  vertex)
inline

Definition at line 59 of file TrackShowerSeparationAlg.h.

References fVertex.

59 { fVertex = vertex; }
vertex reconstruction
void shower::ReconTrack::SetVertexDir ( TVector3  vertexDir)
inline

Definition at line 62 of file TrackShowerSeparationAlg.h.

References fVertexDir.

62 { fVertexDir = vertexDir; }
bool shower::ReconTrack::ShowerTrackCandidate ( ) const
inline

Definition at line 126 of file TrackShowerSeparationAlg.h.

References TrackConeSize().

126 { return TrackConeSize() > 5; }
const std::vector<int>& shower::ReconTrack::ShowerTracks ( ) const
inline

Definition at line 127 of file TrackShowerSeparationAlg.h.

References fShowerTracks.

127 { return fShowerTracks; }
std::vector< int > fShowerTracks
const std::vector<art::Ptr<recob::SpacePoint> >& shower::ReconTrack::SpacePoints ( ) const
inline

Definition at line 85 of file TrackShowerSeparationAlg.h.

References fSpacePoints.

85 { return fSpacePoints; }
std::vector< art::Ptr< recob::SpacePoint > > fSpacePoints
double shower::ReconTrack::SphereSpacePointDensity ( double  scale) const
inline

Definition at line 136 of file TrackShowerSeparationAlg.h.

References fLength, and fSphereSpacePoints.

136 { return (double)fSphereSpacePoints.size()/(4*TMath::Pi()*TMath::Power((scale*fLength/2.),3)/3.); }
Double_t scale
Definition: plot.C:25
std::vector< int > fSphereSpacePoints
int shower::ReconTrack::TrackConeSize ( ) const
inline

Definition at line 125 of file TrackShowerSeparationAlg.h.

References fBackwardConeTracks, and fForwardConeTracks.

Referenced by ShowerTrackCandidate().

125 { return (int)fForwardConeTracks.size() - (int)fBackwardConeTracks.size(); }
std::vector< int > fForwardConeTracks
std::vector< int > fBackwardConeTracks
TVector3 shower::ReconTrack::Vertex ( ) const
inline

Definition at line 79 of file TrackShowerSeparationAlg.h.

References fVertex.

79 { return fVertex; }
TVector3 shower::ReconTrack::VertexDirection ( ) const
inline

Definition at line 82 of file TrackShowerSeparationAlg.h.

References fVertexDir.

82 { return fVertexDir; }

Member Data Documentation

std::vector<int> shower::ReconTrack::fBackwardConeTracks
private

Definition at line 153 of file TrackShowerSeparationAlg.h.

Referenced by AddBackwardTrack(), and TrackConeSize().

std::vector<int> shower::ReconTrack::fBackwardSpacePoints
private

Definition at line 157 of file TrackShowerSeparationAlg.h.

Referenced by AddBackwardSpacePoint(), and ConeSize().

std::vector<int> shower::ReconTrack::fCylinderSpacePoints
private
TVector3 shower::ReconTrack::fDirection
private

Definition at line 148 of file TrackShowerSeparationAlg.h.

Referenced by Direction(), FlipTrack(), and SetDirection().

TVector3 shower::ReconTrack::fEnd
private

Definition at line 145 of file TrackShowerSeparationAlg.h.

Referenced by End(), FlipTrack(), and SetEnd().

std::vector<int> shower::ReconTrack::fForwardConeTracks
private

Definition at line 152 of file TrackShowerSeparationAlg.h.

Referenced by AddForwardTrack(), ForwardConeTracks(), and TrackConeSize().

std::vector<int> shower::ReconTrack::fForwardSpacePoints
private

Definition at line 156 of file TrackShowerSeparationAlg.h.

Referenced by AddForwardSpacePoint(), ConeSize(), and ForwardSpacePoints().

std::vector<art::Ptr<recob::Hit> > shower::ReconTrack::fHits
private

Definition at line 149 of file TrackShowerSeparationAlg.h.

Referenced by Hits(), and SetHits().

int shower::ReconTrack::fID
private

Definition at line 143 of file TrackShowerSeparationAlg.h.

Referenced by ID(), and ReconTrack().

std::map<int,double> shower::ReconTrack::fIsolationSpacePoints
private
double shower::ReconTrack::fLength
private

Definition at line 146 of file TrackShowerSeparationAlg.h.

Referenced by Length(), SetLength(), and SphereSpacePointDensity().

bool shower::ReconTrack::fShower
private
bool shower::ReconTrack::fShowerCone
private
bool shower::ReconTrack::fShowerTrack
private
std::vector<int> shower::ReconTrack::fShowerTracks
private

Definition at line 154 of file TrackShowerSeparationAlg.h.

Referenced by AddShowerTrack(), and ShowerTracks().

std::vector<art::Ptr<recob::SpacePoint> > shower::ReconTrack::fSpacePoints
private
std::vector<int> shower::ReconTrack::fSphereSpacePoints
private
bool shower::ReconTrack::fTrack
private
TVector3 shower::ReconTrack::fVertex
private

Definition at line 144 of file TrackShowerSeparationAlg.h.

Referenced by FlipTrack(), SetVertex(), and Vertex().

TVector3 shower::ReconTrack::fVertexDir
private

Definition at line 147 of file TrackShowerSeparationAlg.h.

Referenced by SetVertexDir(), and VertexDirection().


The documentation for this class was generated from the following file: