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 31 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);
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  }
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)
LArSoft geometry interface.
Definition: ChannelGeo.h:16

Member Function Documentation

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

Definition at line 216 of file GraphClusterAlg.cxx.

216  {
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  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
RunNumber_t run() const
Definition: EventID.h:98
EventNumber_t event() const
Definition: EventID.h:116
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID id() const
Definition: Event.cc:34
void evd::GraphClusterAlg::GetHitList ( unsigned int  plane,
art::PtrVector< recob::Hit > &  ptrhitlist 
)

Definition at line 176 of file GraphClusterAlg.cxx.

177  {
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  }
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
typename data_t::const_iterator const_iterator
Definition: PtrVector.h:55
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
std::vector< art::Ptr< recob::Hit > > GetHitList(unsigned int plane)
Definition: InfoTransfer.h:64
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 
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  }
std::vector< util::PxLine > GetSeedList()
QTextStream & endl(QTextStream &s)
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;
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  }
std::vector< double > GetStartHitCoords(unsigned int plane)
Definition: InfoTransfer.h:93
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:95
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 62 of file GraphClusterAlg.h.

unsigned int evd::GraphClusterAlg::fNPlanes
private

Definition at line 57 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::fRun
private

Definition at line 60 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::fSubRun
private

Definition at line 61 of file GraphClusterAlg.h.

int evd::GraphClusterAlg::TestFlag
private

Definition at line 59 of file GraphClusterAlg.h.


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