Complete: 2

Data Formats in SimG4Core

RECO Data Formats

InputTag/Module (Instance name) Containers Description

SimG4Core collections (in RECOSIM and AODSIM)
none none none
SimG4Core collections (in RECOSIM only)
g4SimHits edm::SimTrackContainer collection of (selected) tracks produced during Geant4 tracing of the generator's particles through CMS detector
g4SimHits edm::SimVertexContainer collection of vertices associated with the SimTrack's (see above)

How to use the table

In the header of your analyzer you should have the header(s) of the data format(s) you will access. SimTrack belongs to the SimDataFormats/Track package, and SimVertex belongs to the SimDataFormats/Vertex package; the headers are located in the /interface subdirectories. Thus, your EDAnalyzer should contain the following:

#include "SimDataFormats/Track/interface/SimTrack.h"
#include "SimDataFormats/Track/interface/SimTrackContainer.h"
#include "SimDataFormats/Vertex/interface/SimVertex.h"
#include "SimDataFormats/Vertex/interface/SimVertexContainer.h"

In the analyze(const Event& e, const EventSetup& ) method you should do something like the following:

edm::Handle<edm::SimTrackContainer> SimTk;
edm::Handle<edm::SimVertexContainer> SimVtx;
for ( edm::SimTrackContainer::const_iterator itk=SimTk->begin(); itk!=SimTk->end(); ++itk )
// your code here
for ( edm::SimVertexContainer::const_iterator ivtx=SimVtx->begin(); ivtx!=SimVtx->end(); ++ivtx )
// your code here

You can also excercise your curiosity and view more usage details in the example analyzer

Note that edm::SimTrackContainer and edm::SimVertexContainer are actually typedef, respectively, for the following:


Review status

Reviewer/Editor and Date (copy from screen) Comments
JuliaYarba - 21 Aug 2009 fill up with basic information
KatiLassilaPerini - 22 Jul 2008 created template page

Last reviewed by:

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2014-08-12 - IvantchenkoV
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback