#ifndef ROOT_THaPIDinfo
#define ROOT_THaPIDinfo
#include "TObject.h"
#include "TArrayD.h"
class THaTrack;
class THaPIDinfo : public TObject {
public:
THaPIDinfo();
THaPIDinfo( UInt_t ndet, UInt_t npart );
THaPIDinfo( const THaTrack* track );
virtual ~THaPIDinfo();
virtual void Clear( Option_t* opt="" );
virtual void CombinePID();
Double_t GetProb( UInt_t detector, UInt_t particle ) const;
Double_t GetCombinedProb( UInt_t particle ) const;
virtual void Print( Option_t* opt ) const;
void SetProb( UInt_t detector, UInt_t particle, Double_t prob );
void SetSize( UInt_t ndet, UInt_t prob );
protected:
TArrayD* fProb;
TArrayD* fCombinedProb;
UInt_t fNdet;
UInt_t fNpart;
UInt_t idx( UInt_t detector, UInt_t particle ) const;
void SetupArrays( UInt_t ndet, UInt_t npart );
ClassDef(THaPIDinfo,0)
};
inline UInt_t THaPIDinfo::idx( UInt_t det, UInt_t part ) const
{
return det + part*fNdet;
}
inline Double_t THaPIDinfo::GetProb( UInt_t det, UInt_t part ) const
{
return fProb ? (*fProb)[ idx(det,part) ] : 0.0;
}
inline Double_t THaPIDinfo::GetCombinedProb( UInt_t part ) const
{
return fCombinedProb ? (*fCombinedProb)[ part ] : 0.0;
}
inline void THaPIDinfo::SetProb( UInt_t det, UInt_t part, Double_t prob )
{
if( fProb ) (*fProb)[ idx(det,part) ] = prob;
}
#endif
Last change: Sat Nov 7 21:26:49 2009
Last generated: 2009-11-07 21:26
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.