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

#include "GraphClusterAlg.h"

Public Member Functions

 GraphClusterAlg (fhicl::ParameterSet const &)
 
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 28 of file GraphClusterAlg.h.

Constructor & Destructor Documentation

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

Definition at line 23 of file GraphClusterAlg.cxx.

References fNPlanes, and Get.

24 {
26 }
cout<< "Opened file "<< fin<< " ixs= "<< ixs<< endl;if(ixs==0) hhh=(TH1F *) fff-> Get("h1")
Definition: AddMC.C:8

Member Function Documentation

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

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

88 {
90  TestFlag = intr->GetTestFlag();
91 
92  fEvent = intr->GetEvtNumber();
93  fRun = intr->GetRunNumber();
94  fSubRun = intr->GetSubRunNumber();
95 
96  if (TestFlag == -1) return -1;
97 
98  if (fEvent != (int)evt.id().event() || fRun != (int)evt.id().run() ||
99  fSubRun != (int)evt.id().subRun()) {
100  mf::LogVerbatim("GraphClusterAlg") << (" old event ");
101  return -1;
102  }
103 
104  return TestFlag;
105 }
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 53 of file GraphClusterAlg.cxx.

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

Referenced by GetHitListAndEndPoints().

54 {
56 
57  std::vector<art::Ptr<recob::Hit>> ptlist = intr->GetHitList(plane);
58 
59  if (ptlist.size() == 0) {
60  mf::LogVerbatim("GraphClusterAlg") << ("hit list of zero size, please select some hits");
61  return;
62  }
63 
64  for (art::PtrVector<recob::Hit>::const_iterator hitIter = ptlist.begin(); hitIter != ptlist.end();
65  hitIter++) {
66  ptrhitlist.push_back((*hitIter));
67  }
68 
69  return;
70 }
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 29 of file GraphClusterAlg.cxx.

References GetHitList(), and GetStartEndHits().

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

32 {
33  GetHitList(plane, ptrhitlist);
34  GetStartEndHits(plane, startendpoints);
35 }
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 73 of file GraphClusterAlg.cxx.

References evd::InfoTransfer::GetSeedList().

74 {
75 
78  //this is where you could create Bezier Tracks if you wanted to do it inside a producer
80  std::vector<util::PxLine> plines = intr->GetSeedList();
81 
82  std::cout << " Received Seed List of Size: " << plines.size() << std::endl;
83 
84  return plines;
85 }
std::vector< util::PxLine > const & GetSeedList() const
void evd::GraphClusterAlg::GetStartEndHits ( unsigned int  plane,
util::PxLine startendpoints 
)

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

38 {
39  std::vector<double> starthit;
40  std::vector<double> endhit;
42  starthit = intr->GetStartHitCoords(plane);
43  endhit = intr->GetEndHitCoords(plane);
44 
45  startendpoints.w0 = starthit[0];
46  startendpoints.t0 = starthit[1];
47  startendpoints.w1 = endhit[0];
48  startendpoints.t1 = endhit[1];
49  startendpoints.plane = plane;
50 }
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

Member Data Documentation

int evd::GraphClusterAlg::fEvent
private

Definition at line 51 of file GraphClusterAlg.h.

Referenced by CheckValidity().

unsigned int evd::GraphClusterAlg::fNPlanes
private

Definition at line 46 of file GraphClusterAlg.h.

Referenced by GraphClusterAlg().

int evd::GraphClusterAlg::fRun
private

Definition at line 49 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::fSubRun
private

Definition at line 50 of file GraphClusterAlg.h.

Referenced by CheckValidity().

int evd::GraphClusterAlg::TestFlag
private

Definition at line 48 of file GraphClusterAlg.h.

Referenced by CheckValidity().


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