"L0/L0Checker" Package
 
Purpose

Package to check the performance of the L0-trigger and to access Monte Carlo information relative to the L0 calorimeter and muon candidates. Main checks are:

The algorithm may be configured to produce histograms and an ntuple with relevant information.

Contents of the package
 
"L0Check" algorithm: L0Check.h / L0Check.cpp "L0CandidateMCTool" tool: L0CandidateMCTool.h / L0CandidateMCTool.cpp
Package's versions
Version Release date Comments
v2r1 27 / 05 / 2004 - to analyse DC'04 data
v2r0 14 / 05 / 2004 - first version able to analyse DC'04 data
- needed for L0CaloCandidates produced with L0/L0Calo v7r3 or later
- run typically in DaVinci v11r7 or later
v1r0 05 / 05 / 2004 - to analyse TDR data
- latest released version of the package for these data
- run typically in DaVinci v9r4
 
Options

The "L0Check" algorithm has several user-defined options (here set to their default values for versions v2r*):

   L0Check.HistogramFlag = true;    : boolean flag to produce histograms
   L0Check.NtupleFlag    = false;   : boolean flag to produce an ntuple
   L0Check.NtupleName    = "";      : string for the ntuple name
                                      (reminder: has to be a number if using HBOOK persistency!)
   L0Check.OutputLevel = 3;         : integer specifying the level of printout
                                      (according to Gaudi's definitions)
Here is an example for debugging purposes:
   //-----------------------------------------------
   //  Options of "L0Checker" for debugging purposes
   //-----------------------------------------------
   L0Check.HistogramFlag = true;     // default value
   L0Check.NtupleFlag    = true;     // set to false by default
   L0Check.NtupleName    = "1";      // only needed if NtupleFlag set to true

   L0Check.OutputLevel   = 2;        // printout in DEBUG level

A copy of L0Checker.opts is available for versions v2r*, version v1r0.

How to get and build the algorithm

Direct link to the CVS repository.

First check out the package:
   cd ~/newmycmt
   getpack L0/L0Checker v2r0
This will get version v2r0 ... To build the package
   cd ~/newmycmt/L0/L0Checker/v2r0/cmt
   cmt config
   source setup.(c)sh 
   gmake
How to run the algorithm

Several lines of code are needed to run the package:

In the requirements file:
   use    L0Checker  v2r0   L0
In the options file:

The simplest way might be to include in the DaVinci options file a "L0Checker.opts" options file containing all the necessary settings - that can be changed according to the needs. The following line is then enough:

   #include "$DAVINCIROOT/options/L0Checker.opts"
after inserting "L0Checker.opts" in the DaVinci options directory. In any case the mandatory smallest set of options is
   ApplicationMgr.DLLs    += { "L0Checker" };
   ApplicationMgr.TopAlg  += { "L0Check" };

   L0Check.L0CandidateMCTool.L0Calo2MCP.Location = "Rec/Relations/L0CaloCandidates";
To produce histograms make sure that the options file contains similar code to
   //--------------------------------------------------------------
   // Cards for the histogram persistency
   // Hbook or Root are available, uncomment the one you want to use
   //--------------------------------------------------------------
   #include "$STDOPTS/Hbook.opts"
   HistogramPersistencySvc.OutputFile = "L0Checker_histos.hbook";
   //#include "$STDOPTS/RootHist.opts"
   //HistogramPersistencySvc.OutputFile = "L0Checker_histos.root";
To produce ntuples make sure that the options file contains similar code to
   //--------------------------------------------------------------
   // Ntuples available by default. Comment to switch off
   // Hbook or Root are available, uncomment the one you want to use
   //--------------------------------------------------------------
   ApplicationMgr.ExtSvc += { "NTupleSvc" };
   NTupleSvc.Output={"FILE1 DATAFILE='L0Checker_ntuples.hbook' TYP='HBOOK' OPT='NEW'"};
   //NTupleSvc.Output={"FILE1 DATAFILE='L0Checker_ntuples.root' TYP='ROOT' OPT='NEW'"};
Description of the output

There are 3 types of output:

  1. A "L0Check summary" with all rates is printed out at the end of the job. An example output is:
       L0Check               INFO ====================== L0Check Summary ======================
       L0Check               INFO   Total # of events :        1000
       L0Check               INFO -------------------------------------------------------------
       L0Check               INFO   L0-pass    :        75    7.50 %
       L0Check               INFO -------------------------------------------------------------
       L0Check               INFO   Electron   :         9    0.90 %  excl        3    0.30 %
       L0Check               INFO   Photon     :        14    1.40 %  excl        8    0.80 %
       L0Check               INFO   Hadron     :        51    5.10 %  excl       41    4.10 %
       L0Check               INFO   Pi0 Local  :         7    0.70 %  excl        0    0.00 %
       L0Check               INFO   Pi0 Global :        11    1.10 %  excl        1    0.10 %
       L0Check               INFO   Any Pi0    :        11    1.10 %  excl        2    0.20 %
       L0Check               INFO   Muon       :         6    0.60 %  excl        0    0.00 %
       L0Check               INFO   Sum Muon   :         9    0.90 %  excl        3    0.30 %
       L0Check               INFO -------------------------------------------------------------
       L0Check               INFO   Veto from
       L0Check               INFO   Global Event Cuts               :        501   50.10 %
       L0Check               INFO     * SumEt Cut                   :        427   42.70 %
       L0Check               INFO     * Global Veto Cuts            :         76    7.60 %
       L0Check               INFO         - Pile-Up Veto (SumPeak2) :         74    7.40 %
       L0Check               INFO         - Pile-Up Multiplicity    :         10    1.00 %
       L0Check               INFO         - Spd Multiplicity        :         12    1.20 %
       L0Check               INFO =============================================================
    

    This summary table contains the total number of events analysed, the percentage of events that passed L0 given the default L0-settings in the L0DU (or those given explicitly by the user if L0DU was rerun before L0Checker), the inclusive and exclusive percentages of events that pass each sub-trigger (no veto cuts considered), and the percentage of events vetoed by the several global event cuts.

  2. By default the "L0Check" algorithm produces histograms of the most relevant L0 information. All histograms are booked in directory "L0/L0Check/". For the latest versions v1r0 and v2r0 the list of histograms is:
    
       LIST OF HISTOGRAMS
    
       "Hadron Et"           : Et of L0 highest-Et hadron candidate
       "2nd Hadron Et"       : Et of L0 second highest-Et hadron candidate
       "Electron Et"         : Et of L0 electron candidate
       "Photon Et"           : Et of L0 photon candidate
       "Pi0 Local Et"        : Et of L0 π0 Local candidate
       "Pi0 Global Et"       : Et of L0 π0 Global candidate
       "Muon1 Pt"            : Pt of L0 highest-Pt muon candidate
       "Muon2 Pt"            : Pt of L0 second highest-Pt muon candidate
       "Muon3 Pt"            : Pt of L0 third highest-Pt muon candidate
       "SumMuon Pt"          : ∑Pt of the 2 highest-Pt muon candidates
       "Sum Et"              : ∑Et (in hadronic calorimeter)
       "PuVeto SumPeak1"     : SumPeak1 value from the Pile-up system
       "PuVeto SumPeak2"     : SumPeak2 value from the Pile-up system
       "PuVeto ZPosPeak1"    : z-position of the first peak returned by the Pile-up System
       "PuVeto ZPosPeak2"    : z-position of the second peak returned by the Pile-up System
       "PuVeto Multiplicity" : Pile-up System multiplicity
       "SPD Multiplicity"    : SPD multiplicity
    
    
  3. The "L0Check" algorithm can also produce an ntuple if configured accordingly. The ntuple is then booked in location "/NTUPLES/FILE1/L0/L0Check/<NtupleName>". For the latest versions v1r0 and v2r0 the ntuple definition is as follows:
    
       LIST OF NTUPLE ENTRIES
    
       Run            : run number
       Event          : event number
       L0Decision     : L0 decision
       L0HadronEt     : Et of L0 highest-Et hadron candidate
       L0Hadron2Et    : Et of L0 second highest-Et hadron candidate
       L0ElectronEt   : Et of L0 electron candidate
       L0PhotonEt     : Et of L0 photon candidate
       L0Pi0LocalEt   : Et of L0 π0 Local candidate
       L0Pi0GlobEt    : Et of L0 π0 Global candidate
       L0Muon1Pt      : Pt of L0 highest-Pt muon candidate
       L0Muon2Pt      : Pt of L0 second highest-Pt muon candidate
       L0Muon3Pt      : Pt of L0 third highest-Pt muon candidate
       L0SumMuonPt    : ∑Pt of the 2 highest-Pt muon candidates
       L0SumEt        : ∑Et (in hadronic calorimeter)
       PuVetoSumPeak1 : SumPeak1 value from the Pile-up system
       PuVetoSumPeak2 : SumPeak2 value from the Pile-up system
       PuVetoZPeak1   : z-position of the first peak returned by the Pile-up System
       PuVetoZPeak2   : z-position of the second peak returned by the Pile-up System
       PuVetoMult     : Pile-up System multiplicity
       SpdMult        : SPD multiplicity
       SelFlag        : flag for offline selection ( 0/1 = does not pass/passes offline selection algorithm)
       SpillOverP     : spill-over from "previous" event ( 0/1 = spill-over non-/present)
       SpillOverPP    : spill-over from "previous previous" event 
       SpillOverN     : spill-over from "next" event 
       SpillOverNN    : spill-over from "next next" event 
       InstLumi       : instantaneous luminosity
       EvtType        : event type number
       NrMCColls      : number of MC collisions in the event
       MCProcType     : MC process type number = Pythia's ISUB value (vector of size 'NrMCColls')
       xMCPrimVtx     : x-position of MC primary vertex (vector of size 'NrMCColls')
       yMCPrimVtx     : y-position of MC primary vertex (vector of size 'NrMCColls')
       zMCPrimVtx     : z-position of MC primary vertex (vector of size 'NrMCColls')
       MCCollIsVis    : flags whether the collision is visible (vector of size 'NrMCColls')
       MCCollHasB     : flags whether the collision contains a b-hadron (vector of size 'NrMCColls')
       NrVisTracks    : number of visible tracks (vector of size 'NrMCColls')
       NrVisPrimVtx   : number of visible primary vertices
       MCL0HadrEt     : Et of MC particle associated to the L0 highest-Et hadron candidate
       MCL0Had2Et     : Et of MC particle associated to the L0 second highest-Et hadron
       MCL0ElecEt     : Et of MC particle associated to the L0 electron candidate
       MCL0PhotEt     : Et of MC particle associated to the L0 photon candidate
       MCL0Pi0LEt     : Et of MC particle associated to the L0 π0 Local candidate
       MCL0Muon1Pt    : Pt of MC particle associated to the L0 highest-Pt muon candidate
       MCL0Muon2Pt    : Pt of MC particle associated to the L0 second highest-Pt muon candidate
       MCL0Muon3Pt    : Pt of MC particle associated to the L0 third highest-Pt muon candidate
    
    
    The ntuple variables use the units:
    - energies and momenta in GeV
    - positions in mm
    - luminosity in cm-2s-1
Testing the algorithm

The algorithm was tested on 200k events produced in late 2003 for the Trigger TDR. The following "L0Check summary" corresponds to these data (Brunel v17r4 - Database v254r1 - SICBMC v260r2):

   L0Check               INFO ====================== L0Check Summary ======================
   L0Check               INFO   Total # of events :      200000
   L0Check               INFO -------------------------------------------------------------
   L0Check               INFO   L0-pass    :     13368    6.68 %
   L0Check               INFO -------------------------------------------------------------
   L0Check               INFO   Electron   :      1390    0.70 %  excl      368    0.18 %
   L0Check               INFO   Photon     :      1700    0.85 %  excl      593    0.30 %
   L0Check               INFO   Hadron     :      9488    4.74 %  excl     7560    3.78 %
   L0Check               INFO   Pi0 Local  :      1481    0.74 %  excl       99    0.05 %
   L0Check               INFO   Pi0 Global :      1949    0.97 %  excl      196    0.10 %
   L0Check               INFO   Any Pi0    :      2338    1.17 %  excl      393    0.20 %
   L0Check               INFO   Muon       :      1478    0.74 %  excl      175    0.09 %
   L0Check               INFO   Sum Muon   :      1949    0.97 %  excl      688    0.34 %
   L0Check               INFO -------------------------------------------------------------
   L0Check               INFO   Veto from
   L0Check               INFO   Global Event Cuts               :     105663   52.83 %
   L0Check               INFO     * SumEt Cut                   :      88177   44.09 %
   L0Check               INFO     * Global Veto Cuts            :      17806    8.90 %
   L0Check               INFO         - Pile-Up Veto (SumPeak2) :      16153    8.08 %
   L0Check               INFO         - Pile-Up Multiplicity    :       2311    1.16 %
   L0Check               INFO         - Spd Multiplicity        :       3374    1.69 %
   L0Check               INFO =============================================================