ROOT logo
AliRoot » PWGLF » RESONANCES » AliRsnEvent

class AliRsnEvent: public TObject


  This class works as generic interface to an event.
  Its main purpose is to provide a unique reference which includes all the
  facilities available in the AliVEvent generic base class, plus all info
  which could be needed during analysis, which are not in AliVEvent but
  need to be accessed from ESD or AOD objects, usually in different ways.
  When MC is available, it is properly taken into account.

  authors: A. Pulvirenti (alberto.pulvirenti@ct.infn.it)
           M. Vala (martin.vala@cern.ch)


Function Members (Methods)

public:
AliRsnEvent(const AliRsnEvent& copy)
AliRsnEvent(AliVEvent* ref = 0, AliVEvent* refMC = 0)
virtual~AliRsnEvent()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tConvertAbsoluteIndex(Int_t index, Int_t& realIndex, AliRsnDaughter::ERefType& type)
Int_tConvertRealIndex(Int_t index, AliRsnDaughter::ERefType type)
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tGetAbsoluteSum()
TClonesArray*GetAODList()
AliRsnDaughterGetDaughter(Int_t index, Bool_t fromMC)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tGetLeadingIndex() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
AliPIDResponse*GetPIDResponse()
AliVEvent*GetRef()
AliAODEvent*GetRefAOD()
AliESDEvent*GetRefESD()
AliVEvent*GetRefMC()
AliAODEvent*GetRefMCAOD()
AliMCEvent*GetRefMCESD()
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
Bool_tHasMC()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
Bool_tInputOK()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsAOD()
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tIsESD()
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
Bool_tMatch(AliVEvent* ev, TClass* ref)
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliRsnEvent&operator=(const AliRsnEvent& copy)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Int_tSelectLeadingParticle(AliRsnCutSet* cuts = 0x0)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetDaughter(AliRsnDaughter& daughter, Int_t index, Bool_t fromMC = kFALSE)
voidSetDaughterAODcascade(AliRsnDaughter& target, Int_t index)
voidSetDaughterAODMCtrack(AliRsnDaughter& target, Int_t index)
voidSetDaughterAODtrack(AliRsnDaughter& target, Int_t index)
voidSetDaughterAODv0(AliRsnDaughter& target, Int_t index)
voidSetDaughterESDcascade(AliRsnDaughter& target, Int_t index)
voidSetDaughterESDMCtrack(AliRsnDaughter& target, Int_t index)
voidSetDaughterESDtrack(AliRsnDaughter& target, Int_t index)
voidSetDaughterESDv0(AliRsnDaughter& target, Int_t index)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetLeadingParticle(AliRsnDaughter& leading)
Bool_tSetMCInfoAOD(AliRsnDaughter& target)
Bool_tSetMCInfoESD(AliRsnDaughter& target)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPIDResponse(AliPIDResponse* pid)
voidSetRef(AliVEvent* ref)
voidSetRefMC(AliVEvent* mc)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

private:
TClonesArray*fAODListpointer to AOD list of particles (if any)
Int_tfLeadingindex of leading track
AliPIDResponse*fPIDpointer to PID response
AliVEvent*fRefpointer to input event
AliVEvent*fRefMCpointer to reference MC event (if any)

Class Charts

Inheritance Chart:
TObject
AliRsnEvent

Function documentation

AliRsnEvent(AliVEvent* ref = 0, AliVEvent* refMC = 0)
 Default constructor.

AliRsnEvent(const AliRsnEvent& copy)
 Copy constructor.

AliRsnEvent & operator=(const AliRsnEvent& copy)
 Works in the same way as the copy constructor.

~AliRsnEvent()
 Destructor (does nothing since there are not owned pointers)

void SetDaughter(AliRsnDaughter& daughter, Int_t index, Bool_t fromMC = kFALSE)
 Assigns to the first argument the reference to the i-th track in the ref event.
 What assignment method to be used will depend on the index and on the type of input.
 If the last argument is kTRUE and an MC is referenced, then both fRef and fRefMC will
 point to the MC particle (pure MC analysis)

AliRsnDaughter GetDaughter(Int_t index, Bool_t fromMC)
 Returns a daughter set using same criteria as SetDaughter

void SetDaughterESDtrack(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #1: ESD tracks

void SetDaughterAODtrack(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #2: AOD tracks

void SetDaughterESDv0(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #3: ESD v0

void SetDaughterAODv0(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #4: AOD v0

void SetDaughterESDcascade(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #3: ESD cascade

void SetDaughterAODcascade(AliRsnDaughter& target, Int_t index)
 Setup the first argument to the track identified by the index.
 When available, adds the MC information and references.

 Version #4: AOD cascade

Bool_t SetMCInfoESD(AliRsnDaughter& target)
 Using the label assigned to the daughter, searches for the MC informations:
 -- MC reference
 -- mother

Bool_t SetMCInfoAOD(AliRsnDaughter& target)
 Using the label assigned to the daughter, searches for the MC informations:
 -- MC reference
 -- mother

Bool_t ConvertAbsoluteIndex(Int_t index, Int_t& realIndex, AliRsnDaughter::ERefType& type)
 Using the phylosophy of the absolute index, which loops over
 all tracks, V0s and cascades, returns the result of a check
 on it (first argument) based on this criterion:
 1) if the absolute ID is smaller than number of tracks,
    return itself and the type 'track'
 2) if the absolute ID is larger than number of tracks, subtract it
    and if the result is smaller than number of V0s,
    return the corresponding V0 index and type
 3) if the absolute ID is larger than number of tracks + V0s, subtract them
    and if the result is smaller than number of cascades,
    return the corresponding cascade index and type
 The results of this check are stored in the reference arguments, while the outcome of
 the function is kTRUE if one of these checks was successful, otherwise it is kFALSE,
 meaning that the absolute index reached the end.

Int_t ConvertRealIndex(Int_t index, AliRsnDaughter::ERefType type)
 Translates a pair made by index + object type into the corresponding
 absolute index, which is set to -1 in case the real index overflows.

Int_t SelectLeadingParticle(AliRsnCutSet* cuts = 0x0)
 Searches the collection of all particles with given PID type and charge,
 and returns the one with largest momentum, provided that it is greater than 1st argument.
 If one specifies AliRsnPID::kUnknown as type or AliRsnDaughter::kNoPID as method,
 the check is done over all particles irrespectively of their PID.
 If the sign argument is '+' or '-', the check is done over the particles of that charge,
 otherwise it is done irrespectively of the charge.

Bool_t InputOK()
 Check that input is ESD or AOD

void SetRefMC(AliVEvent* mc)
 Assign pointer to MC event.
 If it is an AOD, retrieve the list of MC particles

void SetRef(AliVEvent* ref)
 basic setters/getters
{fRef = ref;}
void SetPIDResponse(AliPIDResponse* pid)
{fPID = pid;}
AliVEvent * GetRef()
{return fRef;}
AliVEvent * GetRefMC()
{return fRefMC;}
Int_t GetLeadingIndex() const
{return fLeading;}
AliPIDResponse * GetPIDResponse()
{return fPID;}
Bool_t Match(AliVEvent* ev, TClass* ref)
 getters which convert into allowed input types
{if (ev) return (ev->InheritsFrom(ref)); return kFALSE;}
Bool_t IsESD()
{return (Match(fRef, AliESDEvent::Class()));}
Bool_t IsAOD()
{return (Match(fRef, AliAODEvent::Class()));}
AliESDEvent * GetRefESD()
{if (IsESD()) return (AliESDEvent *)fRef; return 0x0;}
AliMCEvent * GetRefMCESD()
{if (IsESD()) return (AliMCEvent *)fRefMC; return 0x0;}
AliAODEvent * GetRefAOD()
{if (IsAOD()) return (AliAODEvent *)fRef; return 0x0;}
AliAODEvent * GetRefMCAOD()
{if (IsAOD()) return (AliAODEvent *)fRefMC; return 0x0;}
TClonesArray * GetAODList()
{return fAODList;}
Bool_t HasMC()
{if (IsESD()) return (fRefMC != 0x0); else if (IsAOD()) return (fRefMC != 0x0 && fAODList != 0x0); return kFALSE;}
void SetDaughterESDMCtrack(AliRsnDaughter& target, Int_t index)
void SetDaughterAODMCtrack(AliRsnDaughter& target, Int_t index)
Int_t GetAbsoluteSum()
 counters/converters of candidates
{if (fRef) return (fRef->GetNumberOfTracks() + fRef->GetNumberOfV0s() + fRef->GetNumberOfCascades()); return 0;}
void SetLeadingParticle(AliRsnDaughter& leading)
 leading particle stuff
{if (fLeading >= 0) SetDaughter(leading, fLeading, kFALSE);}