KaliVeda
Toolkit for HIC analysis
KVINDRACodes Class Reference

Detailed Description

[OBSOLETE] Identification code structure for INDRA data

Warning
This class and the informations related to it are completely obsolete. For information on definitions and use of INDRA identification and calibration quality codes, see the documentation for the KVINDRA class

Describes the identification and calibration status of reconstructed particles. Based on the codes figuring in veda_6.incl of the old VEDA programme.

GetVedaIDCode() - returns ID code in VEDA format (0 = gamma, 2 = id CsI/Phoswich, etc.)
GetVedaECode() - returns energy calibration code in VEDA format (1 = calibration sans probleme, etc.)
GetIDStatus() - returns a string describing the identification status
e.g. if GetVedaIDCode()=0 then GetIDStatus()="gamma"
GetEStatus() - returns a string describing the calibration status
e.g. if GetVedaECode()=0 then GetEStatus()="Aucun appel a une routine de calibration effectuee"
const Char_t * GetEStatus()
Give an explanation for the calibration code.
UChar_t GetVedaECode()
Returns VEDA6 energy calibration code.
UChar_t GetVedaIDCode()
Returns VEDA6 identification code.
const Char_t * GetIDStatus()
Give an explanation for the ID code.

WARNING: the methods GetIDCode() and GetECode() return the new bit-mask status codes defined in class KVINDRACodeMask.

If you prefer to use these masks, the best way to test the status of the particles is by using KVINDRACodeMask::TestIDCode and KVINDRACodeMask::TestECode

e.g. to test if a particle was identified using CsI R-L you have three choices (supposing the particle is referenced by KVINDRAReconNuc* part):

EITHER if( part->GetCodes().GetVedaIDCode() == 2 ) { ... }
OR if( part->GetCodes().TestIDCode( kIDCode2 ) ) { ... }
OR if( part->GetCodes().TestIDCode( kIDCode_CsI ) ) { ... ]

Obviously, the third method is to be preferred (it is immediately clear what the instruction means)!!

Definition at line 43 of file KVINDRACodes.h.

#include <KVINDRACodes.h>

Inheritance diagram for KVINDRACodes:

Public Types

enum  { kIsoRes = BIT(14) }
 
- Public Types inherited from KVINDRACodeMask
enum  EIDCodes {
  kIDCode_Gamma = kIDCode0 , kIDCode_Neutron = kIDCode1 , kIDCode_CsI = kIDCode2 , kIDCode_Phoswich = kIDCode2 ,
  kIDCode_SiCsI = kIDCode3 , kIDCode_SiLiCsI = kIDCode3 , kIDCode_Si75SiLi = kIDCode3 , kIDCode_ChIoSi = kIDCode4 ,
  kIDCode_ChIoCsI = kIDCode4 , kIDCode_ChIoSi75 = kIDCode4 , kIDCode_Bragg = kIDCode5 , kIDCode_Zmin = kIDCode5 ,
  kIDCode_ZminCsI = kIDCode9 , kIDCode_ArretChIo = kIDCode5 , kIDCode_ArretSi = kIDCode5 , kIDCode_MultihitChIo = kIDCode8
}
 
enum  EVedaCodes {
  kIDCode0 = BIT(0) , kIDCode1 = BIT(1) , kIDCode2 = BIT(2) , kIDCode3 = BIT(3) ,
  kIDCode4 = BIT(4) , kIDCode5 = BIT(5) , kIDCode6 = BIT(6) , kIDCode7 = BIT(7) ,
  kIDCode8 = BIT(8) , kIDCode9 = BIT(9) , kIDCode10 = BIT(10) , kIDCode11 = BIT(11) ,
  kIDCode14 = BIT(12) , kIDCode15 = BIT(13) , kECode0 = BIT(0) , kECode1 = BIT(1) ,
  kECode2 = BIT(2) , kECode3 = BIT(3) , kECode11 = BIT(4) , kECode15 = BIT(5) ,
  kECode4 = BIT(6) , kECode5 = BIT(7)
}
 

Public Member Functions

 KVINDRACodes ()
 
virtual ~ KVINDRACodes ()
 
void Clear (Option_t *opt="") override
 resets all id subcodes. More...
 
UChar_t GetCodeIndex (UShort_t)
 
UChar_t GetECode ()
 Returns energy calibration code in the form of EVedaCodes or EIDCodes bitmask. More...
 
const Char_t * GetEStatus ()
 Give an explanation for the calibration code. More...
 
UShort_t GetIDCode ()
 Returns identification code in the form of EVedaCodes or EIDCodes bitmask. More...
 
const Char_t * GetIDStatus ()
 Give an explanation for the ID code. More...
 
UChar_t GetVedaECode ()
 Returns VEDA6 energy calibration code. More...
 
UChar_t GetVedaIDCode ()
 Returns VEDA6 identification code. More...
 
void SetECode (UChar_t)
 Set E code - the argument given is one of the EVedaCodes or EIDCodes bitmasks. More...
 
void SetIDCode (UShort_t)
 Set ID code - the argument given is one of the EVedaCodes or EIDCodes bitmasks. More...
 
void SetVedaECode (UChar_t)
 Set E code - the argument given is the old VEDA6 code number. More...
 
void SetVedaIDCode (UChar_t)
 Set ID code - the argument given is the old VEDA6 code number. More...
 
- Public Member Functions inherited from KVINDRACodeMask
 KVINDRACodeMask ()
 
virtual ~ KVINDRACodeMask ()
 
 ClassDefOverride (KVINDRACodeMask, 1)
 
void Clear (Option_t *="") override
 
void Copy (TObject &object) const override
 
UChar_t GetEMask ()
 
UShort_t GetIDMask ()
 
Bool_t IsNull () const
 
Bool_t operator& (KVINDRACodeMask &msk)
 
void SetEMask (UChar_t codes)
 
void SetIDMask (UShort_t codes)
 
Bool_t TestECode (UChar_t code)
 
Bool_t TestIDCode (UShort_t code)
 

Static Public Member Functions

static UChar_t VedaECodeToBitmask (UChar_t veda_e_code)
 
static UShort_t VedaIDCodeToBitmask (UChar_t veda_id_code)
 

Friends

class KVINDRAReconNuc
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kIsoRes 

Definition at line 57 of file KVINDRACodes.h.

Constructor & Destructor Documentation

◆ KVINDRACodes()

KVINDRACodes::KVINDRACodes ( )

Definition at line 102 of file KVINDRACodes.cpp.

◆ ~ KVINDRACodes()

virtual KVINDRACodes::~ KVINDRACodes ( )
inlinevirtual

Definition at line 62 of file KVINDRACodes.h.

Member Function Documentation

◆ Clear()

void KVINDRACodes::Clear ( Option_t *  opt = "")
override

resets all id subcodes.

Definition at line 281 of file KVINDRACodes.cpp.

◆ GetCodeIndex()

UChar_t KVINDRACodes::GetCodeIndex ( UShort_t  mask)

Argument is a bit-mask representing particle ID or E code Returns the number of the bit which is set to 1 (right-most bit is 0). Result is corresponding index in arrays fCodeGenIdent, fIDCodes, etc.

Definition at line 186 of file KVINDRACodes.cpp.

◆ GetECode()

UChar_t KVINDRACodes::GetECode ( )

Returns energy calibration code in the form of EVedaCodes or EIDCodes bitmask.

Definition at line 243 of file KVINDRACodes.cpp.

◆ GetEStatus()

const Char_t * KVINDRACodes::GetEStatus ( )

Give an explanation for the calibration code.

Definition at line 124 of file KVINDRACodes.cpp.

◆ GetIDCode()

UShort_t KVINDRACodes::GetIDCode ( )

Returns identification code in the form of EVedaCodes or EIDCodes bitmask.

Definition at line 231 of file KVINDRACodes.cpp.

◆ GetIDStatus()

const Char_t * KVINDRACodes::GetIDStatus ( )

Give an explanation for the ID code.

Definition at line 112 of file KVINDRACodes.cpp.

◆ GetVedaECode()

UChar_t KVINDRACodes::GetVedaECode ( )

Returns VEDA6 energy calibration code.

Definition at line 219 of file KVINDRACodes.cpp.

◆ GetVedaIDCode()

UChar_t KVINDRACodes::GetVedaIDCode ( )

Returns VEDA6 identification code.

Definition at line 207 of file KVINDRACodes.cpp.

◆ SetECode()

void KVINDRACodes::SetECode ( UChar_t  icod)

Set E code - the argument given is one of the EVedaCodes or EIDCodes bitmasks.

Definition at line 172 of file KVINDRACodes.cpp.

◆ SetIDCode()

void KVINDRACodes::SetIDCode ( UShort_t  icod)

Set ID code - the argument given is one of the EVedaCodes or EIDCodes bitmasks.

Definition at line 160 of file KVINDRACodes.cpp.

◆ SetVedaECode()

void KVINDRACodes::SetVedaECode ( UChar_t  icod)

Set E code - the argument given is the old VEDA6 code number.

Definition at line 148 of file KVINDRACodes.cpp.

◆ SetVedaIDCode()

void KVINDRACodes::SetVedaIDCode ( UChar_t  icod)

Set ID code - the argument given is the old VEDA6 code number.

Definition at line 136 of file KVINDRACodes.cpp.

◆ VedaECodeToBitmask()

UChar_t KVINDRACodes::VedaECodeToBitmask ( UChar_t  veda_e_code)
static

Static method Returns bitmask equivalent for old VEDA ID code

Definition at line 269 of file KVINDRACodes.cpp.

◆ VedaIDCodeToBitmask()

UShort_t KVINDRACodes::VedaIDCodeToBitmask ( UChar_t  veda_id_code)
static

Static method Returns bitmask equivalent for old VEDA ID code

Definition at line 256 of file KVINDRACodes.cpp.

Friends And Related Function Documentation

◆ KVINDRAReconNuc

friend class KVINDRAReconNuc
friend

Definition at line 45 of file KVINDRACodes.h.