LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
evd::GraphClusterAlg Class Reference

#include "GraphClusterAlg.h"

Public Member Functions

 GraphClusterAlg (fhicl::ParameterSet const &pset)
 
void reconfigure (fhicl::ParameterSet const &pset)
 
void GetStartEndHits (unsigned int plane, util::PxLine &startendpoints)
 
void GetHitList (unsigned int plane, art::PtrVector< recob::Hit > &ptrhitlist)
 
void GetHitListAndEndPoints (unsigned int plane, art::PtrVector< recob::Hit > &ptrhitlist, util::PxLine &startendpoints)
 
int CheckValidity (art::Event &evt)
 

Private Member Functions

std::vector< util::PxLineGetSeedLines ()
 

Private Attributes

unsigned int fNPlanes
 
int TestFlag
 
int fRun
 
int fSubRun
 
int fEvent
 

Detailed Description

Definition at line 33 of file GraphClusterAlg.h.

Constructor & Destructor Documentation

evd::GraphClusterAlg::GraphClusterAlg ( fhicl::ParameterSet const &  pset)

Definition at line 23 of file GraphClusterAlg.cxx.

References fNPlanes, geo::GeometryCore::Nplanes(), and reconfigure().

24 {
25  this->reconfigure(pset);
27 
28  fNPlanes = geo->Nplanes();
29  // starthit.resize(fNPlanes);
30  // endhit.resize(fNPlanes);
31 
32  /*
33  swire.resize(fNPlanes);
34  ewire.resize(fNPlanes);
35  stime.resize(fNPlanes);
36  etime.resize(fNPlanes);*/
37 }
unsigned int Nplanes(TPCID const &tpcid=tpc_zero) const
Returns the total number of planes in the specified TPC.
Definition: GeometryCore.h:977
void reconfigure(fhicl::ParameterSet const &pset)
Namespace collecting geometry-related classes utilities.

Member Function Documentation

int evd::GraphClusterAlg::CheckValidity ( art::Event evt)

Definition at line 199 of file GraphClusterAlg.cxx.

References art::EventID::event(), fEvent, fRun, fSubRun, evd::InfoTransfer::GetEvtNumber(), evd::InfoTransfer::GetRunNumber(), evd::InfoTransfer::GetSubRunNumber(), evd::InfoTransfer::GetTestFlag(), art::Event::id(), art::EventID::run(), art::EventID::subRun(), and TestFlag.

Referenced by evd::GraphCluster::produce().

200 {
202  TestFlag = intr->GetTestFlag();
203 
204  fEvent = intr->GetEvtNumber();
205  fRun = intr->GetRunNumber();
206  fSubRun = intr->GetSubRunNumber();
207 
208  if (TestFlag == -1) return -1;
209 
210  if (fEvent != (int)evt.id().event() || fRun != (int)evt.id().run() ||
211  fSubRun != (int)evt.id().subRun()) {
212  mf::LogVerbatim("GraphClusterAlg") << (" old event ");
213  return -1;
214  }
215 
216  return TestFlag;
217 }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
RunNumber_t run() const
Definition: EventID.h:98
int GetRunNumber() const
Definition: InfoTransfer.h:58
int GetSubRunNumber() const
Definition: InfoTransfer.h:60
int GetTestFlag() const
Definition: InfoTransfer.h:56
EventNumber_t event() const
Definition: EventID.h:116
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID id() const
Definition: Event.cc:23
int GetEvtNumber() const
Definition: InfoTransfer.h:62
void evd::GraphClusterAlg::GetHitList ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist 
)

Definition at line 161 of file GraphClusterAlg.cxx.

References evd::InfoTransfer::GetHitList(), and art::PtrVector< T >::push_back().

Referenced by GetHitListAndEndPoints().

162 {
164 
165  std::vector<art::Ptr<recob::Hit>> ptlist = intr->GetHitList(plane);
166 
167  //std::vector <recob::Hit *> hitlist_out;
168 
169  if (ptlist.size() == 0) {
170  mf::LogVerbatim("GraphClusterAlg") << ("hit list of zero size, please select some hits");
171  return;
172  }
173 
174  for (art::PtrVector<recob::Hit>::const_iterator hitIter = ptlist.begin(); hitIter != ptlist.end();
175  hitIter++) {
176  // art::Ptr<recob::Hit> theHit = (*hitIter);
177  // unsigned int plane,cstat,tpc,wire;
178  ptrhitlist.push_back((*hitIter));
179  }
180 
181  return; // hitlist_out;
182 }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
std::vector< art::Ptr< recob::Hit > > const & GetHitList(unsigned int plane) const
Definition: InfoTransfer.h:70
typename data_t::const_iterator const_iterator
Definition: PtrVector.h:55
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
void evd::GraphClusterAlg::GetHitListAndEndPoints ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist,
util::PxLine startendpoints 
)

Definition at line 46 of file GraphClusterAlg.cxx.

References GetHitList(), and GetStartEndHits().

Referenced by evd::GraphCluster::produce().

49 {
50  GetHitList(plane, ptrhitlist);
51  GetStartEndHits(plane, startendpoints);
52 }
void GetStartEndHits(unsigned int plane, util::PxLine &startendpoints)
void GetHitList(unsigned int plane, art::PtrVector< recob::Hit > &ptrhitlist)
std::vector< util::PxLine > evd::GraphClusterAlg::GetSeedLines ( )
private

Definition at line 185 of file GraphClusterAlg.cxx.

References evd::InfoTransfer::GetSeedList().

186 {
187 
190  //this is where you could create Bezier Tracks if you wanted to do it inside a producer
192  std::vector<util::PxLine> plines = intr->GetSeedList();
193 
194  std::cout << " Received Seed List of Size: " << plines.size() << std::endl;
195 
196  return plines;
197 }
std::vector< util::PxLine > const & GetSeedList() const
void evd::GraphClusterAlg::GetStartEndHits ( unsigned int  plane,
util::PxLine startendpoints 
)

Definition at line 54 of file GraphClusterAlg.cxx.

References evd::InfoTransfer::GetEndHitCoords(), evd::InfoTransfer::GetStartHitCoords(), util::PxLine::plane, util::PxLine::t0, util::PxLine::t1, util::PxLine::w0, and util::PxLine::w1.

Referenced by GetHitListAndEndPoints().

55 {
56  std::vector<double> starthit;
57  std::vector<double> endhit;
59  starthit = intr->GetStartHitCoords(plane);
60  endhit = intr->GetEndHitCoords(plane);
61 
62  startendpoints.w0 = starthit[0];
63  startendpoints.t0 = starthit[1];
64  startendpoints.w1 = endhit[0];
65  startendpoints.t1 = endhit[1];
66  startendpoints.plane = plane;
67 }
double t1
defined to be the ending t-position (of line or seed depending)
Definition: PxUtils.h:67
std::vector< double > const & GetEndHitCoords(unsigned int plane) const
Definition: InfoTransfer.h:107
double w0
defined to be the vertex w-position
Definition: PxUtils.h:64
double w1
defined to be the ending w-position (of line or seed depending)
Definition: PxUtils.h:66
unsigned int plane
Definition: PxUtils.h:68
double t0
defined to be the vertex t-position
Definition: PxUtils.h:65
std::vector< double > const & GetStartHitCoords(unsigned int plane) const
Definition: InfoTransfer.h:102
void evd::GraphClusterAlg::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 40 of file GraphClusterAlg.cxx.

Referenced by GraphClusterAlg().

41 {
42 
43  return;
44 }

Member Data Documentation

int evd::GraphClusterAlg::fEvent
private

Definition at line 61 of file GraphClusterAlg.h.

Referenced by CheckValidity().

unsigned int evd::GraphClusterAlg::fNPlanes
private

Definition at line 56 of file GraphClusterAlg.h.

Referenced by GraphClusterAlg().

int evd::GraphClusterAlg::fRun
private

Definition at line 59 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::fSubRun
private

Definition at line 60 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::TestFlag
private

Definition at line 58 of file GraphClusterAlg.h.

Referenced by CheckValidity().


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