User Tools

Site Tools


To get event content to edmDumpEventContent of your AOD file

edmDumpEventContent 06688145-E89E-E211-9845-002590593876.root

For only info on certain type use regex

edmDumpEventContent 06688145-E89E-E211-9845-002590593876.root --regex gen
Type                                  Module                     Label      Process   
GenEventInfoProduct                   "generator"                ""         "SIM"     
vector<int>                           "genParticles"             ""         "SIM"     
vector<reco::GenJet>                  "ak5GenJets"               ""         "SIM"     
vector<reco::GenJet>                  "ak7GenJets"               ""         "SIM"     
vector<reco::GenJet>                  "kt4GenJets"               ""         "SIM"     
vector<reco::GenJet>                  "kt6GenJets"               ""         "SIM"     
vector<reco::GenMET>                  "genMetCalo"               ""         "SIM"     
vector<reco::GenMET>                  "genMetCaloAndNonPrompt"   ""         "SIM"     
vector<reco::GenMET>                  "genMetTrue"               ""         "SIM"     
vector<reco::GenParticle>             "genParticles"             ""         "SIM"     
vector<reco::Track>                   "generalTracks"            ""         "RECO"    

First column is the name of the class, second is the label. Google your class reference to see the functions of the class. For instance “reco::GenParticle reference” gives you the page reco::GenParticle class reference. You then need you own analyzer. Check out Writing your own EDAnalyzer.
For examples, check out /shome/jngadiub/TestPAT/CMSSW_5_3_11/src/Demo/MyEdmNtupleProducer/src/
To get your class

edm::Handle<reco::GenParticleCollection> genParticles;
iEvent.getByLabel(genSrc_, genParticles);

To loop

for(size_t i = 0; i < genParticles->size(); ++i ) 
  const reco::GenParticle          & ParticleCand = (*genParticles)[i];
  const reco::GenParticleRefVector & motherRefs   = ParticleCand.motherRefVector();
  const reco::GenParticleRefVector & daughterRefs = ParticleCand.daughterRefVector();

To for instance get eta and pt

users/taarre/edm.txt · Last modified: 2014/05/28 11:10 by taarre