KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVINDRACodes.cpp
Go to the documentation of this file.
1 /***************************************************************************
2 $Id: KVINDRACodes.cpp,v 1.3 2008/02/14 10:30:18 franklan Exp $
3  ***************************************************************************/
4 
5 #include "KVINDRACodes.h"
6 
7 
9 
10 
11 
12 
15  "gamma",
16  "neutron (seulement couronnes 2 a 9)",
17  "part. ident. dans CsI ou Phoswich (OK + 8Be)",
18  "fragment identifie dans Si-CsI ou fragment ident. dans Si75-SiLi ou SiLi-CsI",
19  "fragment identifie dans ChIo-Si/ChIo-CsI ou fragment ou part. identifie dans ChIo-Si75",
20  "fragment non-ident. (montee de Bragg)(Z min.) ou stoppe dans Chio (Z min)",
21  "frag. cree par la coherence CsI (stoppe ds Si.)",
22  "frag. cree par la coherence ChIo (stoppe ds ChIo)",
23  "multiple comptage dans ChIo avec arret: - dans les siliciums (cour. 2-9); - dans les CsI (cour. 10-17)",
24  "ident. incomplete dans CsI ou Phoswich (Z.min)",
25  "ident. 'entre les lignes' dans CsI",
26  "ident. Z=2 due a l'inversion CHIO (Argon)",
27  "Particule restee non identifiee (a rejeter)",
28  "frag. ou part. rejete"
29 };
30 
31 
33 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15 };
34 
35 
37 
39  kIDCode0,
40  kIDCode1,
41  kIDCode2,
42  kIDCode3,
43  kIDCode4,
44  kIDCode5,
45  kIDCode6,
46  kIDCode7,
47  kIDCode8,
48  kIDCode9,
49  kIDCode10,
50  kIDCode11,
51  0,
52  0,
53  kIDCode14,
54  kIDCode15
55 };
56 
57 
58 
60 
62  "Aucun appel a une routine de calibration effectuee",
63  "Calibration sans probleme (toute les routines ont retourne le code 1)",
64  "Warning : Une des routines a retourne un code different de 1",
65  "Warning specifique au CSI : E_CsI > E_Max du CsI",
66  "Detecteur en panne (CHIO ou SI): perte d'energie dans ce detecteur calcule par Veda",
67  "Rejet : Une des routines a retourne un code de rejet.",
68  "One or more detectors hit by more than one particle, energy loss calculated for this detector",
69  "Coherency test of energy losses reveals presence of other particles"
70 };
71 
72 
73 UChar_t KVINDRACodes::fECodes[8] = { 0, 1, 2, 3, 11, 15, 4, 5 };
74 
75 
77 
79  kECode0,
80  kECode1,
81  kECode2,
82  kECode3,
83  kECode4,
84  kECode5,
85  0,
86  0,
87  0,
88  0,
89  0,
90  kECode11,
91  0,
92  0,
93  0,
94  kECode15
95 };
96 
97 
99 
101 
103 {
104 }
105 
106 
107 
108 
111 
113 {
114  //Give an explanation for the ID code
115 
117 }
118 
119 
120 
123 
125 {
126  //Give an explanation for the calibration code
127 
129 }
130 
131 
132 
135 
137 {
138  //Set ID code - the argument given is the old VEDA6 code number
139 
140  SetIDMask(fIDBits[icod]);
141 }
142 
143 
144 
147 
149 {
150  //Set E code - the argument given is the old VEDA6 code number
151 
152  SetEMask(fEBits[icod]);
153 }
154 
155 
156 
159 
161 {
162  //Set ID code - the argument given is one of the EVedaCodes or EIDCodes bitmasks
163 
164  SetIDMask(icod);
165 }
166 
167 
168 
171 
173 {
174  //Set E code - the argument given is one of the EVedaCodes or EIDCodes bitmasks
175 
176  SetEMask(icod);
177 }
178 
179 
180 
185 
187 {
188  //Argument is a bit-mask representing particle ID or E code
189  //Returns the number of the bit which is set to 1 (right-most bit is 0).
190  //Result is corresponding index in arrays fCodeGenIdent, fIDCodes, etc.
191  int i = 0;
192  if (!mask)
193  return 0;
194  do {
195  mask = (mask >> 1);
196  i++;
197  }
198  while (mask);
199  return i - 1;
200 }
201 
202 
203 
206 
208 {
209  //Returns VEDA6 identification code
210 
211  return fIDCodes[GetCodeIndex(GetIDMask())];
212 }
213 
214 
215 
218 
220 {
221  //Returns VEDA6 energy calibration code
222 
223  return fECodes[GetCodeIndex(GetEMask())];
224 }
225 
226 
227 
230 
232 {
233  //Returns identification code in the form of EVedaCodes or EIDCodes bitmask
234 
235  return GetIDMask();
236 }
237 
238 
239 
242 
244 {
245  //Returns energy calibration code in the form of EVedaCodes or EIDCodes bitmask
246 
247  return GetEMask();
248 }
249 
250 
251 
255 
257 {
258  //Static method
259  //Returns bitmask equivalent for old VEDA ID code
260  return fIDBits[veda_id_code];
261 }
262 
263 
264 
268 
270 {
271  //Static method
272  //Returns bitmask equivalent for old VEDA ID code
273  return fEBits[veda_e_code];
274 }
275 
276 
277 
280 
282 {
283  //resets all id subcodes.
285 }
286 
287 
@ kECode15
@ kIDCode1
@ kIDCode2
@ kIDCode3
@ kIDCode7
@ kECode1
@ kIDCode8
@ kIDCode5
@ kIDCode14
@ kIDCode11
@ kIDCode0
@ kECode2
@ kIDCode10
@ kIDCode9
@ kECode3
@ kECode5
@ kIDCode15
@ kECode0
@ kIDCode4
@ kECode4
@ kIDCode6
@ kECode11
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
unsigned short UShort_t
unsigned char UChar_t
char Char_t
const char Option_t
void SetEMask(UChar_t codes)
void SetIDMask(UShort_t codes)
void Clear(Option_t *="")
UShort_t GetIDMask()
Identification code structure for INDRA data (obsolete)
Definition: KVINDRACodes.h:41
static Char_t fCodeGenCalib[8][120]
Definition: KVINDRACodes.h:47
static UChar_t VedaECodeToBitmask(UChar_t veda_e_code)
const Char_t * GetEStatus()
Give an explanation for the calibration code.
void SetIDCode(UShort_t)
Set ID code - the argument given is one of the EVedaCodes or EIDCodes bitmasks.
UChar_t GetECode()
Returns energy calibration code in the form of EVedaCodes or EIDCodes bitmask.
static Char_t fCodeGenIdent[14][120]
Definition: KVINDRACodes.h:46
UChar_t GetVedaECode()
Returns VEDA6 energy calibration code.
UChar_t GetVedaIDCode()
Returns VEDA6 identification code.
void SetVedaECode(UChar_t)
Set E code - the argument given is the old VEDA6 code number.
static UShort_t fIDBits[16]
Definition: KVINDRACodes.h:50
static UChar_t fEBits[16]
Definition: KVINDRACodes.h:51
UChar_t GetCodeIndex(UShort_t)
void Clear(Option_t *opt="")
resets all id subcodes.
const Char_t * GetIDStatus()
Give an explanation for the ID code.
static UChar_t fECodes[8]
Definition: KVINDRACodes.h:49
static UChar_t fIDCodes[14]
Definition: KVINDRACodes.h:48
void SetECode(UChar_t)
Set E code - the argument given is one of the EVedaCodes or EIDCodes bitmasks.
static UShort_t VedaIDCodeToBitmask(UChar_t veda_id_code)
UShort_t GetIDCode()
Returns identification code in the form of EVedaCodes or EIDCodes bitmask.
void SetVedaIDCode(UChar_t)
Set ID code - the argument given is the old VEDA6 code number.