![]() |
AliPhysics
bdbde52 (bdbde52)
|
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>
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 AliEmcalCopyCollection * | AddTaskEmcalCopyCollection (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... | |
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.
Definition at line 28 of file AliEmcalCopyCollection.h.
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.
|
inlinevirtual |
Definition at line 32 of file AliEmcalCopyCollection.h.
|
static |
Definition at line 319 of file AliEmcalCopyCollection.cxx.
|
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().
|
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().
|
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().
|
inline |
Definition at line 40 of file AliEmcalCopyCollection.h.
|
inline |
Definition at line 39 of file AliEmcalCopyCollection.h.
|
inline |
Definition at line 42 of file AliEmcalCopyCollection.h.
|
inline |
Definition at line 41 of file AliEmcalCopyCollection.h.
|
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().
|
inline |
Definition at line 46 of file AliEmcalCopyCollection.h.
|
inline |
Definition at line 45 of file AliEmcalCopyCollection.h.
|
inline |
Definition at line 48 of file AliEmcalCopyCollection.h.
|
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.
|
protected |
Name of the collection branch to copy.
Definition at line 63 of file AliEmcalCopyCollection.h.
Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), GetCollectionToCopyName(), and SetCollectionToCopyName().
|
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().
|
protected |
! Denotes whether the event is initialized
Definition at line 66 of file AliEmcalCopyCollection.h.
Referenced by CreateNewObjectBranch(), and UserExec().
|
protected |
Type of collection to copy.
Definition at line 62 of file AliEmcalCopyCollection.h.
Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), GetInputObjectType(), NewBranch(), and SetInputObjectType().
|
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().
|
protected |
! Denotes whether the input is ESD
Definition at line 67 of file AliEmcalCopyCollection.h.
Referenced by CopyBranchToNewObject(), CreateNewObjectBranch(), NewBranch(), and UserCreateOutputObjects().
|
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().