%RESPONSIBLE%
IoannisNomidis
%CERTIFY%

CalibHitRecForEGamma

Calibration hits information for EGamma studies

General

CalibrationHit containers that hold the information for the true energy deposits are stored in the following containers: LArCalibrationHitActive, LArCalibrationHitInactive, LArCalibrationHitDeadMaterial and similarly for Tile. The three containers correspond to deposits in the active and inactive volumes and dead material, respectively. The calibration hit object carries information for the LAr (or Tile) CaloCell that the deposit falls into, and also the electromagnetic, hadronic, invisible and total energy deposits separately. For a more detailed description see PrimaryParticleID.

Useful code for reading this information exists since Run-1, e.g. https://svnweb.cern.ch/trac/atlasoff/browser/Calorimeter/CaloInterface/trunk/CaloInterface/ICaloParticleIDTool.h https://svnweb.cern.ch/trac/atlasoff/browser/Calorimeter/CaloCalibHitRec/tags/CaloCalibHitRec-00-00-88

For the purposes of EGamma studies, the focus is on the use of this information in a single-particle environment, therefore the code required to assign deposits in cells to truth particles is simplified significantly.

CalibHitToCaloCellTool

To access calibration hit information, the CalibHitToCaloCellTool can be used to create objects that can be written out in the derivations or analyzed directly in athena. In specific, the objects that are created by the tool are:

Truth cells

CaloCell objects are built from true energy deposits in active and inactive volume. Deposits in dead material are not considered. The objects are written out in StoreGate in as CaloCellContainers. There are three containers written out, one for each type of energy deposit (EM, visible = EM+hadronic, total), namely TruthLArCells_Etot, TruthLArCells_Evis, TruthLArCells_Eem.

Truth clusters

The collection of TruthCells for a given type of energy deposit in the event is used to form an xAOD::CaloCluster object. This 'truth cluster' is simply the collection of all true energy deposits, so it can be considered as the ideal cluster that could be reconstructed in a perfect ATLAS calorimeter by a perfect clustering algorithm. As for any xAOD::CaloCluster object, all cluster kinematics and other properties as calculated from contained cells are provided. For a single-particle sample, there is only one cluster defined in the event and it is written out in a xAOD::CaloClusterContainer, one for each type of energy deposit, TruthLArClusters_Etot, TruthLArClusters_Evis, TruthLArClusters_Eem.

Usage (Athena only)

Initialize as for any AthAlgTool and call the processCalibHitsFromParticle function in execute to create the containers and make them available in StoreGate:

//in header
ToolHandle<CalibHitToCaloCellTool> m_calibhitToCaloCellTool; 

//in constructor
declareProperty("CalibHitToCaloCellToolName",m_calibhitToCaloCellTool); 

//in initialize()
if(m_calibhitToCaloCellTool.retrieve().isFailure())  return StatusCode::FAILURE;

//in execute()
if (!m_calibhitToCaloCellTool->processCalibHitsFromParticle().isSuccess())   return StatusCode::FAILURE;

See also CalibHitToCaloCellAlg. An example of retrieving and browsing the created containers can be found here.

Configuration of the tool is as follows:

from CaloCalibHitRec.CaloCalibHitRecConf import CalibHitToCaloCellTool
CalibHitToCaloCellTool_LAr = CalibHitToCaloCellTool(name = "CalibHitToCaloCellTool_LAr",
                                                   CalibHitContainers = [ 'LArCalibrationHitInactive', 'LArCalibrationHitActive' ],
                                                   OutputCellContainerName = "TruthLArCells",
                                                   OutputClusterContainerName = "TruthLArClusters",
                                                   WriteTruthCellContainers = True,
                                                   WriteTruthClusterContainers = True,
                                                   SingleParticleBarcode = 10001,
                                                   OutputLevel = ERROR)
ToolSvc += CalibHitToCaloCellTool_LAr

The tool will work also for Tile calibration hits if the corresponding containers are passed instead of the LAr ones ('TileCalibHitInactiveCell', 'TileCalibHitActiveCell'). By default the tool is assuming usage with single-particle samples, where there is only one generated particle with a standard barcode, 10001. (Currently the calibration hit information in egamma samples is only available for the single particles). The tool can work for any other barcode that can be defined in the job options, but it can also work for particles with different barcode per event, passed as argument to processCalibHitsFromParticle(). (Has not been tested.)

Derivation Tools

Augmentation tools using the CalibHitToCaloCellTool are available within the derivation framework and can be used to decorate objects with useful information from the calibration hits and make also readable outside athena. Here's a short description of these tools and the decorations they provide.

ClusterTrueEnergyDecorator

ClusterTrueEnergyDecorator (DerivationFrameworkCalo) decorates all egammaClusters with the true energy deposit contained within the cells associated to the reconstructed cluster:

const xAOD::CaloCluster* cluster;
...
float Etot = cluster->auxdata<float>("clusterTrueEtot")
float Evis = cluster->auxdata<float>("clusterTrueEvis")
float Eem = cluster->auxdata<float>("clusterTrueEem")

Regarding matching the reconstructed cluster to a truth cluster: In the case of single-particle samples, there is only one truth cluster in the event so any reconstructed cluster would point to this one, so such a link would be redundant.

TruthCaloShowerDecorator

TruthCaloShowerDecorator decorates egammaTruthParticles with links to the truth cluster built from the true depositions of the given truth particle:

const xAOD::TruthParticle* truthPart;
...
ElementLink<xAOD::CaloClusterContainer> > truthClusterEtot = truthPart->auxdata<ElementLink<xAOD::CaloClusterContainer> >("truthLArClusterEtotLink")
ElementLink<xAOD::CaloClusterContainer> > truthClusterEvis = truthPart->auxdata<ElementLink<xAOD::CaloClusterContainer> >("truthLArClusterEvisLink")
ElementLink<xAOD::CaloClusterContainer> > truthClusterEem = truthPart->auxdata<ElementLink<xAOD::CaloClusterContainer> >("truthLArClusterEemLink")

Then from the truth cluster one can retrieve the actual true shower energy in the calorimeter for the given particle. Currently the functionality assumes usage only for single-particle samples.

Example: cluster leakage energy measurement

With the information provided by the decorations described above, it becomes straightforward to measure quantities such as the cluster leakage energy (due to imperfect clustering algorithm, for example). Defining leakage energy as:

(true energy contained within the reco cluster) / (true energy of the shower in the calorimeter) ,

then one can calculate it with the following piece of code:

const xAOD::Electron* el; 
...
const xAOD::TruthParticle *true_el = xAOD::TruthHelpers::getTruthParticle(*(el)); 
if (true_el->barcode() != 10001) continue; // the generated truth particle
ElementLink<xAOD::CaloClusterContainer> > truthClusterEemLink = true_el->auxdata<ElementLink<xAOD::CaloClusterContainer> >("truthLArClusterEemLink")
float showerE = (*truthClusterEemLink)->e();

const xAOD::CaloCluster* cluster = el->caloCluster();
float clusterE = cluster->auxdata<float>("clusterTrueEem");

float leakageE = clusterE / showerE;


Major updates:

-- IoannisNomidis - 2017-01-13

%RESPONSIBLE% IoannisNomidis
%REVIEW% Never reviewed

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2017-01-17 - IoannisNomidis
 
    • 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