TileAnalysis Documentation

What is the TileAnalysis package

The TileAnalysis package has been created for the production of ntuples with useful information for calibration studies of the TileCalorimeter. The package can be found under the TileCal Collaboration svn page: https://svnweb.cern.ch/cern/wsvn/atlasoff/TileCalorimeter/TileAnalysis.
You can download the package setting

  • SVNROOT=svn+ssh://USERNAME@cern.ch/reps/atlasoff
and checking out
  • cmt co $SVNROOT/TileCalorimeter/TileAnalysis

N.B. you might be requested your svn password more than once!

Contact: succurro [AT] ifae.es

Ntuple production

Example Job Options:
  • eoverpJobO.py, used to run on MC
  • eoverpJobOData.py, used to run on Data (sets the isMC flag as false and loads the eoverpJobO file)

Ntuple content

See the ntuple content description page for ntuple content details and the dumper tools description section for additional information.

Datasets used

  • user.lfiorini.mc09_7TeV.105001_pythia minbias e517 s764 s767 r1307 AkaEoP time 20101110 155723/
  • user.lfiorini.data10_7TeV.data10_7TeV 00158975 f275 AkaEoP time 20101109 174709/

Usage of the Job Options

See the algorithms and tools description for details on them.
The input files (MinBias ESD files) can be passed by command line when launching athena as athena -c "import glob; m_inputName = glob.glob('/pathtofiles/*ESD*')" . If not, the input files are set in the JobOptions as, e.g.
if not 'm_inputName' in dir():
      m_inputName = glob.glob("/pathtofiles/*ESD*");
To load the Algorithm for Track Selection do, e.g.
# Track selection 
from TileAnalysis.TileAnalysisConf import GoodTrackSelector
thisAlg = GoodTrackSelector("GoodTrackSelector")
thisAlg.OutputLevel= TILEANALYSIS_DEBUG
thisAlg.InputTrackParticleContainerName        = "TrackParticleCandidate"   <--- name of the input track container  to be retrieved from StoreGate
thisAlg.ProvisionalTrackParticleContainer1Name = "intermediate1TrackParticles"  <--- names of the track containers to be recorded at different steps of track selection
thisAlg.ProvisionalTrackParticleContainer2Name = "intermediate2TrackParticles"
thisAlg.ProvisionalTrackParticleContainer3Name = "intermediate3TrackParticles"
thisAlg.OutputTrackParticleContainerName       = "myTrackParticles"     <--- name of the track containers to be recorded with the selected tracks
thisAlg.InputMuonContainerName                 = "MuidMuonCollection"     <--- name of the muon container to be retrieved from StoreGate
thisAlg.CellContainterName                     = "AllCalo"                         <--- name of the CaloCellContainer to be retrieved from StoreGate
thisAlg.ConcernedCellContainerName             = "ConcernedCells"          <--- name of the output CaloCellContainer to be recorded, see algorithm description
thisAlg.TrackMomentumCut                       = 3.0*GeV        <--- cuts, see algorithm description
thisAlg.TrackLowMomentumCut                    = 1.0*GeV
thisAlg.TrackIsolationCone                     = 0.4
thisAlg.TrackMuonIsolationCone                 = 0.1
thisAlg.TrackTransverseMomentumCut             = 1.0*GeV
thisAlg.TrackEtaCut                            = 2.
thisAlg.CrackEtaMin                            = 99.
thisAlg.CrackEtaMax                            = 99.
thisAlg.TrackMinimumHits                       = 6
thisAlg.MIPCheckFlag                           = TRUE             <--- tell the algorithm to check if the track behaves as mip in the LAr
thisAlg.MIPinTileCheckFlag                     = FALSE       <--- tell the algorithm to check if the track behaves as mip in the first Tile Layer
thisAlg.CellNoiseSigmaThreshold                = 3.           <--- parameters for mip selection, see algorithm description
thisAlg.NeighborNoiseSigmaThreshold            = 2.
thisAlg.CaloNoiseTool                          = theNoiseTool
thisAlg.MIPCone                                = 0.1
TopAlg +=[thisAlg]

To load the Algorithm for Track-CaloCell matching do, e.g.

from TileAnalysis.TileAnalysisConf import CaloCellSelector
thisAlg = CaloCellSelector("CaloCellSelectorCluster")
thisAlg.OutputLevel= TILEANALYSIS_DEBUG
thisAlg.GoodTrackParticleContainerName            = "myTrackParticles"     <--- name of the tracks selected and recorded previously
thisAlg.CaloClusterContainerName                  = "CaloTopoCluster"    <--- name of the input clusters container N.B. only Cluster and MultiCluster matching need this container!
thisAlg.GoodCaloClusterContainerName              = "myCaloTopoCluster"   <--- name of the output matched clusters container N.B. only Cluster matching needs it!
#thisAlg.ConcernedCellContainerName                = "ConcernedCells"      <--- name of the cells recorded previously N.B. only the Cone and Significance matching need this container!
thisAlg.TrackMatchedCellContainersName            = "TrackMatchedCells"    <--- name of the output cell containers N.B. same name for all selections, only the flag have to change!
thisAlg.CellSelectionAroundCone                   = 0.2     <--- Delta R cone dimensions
thisAlg.CellSelectionAroundCluster                = 0.2
thisAlg.CellConeSelFlag                           = FALSE    <--- flags for selections, will determine the selection and the name under which containers will be recorded!
thisAlg.CellClusterSelFlag                        = TRUE
thisAlg.CellMultiClusterSelFlag                   = FALSE
thisAlg.CellSignificanceSelFlag                   = FALSE
thisAlg.DumpMIPInfo                               = FALSE
thisAlg.CaloNoiseTool                             = theNoiseTool
TopAlg +=[thisAlg]
and to load additional selections do e.g.
thisAlg = CaloCellSelector("CaloCellSelectorCone")
thisAlg.OutputLevel= TILEANALYSIS_DEBUG
thisAlg.GoodTrackParticleContainerName            = "myTrackParticles"
#thisAlg.CaloClusterContainerName                  = "CaloTopoCluster"
#thisAlg.GoodCaloClusterContainerName              = "myCaloTopoCluster"
thisAlg.ConcernedCellContainerName                = "ConcernedCells"
thisAlg.TrackMatchedCellContainersName            = "TrackMatchedCells"    <--- name of the output cell containers N.B. same name for all selections, only the flag have to change!
thisAlg.CellSelectionAroundCone                   = 0.2
thisAlg.CellSelectionAroundCluster                = 0.2
thisAlg.CellConeSelFlag                           = TRUE    <--- flags for selections, will determine the selection and the name under which containers will be recorded!
thisAlg.CellClusterSelFlag                        = FALSE
thisAlg.CellMultiClusterSelFlag                   = FALSE
thisAlg.CellSignificanceSelFlag                   = FALSE
thisAlg.CaloNoiseTool                          = theNoiseTool
TopAlg +=[thisAlg]

To load the Dumping Tools and Algorithms do, e.g.

from TileAnalysis.TileAnalysisConf import Ntupleizer
from TileAnalysis.TileAnalysisConf import EventVariablesDumper
from TileAnalysis.TileAnalysisConf import TriggerDumper
from TileAnalysis.TileAnalysisConf import TrackDumper
from TileAnalysis.TileAnalysisConf import ClusterDumper
from TileAnalysis.TileAnalysisConf import CellDumper
from TileAnalysis.TileAnalysisConf import VertexDumper
from TileAnalysis.TileAnalysisConf import MuonDumper

thisAlg = Ntupleizer("Ntupleizer")


thisAlg.DumpingToolList += [ TrackDumper("GoodTrackDumper") ]
thisAlg.DumpingToolList[ "GoodTrackDumper" ].BranchPrefix               = "Good"
thisAlg.DumpingToolList[ "GoodTrackDumper" ].TrackParticleContainerKey  = "myTrackParticles"
thisAlg.DumpingToolList[ "GoodTrackDumper" ].isMC                       = isMC
thisAlg.DumpingToolList[ "GoodTrackDumper" ].SummaryInfo                = True

thisAlg.DumpingToolList += [ ClusterDumper("GoodClusterDumper") ]
thisAlg.DumpingToolList[ "GoodClusterDumper" ].BranchPrefix             = "Good"
thisAlg.DumpingToolList[ "GoodClusterDumper" ].ClusterContainerKey      = "myCaloTopoCluster"
thisAlg.DumpingToolList[ "GoodClusterDumper" ].UseLink                  = True
thisAlg.DumpingToolList[ "GoodClusterDumper" ].WriteDetailedEnergies    = True
thisAlg.DumpingToolList[ "GoodClusterDumper" ].WriteSamplingCells      = True

thisAlg.DumpingToolList += [ CellDumper("ClusterMatchedCellsDumper") ]
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].BranchPrefix          = "ClusterMatchedCells"
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].CellContainerKey      = "TrackMatchedCells"
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].SaveCellDetails       = True
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].SavePositionInfo      = True
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].CellSelectionKind     = "ClusterSel"
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].TrackParticleContainerKey= "myTrackParticles"
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].DumpTheLArMIPInfo     = False;
thisAlg.DumpingToolList[ "ClusterMatchedCellsDumper" ].CaloNoiseTool         = theNoiseTool

thisAlg.DumpingToolList += [ CellDumper("ConeMatchedCellsDumper") ]
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].BranchPrefix          = "ConeMatchedCells"
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].CellContainerKey      = "TrackMatchedCells"
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].SaveCellDetails       = True
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].SavePositionInfo      = True
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].CellSelectionKind     = "ConeSel"
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].TrackParticleContainerKey= "myTrackParticles"
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].DumpTheLArMIPInfo     = False;
thisAlg.DumpingToolList[ "ConeMatchedCellsDumper" ].CaloNoiseTool         = theNoiseTool

Algorithms and Tools

The package is composed by the following specific files:

The following files are taken from the FLIPA package and only slightly modified:

GoodTrackSelector

This algorithm selects isolated tracks that satisfy some requirements. The selection is done in four main steps.
From InputTrackParticleContainerName to ProvisionalTrackParticleContainer1Name
  • retrieve the track container from StoreGate (set by InputTrackParticleContainerName)
  • skim tracks using a low p cut (set by TrackLowMomentumCut), the N of hits in the SCT (set by TrackMinimumHits , while the hits in the Pixel is asked to be more than zero), the muon veto (the muons being retrieved through InputMuonContainerName and the isolation cut being set by TrackMuonIsolationCone)
  • check that the tracks are isolated with respect to each other at the vertex to a certain ∆R cut ( set by TrackIsolationCone)
  • These tracks are stored in a provisional container (named by ProvisionalTrackParticleContainer1Name)
From ProvisionalTrackParticleContainer1Name to ProvisionalTrackParticleContainer2Name
  • extrapolate the tracks in ProvisionalTrackParticleContainer1Name to all calorimeters layers
  • check eta range (defined by TrackEtaCut)
  • These tracks are stored in a provisional container (named by ProvisionalTrackParticleContainer2Name)
From ProvisionalTrackParticleContainer2Name to ProvisionalTrackParticleContainer3Name
  • check isolation between tracks in ProvisionalTrackParticleContainer2Name (the ∆R cut being set by TrackIsolationCone) using the extrapolated parameters at the second EM layer
  • apply the high p cut (set by TrackMomentumCut) and the pT cut (set by TrackTransverseMomentumCut)
  • These tracks are stored in a provisional container (named by ProvisionalTrackParticleContainer3Name)
From ProvisionalTrackParticleContainer3Name to OutputTrackParticleContainerName
  • operate a skim of calorimeter cells around the track (stored in ConcernedCellContainerName)
  • if requested through jobOptions, do mip selection in the LAr (see details of mip selection)
  • These tracks are stored in the output container (named by OutputTrackParticleContainerName)
  • if no mip selection is requested, ProvisionalTrackParticleContainer3Name is simply copied to OutputTrackParticleContainerName

mip selection

  • we check the LAr cells (EM Barrel and EndCap) inside a ∆R cone (dimension set by MIPCone) around the track, using for the track the parameters extrapolated at the cell sample
  • if these cells have significance (E/sigma, where the sigma of the noise is obtained with the CaloNoiseTool) higher than CellNoiseSigmaThreshold we check their neighbors
  • if we find more than 2 neighbors having E/sigma higher than NeighborNoiseSigmaThreshold, we exclude the track
Current values used are: CellNoiseSigmaThreshold = 3. and NeighborNoiseSigmaThreshold = 2.

CaloCellSelector

This Algorithm retrieves the selected tracks container (saved as GoodTrackParticleContainerName) and performs the matching with calorimeter cells.
Four options for matching are available (set throug the flags in the job options CellConeSelFlag, CellClusterSelFlag, CellMultiClusterSelFlag and CellSignificanceSelFlag; if one is true the others have to be false):
Cluster Selection
  • match clusters (retrieved from CaloClusterContainerName) and tracks by extrapolating the tracks to the calorimeter layer in which the cluster has the highest amount of energy deposit and check that the ∆R computed with the extrapolated η, φ and the ones of the cluster is lower than a cut (set by CellSelectionAroundCluster)
  • save the clusters (in GoodCaloClusterContainerName) and their cells
  • in case more than one cluster match with a track we choose the most energetic one (in absolute value)
Multi Cluster Selection
  • match cells of clusters (retrieved from CaloClusterContainerName) and tracks by extrapolating the tracks to the sample of the cell and check that the ∆R computed with the extrapolated η, φ and the ones of cell is lower than a cut (set by CellSelectionAroundCluster)
  • save all these cells
Cone Selection
  • retrieve the cell container (saved ad ConcernedCellContainerName)
  • save all cells in a certain ∆R cone (CellSelectionAroundCone) around tracks
Significance Selection
  • retrieve the cell container (saved ad ConcernedCellContainerName)
  • save all cells in a certain ∆R cone ("CellSelectionAroundCone") around tracks if and only if the cell energy significance (energy divided by noise) is higher than 2

In all cases we end up with some containers of cells (named by TrackMatchedCellContainersName) in the same number as the selected tracks. If no matching is present the container is empty The names under which the cell containers are stored in StoreGate are depending on the selection kind:

Dumpers

ClusterDumper

This tool dumps the information about the clusters of the event in the ntuple. The branches are saved with the name "BranchPrefix"_cluster_"NAME", where "BranchPrefix" is set by jobOption. Information stored are the cluster energy, eta, phi, momenta etc., plus:
  • Energy deposit in cluster per layer: "BranchPrefix"_cluster_"SAMPLE"_Ene (see list of calorimeter samples)
  • Number of cells of cluster per layer: "BranchPrefix"_cluster_"SAMPLE"_Ncell
  • Total number of cells in the cluster: "BranchPrefix"_cluster_Ncell
  • Energy deposit in EM (Barrel and Endcaps) and Tile (Barrel, Extended Barrel and Gap withouth Gap3) layers: "BranchPrefix"_cluster_totEmEne and "BranchPrefix"_cluster_totTileEne
  • Bad Cells energy deposit in cluster per layer: "BranchPrefix"_cluster_badCells_"SAMPLE"_Ene (see list of calorimeter samples)
  • Number of Bad Cells of cluster per layer: "BranchPrefix"_cluster_badCells_"SAMPLE"_Ncell
  • Sample with the highest amount of energy in the cluster: "BranchPrefix"_cluster_maxESample_Sample
  • Energy of the sample with the highest amount of energy in the cluster: "BranchPrefix"_cluster_maxESample_Ene

CellDumper

This tool dumps the information about selected cells of the event in the ntuple. The name of the branch starts with "ClusterMatchedCells_" or "ConeMatchedCells_" or "MultiClusterMatchedCells_" or "SignificanceMatchedCells_" depending on the selection kind.
  • Total Energy Sum of Cells per event: "X"MatchedCells_AllCell_ETot
  • Total Number of Cells per event: "X"MatchedCells_AllCell_NTot
  • Energy of the Cells: "X"MatchedCells_E
  • Eta of the Cells: "X"MatchedCells_eta
  • Phi of the Cells: "X"MatchedCells_phi
  • Energy Sum of the Cells, per layer: "X"MatchedCells_"SAMPLE"_Ene
  • Number of Cells, per layer: "X"MatchedCells_"SAMPLE"_Ncell
  • Total Energy of TileCells: "X"MatchedCells_Tile_ETot
  • Total Number of TileCells: "X"MatchedCells_Tile_NTot
  • Tile Specific Properties: "X"MatchedCells_Tile_"PROPERTY"

Track, Vertex, Trigger and EventVariables Dumpers

These tools record the standard information for their subject. Taken from FLIPA with slight (if any) changes

Other Tools

Methods of the Algorithms

GoodTrackSelector

inline bool passHits ( Rec::TrackParticle * inTrContIt, int nMinHits)
returns true if the number of hits in the pixel detector is higher than zero and the number of hits in the SCT is higher or equal than "nMinHits"

inline bool passPt ( Rec::TrackParticle * inTrContIt, double cut_pT)
returns true if the track transverse momentum is highr than "cut_pT"

inline bool passP ( Rec::TrackParticle * inTrContIt, double cut_p)
returns true if the track momentum is highr than "cut_p"

inline bool passEta (double extrpltdPar, double cut_eta, double crack_eta_min, double crack_eta_max )
returns true if the absolute value of the eta passed by the variable "extrpltdPar" is lower than "cut_eta". The other two variables are not used.

inline bool passIsolation ( double eta1, double eta2, double phi1, double phi2, double isolCut)
returns true if the ∆R computed with the four parameters passed to the function is higher than "isolCut"

inline double deltaR (double eta1, double eta2, double phi1, double phi2)
returns the ∆R computed with the passed parameters

inline bool trackInCone ( double eta1, double eta2, double phi1, double phi2, double cellConeCut)
returns true if the ∆R computed with the passed parameters is lower than "cellConeCut"

bool muonVeto ( Rec::TrackParticle * iTrk)
checks isolation between tracks and muons, using the passIsolation method

bool getTheIsolationCheck ( double eta1, double phi1, Rec::TrackParticle& Trk1,const Rec::TrackParticleContainer& cTrk, bool needToExtrap )
checks isolation between a track "Trk1" and all the tracks of the "cTrk" container using the passIsolation method. If "needToExtrap" is true, the tracks are extrapolated to the second EM layer and isolation is checked using the extrapolated parameters

CaloCell ID::CaloSample getTheGoodSample ( const DataVector* param )
checks the extrapolation results from "param" and returns the EM second layer EME2 or EMB2 depending on the goodness of the extrapolation

bool checkMIP (const CaloCell * cell, const CaloCellContainer * theCont, int option)
checks if the cell "cell" of the container "theCont" has energy significance higher than a certain value set by job options ("CellNoiseSigmaThreshold"). If the check turns out to be true, it loops over all the cell neighbors and checks if more than 2 neighbors have significance higer than a certain value set by job options ("NeighborNoiseSigmaThreshold"). If the cell passes both of these checks, it is not a mip and the method returns false

StatusCode findAndRecordConcernedCells (std::vector< const DataVector< const Trk::ParametersBase> * > trackToCaloPar )
skims the calorimeter cells using the method trackInCone and the extrapolated parameters passed through "trackToCaloPar" and finally records the concerned cells container in StoreGate

CaloCellSelector

inline bool trackInCone ( double eta1, double eta2, double phi1, double phi2, double cellConeCut)
returns true if the ∆R computed with the passed parameters is lower than "cellConeCut"
StatusCode getTheExtrapolatedTracksParameters ( const Rec::TrackParticleContainer& trkContainer, std::vector< const DataVector< const Trk::ParametersBase> * >& theVector )
fills "theVector" with the results from the extrapolation of the tracks contained in "trkContainer"
CaloSampling::CaloSample getTheCaloClusterLayer ( CaloClusterContainer::const_iterator clIt )
returns the CaloSample in which the highest amount of energy of the cluster "clIt" is deposited
StatusCode recordTheCaloCellContainer ( std::vector< CaloCellContainer * > TMCContainers )
records on StoreGate the CaloCellContainers inside "TMCContainers"
float getTheEnergyInTile (CaloClusterContainer::const_iterator clusterContainerIter)
returns the amount of energy in TileCal of the Cluster
StatusCode dumpLArInfo (const DataVector< const Trk::ParametersBase>& trackParBaseVec , std::vector< CaloCellContainer* >& TMCContainers, int trackI)
dumps on screen informations about energy deposit in the LAr around a track
StatusCode doTheClusterSelection ( std::vector< const DataVector< const Trk::ParametersBase>* >& trackParams, std::vector< CaloCellContainer* >& TMCContainers, std::vector< CaloCellContainer* >& TMLArCContainers )
performs the matching of tracks with clusters
StatusCode doTheMultiClusterSelection (std::vector< const DataVector< const Trk::ParametersBase>* >& trackParams, std::vector< CaloCellContainer* >& TMCContainers )
performs the matching of tracks with more clusters

-- created by AntonellaSuccurro - on 05-Jan-2011

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2014-11-20 - TWikiAdminUser
 
    • 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