class HPidCandidate: public TObject

_HADES_CLASS_DESCRIPTION


 HPidCandidate


 The container consists of all values returend by PidAlgorithms
 for a specific HPidTrackCand
 The idea of this container was to make it as flexible as possible and do not
 fix the number and type of algorithms and reconstructed partices for which
 the values are stored. The organization of the data in the container looks
 like:

    ...... pAlogrithms ......
 .  -------------------------
 .  |                       |
 p  |                       |
 P  |                       |
 a  |                       |
 r  |                       |
 t  |        pValues        |
 i  |                       |
 c  |                       |
 l  |                       |
 e  |                       |
 s  |                       |
 .  |                       |
 .  |                       |
 .  -------------------------

 Ids of used algorithms are stored in aAlogrithms vector constisting of
 values from EnumPidAlgorithm_t (piddef.h). Ids larger then 100 mean
 values for CL for algorihm (id - 100)
 Ids of particles are stored in aParticles vector (from Geant).


 The values returned from the algorithms are stored in 2D array
 aValues[PID_ALG][PARTICLE] - where indices corresponds to values in
 aAlogrithms and aParticles vectors.


Function Members (Methods)

public:
HPidCandidate()
HPidCandidate(const HPidCandidate&)
HPidCandidate(Short_t numpart, Int_t numalgs, Int_t candIndex, Int_t momAlgIndex)
virtual~HPidCandidate()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static HCategory*buildPidCandidateCategory()
Int_tcalcBayesVector(Float_t* fOut, const Int_t* aAlgs = 0, Int_t iAlgs = 0)
Int_tcalcBayesVectorFromAlgSelection(Float_t* fOut, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0)
Int_tcalcMergedPDFVector(Float_t* fOut, const Int_t* aAlgs, Int_t iAlgs) const
Int_tcalcMergedPDFVectorFromAlgSelection(Float_t* fOut, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
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_tgetAlgorithmIdByIndex(UInt_t uiPosIndex) const
const TArrayS*getAlgorithmIds()
Int_tgetAlgorithmIndexById(Int_t eAlgId) const
Float_tgetBayesValue(Short_t nType, const Int_t* aAlgs, Int_t iAlgs)
Float_tgetBayesValueFromAlgSelection(Short_t nType, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0)
Int_tgetDoubleHitsHadrons()
Int_tgetDoubleHitsLeptons()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tgetFlagField()
virtual const char*TObject::GetIconName() const
Float_tgetMergedPDFValue(Short_t nPID, const Int_t* aAlgs, Int_t iAlgs) const
Float_tgetMergedPDFValueFromAlgSelection(Short_t nPID, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0) const
Int_tgetMomAlg() const
UInt_tgetNAlgorithms() const
virtual const char*TObject::GetName() const
UInt_tgetNParticles() const
UInt_tgetNValues() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Short_tgetParticleIdByIndex(UInt_t uiPosIndex) const
const TArrayS*getParticleIds()
Int_tgetParticleIndexById(Short_t nPartId) const
virtual const char*TObject::GetTitle() const
HPidTrackCand*getTrackCandidate(HCategory* pCat = 0) const
Short_tgetTrackCandIndex() const
virtual UInt_tTObject::GetUniqueID() const
Float_tgetValueById(Int_t eAlgId, Short_t nPartId) const
Float_tgetValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const
Int_tgetValuePositionById(UInt_t uiAlgID, UInt_t uiPartID) const
Int_tgetValuePositionByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const
const TArrayF*getValues()
Float_t*getValuesVectorByIndex(UInt_t uiAlgIndex)
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
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
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tisFlagAllBestHit()
Bool_tisFlagAND(Int_t num)
Bool_tisFlagBit(HPidTrackCand::EflagBits bit)
Bool_tisFlagBit(Int_t bit)
Bool_tisFlagDoubleHit()
Bool_tisFlagNoBestHit()
Bool_tisFlagOR(Int_t num)
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
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
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)
HPidCandidate&operator=(const HPidCandidate&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
Int_tprint() const
virtual voidPrint(Option_t* option = "") const
voidprintFlags(TString comment = "")
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidReset()
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 = "")
Bool_tselect(Bool_t (*)(HPidCandidate*) function)
voidsetAlgorithmIdByIndex(UInt_t uiPosIndex, Short_t iAlgId)
voidsetAlgorithmIds(Short_t* aiAlgIds)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetFlagBit(HPidTrackCand::EflagBits bit)
voidsetFlagBit(Int_t bit)
voidsetFlagBitByValue(HPidTrackCand::EflagBits bit, Bool_t val)
voidsetFlagBitByValue(Int_t bit, Bool_t val)
voidsetFlagField(Int_t field)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetParticleIdByIndex(UInt_t uiPosIndex, Short_t nPartIndex)
voidsetParticleIds(Short_t* anPart, Int_t nrOfParticles)
voidsetTrackCandIndex(Short_t nId)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetValueById(Int_t eAlgId, Short_t nPartId, Float_t fVal)
voidsetValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex, Float_t fVal)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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
voidunsetFlagBit(HPidTrackCand::EflagBits bit)
voidunsetFlagBit(Int_t bit)
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

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
UInt_tNUM_ALGORITHMSNumber of active alorithms
UInt_tNUM_PARTICLESNumber of active partcles
UInt_tNUM_VALUESNumber of values in the array of PDFs, CLs and RELINTs
TArraySaAlgorithmsArray storing the list of active algorithms
TArraySaParticlesArray storing the list of active particless
TArrayFaValuesArray storing the list of values (PDFs and CLs for each algorithm
Int_tflagsstored flags for Double_t hits, best hits etc (bitwise).
Short_tiTrackCandIndexindex of the track candidate in alg. cat.
Int_tnMomAlgIndexIndex specifying which momentum reconstructor has been used

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HPidCandidate(const HPidCandidate& )
default constructor to satisfy root!
HPidCandidate(Short_t numpart, Int_t numalgs, Int_t candIndex, Int_t momAlgIndex)
~HPidCandidate(void)
 Default destructor. Do not do anything
void setFlagBit(Int_t bit)
 set given bit in flag (0-32)
void unsetFlagBit(Int_t bit)
 unset given bit in flag (0-32)
Bool_t isFlagBit(Int_t bit)
 check given bit in flag (0-32)
 return kTRUE if bit is set
Bool_t isFlagOR(Int_t num,...)
 check given number of bits in argument in flag (0-32)
 return kTRUE if any bit is set
Bool_t isFlagAND(Int_t num, ...)
 check given number of bits in argument in flag (0-32)
 return kTRUE if all bits are set
void printFlags(TString comment = "")
 print the flag field in binary representation
 Comment will be printed at the end of line
void Clear(Option_t* = "")
void Reset(void)
Int_t print(void)
HPidTrackCand* getTrackCandidate(HCategory* pCat = 0) const
 Returns HPidTrackCand object corresponding to iTrackCandIndex (if it exists)
 Works when pCat is set or gHades->getCurrentEvent() is accessible
void setAlgorithmIdByIndex(UInt_t uiPosIndex, Short_t iAlgId)
void setAlgorithmIds(Short_t* aiAlgIds)
Int_t getAlgorithmIdByIndex(UInt_t uiPosIndex) const
Int_t getAlgorithmIndexById(Int_t eAlgId) const
 Find the position of the eAlg algorithm in the array of algorithms.
 Returns -1 if algorithm not set.
 Existing of the proper algorithms array is checked
void setParticleIdByIndex(UInt_t uiPosIndex, Short_t nPartIndex)
 Sets particle id nPart in the array of particle ids at position uiPos. Array bounds are checked.
void setParticleIds(Short_t* anPart, Int_t nrOfParticles)
Short_t getParticleIdByIndex(UInt_t uiPosIndex) const
 Gets particle id nPart at position uiPos in the array of particle ids used.
 Array bounds are checked and -10 returned in case of out of bounds.
Int_t getParticleIndexById(Short_t nPartId) const
 Find the position of the particle with PID nPartId in the array of involved species.
 Returns -1 if particle id not set.
 Existing of a propper particlesId array is checked.
void setValueById(Int_t eAlgId, Short_t nPartId, Float_t fVal)
 Set value in the array of pdf-values for the specified algorithm and particle Id
void setValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex, Float_t fVal)
 Set value fVal for known position in the values array
Float_t getValueById(Int_t eAlgId, Short_t nPartId) const
 Returns value computed by algorithm eAlg for the particle nPartId
 or 0.0 if algorithm or particle not in the arrays
Float_t getValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const
 Returns pdf-value for a specific particle and algorithm index in the values array or 0.0 if out of bound
HCategory* buildPidCandidateCategory()
 Static function for making the category for the specified class name.
Int_t calcBayesVector(Float_t* fOut, const Int_t* aAlgs = 0, Int_t iAlgs = 0)
 Calculate Bayes values for the all particles and the algorithms
 with ids from array aAlgs of size iAlgs. If iAlgs==0 all available algorithms
 are used - in this case aAlgs may be NULL. The output values are stored
 in fOut array, which size should be suitable to contain all values.
 fOut must not be NULL. The function returns the number of filled elements
 in fOut array
Int_t calcBayesVectorFromAlgSelection(Float_t* fOut, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0)
 Calculate Bayes values for the all particles and the algorithms
 given as the arguments. If all iAlg? == 0 all available algorithms
 are used. For more info see the descr. of the previous method, which
 is called internally.
Float_t getBayesValue(Short_t nType, const Int_t* aAlgs, Int_t iAlgs)
 Return the Bayes value for the give particle species nType.
 For commends to the eAlgs and iAlgs see calcBayesVect descr.
 In case of any error -1 is returned
Float_t getBayesValueFromAlgSelection(Short_t nType, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0)
 Return the Bayes value for the give particle species nPID and the given
 set of algorithms. For more info see descr. of getBayesVect and calcBayesVect
 methods.
Int_t calcMergedPDFVector(Float_t* fOut, const Int_t* aAlgs, Int_t iAlgs) const
 Calculate merged propability density for the all particles and the algorithms
 with ids from array aAlgs of size iAlgs. If iAlgs==0 all available algorithms
 are used - in this case aAlgs may be NULL. The output values are stored
 in fOut array, which size should be suitable to contain all values.
 fOut must not be NULL. The function returns the number of filled elements
 in fOut array
Int_t calcMergedPDFVectorFromAlgSelection(Float_t* fOut, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0) const
 Calculate merged propability for the all particles and the algorithms
 given as the arguments. If all iAlg? == 0 all available algorithms
 are used. For more info see the descr. of the previous method, which
 is called internally.
Float_t getMergedPDFValue(Short_t nPID, const Int_t* aAlgs, Int_t iAlgs) const
 Return the merged propability value for the give particle species nPID.
 For commends to the eAlgs and iAlgs see calcMergedVect descr.
 In case of any error -1 is returned
Float_t getMergedPDFValueFromAlgSelection(Short_t nPID, Int_t iAlg0 = 0, Int_t iAlg1 = 0, Int_t iAlg2 = 0, Int_t iAlg3 = 0, Int_t iAlg4 = 0, Int_t iAlg5 = 0, Int_t iAlg6 = 0, Int_t iAlg7 = 0, Int_t iAlg8 = 0, Int_t iAlg9 = 0) const
 Return the merged propability value for the give particle species nPID.
 and the set of algorithms. For more info see descr. of getMergedPDFValue
 and calcMergedVect methods.
void Streamer(TBuffer& b)
 Stream an object of class HPidCandidate.
Int_t getValuePositionByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const
returns the linear index in the data array belonging to the algorithm index and the particle index
Float_t* getValuesVectorByIndex(UInt_t uiAlgIndex)
 Get vector of values for the specific algorithm INDEX
Int_t getValuePositionById(UInt_t uiAlgID, UInt_t uiPartID) const
returns the linear index in the data array belonging to the algorithm ID and the particle ID
HPidCandidate(const HPidCandidate& )
void setFlagBit(HPidTrackCand::EflagBits bit)
 functions to access the bit flag array copied from HPidTrackCand
{ flags |= ( 0x01 << bit ); }
void unsetFlagBit(HPidTrackCand::EflagBits bit)
{ flags &= ~( 0x01 << bit ); }
Bool_t isFlagBit(HPidTrackCand::EflagBits bit)
{ return (flags >> bit ) & 0x01 ; }
void setFlagBitByValue(HPidTrackCand::EflagBits bit, Bool_t val)
{ val ? setFlagBit(bit) : unsetFlagBit(bit); }
void setFlagBitByValue(Int_t bit, Bool_t val)
{ val ? setFlagBit(bit) : unsetFlagBit(bit); }
Bool_t isFlagDoubleHit()
{ return (flags & 0xF) == 0x0 ? kFALSE : kTRUE; }
Bool_t isFlagAllBestHit()
{ return ((flags >> 4 ) & 0xF) == 0xF ? kTRUE : kFALSE; }
Bool_t isFlagNoBestHit()
{ return ((flags >> 4 ) & 0xF) == 0x0 ? kTRUE : kFALSE; }
Int_t getFlagField()
{ return flags; }
void setFlagField(Int_t field)
{ flags = field; }
Int_t getDoubleHitsLeptons()
{ return (flags & 0xF);}
Int_t getDoubleHitsHadrons()
{ return ((flags >> 1) & 0x7);}
Bool_t select(Bool_t (*)(HPidCandidate*) function)
{ return (*function)(this); }
void Print(Option_t* option = "") const
{ print(); }
UInt_t getNParticles(void)
getters and setters won't be documented unless required
{ return NUM_PARTICLES;}
UInt_t getNAlgorithms(void)
{ return NUM_ALGORITHMS;}
UInt_t getNValues(void)
{ return NUM_VALUES;}
void setTrackCandIndex(Short_t nId)
{ iTrackCandIndex = nId;}
Short_t getTrackCandIndex(void)
{ return iTrackCandIndex;}
const TArrayS* getAlgorithmIds(void)
{return &aAlgorithms;}
const TArrayS* getParticleIds(void)
{return &aParticles;}
const TArrayF* getValues(void)
{return &aValues;}
Int_t getMomAlg(void)
{ return nMomAlgIndex; }

Author: Marcin Jaskula 27/07/2002
Last change: Sat May 22 13:06:59 2010
Last generated: 2010-05-22 13:06

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.