GAUDI User Guide

4.7 Simple Physics Analysis Example

An example of how to do some very simple physics analysis is provided in the GaudiExamples package. The algorithms in the example use many of the Gaudi Services that someone would want to be able to utilize while doing physics analysis: histograms, ntuples, creating and retrieving private transient data, retrieving particle properties (like mass values), etc. Detailed examples on how to use the specific services are provided in the topical examples but in the SimpleAnalysis example they are combined together. Tools to make physics analysis in a more elegant and complex way are under development and their concrete implementation will be part of the OO Physics Analysis Program. A trivial implementation of an algorithm similar to that of the SimpleAnalysisAlgorithm implemented using tools is provided in the ToolAnalysis example.

The SimpleAnalysisAlgorithm is an example in which pi+ pi- invariant masses are made while requiring the component particles to satisfy some simple kinematic and quality cuts. Private containers of the particles satisfying successive cuts are created and filled (charged particles, detection in the silicon, best particle ID). Invariant masses are made and corresponding histograms are filled for all combinations of the final private containers, for combinations with Pt of both pions greater than a cut value and for combinations with impact parameter of both pions greater then a cut value. The Pt and impact parameter cut values are properties of the algorithm and as such can be specified in the jobOptions, where the number is taken in Gaudi Units. CLHEP vectors' classes are used to evaluate transverse momentum and invariant masses as well as to calculate the impact parameter. When nominal mass values are required they are retrieved via the ParticlePropertySvc . Since a primary vertex is required a "dummy" algorithm RecPrimaryVertex retrieves the Monte Carlo primary vertex and uses the quantites to fill a MyVertex object ( /Event/MyAxVertices ), which is then retrieved by the SimpleAnalysisAlgorithm . Since the MyVertex object is created and registered in the Transient Event store by the RecPrimaryVertex algorithm, the sequencing of RecPrimaryVertex and SimpleAnalysisAlgorithm in the jobOptions file is very important. A protection is put in place so that the SimpleAnalysisAlgorithm will return a failure code if not all of the necessary input data exist in the store.

When doing physics analysis on Monte Carlo data, it is necessary to compare the reconstructed decay with the Monte Carlo truth in order to calculate efficiencies. The MCDecayFinder algorithm is an example of how to find any one step decay. The parent of the decay and the list of its direct descendants are properties of the algorithm and can be specified in the jobOptions file. If no decay is specified in the jobOptions this example will look for a B0->pi+pi- decay. The Algorithm will retrieve the particle Geant3 ID from the ParticlePropertySvc (the identifying particleID in MCParticles ) and search the MCParticles to find the requested parent and that is has the correct type and number of decay products. If a decay is found kinematic variables are stored in an ntuple that can be accessed by PAW. In addition the Algorithm uses the Message service with DEBUG or INFO levels to print a summary of its behaviour for each event as well as for the job.