This page describes the ZToTwoTaus package, created as a benchmark package for Z->tautau analysis in ATLAS. The package consists of a number of tools customised for Ztautau analysis. These include tools for Selection, Overlap Removal, Dataset Management, Calculation of Analysis Quantities and Ntuple Dumping. The package is designed to be as flexible as possible, so that each user can use the General Tools provided to customise and run their own analysis.

Link to package in CVS

Package Layout

Inside the package are a number of tools customised for the Ztautau anlaysis. These tools are all combined and run by the ZtautauTool, which calculates the general anlaysis variables that are used (eg. invariant mass, transverse mass, delta phi b/w tau and lepton etc.). In this way, the user can write their own analysis code (where they define the cut flow, make plots etc.) and simply call on the ZtautauTool to obtain the quantities calculated using official tools.

List of available Tools:

  • CustomSelectionTool - Selection for all objects is defined
  • CustomPreparationTool - Runs CustomSelectionTool on given Input Containers, and outputs Selected Containers
  • CustomOverlapRemovalTool - Runs Overlap Removal on given Input Containers (from CustomPreparationTool) and outputs Overlap-Removed Containers
  • TruthPreparationTool - Runs over Truth Container and makes collections of true objects (electrons, muons, taus, hadronic taus etc...)
  • DatasetTool - Retrieves RunNumber from McEventInfo and returns cross-section and filter efficiency
  • CustomAnalysisTool - Calculates analysis quantities, and has some other useful tools
  • ZtautauTool - Uses all the other tools and provides an interface for the user
  • CustomNtupleDumper - This is a CBNTAA algo that dumps analysis objects and calculated variables to ntuple.
  • ZtautauAnalysis - This is the Milano analysis code which gives an example of how to run the ZtautauTool. This you can replace with your own analysis code if you have different selection criteria or criterion order.

Note: You may find for some tools, there are seemingly two versions of it: i.e. for the CustomAnalysisTool there is CustomAnalysisTool.cxx and ICustomAnalysisTool.cxx. The reason for this is that CustomAnalysisTool is meant to run in an Athena job, having wrappers that call methods from ICustomAnalysisTool.cxx. This ICustomAnalysisTool.cxx is stand-alone code that can be used outside of Athena (maybe just called within ROOT). Thus the ICustomAnalysisTool.cxx (and such calculation of analysis quantities) can be used without having to run an Athena job.

Installing ZToTwoTaus

Note the current tag to use is: ZToTwoTaus-00-00-08

Currently the package can be found in cvs here:


To install follow these steps:

  • Make new testarea, setting up AtlasOffline release 14.5.1.
  • cvs co -r ZToTwoTaus-xx-yy-zz users/wdavey/ZToTwoTaus
  • cd users/wdavey/ZToTwoTaus/cmt/
  • Make version.cmt file with single line indicating the current tag (eg 'ZToTwoTaus-00-00-06'), i.e.:
  • echo "ZToTwoTaus-xx-yy-zz" > version.cmt
  • cmt config
  • source setup.sh
  • gmake

(don't forget to choose a particular tag to substitute -xx-yy-zz)

Running ZToTwoTaus

To run follow these steps:

  • Go to the run dir
  • cp ../share/Ztautau_jobOptions.py .
  • athena Ztautau_jobOptions.py

This is the basic procedure, however before you actually run you will probably want to configure the job options.


The entire configuration of the ZToTwoTaus package can be done through Ztautau_jobOptions.py. The flags set here are passed to ZtautauAnalysis_topOptions.py which adds in all the algorithms that are needed. In principle you shouldn't really need to modify ZtautauAnalysis_topOptions.py. The ZtautauAnalysis_topOptions.py calls also ZtautauTool_topOptions.py and executes the ZtautauAnalysis.cxx.

Input Datasets

  • InputCollections - here you can specify a file or files with a wildcard
  • ListFile - Here you can specify the name of a file (eg list.txt) that contains a list of filenames. Note this will override InputCollections

Splitting Files When specifying input using ListFile one can choose to run only over a subset of the files using the following Flags:

  • NFilePerSplit=400
  • SplitNumber=0

One could also hash out the SplitNumber in the jobOptions and define them on command line with athena -c "SplitNumber=1" Ztautau_jobOptions.py. Note: At the moment the default NFilePerSplit is 400, so if you want to run over a whole list file you should set this abouve the number of files and set SplitNumber=0

Geometry If you plan to use the TrackIsolationTool you will need to set the Geometry Correctly using

  • DetDescrVersion = 'ATLAS-GEO-02-01-00'

DatasetTool The DatasetTool used to obtain the cross-section and filter efficiency can be configured with these lines:

  • DSToolEventInfoKey="McEventInfo" - Need this to obtain the RunNumber
  • DSToolConfigurationFile="DatasetConfig.dat" - Specify the config file to obtain the xsec and filter eff from
  • DSToolReadInConfigFile=True - For now you should set this to True, in the future there might be a hardcoded database aswell
  • DSToolDatasetCodeOverride=-1 - If -1, the tool will retrieve the dataset code from McEventInfo. If you specify a dataset code here it override the one from McEventInfo.

Ouput Ntuple Name You can specify the output ntuple name with this Flag:

  • NtupleName="ntuple.root"

If you are using ListFile and are splitting up jobs you may want to use this method for naming:

  • NtupleNameBase="Ntuple.Ztautau."
  • NtupleNameEnd=".aant.root"

Where the Name will have the form NtupleNameBase + SplitNumber + NtupleNameEnd. Note: NtupleName will override this method!


  • DoExtraEleIsolation=True and DoExtraMuonIsolation=True switch on use of IsolationTools, and will dump ptcone and nucone variables for electrons. The ptcone and nucone variables for muons are always dumped out, but if DoExtraMuonIsolation=True, then these are not taken from the values stored in the AOD, but rather the values that the IsolationTools returns.
  • TrackSelectorMode="Default" - selects the input joboption for the track selector (one can optimise these)

Analysis Properties Here one can set the general options for steering the analysis. Of particular importance are:

  • PreSelInputContainerKeys=[...] - Choose which containers to input to the CustomPreparationTool
  • OverlapRemovalOrder=[...] - Choose the overlap removal order for the CustomOverlapRemovalTool

Selection Specify the selection for anlaysis objects. Note, TightTau selection is what one would use for their standard analysis, while LooseTau selection is used when factorising the tau identification efficiency. The efficiency is then calculated by applying TightTau criteria to LooseTaus that passed overlap removal. You can use tau ID factorisation by setting DoFactoriseTauID=True.

A list of possible selection criteria that can be used can be found in: share/CustomSelectionTool_jobOptions.py

Milano Analysis The final options are used to configure the Milano Ztautau analysis and provide an example of jobOptions that can be written that are analysis specific.

Features to Implement

  • ability to factorize Tau ID using pt-dependent factors
  • ability to call 'in-situ' lepton ID efficiency tools
  • interface for external packages to use (i.e. Missing Et performance package)

Major updates:
-- WillDavey - 26 Apr 2009


Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2009-05-08 - DonatellaCavalli
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback