Monte Carlo Truth
Introduction
One may want to access the truth information from Monte Carlo data in order to compare the truth particles to those from reconstruction. The truth particles in the AOD are in containers just like particles from reconstruction. Most particles types are all together in a single container called
SpclMC
. Jets are a special case and are in separate truth containers.
These notes will explain the analysis of truth information using the
EventView Framework.
Back to top
Truth Particle Insertion
Truth particles, like from the
SpclMC
container, are inserted using the
EVTruthParticleInserter
. One specifies the type of particle with its PDG code. To save you from having to look up PDG codes, you should import the following Python module.
from PyAnalysisUtils import PDG
Then declare an
EVMultipleOutputToolLooper
to store truth information in its own EventView.
TruthLooper = EVMultipleOutputToolLooper('TruthLooper',
EventViewCollectionOutputName = 'TruthEVCollection',
OutputLevel = WARNING)
theJob += TruthLooper
Then add inserters to that looper. In the arguments for the inserter, you need to specify the PDG code, for example, muons.
TruthLooper += EVTruthParticleInserter('MuonTruthInserter',
InsertedLabels = ['TrueMuon'],
pdgCode = [PDG.mu_plus, PDG.mu_minus],
usePdgCodeSign = True,
etCut = 2*GeV,
NoOverlapCheck = True,
ContainerKey = 'SpclMC' )
Back to top
True Tau Jets
Back to top
Associators
Now that you have truth particles in their own EventView, you might want to compare those truth particles to particles that you reconstructed.
Back to top
--
RyanReece - 28 Feb 2008