170 std::unique_ptr<std::vector<recob::Cluster> > Graphcol(
new std::vector<recob::Cluster>);
171 std::unique_ptr< art::Assns<recob::Cluster, recob::Hit> > hassn(
new art::Assns<recob::Cluster, recob::Hit>);
173 std::unique_ptr< std::vector < art::PtrVector < recob::Cluster > > > classn(
new std::vector < art::PtrVector < recob::Cluster > >);
178 art::ServiceHandle<geo::Geometry const> geo;
187 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
192 std::vector < art::PtrVector < recob::Hit > > hitlist;
193 hitlist.resize(fNPlanes);
195 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
201 if(hitlist[ip].
size()==0)
213 double swterror=0.,ewterror=0.;
229 for (art::Ptr<recob::Hit>
const&
hit: hitlist[ip]) {
230 integral.
add(
hit->Integral());
231 summedADC.
add(
hit->SummedADC());
235 geo::PlaneID planeID = hitlist[ip].front()->WireID().planeID();
236 Graphcol->emplace_back(
259 geo->Plane(ip,planeID.
TPC,planeID.
Cryostat).View(),
270 art::PtrVector < recob::Cluster > cvec;
271 cvec.reserve(fNPlanes);
273 for(
unsigned int ip=0;ip<
fNPlanes;ip++) {
274 art::ProductID aid =
evt.getProductID< std::vector < recob::Cluster > >();
275 art::Ptr< recob::Cluster > aptr(aid, ip,
evt.productGetter(aid));
276 cvec.push_back(aptr);
279 classn->push_back(cvec);
289 evt.put(std::move(Graphcol));
290 evt.put(std::move(hassn));
291 evt.put(std::move(classn));
The data type to uniquely identify a Plane.
CryostatID_t Cryostat
Index of cryostat.
std::size_t size(FixedBins< T, C > const &) noexcept
Weight_t RMS() const
Returns the root mean square.
static const SentryArgument_t Sentry
An instance of the sentry object.
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
Weight_t Sum() const
Returns the weighted sum of the values.
int CheckValidity(art::Event &evt)
std::vector< util::PxLine > startendpoints
void GetHitListAndEndPoints(unsigned int plane, art::PtrVector< recob::Hit > &ptrhitlist, util::PxLine &startendpoints)
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
TPCID_t TPC
Index of the TPC within its cryostat.
Collects statistics on a single quantity (weighted)
BEGIN_PROLOG could also be cout
void add(Data_t value, Weight_t weight=Weight_t(1.0))
Adds one entry with specified value and weight.