AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAODForwardHeader Class Reference

#include <AliAODForwardHeader.h>

Inheritance diagram for AliAODForwardHeader:

Public Types

enum  {
  kInel = 0x0001, kInelGt0 = 0x0002, kNSD = 0x0004, kEmpty = 0x0008,
  kA = 0x0010, kB = 0x0020, kC = 0x0080, kE = 0x0100,
  kPileUp = 0x0200, kMCNSD = 0x0400, kOffline = 0x0800, kNClusterGt0 = 0x1000,
  kV0AND = 0x2000, kSatellite = 0x4000
}
 
enum  {
  kBinAll =1, kBinInel, kBinInelGt0, kBinNSD,
  kBinV0AND, kBinA, kBinB, kBinC,
  kBinE, kBinSatellite, kBinPileUp, kBinMCNSD,
  kBinOffline, kBinNClusterGt0, kWithTrigger, kWithVertex,
  kAccepted
}
 
enum  ECheckStatus {
  kGoodEvent = 0, kWrongCentrality, kWrongTrigger, kIsPileup,
  kNoVertex, kWrongVertex
}
 

Public Member Functions

 AliForwardHeader ()
 
Setters of data
void Clear (Option_t *option="")
 
void SetTriggerMask (UInt_t trg)
 
void SetTriggerBits (UInt_t bits)
 
void SetIpZ (Float_t ipZ)
 
void SetCentrality (Float_t c)
 
void SetNClusters (UShort_t n)
 
Tests
Bool_t IsTriggerBits (UInt_t bits) const
 
Bool_t IsTriggerOrBits (UInt_t bits) const
 
Bool_t HasTrigger () const
 
Bool_t HasIpZ () const
 
Bool_t InRange (Float_t low, Float_t high) const
 
Bool_t HasCentrality () const
 
Bool_t CheckEvent (Int_t triggerMask=kInel, Double_t vzMin=-10, Double_t vzMax=10, UShort_t cMin=0, UShort_t cMax=100, TH1 *hist=0, TH1 *status=0) const
 
Getters of data
UInt_t GetTriggerBits () const
 
Float_t GetIpZ () const
 
Float_t GetCentrality () const
 
UShort_t GetNClusters () const
 
Standard TObject member functions
void Print (Option_t *option="") const
 
const Char_tGetName () const
 
void Browse (TBrowser *b)
 
Bool_t IsFolder () const
 

Static Public Member Functions

Utility class functions
static const Char_tGetTriggerString (UInt_t mask)
 
static TH1IMakeTriggerHistogram (const char *name="triggers", Int_t mask=0)
 
static TH1IMakeStatusHistogram (const char *name="status")
 
static UInt_t MakeTriggerMask (const char *what)
 

Protected Attributes

UInt_t fTriggers
 
Float_t fIpZ
 
Float_t fCentrality
 
UShort_t fNClusters
 

Static Protected Attributes

static const Float_t fgkInvalidIpZ = 1e6
 

Detailed Description

Definition at line 18 of file AliAODForwardHeader.h.

Member Enumeration Documentation

anonymous enum

Bits of the trigger pattern

Enumerator
kInel 

In-elastic collision

kInelGt0 

In-elastic collision with at least one SPD tracklet

kNSD 

Non-single diffractive collision

kEmpty 

Empty bunch crossing

kA 

A-side trigger

kB 

B(arrel) trigger

kC 

C-side trigger

kE 

Empty trigger

kPileUp 

pileup from SPD

kMCNSD 

true NSD from MC

kOffline 

Offline MB triggered

kNClusterGt0 

At least one SPD cluster

kV0AND 

V0-AND trigger

kSatellite 

Satellite event

Definition at line 24 of file AliAODForwardHeader.h.

anonymous enum

Bin numbers in trigger histograms

Enumerator
kBinAll 
kBinInel 
kBinInelGt0 
kBinNSD 
kBinV0AND 
kBinA 
kBinB 
kBinC 
kBinE 
kBinSatellite 
kBinPileUp 
kBinMCNSD 
kBinOffline 
kBinNClusterGt0 
kWithTrigger 
kWithVertex 
kAccepted 

Definition at line 57 of file AliAODForwardHeader.h.

Return codes of CheckEvent

Enumerator
kGoodEvent 

Event accepted by cuts

kWrongCentrality 

Event centrality not in range

kWrongTrigger 

Event trigger isn't in the supplied mask

kIsPileup 

Event is a pile-up event

kNoVertex 

Event has no interaction point information

kWrongVertex 

Event interaction point is out of range

Definition at line 79 of file AliAODForwardHeader.h.

Member Function Documentation

AliAODForwardHeader::AliForwardHeader ( )
inline

Constructor

Definition at line 96 of file AliAODForwardHeader.h.

void AliAODForwardHeader::Browse ( TBrowser *  b)

browse this object

Parameters
bBrowser

Definition at line 48 of file AliAODForwardHeader.cxx.

Bool_t AliAODForwardHeader::CheckEvent ( Int_t  triggerMask = kInel,
Double_t  vzMin = -10,
Double_t  vzMax = 10,
UShort_t  cMin = 0,
UShort_t  cMax = 100,
TH1 hist = 0,
TH1 status = 0 
) const

Check if event meets the passses requirements.

It returns true if all of the following is true

  • The trigger is within the bit mask passed.
  • The vertex is within the specified limits.
  • The centrality is within the specified limits, or if lower limit is equal to or larger than the upper limit.

Note, for data with out a centrality estimate (e.g., pp), one must pass equal centrality cuts, or no data will be accepted. In other words, for pp data, always pass cMin=0, cMax=0

If a histogram is passed in the last parameter, then that histogram is filled with the trigger bits.

Parameters
triggerMaskTrigger mask
vzMinMinimum \( v_z\) (in centimeters)
vzMaxMaximum \( v_z\) (in centimeters)
cMinMinimum centrality (in percent)
cMaxMaximum centrality (in percent)
histHistogram to fill
statusHistogram to fill
Returns
true if the event meets the requirements

Definition at line 220 of file AliAODForwardHeader.cxx.

void AliAODForwardHeader::Clear ( Option_t option = "")

Clear all data

Parameters
optionNot used

Definition at line 23 of file AliAODForwardHeader.cxx.

Float_t AliAODForwardHeader::GetCentrality ( ) const
inline

Get the event centrality

Returns
The event centrality or -1 if not set

Definition at line 254 of file AliAODForwardHeader.h.

Float_t AliAODForwardHeader::GetIpZ ( ) const
inline

Set the z coordinate of the interaction point

Returns
Interaction point z coordinate

Definition at line 248 of file AliAODForwardHeader.h.

const Char_t* AliAODForwardHeader::GetName ( ) const
inline

Get the name of the object

Returns
Name of object

Definition at line 278 of file AliAODForwardHeader.h.

UShort_t AliAODForwardHeader::GetNClusters ( ) const
inline

Get the number of SPD clusters seen in \( |\eta|<1\)

Returns
Number of SPD clusters seen

Definition at line 260 of file AliAODForwardHeader.h.

UInt_t AliAODForwardHeader::GetTriggerBits ( ) const
inline

Get the trigger bits

Returns
Trigger bits

Definition at line 242 of file AliAODForwardHeader.h.

const Char_t * AliAODForwardHeader::GetTriggerString ( UInt_t  mask)
static

Get a string correspondig to the trigger mask

Parameters
maskTrigger mask
Returns
Static string (copy before use)

Definition at line 78 of file AliAODForwardHeader.cxx.

Referenced by Browse(), MakeTriggerHistogram(), and Print().

Bool_t AliAODForwardHeader::HasCentrality ( ) const
inline

Check if we have a valid centrality

Returns
True if the centrality is set

Definition at line 197 of file AliAODForwardHeader.h.

Bool_t AliAODForwardHeader::HasIpZ ( ) const

Check if we have a valid z coordinate of the interaction point

Returns
True if we have a valid interaction point z coordinate

Definition at line 37 of file AliAODForwardHeader.cxx.

Referenced by CheckEvent(), InRange(), and Print().

Bool_t AliAODForwardHeader::HasTrigger ( ) const
inline

Whether we have any trigger bits

Returns
true if we have some trigger

Definition at line 174 of file AliAODForwardHeader.h.

Referenced by IsTriggerBits(), and IsTriggerOrBits().

Bool_t AliAODForwardHeader::InRange ( Float_t  low,
Float_t  high 
) const
inline

Check if the z coordinate of the interaction point is within the given limits. Note that the convention used corresponds to the convention used in ROOTs TAxis.

Parameters
lowLower cut (inclusive)
highUpper cut (exclusive)
Returns
true if \( low \ge ipz < high\)

Definition at line 360 of file AliAODForwardHeader.h.

Referenced by CheckEvent().

Bool_t AliAODForwardHeader::IsFolder ( ) const
inline

This is a folder

Returns
Always true

Definition at line 290 of file AliAODForwardHeader.h.

Bool_t AliAODForwardHeader::IsTriggerBits ( UInt_t  bits) const
inline

Check if all bit(s) are set in the trigger mask. Note, this is an and between the bits. If you need an or you should use the member function IsTriggerOrBits

Parameters
bitsBits to test for
Returns
true if all enabled bits in the argument is also set in the trigger word

Definition at line 367 of file AliAODForwardHeader.h.

Referenced by CheckEvent().

Bool_t AliAODForwardHeader::IsTriggerOrBits ( UInt_t  bits) const
inline

Check if any of bit(s) are enabled in the trigger word. This is an or between the selected bits. If you need and and you should use the member function IsTriggerBits;

Parameters
bitsBits to check for
Returns
true if any of the enabled bits in the arguments are also enabled in the trigger mask

Definition at line 373 of file AliAODForwardHeader.h.

TH1I * AliAODForwardHeader::MakeStatusHistogram ( const char *  name = "status")
static

Make a histogram to record status in.

The bins defined by the status enumeration in this class.

Parameters
nameName of the histogram
Returns
Newly allocated histogram

Definition at line 156 of file AliAODForwardHeader.cxx.

TH1I * AliAODForwardHeader::MakeTriggerHistogram ( const char *  name = "triggers",
Int_t  mask = 0 
)
static

Make a histogram to record triggers in.

The bins defined by the trigger enumeration in this class. One can use this enumeration to retrieve the number of triggers for each class.

Parameters
nameName of the histogram
maskTrigger mask
Returns
Newly allocated histogram

Definition at line 103 of file AliAODForwardHeader.cxx.

UInt_t AliAODForwardHeader::MakeTriggerMask ( const char *  what)
static

Utility function to make a trigger mask from the passed string.

The string is a comma or space seperated list of case-insensitive strings

  • INEL
  • INEL>0
  • NSD
Parameters
whatWhich triggers to put in the mask.
Returns
The generated trigger mask.

Definition at line 186 of file AliAODForwardHeader.cxx.

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

Print content

Parameters
optionPassed verbatim to TH2::Print

Definition at line 308 of file AliAODForwardHeader.cxx.

void AliAODForwardHeader::SetCentrality ( Float_t  c)
inline

Set the event centrality

Parameters
cCentrality

Definition at line 133 of file AliAODForwardHeader.h.

void AliAODForwardHeader::SetIpZ ( Float_t  ipZ)
inline

Set the z coordinate of the interaction point

Parameters
ipZInteraction point z coordinate

Definition at line 127 of file AliAODForwardHeader.h.

void AliAODForwardHeader::SetNClusters ( UShort_t  n)
inline

Set the number of SPD clusters seen in \( |\eta|<1\)

Parameters
nNumber of SPD clusters

Definition at line 139 of file AliAODForwardHeader.h.

void AliAODForwardHeader::SetTriggerBits ( UInt_t  bits)
inline

Set bit(s) in trigger mask

Parameters
bitsbit(s) to set

Definition at line 121 of file AliAODForwardHeader.h.

void AliAODForwardHeader::SetTriggerMask ( UInt_t  trg)
inline

Set the trigger mask

Parameters
trgTrigger mask

Definition at line 115 of file AliAODForwardHeader.h.

Member Data Documentation

Float_t AliAODForwardHeader::fCentrality
protected

Centrality

Definition at line 350 of file AliAODForwardHeader.h.

Referenced by Browse(), CheckEvent(), Clear(), GetCentrality(), HasCentrality(), Print(), and SetCentrality().

const Float_t AliAODForwardHeader::fgkInvalidIpZ = 1e6
staticprotected

Invalid value for interaction point \(z\) coordiante

Definition at line 354 of file AliAODForwardHeader.h.

Referenced by Clear(), and HasIpZ().

Float_t AliAODForwardHeader::fIpZ
protected

Interaction point \(z\) coordinate

Definition at line 348 of file AliAODForwardHeader.h.

Referenced by Browse(), Clear(), GetIpZ(), HasIpZ(), InRange(), Print(), and SetIpZ().

UShort_t AliAODForwardHeader::fNClusters
protected

Number of clusters in \(|\eta|<1\)

Definition at line 352 of file AliAODForwardHeader.h.

Referenced by Browse(), Clear(), GetNClusters(), and SetNClusters().

UInt_t AliAODForwardHeader::fTriggers
protected

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