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

Constructor & Destructor Documentation

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

Definition at line 23 of file GraphClusterAlg.cxx.

24  {
25  this->reconfigure(pset);
26  art::ServiceHandle<geo::Geometry const> geo;
27 
28 
29 
30 
31 
32  fNPlanes = geo->Nplanes();
33 // starthit.resize(fNPlanes);
34 // endhit.resize(fNPlanes);
35 
36  /*
37  swire.resize(fNPlanes);
38  ewire.resize(fNPlanes);
39  stime.resize(fNPlanes);
40  etime.resize(fNPlanes);*/
41  }
void reconfigure(fhicl::ParameterSet const &pset)

Member Function Documentation

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

Definition at line 216 of file GraphClusterAlg.cxx.

216  {
217  art::ServiceHandle<evd::InfoTransfer const> intr;
218  TestFlag=intr->GetTestFlag();
219 
220  fEvent=intr->GetEvtNumber();
221  fRun=intr->GetRunNumber();
222  fSubRun=intr->GetSubRunNumber();
223 
224 
225 
226  if(TestFlag==-1)
227  return -1;
228 
229  if(fEvent!=(int)evt.id().event() || fRun!=(int)evt.id().run() || fSubRun!=(int)evt.id().subRun() ) {
230  mf::LogVerbatim("GraphClusterAlg") << (" old event ");
231  return -1;
232  }
233 
234  return TestFlag;
235  }
unsigned int event
Definition: DataStructs.h:634
unsigned int run
Definition: DataStructs.h:635
unsigned int subRun
Definition: DataStructs.h:636
TCEvent evt
Definition: DataStructs.cxx:8
void evd::GraphClusterAlg::GetHitList ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist 
)

Definition at line 176 of file GraphClusterAlg.cxx.

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

Definition at line 55 of file GraphClusterAlg.cxx.

56  {
57  GetHitList(plane,ptrhitlist);
58  GetStartEndHits(plane,startendpoints);
59 
60 
61  }
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 201 of file GraphClusterAlg.cxx.

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

Definition at line 65 of file GraphClusterAlg.cxx.

66  {
67  std::vector < double > starthit;
68  std::vector < double > endhit;
69  art::ServiceHandle<evd::InfoTransfer const> intr;
70  starthit=intr->GetStartHitCoords(plane);
71  endhit=intr->GetEndHitCoords(plane);
72 
73  startendpoints.w0=starthit[0];
74  startendpoints.t0=starthit[1];
75  startendpoints.w1=endhit[0];
76  startendpoints.t1=endhit[1];
77  startendpoints.plane=plane;
78 
79  }
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
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 46 of file GraphClusterAlg.cxx.

47  {
48 
49 
50  return;
51  }

Member Data Documentation

int evd::GraphClusterAlg::fEvent
private

Definition at line 60 of file GraphClusterAlg.h.

unsigned int evd::GraphClusterAlg::fNPlanes
private

Definition at line 55 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::fRun
private

Definition at line 58 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::fSubRun
private

Definition at line 59 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::TestFlag
private

Definition at line 57 of file GraphClusterAlg.h.


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