E/Gamma Analysis

The e/gamma Analysis Package


The main purpose of the e/gamma Analysis Package is to provide a simple and robust way for calculating the electrons’ (including posistrons) and gammas’ selection efficiencies for each of the Trigger Levels of the ATLAS Detector. The electrons can come either from single electron simulated/reconstructed events, or from some interesting physics events (signal), such as:

The implementation is extended to include jets, as a background for rate calculations. The package is based on the code written by M. Diaz-Gomez, E. Moyse, V. Perez-Reale, C. Padilla, A. Wildauer. For more information about the original version, visit the initial web-page of the package.

Package location

The package is located at the ATLAS CVS Repository:


The current, latest version of the package is:


There is also available the former TrigNtEgamma package. Although this package is not maintained anymore, it is useful for the oldest versions of the trigger e/gamma analysis.

Mailing list – Meetings

The ATLAS mailing list for the package is: atlas-trig-egamma@cern.ch

Subscribers of the list are informed about the regular meetings (normally 1 hour before the PESA meetings) and about the latest modifications and tags of the package.

The agendas and the minutes of the meetings can be found at the CDS Agenda System.

Package description

    • Structure
      The following diagram gives the structure of the Package. Click on it to enlarge.

    • Steering file: At the Steering File, which has been introduced and replaced the GUI, the user defines the options for running the package.The user can switch between the different data sets without having to build the code again.Reading the steering file is a case sensitive procedure. Therefore the boolean values should be YES or NO. The other options are:
      • Number_Of_Events= {ALL, an integer}.
      • Data_set= {e25_lumi05, e30_lumi10, jets17_lumi02, jets25_lumi10, e30_lumi10kineZ, e25_lumi02kineZ}.
      • Production= {6.0.4, 7.0.2, 8.0.2}.
      • Triggering= {e25, e30, jets}.
  • Histograms: The histograms are now saved in a file, for the different reconstruction algorithms (i.e Egamma_Histograms_ALGORITHM.root), whenever the user asks for producing them. The histograms are saved in different directories into the file, depending on the level they refer to. Then, it is easy for the user to apply any draw options on the histograms or even to compare histograms from different data sets and different reconstruction algorithms.For example, in the current version of the code, the following histograms are produced:
    • Level1Calo: The Pt distribution of the generated particles.
    • Level2Calo: The Et distribution after the Level2Calo.
    • Level2IDandIDCalo: The Eta-resolution of the selected track algorithm.
    • EventFilterCalo: The Et distribution after the EventFilterCalo.
    • EventFilterID: The distribution of the transverse impact parameter Ao .
    • EventFilterIDCalo: The distribution of the ratio E/Px at the end of the triggering.


    • To change the name of output histogram file, just edit the appropriate line at the Analysis.C file and build the code.
    • To add a new histogram: (i) Declare the histogram at the header file (ii) Initialize it into the constructor, at the source file (iii) Fill it wherever necessary (iv) Write it into the DrawHistos() method.

Production ntuples

The productions refer to single electron (or positron) events with Pt = 25 GeV (Low Luminosity) and with Pt = 30 GeV (High Luminosity). The di-jet events are produced with 17 GeV jets (Low Luminosity) and 25 GeV jets (High Luminosity).

For a further and more detailed description about the production’s features, visit the site at RAL

Find below the location of the ntuples.

    • Ntuples produced with the 6.0.4 (DC1) ATLAS software release
      • Low Luminosity

/castor/cern.ch/atlas/project/dc1/recon/dc1.002026.lumi02.recon.010/dc1.002026.lumi02.recon.010._00001-00010.test.e_minus_25_250.root (1 ntuple with electrons)

/castor/cern.ch/atlas/transfer/emoyse/dc1.002027.lumi02.recon.eplus25.root (1 ntuple with positrons)

      • High Luminosity

/castor/cern.ch/atlas/project/dc1/recon/dc1.002021.lumi10.recon.010/dc1.002021.lumi10.recon.010._00001-00040.test.e_minus_30_250.root (1 ntuple with electrons)

/castor/cern.ch/atlas/transfer/emoyse/dc1.002023.lumi10.recon.eplus30.root (1 ntuple with positrons)

      • Low Luminosity di-jet events


      • High Luminosity di-jet events


    • Ntuples produced with the 7.0.2 ATLAS software release
      • Low Luminosity

/castor/cern.ch/user/b/baines/trigprod/rel702++2003-12-12/lumi02/002026/his/ (10 ntuples + 10 ntuples with the KineZ )

      • High Luminosity

/castor/cern.ch/user/b/baines/trigprod/rel702++2003-12-12/lumi10/002021/his/ (40 ntuples + 40 ntuples with the KineZ)

    • Ntuples produced with the 8.0.2 ATLAS software release
      • Low Luminosity

/castor/cern.ch/user/b/baines/trigprod/8.0.2/2004-05-14/lumi02/002026/his/ (10 ntuples)

Running the package

  • At CERN
    1. Check out the package:cmt co -r TrigEgammaAnalysis-xx-xx-xx Trigger/TrigAnalysis/TrigEgammaAnalysis
    2. cd Trigger/TrigAnalysis/TrigEgammaAnalysis/TrigEgammaAnalysis-xx-xx-xx/Root
    3. source setup.sh
    4. make
    5. ./main.exe
  • Locally
  1. At your home area, create a directory for the package:mkdir /home/EgammaAnalysis/
  2. Create a directory where you can put all the production ntuples for the release you want.For example: /home/EgammaAnalysis/ProductionNtuples/8.0.2/
  3. Go to the CVS Repository and, having selected the preferable version (tag) of the package, download the tarball. Save it at /home/EgammaAnalysis/ directory.
  4. Unpack the package: tar xzvf TrigEgammaAnalysis.tar.gz
  5. cd TrigEgammaAnalysis/Root
  6. Edit the Analysis.C file to give the correct path of the ntuples. For the above example, you should write:
    • Path8 (Low or High) = /home/EgammaAnalysis/ProductionNtuples/8.0.2/

    • Tip: A search for TString Path will give you the paths for all the releases used.

  7. Finally, compile… :
    • make
  8.  …and run:
    • ./main.exe

Tip: As quite often the castor server is down, it is strongly advised to run the package locally. You will only have to transfer the ntuples once. Keep the Analysis.C file so that, for the future package updates, you won’t have to fix the paths from the scratch.

Definition of the variables used

    • LEVEL 1:
      Variable’s NameDescription
      L1em_nroiNumber of EM RoI defined by Level1
      L1em_emclusEnergy in the central four cells
      L1em_emisolEnergy in the EM layer isolation ring
      L1em_hdisolEnergy deposited in hadronic ring
      L1em_hdcoreEnergy deposited in hadronic core
      L1em_etaEta of the EM cluster defined by LVL1
      L1em_phiPhi of the EM cluster defined by LVL1
      EtagenGenerated Eta of the particle
      PhigenGenerated Phi of the particle
      PtgenGenerated Transverse Momentum of the particle
    • LEVEL 2 Calo:
      Variable’s NameDescription
      T2canclusNumber of LVL2 e/m clusters
      T2caetaWeighted eta position of the e/m cluster, calculated in sampling. 2 in a 3×7 cell window
      T2caphiWeighted phi position of the e/m cluster, calculated in sampling 2 in a 3×7 cell window
      T2caemeTotal energy deposited in LAr EM
      T2cahadeTotal Energy deposited in LAr HEC and TileCal
      T2carcoreE3x7/E7x7 in samp. 2 with Enxm is the energy deposited in a window of nxm cells around the refined LVL1 position
      T2caeratio(E1st – E2nd) / (E1st + E2nd) in sampling 1, where E1st and E2nd are the energies of the two highest maxima
    • LEVEL 2 ID and IDCalo:
      Variable’s NameDescription
      T2idntracksNumber of Tracks in the Inner Detector
      T2idalgoAlgorithm that created the track (0:Offline IDScan, 1:SiTrack, 2:Online IDScan, 3:TrtLUT, 4:TrtXk)
      T2idptThe transverse momentum of the reconstructed track
      T2idetaThe eta of the reconstructed track
      T2idd0R of closest approach to origin
      T2idz0Z at closest approach to origin
      T2idphi0Phi at closest approach to origin
    • EVENT FILTER Calo:
      Variable’s NameDescription
      egncNumber of reconstructed cluster
      egetTransverse Energy of the cluster
      egf1Fraction of energy found in EM Sampling 1
      egetaEta of the cluster
      egphiPhi of the cluster
      ege277Uncorrected energy in 7×7 cells in EM Sampling 2
      egiseme-ID flag. 0: electron, >=1: jet
      ege237Uncorrected energy in 3×7 cells in EM Sampling 2
      egetha1Et leakage into Sampling 1 of Hadronic Calorimeter
      egemins1Energy of strip with minimum between maximum 1 and 2
      ege2tsts12nd maximum in strips
      egweta2Corrected width in 3×5 cells in the 2nd Sampling
      egfracs1Energy in strips outside core [( (E+-7) – (E+-3) ) / (E+-7)]
      egwtots1Total width in EM Sampling 1 in 20 strips
      egweta1Corrected width in 3 strips in the 1st Sampling
      Variable’s NameDescription
      egtrkmatchxlink to best matched track in ntuple (for xKalman tracks)
      PatternBit pattern of SCT and Pixel hits associated
      NsihitsNumber of SCT and Pixel holes
      A0vertImpact Parameter
      SharehitsNumber of Hits Shared with another reconstructed track
Variable’s NameDescription
egeoverpxEnergy match of cluster with track, E(calo)/p(track)
egdeta1xDelta eta of track extrapolated to Calo S1
egdeta2xDelta eta of track extrapolated to Calo S2
NstrawhitsNumber of straws associated with the track
NtrhitsNumber of Transition Radiation hits associated with the track

Cuts applied

The cuts which apply at each Trigger Level are of major importance in optimizing the selection efficiencies. It is on the schedule to perform a detail study for optimizing the cuts. Until then, it is suggested to keep the cuts applied until now. While running the code, one must make sure that the following values HAVE BEEN USED in order for the results to be comparable.

The values-together with the variables (for both luminosities)-can also be found in the /doc directory at the CVS-repository.

The cuts listed below refer to single electron events.

Low LuminosityHigh Luminosity
Level 1 Calo
ET> 19 GeV> 20 GeV
EM ring isolation< 3 GeV< 5 GeV
Hadronic ring isolation< 2 GeV< 3 GeV
Hadronic core isolation< 2 GeV< 2 GeV
Level 2 Calo
ET> 22.5 GeV> 25.5 GeV
Rηshape> 0.9> 0.9
Rηstrip> 0.72> 0.75
EThad< 1 GeV< 2.2 GeV
Level 2 ID
PTtrack> 8 GeV> 8 GeV
Level 2 ID-Calo
η-ranges0 – 1 , 1 – 1.5 , 1.5 – 2 , 2 – 100 – 1 , 1 – 1.5 , 1.5 – 2 , 2 – 10
|ΔΦ|< 0.035, 0.035, 0.03, 0.025< 0.05, 0.05, 0.05, 0.05
|Δη|< 0.07, 0.06, 0.05, 0.05< 0.05, 0.05, 0.05, 0.05
ET/Pin the range[0.2, 3], [0.2, 3], [0.2, 3], [0.2, 3.5][0.2, 4], [0.2, 4], [0.2, 5], [0.2, 7]
Event Filter Calo
ET> 22 GeV> 27 GeV
Event Filter ID
Number of precision hits>= 7>= 7
Number of pixel hits>= 1>= 1
Number of B-layer hits>= 1>= 1
Impact Parameter< 0.2 cm< 0.2 cm
Event Filter ID-Calo
If |η| < 1.37, ET/Pin the range[0.7, 1.7][0.7, 1.7]
If |η| >= 1.37, ET/PT in the range[0.7, 2.7][0.7, 2.6]
|ΔΦ|< 0.02< 0.02
|Δη|< 0.01< 0.01