LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TCShowerAlg.cxx File Reference
#include "TCShowerAlg.h"

Go to the source code of this file.

Classes

struct  pfpStuff
 

Namespaces

 shower
 

Functions

bool comparePFP (const pfpStuff &l, const pfpStuff &r)
 
bool compareHit (const art::Ptr< recob::Hit > &l, const art::Ptr< recob::Hit > &r)
 

Function Documentation

bool compareHit ( const art::Ptr< recob::Hit > &  l,
const art::Ptr< recob::Hit > &  r 
)

Definition at line 32 of file TCShowerAlg.cxx.

References geo::WireID::asWireID(), geo::WireID::Wire, and recob::Hit::WireID().

32  {
33 
34  int lwire = l->WireID().asWireID().Wire;
35  int rwire = r->WireID().asWireID().Wire;
36  /*
37  double ltick = l->PeakTime();
38  double rtick = r->PeakTime();
39  */
40  return lwire > rwire;
41 }
WireID const & asWireID() const
Conversion to WireID (for convenience of notation).
Definition: geo_types.h:337
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:313
bool comparePFP ( const pfpStuff l,
const pfpStuff r 
)

Definition at line 14 of file TCShowerAlg.cxx.

References pfpStuff::hits, recob::Vertex::position(), and pfpStuff::vtx.

Referenced by shower::TCShowerAlg::makeShowers().

14  {
15 
18 
19  double lz = l.hits.size();
20  double rz = r.hits.size();
21 
22  // RSF: USED TO BE 50
23  int hitthres = 80; // TODO: ADJUST THIS THRESHOLD
24 
25  if (lz > hitthres && rz <= hitthres) return false;
26  else if (lz <= hitthres && rz > hitthres) return true;
27  return lvtx->position().Z() > rvtx->position().Z();
28 
29  // return l.score > r.score;
30 }
std::vector< art::Ptr< recob::Hit > > hits
Definition: TCShowerAlg.cxx:7
art::Ptr< recob::Vertex > vtx
Definition: TCShowerAlg.cxx:6
const Point_t & position() const
Return vertex 3D position.
Definition: Vertex.h:60