AliPhysics  master (3d17d9d)
AliEmcalCorrectionCellCombineCollections Class Reference

Combines two cell collections into one collection. More...

#include <AliEmcalCorrectionCellCombineCollections.h>

Inheritance diagram for AliEmcalCorrectionCellCombineCollections:

Public Member Functions

 AliEmcalCorrectionCellCombineCollections ()
 
virtual ~AliEmcalCorrectionCellCombineCollections ()
 
Bool_t Initialize ()
 
void UserCreateOutputObjects ()
 
void ExecOnce ()
 
Bool_t Run ()
 
std::string GetExternalCellsBranchName () const
 
std::string GetCombinedCellsBranchName () const
 
void SetExternalCellsBranchName (const char *inputName)
 
void SetCombinedCellsBranchName (const char *inputName)
 
- 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)
 
AliEMCALRecoUtilsGetRecoUtils () const
 
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 SetCustomBadChannels (TString customBC)
 
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

void SetupCombinedCells ()
 
void CreateCombinedCells ()
 
void AddCellsToCombinedCellObject (AliVCaloCells *inputCells, int indexOffset)
 
void VerifyCombinedCells (std::vector< AliVCaloCells * > inputCaloCells)
 
void AddObjectToEvent (TObject *obj, AliVEvent *event, Bool_t attempt=kFALSE)
 
 AliEmcalCorrectionCellCombineCollections (const AliEmcalCorrectionCellCombineCollections &)
 
AliEmcalCorrectionCellCombineCollectionsoperator= (const AliEmcalCorrectionCellCombineCollections &)
 

Protected Attributes

std::string fExternalCellsBranchName
 Name of the cell branch which will be copied from the external event for the combined cells. More...
 
std::string fCreatedCellsBranchName
 Name of the cell branch which will be created for the combined cells. More...
 
bool fVerifyCombinedCells
 True if the task should confirm that the combined cells properly copied the input cells. More...
 
bool fInitializedCombinedCells
 ! True if the combined cells object has been initialized More...
 
AliVCaloCells * fCombinedCells
 ! Cells combined from the input and external events. 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...
 
Bool_t fLoad1DBadChMap
 Flag to load 1D bad channel map. 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...
 
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...
 
AliEMCALRecoUtilsfRecoUtils
 Pointer to RecoUtils. More...
 
TListfOutput
 ! List of output histograms More...
 
TString fBasePath
 Base folder path to get root files. More...
 
TString fCustomBadChannelFilePath
 Custom path to bad channel map OADB file. More...
 

Static Protected Attributes

static RegisterCorrectionComponent< AliEmcalCorrectionCellCombineCollectionsreg
 

Detailed Description

Combines two cell collections into one collection.

The internal cell branch should be set by the correction task! Then, the external cell branch name should be set in the correction configuration. The branch will be retrieved by this task.

Note that this task must run in a seperate correction task and must be configured to run after the previous ones. Otherwise, the cell branches will not yet be corrected!

With a bit of generalization, along with some small modifications in AliEmcalCorrectionTask, this task could combine aribtrary collections of cells together. However, this is quite unnecessary for the current purposes, so it will be left for the future if it is necessary.

Author
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
Dec 6, 2016

Definition at line 30 of file AliEmcalCorrectionCellCombineCollections.h.

Constructor & Destructor Documentation

AliEmcalCorrectionCellCombineCollections::AliEmcalCorrectionCellCombineCollections ( )

Standard constructor for the correction components.

Definition at line 26 of file AliEmcalCorrectionCellCombineCollections.cxx.

AliEmcalCorrectionCellCombineCollections::~AliEmcalCorrectionCellCombineCollections ( )
virtual

Destructor.

Definition at line 41 of file AliEmcalCorrectionCellCombineCollections.cxx.

AliEmcalCorrectionCellCombineCollections::AliEmcalCorrectionCellCombineCollections ( const AliEmcalCorrectionCellCombineCollections )
protected

Member Function Documentation

void AliEmcalCorrectionCellCombineCollections::AddCellsToCombinedCellObject ( AliVCaloCells *  inputCells,
int  indexOffset 
)
protected

Takes the input cells and adds them to the combine cells. To do so, the each individual cell must be duplicated.

Parameters
[in]inputCellsCells to be added to the combined cells.
[in]indexOffsetOffset into combined cell container where the inputCells should be placed.

Definition at line 182 of file AliEmcalCorrectionCellCombineCollections.cxx.

Referenced by CreateCombinedCells(), and SetCombinedCellsBranchName().

void AliEmcalCorrectionCellCombineCollections::AddObjectToEvent ( TObject obj,
AliVEvent *  event,
Bool_t  attempt = kFALSE 
)
protected

Add object to event. Adapted from AliAnalysisTaskEmcal.

Parameters
[in]objObject to be added
[in]eventEvent to which the object is added
[in]attemptIf true don't handle error

Definition at line 280 of file AliEmcalCorrectionCellCombineCollections.cxx.

Referenced by SetCombinedCellsBranchName(), and SetupCombinedCells().

void AliEmcalCorrectionCellCombineCollections::CreateCombinedCells ( )
protected

Create cells combined from the input event and the external (embedded) event. This is only necessary for cells because they basic object is a cell "container" rather than the actual objects, which can then be accessed through EMCal containers (like clusters or tracks).

Definition at line 142 of file AliEmcalCorrectionCellCombineCollections.cxx.

Referenced by Run(), and SetCombinedCellsBranchName().

void AliEmcalCorrectionCellCombineCollections::ExecOnce ( )
virtual

The combined cells are setup during ExecOnce() to atempt to make the cell object creation as efficient as possible (although it is difficult to do compared to AliEmcalContainer derived classes).

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 90 of file AliEmcalCorrectionCellCombineCollections.cxx.

std::string AliEmcalCorrectionCellCombineCollections::GetCombinedCellsBranchName ( ) const
inline

Definition at line 42 of file AliEmcalCorrectionCellCombineCollections.h.

std::string AliEmcalCorrectionCellCombineCollections::GetExternalCellsBranchName ( ) const
inline

Definition at line 41 of file AliEmcalCorrectionCellCombineCollections.h.

Bool_t AliEmcalCorrectionCellCombineCollections::Initialize ( )
virtual

Initialize all needed variables from the YAML configuration.

Note that "usedefault" is only applied to the externalCellsBranchName because the "usedefault" name for the combinedCellsBranchName is not well defined. However, just using the default in the default YAML configuration should serve more or less the same purpose.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 55 of file AliEmcalCorrectionCellCombineCollections.cxx.

AliEmcalCorrectionCellCombineCollections& AliEmcalCorrectionCellCombineCollections::operator= ( const AliEmcalCorrectionCellCombineCollections )
protected
Bool_t AliEmcalCorrectionCellCombineCollections::Run ( )
virtual

Run each event to fill the combined cells from input and external cells. Note that the combined cells object should have already been created.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 126 of file AliEmcalCorrectionCellCombineCollections.cxx.

void AliEmcalCorrectionCellCombineCollections::SetCombinedCellsBranchName ( const char *  inputName)
inline

Definition at line 45 of file AliEmcalCorrectionCellCombineCollections.h.

void AliEmcalCorrectionCellCombineCollections::SetExternalCellsBranchName ( const char *  inputName)
inline

Definition at line 44 of file AliEmcalCorrectionCellCombineCollections.h.

void AliEmcalCorrectionCellCombineCollections::SetupCombinedCells ( )
protected

Setup the combined cells object and add it to the input event.

NOTE: It could have been added to the embedded event, but then classes outside of AliEmcalCorrection{Task,Component} have some difficulty in using them. It is better to put them in the input event, although it is important to ensure that the requested name is not already in use.

Definition at line 103 of file AliEmcalCorrectionCellCombineCollections.cxx.

Referenced by CreateCombinedCells(), ExecOnce(), and SetCombinedCellsBranchName().

void AliEmcalCorrectionCellCombineCollections::UserCreateOutputObjects ( )
virtual

Create user output objects.

Reimplemented from AliEmcalCorrectionComponent.

Definition at line 79 of file AliEmcalCorrectionCellCombineCollections.cxx.

void AliEmcalCorrectionCellCombineCollections::VerifyCombinedCells ( std::vector< AliVCaloCells * >  inputCaloCells)
protected

Explicitly check that the cells in the various input cell collections were successfully combined together to form the combined cells. NOTE: This should not be run during normal usage. It will reduce performance and provide little benefit to the user.

Parameters
[in]inputCaloCellsvector of calo cells which were combined to create the combined cells.

Definition at line 216 of file AliEmcalCorrectionCellCombineCollections.cxx.

Referenced by CreateCombinedCells(), and SetCombinedCellsBranchName().

Member Data Documentation

AliVCaloCells* AliEmcalCorrectionCellCombineCollections::fCombinedCells
protected

! Cells combined from the input and external events.

Definition at line 59 of file AliEmcalCorrectionCellCombineCollections.h.

Referenced by AddCellsToCombinedCellObject(), CreateCombinedCells(), SetupCombinedCells(), and VerifyCombinedCells().

std::string AliEmcalCorrectionCellCombineCollections::fCreatedCellsBranchName
protected

Name of the cell branch which will be created for the combined cells.

Definition at line 56 of file AliEmcalCorrectionCellCombineCollections.h.

Referenced by GetCombinedCellsBranchName(), Initialize(), SetCombinedCellsBranchName(), and SetupCombinedCells().

std::string AliEmcalCorrectionCellCombineCollections::fExternalCellsBranchName
protected

Name of the cell branch which will be copied from the external event for the combined cells.

Definition at line 55 of file AliEmcalCorrectionCellCombineCollections.h.

Referenced by CreateCombinedCells(), GetExternalCellsBranchName(), Initialize(), and SetExternalCellsBranchName().

bool AliEmcalCorrectionCellCombineCollections::fInitializedCombinedCells
protected

! True if the combined cells object has been initialized

Definition at line 58 of file AliEmcalCorrectionCellCombineCollections.h.

Referenced by CreateCombinedCells(), and SetupCombinedCells().

bool AliEmcalCorrectionCellCombineCollections::fVerifyCombinedCells
protected

True if the task should confirm that the combined cells properly copied the input cells.

Definition at line 57 of file AliEmcalCorrectionCellCombineCollections.h.

Referenced by CreateCombinedCells(), and Initialize().

RegisterCorrectionComponent< AliEmcalCorrectionCellCombineCollections > AliEmcalCorrectionCellCombineCollections::reg
staticprotected

Definition at line 65 of file AliEmcalCorrectionCellCombineCollections.h.


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