LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 59 of file GraphClusterAlg.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file GraphClusterAlg.cxx.

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

20  {
21  this->reconfigure(pset);
23 
24 
25 
26 
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(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
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 212 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().

212  {
214  TestFlag=intr->GetTestFlag();
215 
216  fEvent=intr->GetEvtNumber();
217  fRun=intr->GetRunNumber();
218  fSubRun=intr->GetSubRunNumber();
219 
220 
221 
222  if(TestFlag==-1)
223  return -1;
224 
225  if(fEvent!=(int)evt.id().event() || fRun!=(int)evt.id().run() || fSubRun!=(int)evt.id().subRun() ) {
226  mf::LogVerbatim("GraphClusterAlg") << (" old event ");
227  return -1;
228  }
229 
230  return TestFlag;
231  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
RunNumber_t run() const
Definition: EventID.h:99
EventNumber_t event() const
Definition: EventID.h:117
SubRunNumber_t subRun() const
Definition: EventID.h:111
EventID id() const
Definition: Event.h:56
void evd::GraphClusterAlg::GetHitList ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist 
)

Definition at line 172 of file GraphClusterAlg.cxx.

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

Referenced by GetHitListAndEndPoints().

173  {
175 
176  std::vector< art::Ptr <recob::Hit> > ptlist=intr->GetHitList(plane);
177 
178 
179  //std::vector <recob::Hit *> hitlist_out;
180 
181  if(ptlist.size()==0) {
182  mf::LogVerbatim("GraphClusterAlg") << ("hit list of zero size, please select some hits");
183  return;
184  }
185 
186  for(art::PtrVector<recob::Hit>::const_iterator hitIter = ptlist.begin(); hitIter != ptlist.end(); hitIter++){
187  // art::Ptr<recob::Hit> theHit = (*hitIter);
188  // unsigned int plane,cstat,tpc,wire;
189  ptrhitlist.push_back((*hitIter));
190  }
191 
192  return;// hitlist_out;
193  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
data_t::const_iterator const_iterator
Definition: PtrVector.h:61
std::vector< art::Ptr< recob::Hit > > GetHitList(unsigned int plane)
Definition: InfoTransfer.h:63
void evd::GraphClusterAlg::GetHitListAndEndPoints ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist,
util::PxLine startendpoints 
)

Definition at line 51 of file GraphClusterAlg.cxx.

References GetHitList(), and GetStartEndHits().

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

52  {
53  GetHitList(plane,ptrhitlist);
54  GetStartEndHits(plane,startendpoints);
55 
56 
57  }
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 197 of file GraphClusterAlg.cxx.

References evd::InfoTransfer::GetSeedList().

198  {
199 
202  //this is where you could create Bezier Tracks if you wanted to do it inside a producer
204  std::vector < util::PxLine > plines = intr->GetSeedList();
205 
206  std::cout << " Received Seed List of Size: " << plines.size() << std::endl;
207 
208  return plines;
209  }
std::vector< util::PxLine > GetSeedList()
void evd::GraphClusterAlg::GetStartEndHits ( unsigned int  plane,
util::PxLine startendpoints 
)

Definition at line 61 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().

62  {
63  std::vector < double > starthit;
64  std::vector < double > endhit;
66  starthit=intr->GetStartHitCoords(plane);
67  endhit=intr->GetEndHitCoords(plane);
68 
69  startendpoints.w0=starthit[0];
70  startendpoints.t0=starthit[1];
71  startendpoints.w1=endhit[0];
72  startendpoints.t1=endhit[1];
73  startendpoints.plane=plane;
74 
75  }
std::vector< double > GetStartHitCoords(unsigned int plane)
Definition: InfoTransfer.h:92
double t1
defined to be the ending t-position (of line or seed depending)
Definition: PxUtils.h:72
double w0
defined to be the vertex w-position
Definition: PxUtils.h:69
double w1
defined to be the ending w-position (of line or seed depending)
Definition: PxUtils.h:71
std::vector< double > GetEndHitCoords(unsigned int plane)
Definition: InfoTransfer.h:94
unsigned int plane
Definition: PxUtils.h:73
double t0
defined to be the vertex t-position
Definition: PxUtils.h:70
void evd::GraphClusterAlg::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 42 of file GraphClusterAlg.cxx.

Referenced by GraphClusterAlg().

43  {
44 
45 
46  return;
47  }

Member Data Documentation

int evd::GraphClusterAlg::fEvent
private

Definition at line 90 of file GraphClusterAlg.h.

Referenced by CheckValidity().

unsigned int evd::GraphClusterAlg::fNPlanes
private

Definition at line 85 of file GraphClusterAlg.h.

Referenced by GraphClusterAlg().

int evd::GraphClusterAlg::fRun
private

Definition at line 88 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::fSubRun
private

Definition at line 89 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::TestFlag
private

Definition at line 87 of file GraphClusterAlg.h.

Referenced by CheckValidity().


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