10 #define GRAPHCLUSTER_H 60 #include <sys/types.h> 137 void GetStartEndHits(
unsigned int plane);
143 std::vector < util::PxLine > GetSeedLines();
177 fGClAlg(pset.get<
fhicl::ParameterSet >(
"GraphClusterAlg"))
183 produces< std::vector<recob::Cluster> >();
184 produces< art::Assns<recob::Cluster, recob::Hit> >();
185 produces< std::vector < art::PtrVector <recob::Cluster> > >();
221 std::unique_ptr<std::vector<recob::Cluster> > Graphcol(
new std::vector<recob::Cluster>);
238 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
243 std::vector < art::PtrVector < recob::Hit > > hitlist;
244 hitlist.resize(fNPlanes);
246 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
252 if(hitlist[ip].size()==0)
262 if(hitlist[ip].size()>0 && !(
TestFlag==-1 ) )
264 double swterror=0.,ewterror=0.;
272 std::cout <<
" clustering @ " <<
startendpoints[ip].w0 <<
" +/- "<< swterror
281 integral.
add(
hit->Integral());
282 summedADC.
add(
hit->SummedADC());
286 geo::PlaneID planeID = hitlist[ip].front()->WireID().planeID();
287 Graphcol->emplace_back(
324 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
325 art::ProductID aid = this->getProductID< std::vector < recob::Cluster > >();
330 classn->push_back(cvec);
340 evt.
put(std::move(Graphcol));
341 evt.
put(std::move(hassn));
342 evt.
put(std::move(classn));
354 #endif // GRAPHCLUSTER_H code to link reconstructed objects back to the MC truth information
void reserve(size_type n)
Namespace for general, non-LArSoft-specific utilities.
PlaneGeo const & Plane(unsigned int const p, unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified wire.
Reconstruction base classes.
Declaration of signal hit object.
The data type to uniquely identify a Plane.
CryostatID_t Cryostat
Index of cryostat.
EDProductGetter const * productGetter(ProductID const) const
Classes gathering simple statistics.
Weight_t RMS() const
Returns the root mean square.
std::vector< recob::Hit * > starthit
static const SentryArgument_t Sentry
An instance of the sentry object.
ProductID put(std::unique_ptr< PROD > &&product)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
View_t View() const
Which coordinate does this plane measure.
unsigned int Nplanes(unsigned int tpc=0, unsigned int cstat=0) const
Returns the total number of wire planes in the specified TPC.
#define DEFINE_ART_MODULE(klass)
void push_back(Ptr< U > const &p)
Weight_t Sum() const
Returns the weighted sum of the values.
int CheckValidity(art::Event &evt)
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
std::vector< util::PxLine > startendpoints
Declaration of cluster object.
Detector simulation of raw signals on wires.
void GetHitListAndEndPoints(unsigned int plane, art::PtrVector< recob::Hit > &ptrhitlist, util::PxLine &startendpoints)
void produce(art::Event &evt)
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
std::vector< recob::Hit * > endhit
2D representation of charge deposited in the TDC/wire plane
TPCID_t TPC
Index of the TPC within its cryostat.
Namespace collecting geometry-related classes utilities.
Collects statistics on a single quantity (weighted)
void reconfigure(fhicl::ParameterSet const &p)
art framework interface to geometry description
void add(Data_t value, Weight_t weight=Weight_t(1.0))
Adds one entry with specified value and weight.