All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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 39 of file TrackShowerSeparationAlg.h.

Constructor & Destructor Documentation

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

Definition at line 42 of file TrackShowerSeparationAlg.h.

Member Function Documentation

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

Definition at line 64 of file TrackShowerSeparationAlg.h.

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

Definition at line 60 of file TrackShowerSeparationAlg.h.

60 { if (std::find(fBackwardConeTracks.begin(), fBackwardConeTracks.end(), track) == fBackwardConeTracks.end()) fBackwardConeTracks.push_back(track); }
process_name use argoneut_mc_hitfinder track
std::vector< int > fBackwardConeTracks
void shower::ReconTrack::AddCylinderSpacePoint ( int  spacePoint)
inline

Definition at line 65 of file TrackShowerSeparationAlg.h.

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

Definition at line 63 of file TrackShowerSeparationAlg.h.

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

Definition at line 59 of file TrackShowerSeparationAlg.h.

59 { if (std::find(fForwardConeTracks.begin(), fForwardConeTracks.end(), track) == fForwardConeTracks.end()) fForwardConeTracks.push_back(track); }
process_name use argoneut_mc_hitfinder track
std::vector< int > fForwardConeTracks
void shower::ReconTrack::AddIsolationSpacePoint ( int  spacePoint,
double  distance 
)
inline

Definition at line 67 of file TrackShowerSeparationAlg.h.

67 { fIsolationSpacePoints[spacePoint] = distance; }
std::map< int, double > fIsolationSpacePoints
double distance(geo::Point_t const &point, CathodeDesc_t const &cathode)
Returns the distance of a point from the cathode.
void shower::ReconTrack::AddShowerTrack ( int  track)
inline

Definition at line 61 of file TrackShowerSeparationAlg.h.

61 { fShowerTracks.push_back(track); }
process_name use argoneut_mc_hitfinder track
std::vector< int > fShowerTracks
void shower::ReconTrack::AddSphereSpacePoint ( int  spacePoint)
inline

Definition at line 66 of file TrackShowerSeparationAlg.h.

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

Definition at line 122 of file TrackShowerSeparationAlg.h.

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

Definition at line 125 of file TrackShowerSeparationAlg.h.

125 { 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 75 of file TrackShowerSeparationAlg.h.

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

Definition at line 72 of file TrackShowerSeparationAlg.h.

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

Definition at line 79 of file TrackShowerSeparationAlg.h.

79  {
80  TVector3 tmp = fEnd;
81  fEnd = fVertex;
82  fVertex = tmp;
83  fDirection *= -1;
84  }
const std::vector<int>& shower::ReconTrack::ForwardConeTracks ( ) const
inline

Definition at line 120 of file TrackShowerSeparationAlg.h.

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

Definition at line 123 of file TrackShowerSeparationAlg.h.

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

Definition at line 76 of file TrackShowerSeparationAlg.h.

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

Definition at line 70 of file TrackShowerSeparationAlg.h.

70 { return fID; }
double shower::ReconTrack::IsolationSpacePointDistance ( ) const
inline

Definition at line 128 of file TrackShowerSeparationAlg.h.

128  { std::vector<double> distances;
129  std::transform(fIsolationSpacePoints.begin(), fIsolationSpacePoints.end(), std::back_inserter(distances), [](const std::pair<int,double>& p){return p.second;});
130  return TMath::Mean(distances.begin(), distances.end()); }
static constexpr Sample_t transform(Sample_t sample)
pdgs p
Definition: selectors.fcl:22
std::map< int, double > fIsolationSpacePoints
bool shower::ReconTrack::IsShower ( ) const
inline

Definition at line 111 of file TrackShowerSeparationAlg.h.

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

Definition at line 113 of file TrackShowerSeparationAlg.h.

113 { return fShowerCone; }
bool shower::ReconTrack::IsShowerTrack ( ) const
inline

Definition at line 112 of file TrackShowerSeparationAlg.h.

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

Definition at line 114 of file TrackShowerSeparationAlg.h.

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

Definition at line 115 of file TrackShowerSeparationAlg.h.

115 { return !fTrack and !fShower; }
return match has_match and(match.match_pdg==11 or match.match_pdg==-11)
double shower::ReconTrack::Length ( void  ) const
inline

Definition at line 73 of file TrackShowerSeparationAlg.h.

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

Definition at line 86 of file TrackShowerSeparationAlg.h.

86  {
87  if (fTrack)
88  this->MakeShowerTrack();
89  else
90  this->MakeShowerCone();
91  }
void shower::ReconTrack::MakeShowerCone ( )
inline

Definition at line 98 of file TrackShowerSeparationAlg.h.

98  {
99  fShower = true;
100  fShowerCone = true;
101  fShowerTrack = false;
102  fTrack = false;
103  }
void shower::ReconTrack::MakeShowerTrack ( )
inline

Definition at line 92 of file TrackShowerSeparationAlg.h.

void shower::ReconTrack::MakeTrack ( )
inline

Definition at line 104 of file TrackShowerSeparationAlg.h.

104  {
105  fTrack = true;
106  fShower = false;
107  fShowerTrack = false;
108  fShowerCone = false;
109  }
int shower::ReconTrack::NumCylinderSpacePoints ( ) const
inline

Definition at line 124 of file TrackShowerSeparationAlg.h.

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

Definition at line 126 of file TrackShowerSeparationAlg.h.

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

Definition at line 55 of file TrackShowerSeparationAlg.h.

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

Definition at line 52 of file TrackShowerSeparationAlg.h.

52 { fEnd = end; }
auto end(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:585
void shower::ReconTrack::SetHits ( std::vector< art::Ptr< recob::Hit > >  hits)
inline

Definition at line 56 of file TrackShowerSeparationAlg.h.

56 { fHits = hits; }
std::vector< art::Ptr< recob::Hit > > fHits
void shower::ReconTrack::SetLength ( double  length)
inline

Definition at line 53 of file TrackShowerSeparationAlg.h.

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

Definition at line 57 of file TrackShowerSeparationAlg.h.

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

Definition at line 51 of file TrackShowerSeparationAlg.h.

51 { fVertex = vertex; }
process_name vertex
Definition: cheaterreco.fcl:51
void shower::ReconTrack::SetVertexDir ( TVector3  vertexDir)
inline

Definition at line 54 of file TrackShowerSeparationAlg.h.

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

Definition at line 118 of file TrackShowerSeparationAlg.h.

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

Definition at line 119 of file TrackShowerSeparationAlg.h.

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

Definition at line 77 of file TrackShowerSeparationAlg.h.

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

Definition at line 127 of file TrackShowerSeparationAlg.h.

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

Definition at line 117 of file TrackShowerSeparationAlg.h.

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

Definition at line 71 of file TrackShowerSeparationAlg.h.

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

Definition at line 74 of file TrackShowerSeparationAlg.h.

74 { return fVertexDir; }

Member Data Documentation

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

Definition at line 144 of file TrackShowerSeparationAlg.h.

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

Definition at line 148 of file TrackShowerSeparationAlg.h.

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

Definition at line 149 of file TrackShowerSeparationAlg.h.

TVector3 shower::ReconTrack::fDirection
private

Definition at line 139 of file TrackShowerSeparationAlg.h.

TVector3 shower::ReconTrack::fEnd
private

Definition at line 136 of file TrackShowerSeparationAlg.h.

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

Definition at line 143 of file TrackShowerSeparationAlg.h.

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

Definition at line 147 of file TrackShowerSeparationAlg.h.

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

Definition at line 140 of file TrackShowerSeparationAlg.h.

int shower::ReconTrack::fID
private

Definition at line 134 of file TrackShowerSeparationAlg.h.

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

Definition at line 151 of file TrackShowerSeparationAlg.h.

double shower::ReconTrack::fLength
private

Definition at line 137 of file TrackShowerSeparationAlg.h.

bool shower::ReconTrack::fShower
private

Definition at line 153 of file TrackShowerSeparationAlg.h.

bool shower::ReconTrack::fShowerCone
private

Definition at line 155 of file TrackShowerSeparationAlg.h.

bool shower::ReconTrack::fShowerTrack
private

Definition at line 154 of file TrackShowerSeparationAlg.h.

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

Definition at line 145 of file TrackShowerSeparationAlg.h.

std::vector<art::Ptr<recob::SpacePoint> > shower::ReconTrack::fSpacePoints
private

Definition at line 141 of file TrackShowerSeparationAlg.h.

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

Definition at line 150 of file TrackShowerSeparationAlg.h.

bool shower::ReconTrack::fTrack
private

Definition at line 156 of file TrackShowerSeparationAlg.h.

TVector3 shower::ReconTrack::fVertex
private

Definition at line 135 of file TrackShowerSeparationAlg.h.

TVector3 shower::ReconTrack::fVertexDir
private

Definition at line 138 of file TrackShowerSeparationAlg.h.


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