AliPhysics  608b256 (608b256)
AliEmcalMCTrackSelector Class Reference

Class to select particles in MC events. Salvatore Aiola, Yale Univeristy. More...

#include <AliEmcalMCTrackSelector.h>

Inheritance diagram for AliEmcalMCTrackSelector:

Public Member Functions

 AliEmcalMCTrackSelector ()
 Dummy constructor. More...
 
 AliEmcalMCTrackSelector (const char *name)
 Main constructor. More...
 
virtual ~AliEmcalMCTrackSelector ()
 Destructor. More...
 
void SetOnlyPhysPrim (Bool_t s)
 Select only physical primary particles. More...
 
void SetChargedMC (Bool_t c=kTRUE)
 Select only charged particles. More...
 
void SetEtaMax (Double_t e)
 Set the eta acceptance. More...
 
void SetRejectNK (Bool_t r=kTRUE)
 Reject neutrons and K0long particles. More...
 
void SetRejectPhotonMother (bool doReject)
 Reject photon in case it is the mother of another photon. More...
 
void SetOnlyHIJING (Bool_t s)
 
void SetParticlesOutName (const char *name)
 Set the name of the output container. More...
 

Static Public Member Functions

static AliEmcalMCTrackSelectorAddTaskMCTrackSelector (TString outname="mcparticles", Bool_t nk=kFALSE, Bool_t ch=kFALSE, Double_t etamax=1, Bool_t physPrim=kTRUE)
 Create new AliEmcalMCTrackSelector task and add it to the analysis manager. More...
 

Protected Member Functions

void UserCreateOutputObjects ()
 Creating user output. More...
 
void UserExec (Option_t *option)
 Main event loop. More...
 
virtual Bool_t AcceptParticle (AliAODMCParticle *part) const
 Check whether paricle is selected. More...
 
void ConvertMCParticles (AliMCEvent *mcEvent, TClonesArray *partOut, AliNamedArrayI *partMap=0)
 Convert MC particles in MC AOD articles (for ESD analysis). More...
 
void CopyMCParticles (TClonesArray *partIn, TClonesArray *partOut, AliNamedArrayI *partMap=0)
 Convert standard MC AOD particles in a new array, and filter if requested (for AOD analysis). More...
 

Protected Attributes

TString fParticlesOutName
 name of output particle array More...
 
Bool_t fOnlyPhysPrim
 true = only physical primary particles More...
 
Bool_t fRejectNK
 true = reject K_0^L and neutrons More...
 
Bool_t fChargedMC
 true = only charged particles More...
 
Bool_t fOnlyHIJING
 true = only HIJING particles More...
 
Bool_t fRejectPhotonMothers
 Reject photons that are mothers of other photons. More...
 
Double_t fEtaMax
 maximum eta to accept particles More...
 
TString fParticlesMapName
 ! name of the particle map More...
 
Bool_t fInit
 ! true = task initialized More...
 
TClonesArray * fParticlesIn
 ! particle array in (AOD) More...
 
TClonesArray * fParticlesOut
 ! particle array out More...
 
AliNamedArrayIfParticlesMap
 ! particle index/label More...
 
AliVEvent * fEvent
 ! event More...
 
AliMCEvent * fMC
 ! MC event (ESD) More...
 
Bool_t fIsESD
 ! ESD or AOD analysis More...
 
Bool_t fDisabled
 ! Disable task if a problem occurs at initialization More...
 

Private Member Functions

 AliEmcalMCTrackSelector (const AliEmcalMCTrackSelector &)
 
AliEmcalMCTrackSelectoroperator= (const AliEmcalMCTrackSelector &)
 

Detailed Description

Class to select particles in MC events. Salvatore Aiola, Yale Univeristy.

Since
Aug 5, 2012

Definition at line 46 of file AliEmcalMCTrackSelector.h.

Constructor & Destructor Documentation

AliEmcalMCTrackSelector::AliEmcalMCTrackSelector ( )

Dummy constructor.

Definition at line 45 of file AliEmcalMCTrackSelector.cxx.

Referenced by AddTaskMCTrackSelector().

AliEmcalMCTrackSelector::AliEmcalMCTrackSelector ( const char *  name)

Main constructor.

Parameters
nameName of the task

Definition at line 66 of file AliEmcalMCTrackSelector.cxx.

virtual AliEmcalMCTrackSelector::~AliEmcalMCTrackSelector ( )
inlinevirtual

Destructor.

Definition at line 64 of file AliEmcalMCTrackSelector.h.

AliEmcalMCTrackSelector::AliEmcalMCTrackSelector ( const AliEmcalMCTrackSelector )
private

Member Function Documentation

Bool_t AliEmcalMCTrackSelector::AcceptParticle ( AliAODMCParticle *  part) const
protectedvirtual

Check whether paricle is selected.

Acceptance criteria:

  • Physical primary
  • Charged / neutral
  • Is neutron or K0long
  • Eta range
  • Generator index (for HIJING prodctions)
Parameters
partParticle to be checked
Returns
True if the particle is accepted, false otherwise

Reimplemented in AliMCHFParticleSelector.

Definition at line 297 of file AliEmcalMCTrackSelector.cxx.

Referenced by ConvertMCParticles(), CopyMCParticles(), and UserCreateOutputObjects().

AliEmcalMCTrackSelector * AliEmcalMCTrackSelector::AddTaskMCTrackSelector ( TString  outname = "mcparticles",
Bool_t  nk = kFALSE,
Bool_t  ch = kFALSE,
Double_t  etamax = 1,
Bool_t  physPrim = kTRUE 
)
static

Create new AliEmcalMCTrackSelector task and add it to the analysis manager.

Parameters
outnamename of the output contaienr
nkReject neutrons and K0long
chSelect only charged particles
etamaxMax eta acceptance
physPrimRequire physical primary particles
Returns
AliEmcalMCTrackSelector*

Definition at line 316 of file AliEmcalMCTrackSelector.cxx.

Referenced by SetParticlesOutName().

void AliEmcalMCTrackSelector::ConvertMCParticles ( AliMCEvent *  mcEvent,
TClonesArray *  partOut,
AliNamedArrayI partMap = 0 
)
protected

Convert MC particles in MC AOD articles (for ESD analysis).

Parameters
mcEventInput event
partOutOutput particle container with selected particles
partMap

Definition at line 157 of file AliEmcalMCTrackSelector.cxx.

Referenced by UserCreateOutputObjects(), and UserExec().

void AliEmcalMCTrackSelector::CopyMCParticles ( TClonesArray *  partIn,
TClonesArray *  partOut,
AliNamedArrayI partMap = 0 
)
protected

Convert standard MC AOD particles in a new array, and filter if requested (for AOD analysis).

Parameters
partInInput particle container
partOutOutput particle container with selected particles
partMapIndex map between particles in input and output container

Definition at line 237 of file AliEmcalMCTrackSelector.cxx.

Referenced by UserCreateOutputObjects(), and UserExec().

AliEmcalMCTrackSelector& AliEmcalMCTrackSelector::operator= ( const AliEmcalMCTrackSelector )
private
void AliEmcalMCTrackSelector::SetChargedMC ( Bool_t  c = kTRUE)
inline

Select only charged particles.

Parameters
cIf true only charged particles are selected

Definition at line 76 of file AliEmcalMCTrackSelector.h.

Referenced by AddTaskMCTrackSelector().

void AliEmcalMCTrackSelector::SetEtaMax ( Double_t  e)
inline

Set the eta acceptance.

Parameters
eMaximum eta acceptance

Definition at line 82 of file AliEmcalMCTrackSelector.h.

Referenced by AddTaskMCTrackSelector().

void AliEmcalMCTrackSelector::SetOnlyHIJING ( Bool_t  s)
inline

Definition at line 102 of file AliEmcalMCTrackSelector.h.

void AliEmcalMCTrackSelector::SetOnlyPhysPrim ( Bool_t  s)
inline

Select only physical primary particles.

Parameters
sIf true only physical primary particles are used

Definition at line 70 of file AliEmcalMCTrackSelector.h.

Referenced by AddTaskMCTrackSelector().

void AliEmcalMCTrackSelector::SetParticlesOutName ( const char *  name)
inline

Set the name of the output container.

This container is attached to the input event with the corresponding name. This name has to be used in the user tasks to connect the MC particle container to the particles selected by this instance of the task.

Parameters
nameName of the output container attached to the input event

Definition at line 113 of file AliEmcalMCTrackSelector.h.

Referenced by AddTaskMCTrackSelector().

void AliEmcalMCTrackSelector::SetRejectNK ( Bool_t  r = kTRUE)
inline

Reject neutrons and K0long particles.

Parameters
rIf true neutrons and K0long particles are rejected

Definition at line 88 of file AliEmcalMCTrackSelector.h.

Referenced by AddTaskMCTrackSelector().

void AliEmcalMCTrackSelector::SetRejectPhotonMother ( bool  doReject)
inline

Reject photon in case it is the mother of another photon.

In order to mimic processes PYTHIA8 puts mothers and daugthers of the process on the stack, which can lead in case of photons to double counting. Photon mothers that are duaghters of photon mothers need to be rejected.

Parameters
doRejectIf true photons are rejected if they are mothers of other photons

Definition at line 100 of file AliEmcalMCTrackSelector.h.

void AliEmcalMCTrackSelector::UserCreateOutputObjects ( )
inlineprotected

Creating user output.

Not used in this task

Definition at line 135 of file AliEmcalMCTrackSelector.h.

void AliEmcalMCTrackSelector::UserExec ( Option_t option)
protected

Main event loop.

Run selection of particles and convert them to AliAODMCParticles and copy them to the output container. Set AliEmcalMCTrackSelector::AccpetParticle for the definition of selected particles.

Parameters
optionNot used

Definition at line 87 of file AliEmcalMCTrackSelector.cxx.

Referenced by UserCreateOutputObjects().

Member Data Documentation

Bool_t AliEmcalMCTrackSelector::fChargedMC
protected

true = only charged particles

Definition at line 183 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), AcceptParticle(), and SetChargedMC().

Bool_t AliEmcalMCTrackSelector::fDisabled
protected

! Disable task if a problem occurs at initialization

Definition at line 195 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

Double_t AliEmcalMCTrackSelector::fEtaMax
protected

maximum eta to accept particles

Definition at line 186 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), AcceptParticle(), and SetEtaMax().

AliVEvent* AliEmcalMCTrackSelector::fEvent
protected

! event

Definition at line 192 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

Bool_t AliEmcalMCTrackSelector::fInit
protected

! true = task initialized

Definition at line 188 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

Bool_t AliEmcalMCTrackSelector::fIsESD
protected

! ESD or AOD analysis

Definition at line 194 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), and UserExec().

AliMCEvent* AliEmcalMCTrackSelector::fMC
protected
Bool_t AliEmcalMCTrackSelector::fOnlyHIJING
protected

true = only HIJING particles

Definition at line 184 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), AcceptParticle(), and SetOnlyHIJING().

Bool_t AliEmcalMCTrackSelector::fOnlyPhysPrim
protected

true = only physical primary particles

Definition at line 181 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), AcceptParticle(), and SetOnlyPhysPrim().

TClonesArray* AliEmcalMCTrackSelector::fParticlesIn
protected
AliNamedArrayI* AliEmcalMCTrackSelector::fParticlesMap
protected

! particle index/label

Definition at line 191 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

TString AliEmcalMCTrackSelector::fParticlesMapName
protected

! name of the particle map

Definition at line 187 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

TClonesArray* AliEmcalMCTrackSelector::fParticlesOut
protected

! particle array out

Definition at line 190 of file AliEmcalMCTrackSelector.h.

Referenced by UserExec().

TString AliEmcalMCTrackSelector::fParticlesOutName
protected

name of output particle array

Definition at line 180 of file AliEmcalMCTrackSelector.h.

Referenced by SetParticlesOutName(), and UserExec().

Bool_t AliEmcalMCTrackSelector::fRejectNK
protected

true = reject K_0^L and neutrons

Definition at line 182 of file AliEmcalMCTrackSelector.h.

Referenced by AliMCHFParticleSelector::AcceptParticle(), AcceptParticle(), and SetRejectNK().

Bool_t AliEmcalMCTrackSelector::fRejectPhotonMothers
protected

Reject photons that are mothers of other photons.

Definition at line 185 of file AliEmcalMCTrackSelector.h.

Referenced by ConvertMCParticles(), CopyMCParticles(), and SetRejectPhotonMother().


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