AliPhysics  cd965e1 (cd965e1)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalCorrectionClusterTrackMatcher Class Reference

Cluster-track matcher component in the EMCal correction framework. More...

#include <AliEmcalCorrectionClusterTrackMatcher.h>

Inheritance diagram for AliEmcalCorrectionClusterTrackMatcher:

Public Member Functions

 AliEmcalCorrectionClusterTrackMatcher ()
 
virtual ~AliEmcalCorrectionClusterTrackMatcher ()
 
Bool_t Initialize ()
 
void UserCreateOutputObjects ()
 
void ExecOnce ()
 
Bool_t Run ()
 
- Public Member Functions inherited from AliEmcalCorrectionComponent
 AliEmcalCorrectionComponent ()
 
 AliEmcalCorrectionComponent (const char *name)
 
virtual ~AliEmcalCorrectionComponent ()
 
virtual Bool_t UserNotify ()
 
virtual Bool_t CheckIfRunChanged ()
 
void GetEtaPhiDiff (const AliVTrack *t, const AliVCluster *v, Double_t &phidiff, Double_t &etadiff)
 
void UpdateCells ()
 
void GetPass ()
 
void FillCellQA (TH1F *h)
 
Int_t InitBadChannels ()
 
AliParticleContainerAddParticleContainer (const char *n)
 
AliTrackContainerAddTrackContainer (const char *n)
 
AliMCParticleContainerAddMCParticleContainer (const char *n)
 
AliClusterContainerAddClusterContainer (const char *n)
 
void AdoptParticleContainer (AliParticleContainer *cont)
 
void AdoptTrackContainer (AliTrackContainer *cont)
 
void AdoptMCParticleContainer (AliMCParticleContainer *cont)
 
void AdoptClusterContainer (AliClusterContainer *cont)
 
AliParticleContainerGetParticleContainer (Int_t i=0) const
 
AliParticleContainerGetParticleContainer (const char *name) const
 
AliClusterContainerGetClusterContainer (Int_t i=0) const
 
AliClusterContainerGetClusterContainer (const char *name) const
 
AliMCParticleContainerGetMCParticleContainer (Int_t i=0) const
 
AliMCParticleContainerGetMCParticleContainer (const char *name) const
 
AliTrackContainerGetTrackContainer (Int_t i=0) const
 
AliTrackContainerGetTrackContainer (const char *name) const
 
void RemoveParticleContainer (Int_t i=0)
 
void RemoveClusterContainer (Int_t i=0)
 
AliVCaloCells * GetCaloCells () const
 
TListGetOutputList () const
 
void SetCaloCells (AliVCaloCells *cells)
 
void SetRecoUtils (AliEMCALRecoUtils *ru)
 
void SetInputEvent (AliVEvent *event)
 
void SetMCEvent (AliMCEvent *mcevent)
 
void SetUsingInputEvent (bool b=true)
 
void SetEMCALGeometry (AliEMCALGeometry *geometry)
 
void SetCentralityBin (Int_t bin)
 
void SetCentrality (Double_t cent)
 
void SetNcentralityBins (Int_t n)
 
void SetVertex (Double_t *vertex)
 
void SetIsESD (Bool_t isESD)
 
void SetYAMLConfiguration (PWG::Tools::AliYAMLConfiguration config)
 Set YAML Configuration. More...
 
template<typename T >
bool GetProperty (std::string propertyName, T &property, bool requiredProperty=true, std::string correctionName="")
 Retrieve property. More...
 

Protected Member Functions

Int_t GetMomBin (Double_t p) const
 
void GenerateEmcalParticles ()
 
void DoMatching ()
 
void UpdateTracks ()
 
void UpdateClusters ()
 
Bool_t IsTrackInEmcalAcceptance (AliVParticle *part, Double_t edges=0.9) const
 
void SetNumberOfMCGeneratorsToAccept (Int_t nGen)
 
void SetNameOfMCGeneratorsToAccept (Int_t ig, TString name)
 

Protected Attributes

Double_t fPropDist
 distance to surface (440cm default) More...
 
Bool_t fDoPropagation
 if true then propagate all hybrid tracks to EMCal surface More...
 
Bool_t fAttemptProp
 if true then attempt to propagate if not done yet More...
 
Bool_t fAttemptPropMatch
 if true then attempt to propagate if not done yet but IsEMCAL is true More...
 
Double_t fMaxDistance
 maximum distance to match clusters and tracks More...
 
Bool_t fUsePIDmass
 Use PID-based mass hypothesis for track propagation, rather than pion mass hypothesis. More...
 
Bool_t fUseDCA
 Use DCA as starting point for track propagation, rather than primary vertex. More...
 
Bool_t fUpdateTracks
 update tracks with matching info More...
 
Bool_t fUpdateClusters
 update clusters with matching info More...
 
AliEmcalContainerIndexMap
< AliClusterContainer,
AliVCluster > 
fClusterContainerIndexMap
 ! Mapping between index and cluster containers More...
 
AliEmcalContainerIndexMap
< AliParticleContainer,
AliVParticle > 
fParticleContainerIndexMap
 ! Mapping between index and particle containers More...
 
TClonesArray * fEmcalTracks
 !emcal tracks More...
 
TClonesArray * fEmcalClusters
 !emcal clusters More...
 
Int_t fNEmcalTracks
 !number of emcal tracks More...
 
Int_t fNEmcalClusters
 !number of emcal clusters More...
 
TH1fHistMatchEtaAll
 !deta distribution More...
 
TH1fHistMatchPhiAll
 !dphi distribution More...
 
TH1fHistMatchEta [10][9][2]
 !deta distribution More...
 
TH1fHistMatchPhi [10][9][2]
 !dphi distribution More...
 
Int_t fNMCGenerToAccept
 Number of MC generators that should not be included in analysis. More...
 
TString fMCGenerToAccept [5]
 List with name of generators that should not be included. More...
 
Bool_t fMCGenerToAcceptForTrack
 Activate the removal of tracks entering the track matching that come from a particular generator. More...
 
- Protected Attributes inherited from AliEmcalCorrectionComponent
PWG::Tools::AliYAMLConfiguration fYAMLConfig
 Contains the YAML configuration used to configure the component. More...
 
Bool_t fCreateHisto
 Flag to make some basic histograms. More...
 
Int_t fRun
 ! Run number More...
 
TString fFilepass
 Input data pass number. More...
 
Bool_t fGetPassFromFileName
 Get fFilepass from file name. More...
 
AliEmcalCorrectionEventManager fEventManager
 Minimal task which inherits from AliAnalysisTaskSE and manages access to the event. More...
 
Bool_t fEsdMode
 flag for ESD More...
 
AliMCEvent * fMCEvent
 ! MC More...
 
Double_t fCent
 ! Event centrality More...
 
Int_t fNcentBins
 How many centrality bins (this member copied from AliAnalysisTaskEmcal) More...
 
Int_t fCentBin
 ! Event centrality bin More...
 
Int_t fNbins
 No. of pt bins. More...
 
Double_t fMinBinPt
 Min pt in histograms. More...
 
Double_t fMaxBinPt
 Max pt in histograms. More...
 
Double_t fVertex [3]
 ! Event vertex More...
 
AliEMCALGeometry * fGeom
 ! Geometry object More...
 
Bool_t fIsEmbedded
 Trigger, embedded signal. More...
 
Int_t fMinMCLabel
 Minimum MC label value for the tracks/clusters being considered MC particles. More...
 
TObjArray fClusterCollArray
 Cluster collection array. More...
 
TObjArray fParticleCollArray
 Particle/track collection array. More...
 
AliVCaloCells * fCaloCells
 ! Pointer to CaloCells More...
 
AliEMCALRecoUtils * fRecoUtils
 Pointer to RecoUtils. More...
 
TListfOutput
 ! List of output histograms More...
 
TString fBasePath
 Base folder path to get root files. More...
 

Private Member Functions

 AliEmcalCorrectionClusterTrackMatcher (const AliEmcalCorrectionClusterTrackMatcher &)
 
AliEmcalCorrectionClusterTrackMatcheroperator= (const AliEmcalCorrectionClusterTrackMatcher &)
 

Static Private Attributes

static
RegisterCorrectionComponent
< AliEmcalCorrectionClusterTrackMatcher
reg
 

Detailed Description

Cluster-track matcher component in the EMCal correction framework.

Tracks and clusters are matched using a simple geometrical algorithm. Multiple tracks can be matched to a single cluster; however only one cluster can be matched to a track. The default configuration of the task is such that it will attempt track propagation to the EMCal surface (440 cm) if the track is not already propagated. This means that the OCDB has to be loaded beforehand (e.g. using the CDBConnect task), as well as the geometry (handled automatically by AliEmcalCorrectionTask). This should usually work in both AOD and ESD events.

The number of tracks matched to a cluster can be retrieved using cluster->GetNTracksMatched(). Unfortunately the method to access the tracks matched to a cluster depend on the data format. For ESD clusters (AliESDCaloClusters):

Int_t iTrack = cluster->GetTrackMatchedIndex(i);

will return the position of the track in the array. The integer i is a number from 0 to cluster->GetNTracksMatched() -1. A pointer to the track object can be retrieved using:

AliVTrack* track = static_cast<AliVTrack*>(GetParticleContainer(0)->GetParticle(iTrack));

(assuming that the task is derived from AliAnalysisTaskEmcal or AliAnalysisTaskEmcalJet).

For AOD clusters (AliAODCaloClusters) the method:

AliVTrack* track = static_cast<AliVTrack*>(cluster->GetTrackMatched(i));

will directly return a pointer to the matched track.

To get the cluster matched to a track one can use (both ESD and AOD):

Int_t iCluster = track->GetEMCALcluster();

This will return the index of the cluster. To get a pointer to the cluster object:

AliVCluster *cluster = GetClusterContainer(0)->GetCluster(iCluster);

(again assuming that the task is derived from AliAnalysisTaskEmcal or AliAnalysisTaskEmcalJet).

Based on code in AliEmcalClusTrackMatcherTask.

Author
Constantin Loizides, LBNL, AliEmcalClusTrackMatcherTask
Salvatore Aiola, LBNL, AliEmcalClusTrackMatcherTask
James Mulligan james.nosp@m..mul.nosp@m.ligan.nosp@m.@yal.nosp@m.e.edu, Yale University, centralize EMCal corrections using components
Raymond Ehlers raymo.nosp@m.nd.e.nosp@m.hlers.nosp@m.@yal.nosp@m.e.edu, Yale University, centralize EMCal corrections using components
Date
Jul 8, 2016

Definition at line 57 of file AliEmcalCorrectionClusterTrackMatcher.h.

Constructor & Destructor Documentation

AliEmcalCorrectionClusterTrackMatcher::AliEmcalCorrectionClusterTrackMatcher ( )

Default constructor

Definition at line 29 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

AliEmcalCorrectionClusterTrackMatcher::~AliEmcalCorrectionClusterTrackMatcher ( )
virtual

Destructor

Definition at line 66 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

AliEmcalCorrectionClusterTrackMatcher::AliEmcalCorrectionClusterTrackMatcher ( const AliEmcalCorrectionClusterTrackMatcher )
private

Member Function Documentation

void AliEmcalCorrectionClusterTrackMatcher::DoMatching ( )
protected

Set the links between tracks and clusters.

Definition at line 368 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by Run().

void AliEmcalCorrectionClusterTrackMatcher::ExecOnce ( )
virtual

Called before the first event to initialize the correction.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 181 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

void AliEmcalCorrectionClusterTrackMatcher::GenerateEmcalParticles ( )
protected

Create AliEmcalParticle collections to handle the matching efficiently. At the same time propagates tracks, if requested.

Definition at line 237 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by Run().

Int_t AliEmcalCorrectionClusterTrackMatcher::GetMomBin ( Double_t  p) const
protected

Get momentum bin.

Definition at line 208 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by DoMatching().

Bool_t AliEmcalCorrectionClusterTrackMatcher::Initialize ( )
virtual

Initialize and configure the component.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 73 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Bool_t AliEmcalCorrectionClusterTrackMatcher::IsTrackInEmcalAcceptance ( AliVParticle *  part,
Double_t  edges = 0.9 
) const
protected

Determines if a track is inside the EMCal acceptance, using \(\eta\)/ \(\phi\) at the vertex (no propagation). Includes +/- edges. Useful to determine whether track propagation should be attempted.

Parameters
[in]partParticle to check
[in]edgesSize of the edges in \(\phi\) excluded from the EMCAL acceptance
Returns
True if a particle is inside the EMCAL acceptance, false otherwise

Definition at line 489 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by GenerateEmcalParticles().

AliEmcalCorrectionClusterTrackMatcher& AliEmcalCorrectionClusterTrackMatcher::operator= ( const AliEmcalCorrectionClusterTrackMatcher )
private
Bool_t AliEmcalCorrectionClusterTrackMatcher::Run ( )
virtual

Called for each event to process the event data.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 190 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

void AliEmcalCorrectionClusterTrackMatcher::SetNameOfMCGeneratorsToAccept ( Int_t  ig,
TString  name 
)
inlineprotected

Definition at line 79 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by Initialize().

void AliEmcalCorrectionClusterTrackMatcher::SetNumberOfMCGeneratorsToAccept ( Int_t  nGen)
inlineprotected

Definition at line 76 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by Initialize().

void AliEmcalCorrectionClusterTrackMatcher::UpdateClusters ( )
protected

Update clusters with matching info.

Definition at line 416 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by Run().

void AliEmcalCorrectionClusterTrackMatcher::UpdateTracks ( )
protected

Update tracks with matching info.

Definition at line 467 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Referenced by Run().

void AliEmcalCorrectionClusterTrackMatcher::UserCreateOutputObjects ( )
virtual

Create run-independent objects for output. Called before running over events.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 114 of file AliEmcalCorrectionClusterTrackMatcher.cxx.

Member Data Documentation

Bool_t AliEmcalCorrectionClusterTrackMatcher::fAttemptProp
protected

if true then attempt to propagate if not done yet

Definition at line 83 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fAttemptPropMatch
protected

if true then attempt to propagate if not done yet but IsEMCAL is true

Definition at line 84 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles().

AliEmcalContainerIndexMap<AliClusterContainer, AliVCluster> AliEmcalCorrectionClusterTrackMatcher::fClusterContainerIndexMap
protected

! Mapping between index and cluster containers

Definition at line 93 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by ExecOnce(), and GenerateEmcalParticles().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fDoPropagation
protected

if true then propagate all hybrid tracks to EMCal surface

Definition at line 82 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles(), and Initialize().

TClonesArray* AliEmcalCorrectionClusterTrackMatcher::fEmcalClusters
protected
TClonesArray* AliEmcalCorrectionClusterTrackMatcher::fEmcalTracks
protected
TH1* AliEmcalCorrectionClusterTrackMatcher::fHistMatchEta[10][9][2]
protected
TH1* AliEmcalCorrectionClusterTrackMatcher::fHistMatchEtaAll
protected

!deta distribution

Definition at line 101 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by DoMatching(), and UserCreateOutputObjects().

TH1* AliEmcalCorrectionClusterTrackMatcher::fHistMatchPhi[10][9][2]
protected
TH1* AliEmcalCorrectionClusterTrackMatcher::fHistMatchPhiAll
protected

!dphi distribution

Definition at line 102 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by DoMatching(), and UserCreateOutputObjects().

Double_t AliEmcalCorrectionClusterTrackMatcher::fMaxDistance
protected

maximum distance to match clusters and tracks

Definition at line 85 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by DoMatching(), and Initialize().

TString AliEmcalCorrectionClusterTrackMatcher::fMCGenerToAccept[5]
protected

List with name of generators that should not be included.

Definition at line 107 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by AliEmcalCorrectionClusterTrackMatcher(), GenerateEmcalParticles(), and SetNameOfMCGeneratorsToAccept().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fMCGenerToAcceptForTrack
protected

Activate the removal of tracks entering the track matching that come from a particular generator.

Definition at line 108 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles(), and Initialize().

Int_t AliEmcalCorrectionClusterTrackMatcher::fNEmcalClusters
protected

!number of emcal clusters

Definition at line 100 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by DoMatching(), GenerateEmcalParticles(), and UpdateClusters().

Int_t AliEmcalCorrectionClusterTrackMatcher::fNEmcalTracks
protected

!number of emcal tracks

Definition at line 99 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by DoMatching(), GenerateEmcalParticles(), and UpdateTracks().

Int_t AliEmcalCorrectionClusterTrackMatcher::fNMCGenerToAccept
protected

Number of MC generators that should not be included in analysis.

Definition at line 106 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles(), and SetNumberOfMCGeneratorsToAccept().

AliEmcalContainerIndexMap<AliParticleContainer, AliVParticle> AliEmcalCorrectionClusterTrackMatcher::fParticleContainerIndexMap
protected

! Mapping between index and particle containers

Definition at line 94 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by ExecOnce(), and GenerateEmcalParticles().

Double_t AliEmcalCorrectionClusterTrackMatcher::fPropDist
protected

distance to surface (440cm default)

Definition at line 81 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fUpdateClusters
protected

update clusters with matching info

Definition at line 89 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by Initialize(), and Run().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fUpdateTracks
protected

update tracks with matching info

Definition at line 88 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by Initialize(), and Run().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fUseDCA
protected

Use DCA as starting point for track propagation, rather than primary vertex.

Definition at line 87 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles(), and Initialize().

Bool_t AliEmcalCorrectionClusterTrackMatcher::fUsePIDmass
protected

Use PID-based mass hypothesis for track propagation, rather than pion mass hypothesis.

Definition at line 86 of file AliEmcalCorrectionClusterTrackMatcher.h.

Referenced by GenerateEmcalParticles(), and Initialize().

RegisterCorrectionComponent< AliEmcalCorrectionClusterTrackMatcher > AliEmcalCorrectionClusterTrackMatcher::reg
staticprivate

Definition at line 115 of file AliEmcalCorrectionClusterTrackMatcher.h.


The documentation for this class was generated from the following files: