Giter VIP home page Giter VIP logo

k4edm4hep2lcioconv's Introduction

EDM4hep to LCIO in-memory converter

Sample usage:

// Declare struct to hold the converted collections
CollectionsPairVectors collection_pairs{};

// Pointer to edm4hep collection
edm4hep::ReconstructedParticleCollection* rp_collection;

// Converting a collection of Reconstructed Particles to LCIO
auto* lcio_converted_reconstructed_particle_ptr = convReconstructedParticles(
  rp_collection, // input collection to be converted
  collection_pairs.recoparticles, // vector holding converted and original collections
  collection_pairs.tracks, // Tracks related to Reconstructed Particles to link them
  collection_pairs.vertices, // Vertices related to Reconstructed Particles to link them
  collection_pairs.clusters); // Clusters related to Reconstructed Particles to link them

// Some collections need the cellID string
edm4hep::SimTrackerHitCollection* sth_collection;
// Example from k4FWCore Data Handle
const auto collID    = sth_collection->getID();
const auto cellIDstr = simtrackerhits_handle.getCollMetadataCellID(collID);
auto* lcio_converted_sim_tracker_hit_ptr = convSimTrackerHits(
  sth_collection,
  cellIDstr,
  collection_pairs.simtrackerhits,
  collection_pairs.mcparticles);

// Run function to fix missing associations between collections.
// Some collections that need to be linked to other collections may be converted
// after these are linked. Running this function after all conversions guarantees correct links
// between collections.
FillMissingCollections(collection_pairs);

k4edm4hep2lcioconv's People

Contributors

fdplacido avatar vvolkl avatar andresailer avatar tmadlener avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.