1 / 6

TruthAssociation

TruthAssociation. EDM Workshop Event Data Model Session Jan 28 2003. Purpose. Create bi-directional associations between HepMC::GenParticles and Identifiers (or Identifiables). Provides the ability to query associations from either side.

cgillam
Download Presentation

TruthAssociation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TruthAssociation EDM Workshop Event Data Model Session Jan 28 2003

  2. Purpose • Create bi-directional associations between HepMC::GenParticles and Identifiers (or Identifiables). • Provides the ability to query associations from either side. • Does NOT fill the associations for you - you, or someone else, has to do this.

  3. Structure • Package is Simulation/TruthAssociation • HepMC::GenParticles are identified using their barcodes. • Identifiables are identified using Indentifiers • Associations between HepMC::GenParticles and Indentifiables can be many-to-many • Associations are held internally in two maps of sets: typedef long barcode std::map< Identifier, std::set<barcode>* > m_toTruth; std::map< barcode, std::set<Identifier>* > m_fromTruth;

  4. Usage • Currently, the TruthAssociation package only provides a simple class - it is not a service. • Items are inserted in the association with: virtual StatusCode insert( const Identifier theID, const barcode theTruth ); • Items can be retrieve by their Identifier, the barcode, or the HepMC::GenParticle* pointer: typedef std::set<barcode>::const_iteratorTruthIterator; typedef std::set<Identifier>::const_iterator IdentifierIterator; virtual int retrieveFromId( const Identifier theID, TruthIterator& first TruthIterator& last ) const; virtual int retrieveFromTruth( const barcode theTruth, IdentifierIterator& first, IdentifierIterator& last ) const; virtual int retrieveFromTruth( const HepMC::GenParticle* theTruth, IdentifierIterator& first, IdentifierIterator& last ) const; • user gets back a return code which is the number of entries retrieved, and a set of const iterators over those entries.

  5. Other Functions • Either map can be dumped to stdout: virtual void dumpIdentifierMap() const; virtual void dumpBarcodeMap() const; • Size of association can be retrieved: virtual long size( ) const; • Maps can be emptied: virtual void clear();

  6. Lastly • I told Srini that this talk would only take about 2 minutes, so it’s up to you, David, to keep the audience entertained for the next 18 minutes.Might I suggest a humorous anecdote, or perhaps a short song and dance number?

More Related