AliPhysics  54fd37e (54fd37e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalCopyCollection Class Reference

Copies cell, cluster, or track collections for use in the EMCal framework.Often, it is necessary to copy cells, clusters, or tracks for use within the EMCal framework. For example, it is important when comparing whether two sets of corrections yield the same results. More generally, it is helpful when running more than one set of tasks which need the same objects with different settings. More...

#include <AliEmcalCopyCollection.h>

Inheritance diagram for AliEmcalCopyCollection:

Public Member Functions

 AliEmcalCopyCollection ()
 
 AliEmcalCopyCollection (std::string name, AliEmcalContainerUtils::InputObject_t inputObjectType, std::string collectionToCopyName, std::string newCollectionName, bool isEmbedding)
 
virtual ~AliEmcalCopyCollection ()
 
void UserCreateOutputObjects ()
 
void UserExec (Option_t *option)
 
AliEmcalContainerUtils::InputObject_t GetInputObjectType () const
 
std::string GetCollectionToCopyName () const
 
std::string GetNewCollectionName () const
 
bool GetIsEmbedding () const
 
void SetInputObjectType (const AliEmcalContainerUtils::InputObject_t inputObjectType)
 
void SetCollectionToCopyName (const std::string collectionToCopyName)
 
void SetNewCollectionName (const std::string newCollectionName)
 
void SetIsEmbedding (bool isEmbedding)
 

Static Public Member Functions

static AliEmcalCopyCollectionAddTaskEmcalCopyCollection (AliEmcalContainerUtils::InputObject_t inputObjectType=AliEmcalContainerUtils::kNoDefinedInputObject, const char *collectionToCopyName="", const char *newCollectionName="", bool isEmbedding=false)
 

Protected Member Functions

void CreateNewObjectBranch ()
 
void NewBranch ()
 
void CopyBranchToNewObject ()
 
void CopyClusters (TClonesArray *orig, TClonesArray *dest)
 

Protected Attributes

AliEmcalContainerUtils::InputObject_t fInputObjectType
 Type of collection to copy. More...
 
std::string fCollectionToCopyName
 Name of the collection branch to copy. More...
 
std::string fNewCollectionName
 Name of the collection bracnh where it will be copied. More...
 
bool fIsEmbedding
 Denotes whether the collection is embedded (and therefore should be copied and stored in the external event) More...
 
bool fEventInitialized
 ! Denotes whether the event is initialized More...
 
bool fIsEsd
 ! Denotes whether the input is ESD More...
 
AliVEvent * fEvent
 ! Points to the event to copy from and store the new bracnh in More...
 

Detailed Description

Copies cell, cluster, or track collections for use in the EMCal framework.

Often, it is necessary to copy cells, clusters, or tracks for use within the EMCal framework. For example, it is important when comparing whether two sets of corrections yield the same results. More generally, it is helpful when running more than one set of tasks which need the same objects with different settings.

This task consolidates the code for copying cells, clusters, and tracks into one place. Some code is drawn from AliEmcalAodTrackFilterTask, and AliAnalysisTaskEMCALClusterizeFast.

Author
Raymond Ehlers raymo.nosp@m.nd.e.nosp@m.hlers.nosp@m.@yal.nosp@m.e.edu, Yale University
Date
Nov 3, 2016

Definition at line 28 of file AliEmcalCopyCollection.h.

Constructor & Destructor Documentation

AliEmcalCopyCollection::AliEmcalCopyCollection ( )

Definition at line 24 of file AliEmcalCopyCollection.cxx.

Referenced by AddTaskEmcalCopyCollection().

AliEmcalCopyCollection::AliEmcalCopyCollection ( std::string  name,
AliEmcalContainerUtils::InputObject_t  inputObjectType,
std::string  collectionToCopyName,
std::string  newCollectionName,
bool  isEmbedding 
)

Definition at line 36 of file AliEmcalCopyCollection.cxx.

virtual AliEmcalCopyCollection::~AliEmcalCopyCollection ( )
inlinevirtual

Definition at line 32 of file AliEmcalCopyCollection.h.

Member Function Documentation

AliEmcalCopyCollection * AliEmcalCopyCollection::AddTaskEmcalCopyCollection ( AliEmcalContainerUtils::InputObject_t  inputObjectType = AliEmcalContainerUtils::kNoDefinedInputObject,
const char *  collectionToCopyName = "",
const char *  newCollectionName = "",
bool  isEmbedding = false 
)
static

Definition at line 319 of file AliEmcalCopyCollection.cxx.

void AliEmcalCopyCollection::CopyBranchToNewObject ( )
protected

Copies from the collection branch to the new collection branch.

Cells, clusters, and tracks are all handled individually.

Definition at line 189 of file AliEmcalCopyCollection.cxx.

Referenced by UserExec().

void AliEmcalCopyCollection::CopyClusters ( TClonesArray *  orig,
TClonesArray *  dest 
)
protected

Copies clusters from an one TClonesArray to another.

This function is from AliAnalysisTaskEMCALClusterizeFast, but modified to copy ALL clusters so that PHOS clusters can be used in the EMCal framework.

Definition at line 264 of file AliEmcalCopyCollection.cxx.

Referenced by CopyBranchToNewObject().

void AliEmcalCopyCollection::CreateNewObjectBranch ( )
protected

Steers creation of a new collection in the event. It supports the "usedefault" pattern to determine the input collection branch name.

Definition at line 96 of file AliEmcalCopyCollection.cxx.

Referenced by UserExec().

std::string AliEmcalCopyCollection::GetCollectionToCopyName ( ) const
inline

Definition at line 40 of file AliEmcalCopyCollection.h.

AliEmcalContainerUtils::InputObject_t AliEmcalCopyCollection::GetInputObjectType ( ) const
inline

Definition at line 39 of file AliEmcalCopyCollection.h.

bool AliEmcalCopyCollection::GetIsEmbedding ( ) const
inline

Definition at line 42 of file AliEmcalCopyCollection.h.

std::string AliEmcalCopyCollection::GetNewCollectionName ( ) const
inline

Definition at line 41 of file AliEmcalCopyCollection.h.

void AliEmcalCopyCollection::NewBranch ( )
protected

Create a new branch for the new collection. It checks to ensure that the object does not already exist in the input event before creating it.

Note that cells and clusters/tracks are handled differently due to the different types used to store each branch (Ali*CaloCells and TClonesArray respectively).

Definition at line 141 of file AliEmcalCopyCollection.cxx.

Referenced by CreateNewObjectBranch().

void AliEmcalCopyCollection::SetCollectionToCopyName ( const std::string  collectionToCopyName)
inline

Definition at line 46 of file AliEmcalCopyCollection.h.

void AliEmcalCopyCollection::SetInputObjectType ( const AliEmcalContainerUtils::InputObject_t  inputObjectType)
inline

Definition at line 45 of file AliEmcalCopyCollection.h.

void AliEmcalCopyCollection::SetIsEmbedding ( bool  isEmbedding)
inline

Definition at line 48 of file AliEmcalCopyCollection.h.

void AliEmcalCopyCollection::SetNewCollectionName ( const std::string  newCollectionName)
inline

Definition at line 47 of file AliEmcalCopyCollection.h.

void AliEmcalCopyCollection::UserCreateOutputObjects ( )

Used to determine the input type (ESD or AOD).

Definition at line 51 of file AliEmcalCopyCollection.cxx.

void AliEmcalCopyCollection::UserExec ( Option_t option)

Creates a new collection during the first event and then copies the collection into it each event.

Definition at line 78 of file AliEmcalCopyCollection.cxx.

Member Data Documentation

std::string AliEmcalCopyCollection::fCollectionToCopyName
protected

Name of the collection branch to copy.

Definition at line 63 of file AliEmcalCopyCollection.h.

Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), GetCollectionToCopyName(), and SetCollectionToCopyName().

AliVEvent* AliEmcalCopyCollection::fEvent
protected

! Points to the event to copy from and store the new bracnh in

Definition at line 68 of file AliEmcalCopyCollection.h.

Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), and NewBranch().

bool AliEmcalCopyCollection::fEventInitialized
protected

! Denotes whether the event is initialized

Definition at line 66 of file AliEmcalCopyCollection.h.

Referenced by CreateNewObjectBranch(), and UserExec().

AliEmcalContainerUtils::InputObject_t AliEmcalCopyCollection::fInputObjectType
protected
bool AliEmcalCopyCollection::fIsEmbedding
protected

Denotes whether the collection is embedded (and therefore should be copied and stored in the external event)

Definition at line 65 of file AliEmcalCopyCollection.h.

Referenced by CreateNewObjectBranch(), GetIsEmbedding(), and SetIsEmbedding().

bool AliEmcalCopyCollection::fIsEsd
protected

! Denotes whether the input is ESD

Definition at line 67 of file AliEmcalCopyCollection.h.

Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), NewBranch(), and UserCreateOutputObjects().

std::string AliEmcalCopyCollection::fNewCollectionName
protected

Name of the collection bracnh where it will be copied.

Definition at line 64 of file AliEmcalCopyCollection.h.

Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), GetNewCollectionName(), NewBranch(), and SetNewCollectionName().


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