AliPhysics  556872f (556872f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliForwardUtil Class Reference

#include <AliForwardUtil.h>

Inheritance diagram for AliForwardUtil:

Classes

struct  DebugGuard
 
struct  Histos
 
struct  RingHistos
 
struct  SuppressGuard
 

Public Types

enum  { kInvalidValue = -9999 }
 
enum  { kSkipRing = (1 << 19) }
 

Static Public Member Functions

static Color_t RingColor (UShort_t d, Char_t r)
 
AliROOT version
static ULong_t AliROOTRevision ()
 
static ULong_t AliROOTBranch ()
 
Recalculate @f$\eta@f$, @f$\phi@f$, etc.
static Double_t GetStripR (Char_t ring, UShort_t strip)
 
static Double_t GetSectorZ (UShort_t det, Char_t ring, UShort_t sec)
 
static Double_t GetSectorPhi (UShort_t det, Char_t ring, UShort_t sec)
 
static Bool_t GetXYZ (UShort_t det, Char_t ring, UShort_t sec, UShort_t str, const TVector3 &ip, TVector3 &pos)
 
static Bool_t GetEtaPhi (UShort_t det, Char_t ring, UShort_t sec, UShort_t str, const TVector3 &ip, Double_t &eta, Double_t &phi)
 
static Double_t GetEtaFromStrip (UShort_t det, Char_t ring, UShort_t sec, UShort_t strip, Double_t zvtx)
 
static Bool_t GetEtaPhiFromStrip (Char_t r, UShort_t strip, Double_t &eta, Double_t &phi, Double_t ipX, Double_t ipY)
 
static Double_t GetPhiFromStrip (Char_t ring, UShort_t strip, Double_t phi, Double_t xvtx, Double_t yvtx)
 
Manager related tasks
static AliAODEventGetAODEvent (AliAnalysisTaskSE *task)
 
static UShort_t CheckForAOD ()
 
static Bool_t CheckForTask (const char *clsOrName, Bool_t cls=true)
 
Member functions to store and retrieve analysis parameters
static TObjectMakeParameter (const char *name, UShort_t value)
 
static TObjectMakeParameter (const char *name, Int_t value)
 
static TObjectMakeParameter (const char *name, Double_t value)
 
static TObjectMakeParameter (const char *name, Bool_t value)
 
static TObjectMakeParameter (const char *name, ULong_t value)
 
static void GetParameter (TObject *o, UShort_t &value)
 
static void GetParameter (TObject *o, Int_t &value)
 
static void GetParameter (TObject *o, Double_t &value)
 
static void GetParameter (TObject *o, Bool_t &value)
 
static void GetParameter (TObject *o, ULong_t &value)
 
Axis functions
static TAxisMakeFullIpZAxis (Int_t nCenter=20)
 
static void MakeFullIpZAxis (Int_t nCenter, TArrayD &bins)
 
static void MakeLogScale (Int_t nBins, Int_t minOrder, Int_t maxOrder, TArrayD &bins)
 
Centrality functions
static Float_t GetCentrality (const AliVEvent &event, const TString &method, Int_t &qual, Bool_t verbose=false)
 
static Float_t GetCentralityMult (const AliVEvent &event, const TString &method, Int_t &qual, Bool_t verbose=false)
 
static Float_t GetCentralityCompat (const AliVEvent &event, const TString &method, Int_t &qual, Bool_t verbose)
 
static Float_t GetCentralityCompat (const AliESDEvent &event, const TString &method, Int_t &qual, Bool_t verbose)
 
static Float_t GetCentralityCompat (const AliAODEvent &event, const TString &method, Int_t &qual, Bool_t verbose)
 
Printing utilities
static void PrintTask (const TObject &o)
 
static void PrintName (const char *name)
 
static void PrintField (const char *name, const char *value,...)
 

Private Member Functions

 AliForwardUtil ()
 
 AliForwardUtil (const AliForwardUtil &o)
 
AliForwardUtiloperator= (const AliForwardUtil &)
 
 ~AliForwardUtil ()
 
 ClassDef (AliForwardUtil, 1)
 

Collision/run parameters

enum  ECollisionSystem {
  kUnknown, kPP, kPbPb, kPPb,
  kPbp
}
 
static Float_t BeamRapidity (Float_t beam, UShort_t z, UShort_t a)
 
static Float_t CenterOfMassEnergy (Float_t beam, UShort_t z1, UShort_t a1, Short_t z2=-1, Short_t a2=-1)
 
static Float_t CenterOfMassRapidity (UShort_t z1, UShort_t a1, Short_t z2=-1, Short_t a2=-1)
 
static UShort_t ParseCollisionSystem (const char *sys)
 
static const char * CollisionSystemString (UShort_t sys)
 
static UShort_t ParseCenterOfMassEnergy (UShort_t sys, Float_t cms)
 
static const char * CenterOfMassEnergyString (UShort_t cms)
 
static Short_t ParseMagneticField (Float_t field)
 
static const char * MagneticFieldString (Short_t field)
 

Detailed Description

Utilities used in the forward multiplcity analysis

Definition at line 36 of file AliForwardUtil.h.

Member Enumeration Documentation

anonymous enum
Enumerator
kInvalidValue 

Value if things cannot be calculated

Definition at line 39 of file AliForwardUtil.h.

anonymous enum
Enumerator
kSkipRing 

Definition at line 43 of file AliForwardUtil.h.

Defined collision types

Enumerator
kUnknown 
kPP 
kPbPb 
kPPb 
kPbp 

Definition at line 97 of file AliForwardUtil.h.

Constructor & Destructor Documentation

AliForwardUtil::AliForwardUtil ( )
inlineprivate

Constructor

Definition at line 867 of file AliForwardUtil.h.

AliForwardUtil::AliForwardUtil ( const AliForwardUtil o)
inlineprivate

Copy constructor

Parameters
oObject to copy from

Definition at line 873 of file AliForwardUtil.h.

AliForwardUtil::~AliForwardUtil ( )
inlineprivate

Destructor

Definition at line 884 of file AliForwardUtil.h.

Member Function Documentation

ULong_t AliForwardUtil::AliROOTBranch ( )
static

Get the branch identifier of AliROOT. In case of trunk, return 0xFFFFFFFF, while for vM-N-R{-S}, we get

((M & 0xFF) << 12 | (N & 0xFF) << 8 | (R & 0xFF) << 3 | (X))

where X is 0xAA if S is specified (e.g., analysis tag).

Returns
branch identifer encoded in bits

Definition at line 74 of file AliForwardUtil.cxx.

Referenced by AliFMDEventInspector::StoreInformation(), and AliBaseAODTask::UserCreateOutputObjects().

ULong_t AliForwardUtil::AliROOTRevision ( )
static

Get the revision number of AliROOT

Returns
Subversion revision number of AliROOT used

Definition at line 36 of file AliForwardUtil.cxx.

Referenced by AliFMDEventInspector::StoreInformation(), and AliBaseAODTask::UserCreateOutputObjects().

Float_t AliForwardUtil::BeamRapidity ( Float_t  beam,
UShort_t  z,
UShort_t  a 
)
static

Calculate the beam rapidity.

Note: The beam energy is given in GeV/charge

Parameters
beamBeam energy in GeV/charge
zCharge number of projectile
aMass number of projectile
Returns
The rapidity of the beam

Definition at line 175 of file AliForwardUtil.cxx.

Float_t AliForwardUtil::CenterOfMassEnergy ( Float_t  beam,
UShort_t  z1,
UShort_t  a1,
Short_t  z2 = -1,
Short_t  a2 = -1 
)
static

Calculate the center of mass energy from the beam energy per charge and the nucleus numbers.

Parameters
beamBeam energy in GeV/charge
z1Charge number of projectile
a1Mass number of projectile
z2Charge number of projectile
a2Mass number of projectile
Returns
The center of mass energy in GeV/nucleon

Definition at line 187 of file AliForwardUtil.cxx.

Referenced by ParseCenterOfMassEnergy().

const char * AliForwardUtil::CenterOfMassEnergyString ( UShort_t  cms)
static

Get a string representation of the center of mass energy per nuclean

Parameters
cmsCenter of mass energy per nucleon
Returns
String representation of the center of mass energy per nuclean

Definition at line 268 of file AliForwardUtil.cxx.

Referenced by AliCorrectionManagerBase::CheckConditions(), AliBasedNdetaTask::Finalize(), MultCutDrawer::Init(), AliCorrectionManagerBase::Print(), AliFMDEventInspector::Print(), and CorrDrawer::Run().

Float_t AliForwardUtil::CenterOfMassRapidity ( UShort_t  z1,
UShort_t  a1,
Short_t  z2 = -1,
Short_t  a2 = -1 
)
static

Calculate the center of mass rapidity (shift)

Parameters
z1Charge number of projectile
a1Mass number of projectile
z2Charge number of projectile
a2Mass number of projectile x
Returns
Rapidity of the center of mass

Definition at line 201 of file AliForwardUtil.cxx.

UShort_t AliForwardUtil::CheckForAOD ( )
static

Check if we have something that will provide and AOD event

Returns
0 if there's nothing that provide an AOD event, 1 if it is provided on the input (AOD analysis) or 2 if it is provided on the output (ESD analysis)

Definition at line 330 of file AliForwardUtil.cxx.

Referenced by AddTaskdNdeta(), AddTaskFMDEventPlane(), AddTaskForwardFlowQC(), AddTaskForwardMultDists(), AliBaseAODTask::Connect(), AliForwardFlowTaskQC::FillTracks(), and AliForwardFlowTaskQC::GetVZERO().

Bool_t AliForwardUtil::CheckForTask ( const char *  clsOrName,
Bool_t  cls = true 
)
static

Check if we have a particular (kind) of task in our train

Parameters
clsOrNameClass name or name of task
clsIf true, look for a task of a particular class - otherwise search for a speficially name task
Returns
true if the needed task was found

Definition at line 347 of file AliForwardUtil.cxx.

Referenced by AddTaskdNdeta(), AddTaskFMDEventPlane(), AddTaskForwardFlowQC(), AddTaskForwardMultDists(), and AliBaseAODTask::Connect().

AliForwardUtil::ClassDef ( AliForwardUtil  ,
 
)
private
const char * AliForwardUtil::CollisionSystemString ( UShort_t  sys)
static

Get a string representation of the collision system

Parameters
sysCollision system
  • kPP -> "pp"
  • kPbPb -> "PbPb"
  • kPPb -> "pPb"
  • anything else gives "unknown"
Returns
String representation of the collision system

Definition at line 149 of file AliForwardUtil.cxx.

Referenced by AliCorrectionManagerBase::CheckConditions(), AliBasedNdetaTask::Finalize(), MultCutDrawer::Init(), AliCorrectionManagerBase::Print(), AliFMDEventInspector::Print(), and CorrDrawer::Run().

AliAODEvent * AliForwardUtil::GetAODEvent ( AliAnalysisTaskSE task)
static

Get the AOD event - either from the input (AOD analysis) or the output (ESD analysis)

Parameters
taskTask to do the investigation for
Returns
Found AOD event or null

Definition at line 315 of file AliForwardUtil.cxx.

Referenced by AliForwardFlowTaskQC::Analyze(), AliForwardMultDists::PreData(), and AliBaseAODTask::UserExec().

Float_t AliForwardUtil::GetCentrality ( const AliVEvent &  event,
const TString method,
Int_t qual,
Bool_t  verbose = false 
)
static

Get the centrality of the event. One can pass a both an ESD and AOD event. Also, there's fall-back to the old centrality objects in case the newer AliMultSelection object isn't found.

Possible values of qual

  • 0 All is good and event within calibrated sample
  • 198 Centrality beyond anchor point
  • 199 No calibration for estimator (return <0)
  • 200 Not the same trigger as in calibration
  • 201 Not an INEL>0 (if used in calibration)
  • 202 Event outside IPz cut used in calibration
  • 203 Event is a pile-up kind not used in calibration
  • 204 Not consistent SPD/TPC IP (if used in calibration)
  • 205 SPD outlier event (if used in calibration)
  • 206 IP has less than 1 contributor (if used in calibration)
  • 0xFFFF No estimate of centrality could be done (return <0)
Parameters
eventEvent
methodCentrality method to use
qualOn return, the quality - 0 is good
verboseIf true, be verbose
Returns
The centrality or -1 in case of problems.

Definition at line 774 of file AliForwardUtil.cxx.

Referenced by AliBasedNdetaTask::GetCentrality(), GetCentralityCompat(), and AliFMDEventInspector::ReadCentrality().

Float_t AliForwardUtil::GetCentralityCompat ( const AliVEvent &  event,
const TString method,
Int_t qual,
Bool_t  verbose 
)
static

Compatbility function to retrieve the centrality from the event.

Parameters
eventEvent
methodCentrality method
qualQuality flat - 0 is good
verboseIf true, be verbose
Returns
The centrality or -1 in case of problems

Definition at line 839 of file AliForwardUtil.cxx.

Referenced by GetCentrality().

Float_t AliForwardUtil::GetCentralityCompat ( const AliESDEvent event,
const TString method,
Int_t qual,
Bool_t  verbose 
)
static

Compatbility function to retrieve the centrality from the ESD event.

Parameters
eventEvent
methodCentrality method
qualQuality flat - 0 is good
verboseIf true, be verbose
Returns
The centrality or -1 in case of problems

Definition at line 853 of file AliForwardUtil.cxx.

Float_t AliForwardUtil::GetCentralityCompat ( const AliAODEvent event,
const TString method,
Int_t qual,
Bool_t  verbose 
)
static

Compatbility function to retrieve the centrality from the AOD header.

Parameters
eventEvent
methodCentrality method
qualQuality flat - 0 is good
verboseIf true, be verbose
Returns
The centrality or -1 in case of problems

Definition at line 881 of file AliForwardUtil.cxx.

Float_t AliForwardUtil::GetCentralityMult ( const AliVEvent &  event,
const TString method,
Int_t qual,
Bool_t  verbose = false 
)
static

Get the centrality of the event. One can pass a both an ESD and AOD event.

Parameters
eventEvent
methodCentrality method to use
qualOn return, the quality - 0 is good
verboseIf true, be verbose
Returns
The centrality or -1 in case of problems.

Definition at line 787 of file AliForwardUtil.cxx.

Referenced by GetCentrality().

Double_t AliForwardUtil::GetEtaFromStrip ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  strip,
Double_t  zvtx 
)
static

Get eta from strip

Parameters
det,ring,sec,strip,zvtx
Returns
eta

Definition at line 535 of file AliForwardUtil.cxx.

Bool_t AliForwardUtil::GetEtaPhi ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str,
const TVector3 &  ip,
Double_t eta,
Double_t phi 
)
static

Get the eta and phi of a strip given an interaction point

Parameters
detDetector
ringRing
secSector
strStrip
ipInteraction point
etaOn return, the eta
phiOn return, the phi (in radians)
Returns
true on success

Definition at line 577 of file AliForwardUtil.cxx.

Referenced by AliFMDMCTrackDensity::Calculate(), AliFMDDensityCalculator::Calculate(), Event(), AliFMDESDFixer::RecalculateEta(), and TestGeomUtils().

Bool_t AliForwardUtil::GetEtaPhiFromStrip ( Char_t  r,
UShort_t  strip,
Double_t eta,
Double_t phi,
Double_t  ipX,
Double_t  ipY 
)
static

Recalculate the eta of a strip. This will correct for an off-set IP

Parameters
rRing identifier
stripStrip number
etaNominal eta, on return corrected
phiNominal phi, on return corrected
ipXIP X coordinate
ipYIP Y coordinate
Returns
true on success

Definition at line 609 of file AliForwardUtil.cxx.

void AliForwardUtil::GetParameter ( TObject o,
UShort_t value 
)
static

Get a parameter value from an object

Parameters
oObject
valueOn return, the parameter value

Definition at line 421 of file AliForwardUtil.cxx.

Referenced by AliBasedNdetaTask::Finalize(), and AliFMDMultCuts::Input().

void AliForwardUtil::GetParameter ( TObject o,
Int_t value 
)
static

Get a parameter value from an object

Parameters
oObject
valueOn return, the parameter value

Definition at line 431 of file AliForwardUtil.cxx.

void AliForwardUtil::GetParameter ( TObject o,
Double_t value 
)
static

Get a parameter value from an object

Parameters
oObject
valueOn return, the parameter value

Definition at line 451 of file AliForwardUtil.cxx.

void AliForwardUtil::GetParameter ( TObject o,
Bool_t value 
)
static

Get a parameter value from an object

Parameters
oObject
valueOn return, the parameter value

Definition at line 464 of file AliForwardUtil.cxx.

void AliForwardUtil::GetParameter ( TObject o,
ULong_t value 
)
static

Get a parameter value from an object

Parameters
oObject
valueOn return, the parameter value

Definition at line 441 of file AliForwardUtil.cxx.

Double_t AliForwardUtil::GetPhiFromStrip ( Char_t  ring,
UShort_t  strip,
Double_t  phi,
Double_t  xvtx,
Double_t  yvtx 
)
static

Get the azimuthal angle of a strip

Parameters
ringRing identifier 'I' or 'O'
stripStrip number
phiStraight forward strip phi
xvtxIp X coordinate
yvtxIp Y coordinate
Returns
The phi angle correctef for (X,Y) off set.

Definition at line 641 of file AliForwardUtil.cxx.

Double_t AliForwardUtil::GetSectorPhi ( UShort_t  det,
Char_t  ring,
UShort_t  sec 
)
static

Get the azimythal angle of sector (in radians)

Parameters
detDetector
ringRing
secSector
Returns
Azimuthal angle (in radians)

Definition at line 517 of file AliForwardUtil.cxx.

Referenced by GetXYZ().

Double_t AliForwardUtil::GetSectorZ ( UShort_t  det,
Char_t  ring,
UShort_t  sec 
)
static

Get the location of a sector in Z (in centimeters)

Parameters
detDetector
ringRing
secSector
Returns
Z position

Definition at line 493 of file AliForwardUtil.cxx.

Referenced by GetEtaFromStrip(), and GetXYZ().

Double_t AliForwardUtil::GetStripR ( Char_t  ring,
UShort_t  strip 
)
static

Get the radius of a strip.

Parameters
ringRing identifier 'I' or 'O'
stripStrip number
Returns
Radial distance from beam of the strip

Definition at line 475 of file AliForwardUtil.cxx.

Referenced by GetEtaFromStrip(), GetEtaPhiFromStrip(), GetPhiFromStrip(), and GetXYZ().

Bool_t AliForwardUtil::GetXYZ ( UShort_t  det,
Char_t  ring,
UShort_t  sec,
UShort_t  str,
const TVector3 &  ip,
TVector3 &  pos 
)
static

Get the coordinates of a strip relative to the interaction point

Parameters
detDetector
ringRing
secSector
strStrip
ipThe interaction point
posOn return, the relative position
Returns
true on success

Definition at line 554 of file AliForwardUtil.cxx.

Referenced by GetEtaPhi(), and TestGeomUtils().

const char * AliForwardUtil::MagneticFieldString ( Short_t  field)
static

Get a string representation of the magnetic field

Parameters
fieldMagnetic field in kG
Returns
String representation of the magnetic field

Definition at line 301 of file AliForwardUtil.cxx.

Referenced by AliCorrectionManagerBase::CheckConditions(), MultCutDrawer::Init(), AliCorrectionManagerBase::Print(), AliFMDEventInspector::Print(), and CorrDrawer::Run().

TAxis * AliForwardUtil::MakeFullIpZAxis ( Int_t  nCenter = 20)
static

Make a full \( \mbox{IP}_z\) axis

Parameters
nCenterNumber of bins in the center
Returns
Newly allocated axis object.

Definition at line 663 of file AliForwardUtil.cxx.

Referenced by AliBaseESDTask::DefaultVertexAxis(), AliBaseMCCorrectionsTask::SetSatellite(), and AliBaseAODTask::UserCreateOutputObjects().

void AliForwardUtil::MakeFullIpZAxis ( Int_t  nCenter,
TArrayD bins 
)
static

Make a full \( \mbox{IP}_z\) axis

Parameters
nCenterNumber of bins in the center
binsOn return, the bin edges

Definition at line 672 of file AliForwardUtil.cxx.

void AliForwardUtil::MakeLogScale ( Int_t  nBins,
Int_t  minOrder,
Int_t  maxOrder,
TArrayD bins 
)
static

Make a log-scale axis. That is, each bin has constant with when drawn on a log scale.

Parameters
nBinsNumber of bins
minOrderLeast power of 10
maxOrderLargest power of 10
binsOn return, the bin edges

Definition at line 709 of file AliForwardUtil.cxx.

Referenced by AliFMDMCTrackELoss::CreateOutputObjects(), AliCentralMultiplicityTask::PreData(), Ring::Ring(), and AliFMDDensityCalculator::RingHistos::RingHistos().

TObject * AliForwardUtil::MakeParameter ( const char *  name,
Int_t  value 
)
static

Make a parameter

Parameters
nameName of the parameter
valueValue of the parameter
Returns
Newly allocated parameter object

Definition at line 386 of file AliForwardUtil.cxx.

TObject * AliForwardUtil::MakeParameter ( const char *  name,
Double_t  value 
)
static

Make a parameter

Parameters
nameName of the parameter
valueValue of the parameter
Returns
Newly allocated parameter object

Definition at line 402 of file AliForwardUtil.cxx.

TObject * AliForwardUtil::MakeParameter ( const char *  name,
Bool_t  value 
)
static

Make a parameter

Parameters
nameName of the parameter
valueValue of the parameter
Returns
Newly allocated parameter object

Definition at line 412 of file AliForwardUtil.cxx.

TObject * AliForwardUtil::MakeParameter ( const char *  name,
ULong_t  value 
)
static

Make a parameter

Parameters
nameName of the parameter
valueValue of the parameter
Returns
Newly allocated parameter object

Definition at line 394 of file AliForwardUtil.cxx.

AliForwardUtil& AliForwardUtil::operator= ( const AliForwardUtil )
inlineprivate

Assingment operator

Returns
Reference to this object

Definition at line 880 of file AliForwardUtil.h.

UShort_t AliForwardUtil::ParseCenterOfMassEnergy ( UShort_t  sys,
Float_t  cms 
)
static

Parse the center of mass energy given as a float and return known values as a unsigned integer

Parameters
sysCollision system (needed for AA)
cmsCenter of mass energy * total charge
Returns
Center of mass energy per nucleon

Definition at line 235 of file AliForwardUtil.cxx.

Referenced by AddTaskForwardMult(), ExtractAcceptance(), ExtractForRun(), AliCentralCorrectionManager::Init(), AliForwardCorrectionManager::Init(), and AliFMDEventInspector::ReadRunDetails().

UShort_t AliForwardUtil::ParseCollisionSystem ( const char *  sys)
static

Parse a collision system spec given in a string. Known values are

  • "pp", "p-p" which returns kPP
  • "PbPb", "Pb-Pb", "A-A", which returns kPbPb
  • "pPb", "p-Pb", "pA", p-A" which returns kPPb
  • Everything else gives kUnknown
Parameters
sysCollision system spec
Returns
Collision system id

Definition at line 119 of file AliForwardUtil.cxx.

Referenced by AddTaskForwardMult(), ExtractAcceptance(), ExtractForRun(), AliCentralCorrectionManager::Init(), AliForwardCorrectionManager::Init(), MakeCorrSecMap(), AliFMDEventInspector::ReadRunDetails(), CorrDrawer::Run(), and CorrDrawer::Summarize().

Short_t AliForwardUtil::ParseMagneticField ( Float_t  field)
static

Parse the magnetic field (in kG) as given by a floating point number

Parameters
fieldMagnetic field in kG
Returns
Short integer value of magnetic field in kG

Definition at line 283 of file AliForwardUtil.cxx.

Referenced by AddTaskForwardMult(), AliCentralCorrectionManager::Init(), AliForwardCorrectionManager::Init(), and AliFMDEventInspector::ReadRunDetails().

void AliForwardUtil::PrintField ( const char *  name,
const char *  value,
  ... 
)
static

Print a field

Parameters
nameThe name of the field
valueFormat for the value

Definition at line 757 of file AliForwardUtil.cxx.

void AliForwardUtil::PrintName ( const char *  name)
static

Print a name

Parameters
nameThe name to pring

Definition at line 735 of file AliForwardUtil.cxx.

Referenced by PrintField().


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