AliPhysics  1168478 (1168478)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliBaseAODTask Class Referenceabstract

#include <AliBaseAODTask.h>

Inheritance diagram for AliBaseAODTask:

Public Member Functions

 AliBaseAODTask ()
 
 AliBaseAODTask (const char *name, const char *title)
 
virtual ~AliBaseAODTask ()
 
virtual Bool_t Configure (const char *macro="-default-")
 
Set parameters
void SetIPzAxis (Int_t n, Double_t min, Double_t max)
 
void SetIPzAxis (Int_t n, Double_t max)
 
void SetIPzAxis (const TString &spec)
 
void SetCentralityAxis (UShort_t n, Short_t *bins)
 
void SetCentralityAxis (UShort_t n, Double_t *bins)
 
void SetCentralityAxis (Short_t low, Short_t high)
 
void SetCentralityAxis (const char *bins)
 
void SetAbsMinCent (Double_t x=-1)
 
void SetTriggerMask (UInt_t mask)
 
void SetTriggerMask (const char *mask)
 
void SetFilterMask (UInt_t mask)
 
void SetFilterMask (const char *mask)
 
Interface member functions
virtual Bool_t Connect (const char *sumFile=0, const char *resFile=0)
 
virtual Bool_t Book ()=0
 
virtual Bool_t PreData ()
 
virtual Bool_t PreEvent ()
 
virtual Bool_t Event (AliAODEvent &aod)=0
 
virtual Bool_t PostEvent ()
 
virtual Bool_t Finalize ()=0
 
Utilities
void Print (Option_t *option="") const
 

Protected Member Functions

 AliBaseAODTask (const AliBaseAODTask &o)
 
AliBaseAODTaskoperator= (const AliBaseAODTask &o)
 
virtual const char * DefaultConfig () const
 
Task interface
virtual void Init ()
 
virtual void UserCreateOutputObjects ()
 
virtual void UserExec (Option_t *option)
 
virtual void Terminate (Option_t *option)
 
Get event information
AliAODForwardMultGetForward (const AliAODEvent &aod, Bool_t mc=false, Bool_t verb=true)
 
AliAODMultEventClassGetMultClass (const AliAODEvent &aod, Bool_t verb=true)
 
AliAODCentralMultGetCentral (const AliAODEvent &aod, Bool_t mc=false, Bool_t verb=true)
 
TH2DGetPrimary (const AliAODEvent &aod)
 
virtual void StoreInformation (AliAODForwardMult &forward)
 
virtual Bool_t StoreTrainName (Int_t no)
 
virtual Bool_t CheckEvent (const AliAODForwardMult &forward)
 
Bool_t HasCentrality () const
 
virtual Double_t GetCentrality (AliAODEvent &event, AliAODForwardMult *forward, Int_t &qual)
 
virtual Double_t GetCentrality (AliAODEvent &event, AliAODForwardMult *forward)
 
virtual Double_t GetIpZ (AliAODEvent &event, AliAODForwardMult *forward)
 
virtual Bool_t GetIpXY (AliAODEvent &aod, Double_t &x, Double_t &y)
 

Static Protected Member Functions

Service functions to set axis limits
static void FixAxis (TAxis &axis, const char *title=0)
 
static void SetAxis (TAxis &axis, Int_t n, Double_t *borders)
 
static void SetAxis (TAxis &axis, const TString &spec, const char *sep=":,")
 
static void SetAxis (TAxis &axis, Int_t n, Double_t l, Double_t h)
 
static void SetAxis (TAxis &axis, Int_t n, Double_t m)
 
static void PrintAxis (const TAxis &axis, Int_t nSig=2, const char *alt=0)
 

Protected Attributes

UInt_t fTriggerMask
 
UInt_t fFilterMask
 
TAxis fCentAxis
 
Double_t fAbsMinCent
 
TAxis fIPzAxis
 
TH1IfTriggers
 
TH1IfEventStatus
 
TH1DfVertex
 
TH1DfCent
 
TH1DfAccVertex
 
TH2DfAccVertexXY
 
TH1DfAccCent
 
Bool_t fFirstEvent
 
Bool_t fCloneList
 
TListfSums
 
TListfResults
 

Detailed Description

Base class for reading in AOD stuff

Definition at line 15 of file AliBaseAODTask.h.

Constructor & Destructor Documentation

AliBaseAODTask::AliBaseAODTask ( )

Constructor (for I/O - do not use)

Definition at line 19 of file AliBaseAODTask.cxx.

AliBaseAODTask::AliBaseAODTask ( const char *  name,
const char *  title 
)

Constructor

Parameters
nameName of task
titleClass name used in configuration script

Definition at line 40 of file AliBaseAODTask.cxx.

virtual AliBaseAODTask::~AliBaseAODTask ( )
inlinevirtual

Destructor

Definition at line 33 of file AliBaseAODTask.h.

AliBaseAODTask::AliBaseAODTask ( const AliBaseAODTask o)
protected

Copyt constructor - not defined

Parameters
oObject to copy from

Member Function Documentation

virtual Bool_t AliBaseAODTask::Book ( )
pure virtual

Book output objects. Derived class should define this to book output objects on the processing output list fList before the actual event processing. This is called on the master and on each slave.

If this member function returns false, the execution is stopped with a fatal signal.

Returns
true on success.

Implemented in AliBasedNdetaTask, AliBaseMultTask, AliForwardMultDists, and AliFMDEventPlaneTask.

Referenced by UserCreateOutputObjects().

Bool_t AliBaseAODTask::CheckEvent ( const AliAODForwardMult forward)
protectedvirtual

Check if the event corresponds to the selected trigger(s), vertex, and centrality. Derived classes can overload this to enable event processing - even if the event is not within cuts.

Parameters
forwardForward object
Returns
true if the event is within the cuts.

Reimplemented in AliBasedNdetaTask, AliForwardMultDists, AliBaseMultTask, and AliForwardMultiplicityDistribution.

Definition at line 595 of file AliBaseAODTask.cxx.

Referenced by AliForwardMultiplicityDistribution::CheckEvent(), AliBaseMultTask::CheckEvent(), AliForwardMultDists::CheckEvent(), AliBasedNdetaTask::CheckEvent(), and UserExec().

Bool_t AliBaseAODTask::Configure ( const char *  macro = "-default-")
virtual

Configure this task via a macro

Parameters
macroMacro to configure va
Returns
true on success, false otherwise

Definition at line 69 of file AliBaseAODTask.cxx.

Referenced by AddTaskdNdeta().

Bool_t AliBaseAODTask::Connect ( const char *  sumFile = 0,
const char *  resFile = 0 
)
virtual

Add this task to the manager and connect the outputs. If sumFile is null or the empty string, then the sum container is stored in the default output file of the manager. If resFile is null or the empty string, then it is set to resFile if defined, otherwise to the default output file of the manager.

Parameters
sumFileOutput file for sums
resFileOutput file for sums
Returns
true on success

Definition at line 292 of file AliBaseAODTask.cxx.

Referenced by AddTaskCreateRespMatr(), AddTaskdNdeta(), AddTaskMultDistributions(), AddTaskMultDists(), and AddTaskTriggerCorrection().

virtual const char* AliBaseAODTask::DefaultConfig ( ) const
inlineprotectedvirtual

Get the name of the default configuration script to use. Sub-classes can override this to give another default configuration script. Note, it should problably only return the base name (not full path) of the script.

Returns
Name of the configuration script to use.

Definition at line 460 of file AliBaseAODTask.h.

Referenced by Configure().

virtual Bool_t AliBaseAODTask::Event ( AliAODEvent aod)
pure virtual

Process a single event

Parameters
aodInput event
Returns
true on success

Implemented in AliBasedNdetaTask, AliBaseMultTask, AliForwardMultDists, and AliFMDEventPlaneTask.

Referenced by UserExec().

virtual Bool_t AliBaseAODTask::Finalize ( )
pure virtual

Do the final analysis on the merged output.

Returns
true on success

Implemented in AliBasedNdetaTask, AliBaseMultTask, AliForwardMultDists, AliFMDEventPlaneTask, AliForwarddNdetaTask, and AliMCTruthdNdetaTask.

Referenced by Terminate().

void AliBaseAODTask::FixAxis ( TAxis axis,
const char *  title = 0 
)
staticprotected

Fix axis attributes

Parameters
axisAxis to fix
titlePossible title for axis

Definition at line 138 of file AliBaseAODTask.cxx.

Referenced by SetAxis().

AliAODCentralMult * AliBaseAODTask::GetCentral ( const AliAODEvent aod,
Bool_t  mc = false,
Bool_t  verb = true 
)
protected

Get the central object from the AOD

Parameters
aodAOD event
mcIf true, for MC
verbIf truem be verbose
Returns
Central object or null

Definition at line 515 of file AliBaseAODTask.cxx.

Referenced by AliForwardMultDists::Event(), AliBaseMultTask::Event(), and AliCentraldNdetaTask::GetHistogram().

Double_t AliBaseAODTask::GetCentrality ( AliAODEvent event,
AliAODForwardMult forward,
Int_t qual 
)
protectedvirtual

Get the centrality. The trigger mask of the forward object is not modified

Parameters
eventOur event
forwardOur FMD event
qualOn return, the quality flag
Returns
The centrality percentage

Reimplemented in AliBasedNdetaTask.

Definition at line 460 of file AliBaseAODTask.cxx.

Referenced by GetCentrality(), AliBasedNdetaTask::GetCentrality(), and UserExec().

Double_t AliBaseAODTask::GetCentrality ( AliAODEvent event,
AliAODForwardMult forward 
)
protectedvirtual

Get the centrality. If the quality is bad, set the corresponding bit on the forward object.

Parameters
eventOur event
forwardOur FMD event

Reimplemented in AliBasedNdetaTask.

Definition at line 473 of file AliBaseAODTask.cxx.

AliAODForwardMult * AliBaseAODTask::GetForward ( const AliAODEvent aod,
Bool_t  mc = false,
Bool_t  verb = true 
)
protected

Get the forward object from the AOD

Parameters
aodAOD event
mcIf true, for MC
verbIf truem be verbose
Returns
Forward object or null

Definition at line 432 of file AliBaseAODTask.cxx.

Referenced by AliFMDEventPlaneTask::Event(), AliForwardMultDists::Event(), AliBaseMultTask::Event(), AliBasedNdetaTask::Event(), AliForwarddNdetaTask::GetHistogram(), AliForwardMultDists::PreData(), and UserExec().

Bool_t AliBaseAODTask::GetIpXY ( AliAODEvent aod,
Double_t x,
Double_t y 
)
protectedvirtual

Get the IPs (x,y) coordinates

Parameters
aodInput event
xOn return, the X coordinate
yOn return, the Y coordinate
Returns
true on success, false otherwise

Definition at line 491 of file AliBaseAODTask.cxx.

Referenced by UserExec().

Double_t AliBaseAODTask::GetIpZ ( AliAODEvent event,
AliAODForwardMult forward 
)
protectedvirtual

Get the Z coordinate of the interaction point

Parameters
eventOur event
forwardOur FMD event
Returns
The z coordinate of the interaction point

Definition at line 484 of file AliBaseAODTask.cxx.

Referenced by UserExec().

AliAODMultEventClass * AliBaseAODTask::GetMultClass ( const AliAODEvent aod,
Bool_t  verb = true 
)
protected

Get the Mult event class object from the AOD

Parameters
aodAOD event
verbIf truem be verbose
Returns
Forward object or null

Definition at line 447 of file AliBaseAODTask.cxx.

TH2D * AliBaseAODTask::GetPrimary ( const AliAODEvent aod)
protected

Get the histogram of primary particles

Parameters
aodAOD event
Returns
Pointer to primary particles, or null

Definition at line 530 of file AliBaseAODTask.cxx.

Referenced by AliForwardMultDists::Event(), AliBaseMultTask::Event(), AliMCTruthdNdetaTask::GetHistogram(), and AliForwardMultDists::PreData().

Bool_t AliBaseAODTask::HasCentrality ( ) const
inlineprotected
virtual void AliBaseAODTask::Init ( )
inlineprotectedvirtual

Initialise on master - does nothing

Definition at line 253 of file AliBaseAODTask.h.

AliBaseAODTask& AliBaseAODTask::operator= ( const AliBaseAODTask o)
protected

Assignment operatoer - not defined

Parameters
oObject to assign from
Returns
reference to this object
virtual Bool_t AliBaseAODTask::PostEvent ( )
inlinevirtual

Called after processing a single event - should not do anything but clear data, etc.

Returns
true on success

Definition at line 211 of file AliBaseAODTask.h.

Referenced by UserExec().

virtual Bool_t AliBaseAODTask::PreData ( )
inlinevirtual

Called after reading in the first event. Here we can setup stuff depending on the conditions we're running under.

Returns
true on success. If this returns false, then we turn the task into a zombie and we do no more processing.

Reimplemented in AliForwardMultDists.

Definition at line 189 of file AliBaseAODTask.h.

Referenced by UserExec().

virtual Bool_t AliBaseAODTask::PreEvent ( )
inlinevirtual

Called before processing a single event - should not do anything but clear data, etc.

Returns
true on success

Reimplemented in AliBasedNdetaTask, AliBaseMultTask, and AliForwardMultDists.

Definition at line 196 of file AliBaseAODTask.h.

Referenced by UserExec().

void AliBaseAODTask::Print ( Option_t option = "") const

Print information

Parameters
optionNot used

Print this task

Parameters
optionNot used

Definition at line 717 of file AliBaseAODTask.cxx.

Referenced by AliForwardMultDists::Print(), AliBasedNdetaTask::Print(), and UserCreateOutputObjects().

void AliBaseAODTask::PrintAxis ( const TAxis axis,
Int_t  nSig = 2,
const char *  alt = 0 
)
staticprotected

Print axis

Parameters
axisAxis to print
nSigNumber of significant digits
altAlternative

Definition at line 216 of file AliBaseAODTask.cxx.

Referenced by Print().

void AliBaseAODTask::SetAbsMinCent ( Double_t  x = -1)
inline

Set the very least centrality to consider. This is for cases where the centrality calibration of simulated data doesn't really match the real-data one, but we want to keep the original centrality bins. E.g., for LHC15k1b1, the calibration of the DPMJet centrality does not give the same mean number of tracklets for the very most central bin. We therefor need to rule out the event with a very large number of tracklets from the sample by setting this parameter to for example 0.1. If this parameter is set to a negative value (default) it is not considered.

Parameters
xAbsolute lowest centrality to consider

Definition at line 127 of file AliBaseAODTask.h.

void AliBaseAODTask::SetAxis ( TAxis axis,
Int_t  n,
Double_t borders 
)
staticprotected

Set an axis based on bin borders

Parameters
axisAxis to set
nNumber of bins
bordersBin borders (n+1 entries)

Definition at line 154 of file AliBaseAODTask.cxx.

Referenced by SetAxis(), SetCentralityAxis(), and SetIPzAxis().

void AliBaseAODTask::SetAxis ( TAxis axis,
const TString spec,
const char *  sep = ":," 
)
staticprotected

Set an axis based on test string of specs. The token separator is given in sep.

Parameters
axisAxis to set
specSpecification
sepToken separate

Definition at line 160 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetAxis ( TAxis axis,
Int_t  n,
Double_t  l,
Double_t  h 
)
staticprotected

Set axis with least and largest values

Parameters
axisAxis to set
nNumber of bins
lLeast value
hLargest value

Definition at line 202 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetAxis ( TAxis axis,
Int_t  n,
Double_t  m 
)
staticprotected

Set a symmetric axis

Parameters
axisAxis to set
nNumber of bins
mMaximum absolute value

Definition at line 211 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetCentralityAxis ( UShort_t  n,
Short_t bins 
)

Set the centrality bins to use.

UShort_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
task->SetCentralityBins(11, bins);
Parameters
nNumber of bins (elements in bins minus 1)
binsBin limits

Definition at line 237 of file AliBaseAODTask.cxx.

Referenced by AddTaskMultDistributions().

void AliBaseAODTask::SetCentralityAxis ( UShort_t  n,
Double_t bins 
)

Set the centrality bins to use.

UShort_t bins[] = { 0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };
task->SetCentralityBins(11, bins);
Parameters
nNumber of bins (elements in bins minus 1)
binsBin limits

Definition at line 277 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetCentralityAxis ( Short_t  low,
Short_t  high 
)

Define a single centrality bin from low to high

Parameters
lowLower bound
highUpper bound

Definition at line 284 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetCentralityAxis ( const char *  bins)

Set the centrality axis to use based on a string. The bin edges are separated by colons.

Parameters
binsString of bin edges

Definition at line 248 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetFilterMask ( UInt_t  mask)

Set mask of events to filter out

Parameters
maskThe fitler mask

Definition at line 132 of file AliBaseAODTask.cxx.

Referenced by SetFilterMask().

void AliBaseAODTask::SetFilterMask ( const char *  mask)

Set mask of events to filter out

Parameters
mask

Definition at line 119 of file AliBaseAODTask.cxx.

void AliBaseAODTask::SetIPzAxis ( Int_t  n,
Double_t  min,
Double_t  max 
)
inline

Set the \( \mathrm{IP}_z\) axis

Parameters
nNumber of bins
minLeast value
maxLargest value

Definition at line 53 of file AliBaseAODTask.h.

Referenced by AliBasedNdetaTask::AliBasedNdetaTask().

void AliBaseAODTask::SetIPzAxis ( Int_t  n,
Double_t  max 
)
inline

Set the \( \mathrm{IP}_z\) axis

Parameters
nNumber of bins
maxLargest absolute value

Definition at line 63 of file AliBaseAODTask.h.

void AliBaseAODTask::SetIPzAxis ( const TString spec)
inline

Set the interaction point Z axis

Parameters
specbin specification

Definition at line 72 of file AliBaseAODTask.h.

void AliBaseAODTask::SetTriggerMask ( UInt_t  mask)

Set the trigger maskl

Parameters
maskTrigger mask

Definition at line 112 of file AliBaseAODTask.cxx.

Referenced by AddTaskCreateRespMatr(), AddTaskForwardMultDists(), AddTaskMultDistributions(), AddTaskMultDists(), AddTaskTriggerCorrection(), and SetTriggerMask().

void AliBaseAODTask::SetTriggerMask ( const char *  mask)

Set the trigger mask

Parameters
masktrigger mask

Definition at line 99 of file AliBaseAODTask.cxx.

void AliBaseAODTask::StoreInformation ( AliAODForwardMult forward)
protectedvirtual

Store information about the job on output

Parameters
forwardForward object

Definition at line 619 of file AliBaseAODTask.cxx.

Referenced by UserExec().

Bool_t AliBaseAODTask::StoreTrainName ( Int_t  no)
protectedvirtual

Store the analysis trains name on the output pointed to by slot number no.

Parameters
noOutput slot

Definition at line 627 of file AliBaseAODTask.cxx.

Referenced by Terminate().

void AliBaseAODTask::Terminate ( Option_t option)
protectedvirtual

Called at end of event processing.

This is called once in the master

Parameters
optionNot used

Definition at line 666 of file AliBaseAODTask.cxx.

void AliBaseAODTask::UserCreateOutputObjects ( )
protectedvirtual

Create output objects.

This is called once per slave process

Definition at line 339 of file AliBaseAODTask.cxx.

void AliBaseAODTask::UserExec ( Option_t option)
protectedvirtual

Process a single event

Parameters
optionNot used

Definition at line 540 of file AliBaseAODTask.cxx.

Member Data Documentation

Double_t AliBaseAODTask::fAbsMinCent
protected

The absolute minimum centrality to consider - for MC with poor match

Definition at line 469 of file AliBaseAODTask.h.

Referenced by AliBasedNdetaTask::Finalize(), Print(), SetAbsMinCent(), and UserExec().

TH1D* AliBaseAODTask::fAccCent
protected

Centrality distribution of accepted events

Definition at line 485 of file AliBaseAODTask.h.

Referenced by AliBasedNdetaTask::Book(), UserCreateOutputObjects(), and UserExec().

TH1D* AliBaseAODTask::fAccVertex
protected

Vertex distribution of accepted events

Definition at line 481 of file AliBaseAODTask.h.

Referenced by UserCreateOutputObjects(), and UserExec().

TH2D* AliBaseAODTask::fAccVertexXY
protected

Vertex (x,y) distribution of accepted events

Definition at line 483 of file AliBaseAODTask.h.

Referenced by UserCreateOutputObjects(), and UserExec().

TH1D* AliBaseAODTask::fCent
protected

Centrality distribution of all events

Definition at line 479 of file AliBaseAODTask.h.

Referenced by AliBasedNdetaTask::Book(), UserCreateOutputObjects(), and UserExec().

Bool_t AliBaseAODTask::fCloneList
protected

Wether to clone sum list for results

Definition at line 489 of file AliBaseAODTask.h.

Referenced by Terminate().

TH1I* AliBaseAODTask::fEventStatus
protected

Histogram of event selection

Definition at line 475 of file AliBaseAODTask.h.

Referenced by CheckEvent(), AliBasedNdetaTask::CheckEvent(), and UserCreateOutputObjects().

UInt_t AliBaseAODTask::fFilterMask
protected
Bool_t AliBaseAODTask::fFirstEvent
protected

Information stored or not

Definition at line 487 of file AliBaseAODTask.h.

Referenced by UserExec().

TList* AliBaseAODTask::fResults
protected
TH1D* AliBaseAODTask::fVertex
protected

Vertex distribution of all events

Definition at line 477 of file AliBaseAODTask.h.

Referenced by AliForwardMultDists::PreData(), UserCreateOutputObjects(), and UserExec().


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