soft soft soft
play

Soft Soft Soft LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) - PowerPoint PPT Presentation

Access to tracking data products via proxies An introduction. Gianluca Petrillo Fermi National Accelerator Laboratory LArSoft Coordination Meeting, October 10 th , 2017 LAr Soft Soft Soft LArSoft coord, Oct 10 th , 2017 G. Petrillo


  1. Access to tracking data products via “proxies” An introduction. Gianluca Petrillo Fermi National Accelerator Laboratory LArSoft Coordination Meeting, October 10 th , 2017 LAr Soft Soft Soft LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 1 / 7

  2. Tracking data products Track reconstruction and fitting produces several data products, e.g.: vector<recob::Track> vector<vector<TrackHitFitInfo>> Track [#0] vector<TrackHitFitInfo> [#0] [N 0 ] Assns<recob::Track, Hit> positions: vector<Point_t> [N 0 ] vector<TrackHitFitInfo> [#1] [N 1 ] momenta: vector<Vector_t> [N 0 ] Track [#0] hit flags: vector<Flags_t> [N 0 ] Track [#0] hit [N 0 ] ... Track [#0] hit [ N T ] Track [#1] Track [#1] hit positions: vector<Point_t> [N 1 ] Track [#1] hit [N 1 ] momenta: vector<Vector_t> [N 1 ] flags: vector<Flags_t> [N 1 ] ... [ ∑ k N k ] [ N T ] recob::Track trajectory points (flagged), length, ... recob::Hit (associated) one hit per trajectory point recob::TrackFitHitInfo (parallel) point-by-point fit information LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 2 / 7

  3. Track proxy A track proxy object (denoted with proxy::Tracks ) can navigate through these connections: create a proxy object “merging” the information needed; e.g.: 1 #include "lardata/RecoBaseProxy/Track.h" // ... auto const tracks = proxy::getCollection<proxy::Tracks> (event, "pandoranu", proxy::withFitHitInfo()); (hit information is always merged in the proxy) use its interface to get access to the merged information 2 auto const track = tracks[0]; // random access to tracks double const length = track.track().Length(); // access recob::Track auto const firstPoint = track.point(0); // random access to point: art::Ptr<recob::Hit> const & firstHit = firstPoint.hitPtr(); double const firstHitMeas = firstPoint.fitInfoPtr()->hitMeas(); (access to recob::Track members can happen also directly via operator ->() : double const length = track->Length(); ) LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 3 / 7

  4. Track proxy magics The collection proxy called proxy::Tracks has specialised access to associated hits (implicitly merged) access to trajectory points (integrated) access to fit information (requesting proxy::withFitHitInfo() ) Merging other information is possible, but only the common proxy interface is offered. For example, assuming starting vertices are associated to tracks: auto const tracks = proxy::getCollection<proxy::Tracks>( event, art::InputTag("pandoranu"), proxy::withFitHitInfo(), proxy::withAssociated<recob::Vertex>() ); // ... auto const track = tracks[0]; auto const vertices = track.get<recob::Vertex>(); recob::Vertex const * vertex = vertices.empty()? nullptr: *(vertices.first()); (a different input tag may be specified for each merged component) LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 4 / 7

  5. Type of supported data product structures Currently, proxies support only a single data product as main collection (e.g. a recob::Track collection). Also, proxies support merging of only two models of data products: in-order associations where associated objects (e.g. hits) are stored so that the ones associated to the first main object (e.g. track) come first, then all the ones associated to the second one, and so forth parallel data collections whose the first object (e.g. vector of track hit fit information) is connected to the first main object (e.g. track), the second object to the second main object, and so forth, with no holes allowed LArSoft recommends to use one of these models as often as possible. LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 5 / 7

  6. How to use the track proxy Documentation is available in Doxygen format: each proxy is documented in a Doxygen “module” the module for tracking proxy points to proxy::Tracks start from the proxy::Tracks page, with usage examples and documentation of single track and single track point proxy the generic proxy interface is also documented via examples using a proxy object as function argument needs templates ; quirks like this are also documented in Doxygen Need help? ask away! Documentation written by the authors is seldom satisfactory to the users. LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 6 / 7

  7. Summary we have a new “collection proxy” infrastructure in place – extensible (new data products require no special support) – customisable ( proxy::Tracks is in fact a customisation) – usability will be tested on you! documentation is in Doxygen (this talk is no documentation!) comments and suggestions are welcome the first proxy being introduced in LArSoft is about tracking – no LArSoft code has been updated to use it yet more may follow (e.g. space point with charge is a possible idea) LArSoft coord, Oct 10 th , 2017 G. Petrillo (FNAL) Proxies for data products 7 / 7

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend