#include "hpidcandidate.h"

HPidCandidate


class description - source file - inheritance tree (.pdf)

class HPidCandidate : public TObject

Inheritance Chart:
TObject
<-
HPidCandidate

    public:
HPidCandidate() HPidCandidate(Short_t numpart, Int_t numalgs, Int_t candIndex, Int_t momAlgIndex) HPidCandidate(const HPidCandidate&) ~HPidCandidate() static HCategory* buildPidCandidateCategory() Int_t calcBayesVector(Float_t* fOut, const Int_t* aAlgs = 0, Int_t iAlgs = 0) 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) Int_t calcMergedPDFVector(Float_t* fOut, const Int_t* aAlgs, Int_t iAlgs) const 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 static TClass* Class() virtual void Clear(Option_t*) Int_t getAlgorithmIdByIndex(UInt_t uiPosIndex) const const TArrayS* getAlgorithmIds() const Int_t getAlgorithmIndexById(Int_t eAlgId) const Float_t getBayesValue(Short_t nType, const Int_t* aAlgs, Int_t iAlgs) 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) Float_t getMergedPDFValue(Short_t nPID, const Int_t* aAlgs, Int_t iAlgs) const 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 Int_t getMomAlg() const UInt_t getNAlgorithms() const UInt_t getNParticles() const UInt_t getNValues() const Short_t getParticleIdByIndex(UInt_t uiPosIndex) const const TArrayS* getParticleIds() const Int_t getParticleIndexById(Short_t nPartId) const HPidTrackCand* getTrackCandidate(HCategory* pCat = 0) const Short_t getTrackCandIndex() const Float_t getValueById(Int_t eAlgId, Short_t nPartId) const Float_t getValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const Int_t getValuePositionById(UInt_t uiAlgID, UInt_t uiPartID) const Int_t getValuePositionByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const const TArrayF* getValues() const Float_t* getValuesVectorByIndex(UInt_t uiAlgIndex) virtual TClass* IsA() const HPidCandidate& operator=(const HPidCandidate&) virtual void Print(Option_t* option) const Int_t print() const void Reset() void setAlgorithmIdByIndex(UInt_t uiPosIndex, Short_t iAlgId) void setAlgorithmIds(Short_t* aiAlgIds) void setParticleIdByIndex(UInt_t uiPosIndex, Short_t nPartIndex) void setParticleIds(Short_t* anPart, Int_t nrOfParticles) void setTrackCandIndex(Short_t nId) void setValueById(Int_t eAlgId, Short_t nPartId, Float_t fVal) void setValueByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex, Float_t fVal) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
Short_t iTrackCandIndex index of the track candidate in alg. cat. UInt_t NUM_ALGORITHMS Number of active alorithms UInt_t NUM_PARTICLES Number of active partcles UInt_t NUM_VALUES Number of values in the array of PDFs, CLs and RELINTs TArrayS aAlgorithms Array storing the list of active algorithms TArrayS aParticles Array storing the list of active particless TArrayF aValues Array storing the list of values (PDFs and CLs for each algorithm Int_t nMomAlgIndex Index specifying which momentum reconstructor has been used

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.



HPidCandidate(void)
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 Clear(Option_t* opt)

void Reset(void)

Int_t print(void) const

HPidTrackCand* getTrackCandidate(HCategory *pCat) const
 Returns HPidTrackCand object corresponding to iTrackCandIndex (if it exists)
 Works when pCat is set or gHades->getCurrentEvent() is accessible

void setAlgorithmIdByIndex(UInt_t uiPos, Short_t eAlg)

void setAlgorithmIds(Short_t aeAlgs[])

Int_t getAlgorithmIdByIndex(UInt_t uiPos) const

Int_t getAlgorithmIndexById(Int_t eAlg) 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 uiPos, Short_t nPart)
 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 uiPos) 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 eAlg, 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 uiAlgIdx, UInt_t uiPartIdx, Float_t fVal)
 Set value fVal for known position in the values array

Float_t getValueById(Int_t eAlg, 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 uiAlgIdx, UInt_t uiPartIdx) 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[], Int_t iAlgs)
 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, Int_t iAlg1, Int_t iAlg2, Int_t iAlg3, Int_t iAlg4, Int_t iAlg5, Int_t iAlg6, Int_t iAlg7, Int_t iAlg8, Int_t iAlg9)
 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 nPID, 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 nPID, Int_t iAlg0, Int_t iAlg1, Int_t iAlg2, Int_t iAlg3, Int_t iAlg4, Int_t iAlg5, Int_t iAlg6, Int_t iAlg7, Int_t iAlg8, Int_t iAlg9)
 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, Int_t iAlg1, Int_t iAlg2, Int_t iAlg3, Int_t iAlg4, Int_t iAlg5, Int_t iAlg6, Int_t iAlg7, Int_t iAlg8, Int_t iAlg9) 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, Int_t iAlg1, Int_t iAlg2, Int_t iAlg3, Int_t iAlg4, Int_t iAlg5, Int_t iAlg6, Int_t iAlg7, Int_t iAlg8, Int_t iAlg9) 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.



Inline Functions


                  void Print(Option_t* option) const
                UInt_t getNParticles() const
                UInt_t getNAlgorithms() const
                UInt_t getNValues() const
                  void setTrackCandIndex(Short_t nId)
               Short_t getTrackCandIndex() const
              Float_t* getValuesVectorByIndex(UInt_t uiAlgIndex)
                 Int_t getValuePositionByIndex(UInt_t uiAlgIndex, UInt_t uiPartIndex) const
                 Int_t getValuePositionById(UInt_t uiAlgID, UInt_t uiPartID) const
        const TArrayS* getAlgorithmIds() const
        const TArrayS* getParticleIds() const
        const TArrayF* getValues() const
                 Int_t getMomAlg() const
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)
         HPidCandidate HPidCandidate(const HPidCandidate&)
        HPidCandidate& operator=(const HPidCandidate&)


Author: Marcin Jaskula 27/07/2002
Last update: Fri Jan 26 12:21:45 2007


ROOT page - Class index - Class Hierarchy - Top of the page

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.