119 auto const clock_data = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(
e);
121 art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(
e, clock_data);
127 std::unique_ptr<std::vector<sbn::Stub>> outStubs(
new std::vector<sbn::Stub>);
128 std::unique_ptr<art::Assns<sbn::VertexHit, sbn::Stub>> assn(
new art::Assns<sbn::VertexHit, sbn::Stub>);
129 std::unique_ptr<art::Assns<sbn::Stub, recob::Hit>> hitAssn(
new art::Assns<sbn::Stub, recob::Hit>);
130 std::unique_ptr<art::Assns<sbn::Stub, recob::Slice>> slcAssn(
new art::Assns<sbn::Stub, recob::Slice>);
131 std::unique_ptr<art::Assns<sbn::Stub, recob::PFParticle>> pfpAssn(
new art::Assns<sbn::Stub, recob::PFParticle>);
133 art::PtrMaker<sbn::Stub> StubPtrMaker {
e};
136 art::Handle<std::vector<recob::Slice>> slice_handle;
139 std::vector<art::Ptr<recob::Slice>>
slices;
140 art::fill_ptr_vector(slices, slice_handle);
147 for (
unsigned i_slc = 0; i_slc < slices.size(); i_slc++) {
148 const std::vector<art::Ptr<sbn::VertexHit>> &vhits = slcVHits.at(i_slc);
155 art::Ptr<recob::Slice> thisSlice = slices[i_slc];
157 std::vector<sbn::StubInfo> stubs;
158 for (
unsigned i_vhit = 0; i_vhit < vhits.size(); i_vhit++) {
161 const recob::Hit &thisVHitHit = *vhitHits.at(i_vhit).at(0);
165 if (!passcut)
continue;
169 sinfo.
vhit = vhits[i_vhit];
170 sinfo.
vhit_hit = vhitHits.at(i_vhit).at(0);
172 stubs.push_back(sinfo);
178 stubs =
fStubMergeTools[i_mrg]->Merge(stubs, geo, sce, clock_data, dprop);
182 for (
unsigned i_stub = 0; i_stub < stubs.size(); i_stub++) {
185 outStubs->push_back(sinfo.
stub);
186 art::Ptr<sbn::Stub> outStub = StubPtrMaker(outStubs->size() - 1);
187 assn->addSingle(sinfo.
vhit, outStub);
188 for (
unsigned i_hit = 0; i_hit < sinfo.
hits.size(); i_hit++) {
189 hitAssn->addSingle(outStub, sinfo.
hits[i_hit]);
191 slcAssn->addSingle(outStub, thisSlice);
193 pfpAssn->addSingle(outStub, sinfo.
pfp);
199 e.put(std::move(outStubs));
200 e.put(std::move(assn));
201 e.put(std::move(hitAssn));
202 e.put(std::move(slcAssn));
203 e.put(std::move(pfpAssn));
float dqdx
charge/pitch [#elec/cm]
void Setup(const art::Event &e, const art::InputTag &pfplabel, const art::InputTag &trklabel)
geo::WireID wire
Wire that the hit is on.
WireID_t Wire
Index of the wire within its plane.
std::vector< std::unique_ptr< sbn::IStubMerge > > fStubMergeTools
Internal struct: contains information on stub and other associated data products. ...
std::vector< art::Ptr< recob::Hit > > hits
art::InputTag fTrackLabel
sbn::StubBuilder fStubBuilder
art::InputTag fVertexChargeLabel
art::Ptr< recob::Hit > vhit_hit
Description of geometry of one entire detector.
std::vector< TCSlice > slices
art::Ptr< sbn::VertexHit > vhit
sbn::Stub FromVertexHit(const art::Ptr< recob::Slice > &slice, const sbn::VertexHit &vhit, const recob::Hit &vhit_hit, const geo::GeometryCore *geo, const spacecharge::SpaceCharge *sce, const detinfo::DetectorClocksData &dclock, const detinfo::DetectorPropertiesData &dprop, const art::Event &e, std::vector< art::Ptr< recob::Hit >> &stub_hits, art::Ptr< recob::PFParticle > &stub_pfp)
2D representation of charge deposited in the TDC/wire plane
float vtxw
Wire of the vertex associated with this hit. Not space charge corrected. [cm].
art::Ptr< recob::PFParticle > pfp