KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVINDRAForwardGroupReconstructor.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Tue Feb 27 11:35:10 2018
2 //Author: John Frankland,,,
3 
5 #include "KVINDRACodeMask.h"
6 #include "KVIDGChIoSi.h"
7 #include "KVIDGCsI.h"
8 
9 #include <KVCsI.h>
10 #include <KVSilicon.h>
11 
13 
14 
15 
19 {
20  // Coherency analysis for forward rings 1-9 of INDRA
21 
22  bool ok = false;
23  if (PART.GetStoppingDetector()->IsType("CSI")) {
24  // particles stopping in CsI detectors
25  // check coherency of CsI-R/L and Si-CsI identifications
26  ok = CoherencySiCsI(PART);
27  // we check that the ChIo contribution is sane:
28  // if no other particles hit this group, the Z given by the ChIoSi
29  // must be <= the Z found from Si-CsI or CsI-RL identification
30  PART.SetParameter("UseFullChIoEnergyForCalib", CoherencyChIoSiCsI(PART));
31  }
32  else {
33  // particle stopped in Si (=> ChIo-Si) or ChIo (=> Zmin)
34  ok = PART.IsIdentified() && identifying_telescope;
35  PART.SetParameter("UseFullChIoEnergyForCalib", !(theChio && theChio->GetNHits() > 1));
36  }
37 
38  return ok;
39 }
40 
41 
42 
81 
83 {
84  // Special calibration for particles in rings 1 to 9
85  // We set the energy calibration code for the particle here:
86  //
87  //~~~{.cpp}
88  // KVINDRA::ECodes::NO_CALIBRATION_ATTEMPTED = 0, ///< particle stopped in detectors with no available calibration
89  // KVINDRA::ECodes::NORMAL_CALIBRATION = 1, ///< normal well-calibrated particle with no problems
90  // KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED = 2, ///< particle calibration OK, with some detector energies calculated
91  // KVINDRA::ECodes::WARNING_CSI_MAX_ENERGY = 3, ///< particle calibration OK, although apparent energy would mean punching through the CsI
92  // KVINDRA::ECodes::BAD_CALIBRATION = 15 ///< calibration attempted but bad result (negative energies etc.)
93  //~~~
94  //
95  // The contributions from ChIo, Si, and CsI are stored in particle parameters
96  // INDRA.ECHIO, INDRA.ESI and INDRA.ECSI
97  // If the contribution is calculated rather than measured (see below), it is stored as a negative value.
98  // NOTE: in no case do we ever calculate an energy for uncalibrated detector using measured energy
99  // loss in the detector placed in front (i.e. calculate ECsI from deSi, or calculate ESi
100  // from deChIo) as this gives wildly varying (mostly false) results.
101  //
102  // For neutrons (IDCODE=1): if CsI is calibrated, we use the CsI light response to calculate
103  // the equivalent energy for a proton.
104  // For particles stopping in the CsI detector (IDCODE=2 or 3):
105  // - for "8Be" we use half the CsI light output to calculate 4He kinetic energy which is then doubled
106  // (we assume two 4He of identical energy), and ECODE=kECode2 (calculated)
107  // - if no calibration exists for the CsI, we cannot calibrate the particle (ECODE=kECode0)
108  // - if calibrated CsI energy is bizarre (<=0), we cannot calibrate the particle (ECODE=kECode15)
109  // - if the Silicon detector is not calibrated, or if coherency analysis indicates a pile-up
110  // in the silicon or other inconsistency, the Silicon energy is calculated from the calibrated
111  // CsI energy (ECODE=kECode2)
112  // - if the Ionisation Chamber is not calibrated, or if coherency analysis indicates a pile-up
113  // in the ChIo or other inconsistency, this contribution is calculated using the total
114  // cumulated energy measured in the CsI and/or Silicon detectors (ECODE=kECode2)
115  //
116  // For particles stopping in the Silicon detector (IDCODE=3, 4 or 5):
117  // - if no calibration exists for the Silicon, we cannot calibrate the particle (ECODE=kECode0)
118  // - if the Ionisation Chamber is not calibrated, or if coherency analysis indicates a pile-up
119  // in the ChIo or other inconsistency, this contribution is calculated using the total
120  // cumulated energy measured in the CsI and/or Silicon detectors (ECODE=kECode2)
121 
122  bool fUseFullChIoEnergyForCalib = PART->GetParameters()->GetBoolValue("UseFullChIoEnergyForCalib");
123  bool fPileup = PART->GetParameters()->GetBoolValue("Pileup");
124  bool fCoherent = PART->GetParameters()->GetBoolValue("Coherent");
125 
126  if (PART->GetIDCode() == KVINDRA::IDCodes::ID_NEUTRON) { // neutrons
127  DoNeutronCalibration(PART);
128  return;
129  }
130 
131  Bool_t stopped_in_silicon = kTRUE;
132 
133  auto csi = GetCsI(PART);
134  if (csi) {
135  stopped_in_silicon = kFALSE;
136  if (csi->IsCalibrated() && csi->GetDetectorSignalValue("TotLight") > 0) {
137  /* CSI ENERGY CALIBRATION */
138  if (PART->GetIDCode() == KVINDRA::IDCodes::ID_CSI_PSA && PART->IsIsotope(4, 8)) {
140  }
141  else
142  fECsI = csi->GetCorrectedEnergy(PART, -1., kFALSE);
143  }
144  else {
145  SetNoCalibrationStatus(PART);// no CsI calibration - no calibration performed
146  return;
147  }
148  if (fECsI <= 0 && (PART->GetECode() != KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED)) { // DoBeryllium8Calibration returns fECsI<0 with ECode=SOME_ENERGY_LOSSES_CALCULATED if OK
149  SetBadCalibrationStatus(PART);// problem with CsI energy - no calibration
150  return;
151  }
152  }
153  auto si = GetSi(PART);
154  if (si) {
155  /* SILICIUM ENERGY CONTRIBUTION */
156  // if fPileup = kTRUE, the Silicon energy appears to include a contribution from another particle
157  // therefore we have to estimate the silicon energy for this particle using the CsI energy
158  // if fCoherent = kFALSE, the Silicon energy is too small to be consistent with the CsI identification,
159  // therefore we have to estimate the silicon energy for this particle using the CsI energy
160 
161  if (PART->GetIDCode() == KVINDRA::IDCodes::ID_STOPPED_IN_FIRST_STAGE && stopped_in_silicon) {
162  // particles stopped in Silicon detectors with no identification except estimation of Zmin (case of INDRA without Ionization Chambers):
163  // if silicon is calibrated, give measured energy in silicon as particle energy
164  if (si->IsCalibrated())
165  PART->SetEnergy(si->GetEnergy());
166  else
168  return;
169  }
170 
171  if (!fPileup && fCoherent && si->IsCalibrated()) {
172  // all is apparently well. use full energy deposited in silicon.
173  Bool_t si_transmission = kTRUE;
174  if (stopped_in_silicon) {
175  si_transmission = kFALSE;
176  }
177  else {
178  si->SetEResAfterDetector(TMath::Abs(fECsI));
179  }
180  fESi = si->GetCorrectedEnergy(PART, -1., si_transmission);
181  if (fESi <= 0) {
182  // problem with silicon calibration
183  print_part = true;
184  if (!stopped_in_silicon && (TMath::Abs(fECsI) > 0.0)) {
185  if (!CalculateSiliconDEFromResidualEnergy(PART, si)) return;
186  }
187  else {
188  // stopped in Si with bad Si calibration - no good
190  return;
191  }
192  }
193  }
194  else {
195  if (!stopped_in_silicon && (TMath::Abs(fECsI) > 0.0)) {
196  if (!CalculateSiliconDEFromResidualEnergy(PART, si)) return;
197  }
198  else {
199  // cannot calibrate particle stopping in silicon in this case
201  return;
202  }
203  }
204 
205  }
206  if (theChio) {
207  /* CHIO ENERGY CONTRIBUTION */
208  // if fUseFullChIoEnergyForCalib = kFALSE, we have to estimate the ChIo energy for this particle
210  if (fUseFullChIoEnergyForCalib && theChio->IsCalibrated()) {
211  // all is apparently well
212  if (!PART->GetStoppingDetector()->IsType("CI")) {
215  }
216  else {
217  // particle stopped in chio, not in transmission
218  fEChIo = theChio->GetCorrectedEnergy(PART, -1., kFALSE);
219  }
220  if (fEChIo < 0.) {
221  // bad chio calibration
222  if (!PART->GetStoppingDetector()->IsType("CI") && (ERES > 0.0)) {
223  if (!CalculateChIoDEFromResidualEnergy(PART, ERES)) return;
224  }
225  }
226  }
227  else {
228  if (!PART->GetStoppingDetector()->IsType("CI") && (ERES > 0.0)) {
229  if (!CalculateChIoDEFromResidualEnergy(PART, ERES)) return;
230  }
231  else {
232  // particle stopped in ChIo, no calibration available
234  return;
235  }
236  }
237  }
239 }
240 
241 
242 
243 
247 
249 {
250  // use energy of CsI calculated using the Z & A of the CsI identification
251  // to calculate the energy deposited by the neutron
253  KVNucleus tmp(IDcsi->Z, IDcsi->A);
254  auto csi = GetCsI(PART);
255  if (csi && csi->IsCalibrated()) {
256  fECsI = csi->GetCorrectedEnergy(&tmp, -1., kFALSE);
257  PART->SetEnergy(fECsI);
258  SetCalibrationStatus(*PART, KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED); // not a real energy measure
259  }
260  else
262 }
263 
264 
265 
266 
278 
280 {
281  // Called by DoCoherency() for particles stopping in CsI detectors on rings 2-9,
282  // which have a ChIo in front of them.
283  //
284  // we check that the ChIo contribution is sane:
285  // if no other particles hit this group, the Z given by the ChIoSi
286  // must be <= the Z found from Si-CsI or CsI-RL identification
287  //
288  // in this case the measured energy loss of the ChIo can be solely attributed to this particle
289  // and we return kTRUE;
290 
291  // ChIo was hit by more than one particle in group
292  if (theChio && theChio->GetNHits() > 1) {
293  return kFALSE;
294  }
295 
297  if (!IDchiosi->IDattempted) {
298  // no ChIo-Si identification ? assume coherency ?
299  return kTRUE;
300  }
301 
302  // if we have a successful ChIo-Si id with a Z > Z given by CsI or Si-CsI id,
303  // then we consider that there is a pile-up in the ChIo
304  // note that we consider Z_ChIoSi = 1 to mean the ChIo is in the pedestal i.e. nothing seen
305  // we also require the chio-si identification to be above the punch-through line
306  if (IDchiosi->IDOK && IDchiosi->Z > 1 && IDchiosi->IDquality != KVIDGChIoSi::k_BelowPunchThrough && IDchiosi->Z > partID.Z) {
307  return kFALSE;
308  }
309 
310  return kTRUE;
311 }
312 
313 
314 
327 
329 {
330  // Called by DoCoherency() for particles stopping in CsI detectors on rings 1-9,
331  // which have a Silicon detector just in front of them.
332  //
333  // coherent = kFALSE if CsI-R/L and Si-CsI identifications are not coherent.
334  // this is a warning, the CsI identification is kept, either the Si signal
335  // was not good (particle hitting dead zone), or it actually corresponds
336  // to two particles reaching the CsI at the same time
337  // pileup = kTRUE means that the particle identified in CsI-R/L is correct,
338  // and there is probably a second particle which stopped in the silicon
339  // detector at the same time, to be identified in ChIo-Si after
340  // subtraction of the Silicon contribution
341 
346  bool fCoherent = kTRUE;
347  bool fPileup = kFALSE;
348 
349  // Unsuccessful/no CsI id attempt with successful Si-CsI id ?
350  // Then use Si-CsI identification result
351  if (IDsicsi->IDOK && !IDcsi->IDOK) {
352  partID = *IDsicsi;
353  identifying_telescope = idt_sicsi;
354  PART.SetParameter("Coherent", fCoherent);
355  PART.SetParameter("Pileup", fPileup);
356  return kTRUE;
357  }
358 
359  // check coherency of CsI-R/L and Si-CsI identifications
360  if (IDcsi->IDOK) {
361  partID = *IDcsi;
362  identifying_telescope = idt_csi;
363 
364  // Neutrons have no energy loss in Si detector (pedestal), have a reaction in the CsI and create a Z=1
365  // or Z=2 which is identified in CsI R-L, while they show up in Si-CsI maps as a horizontal
366  // band around the Si pedestal for low energies (energies where proton dE is significantly larger than
367  // the pedestal).
368  if ((IDcsi->Z == 1 || IDcsi->Z == 2) && IDsicsi->IDattempted) {
369 // if (IDsicsi->deltaEpedestal == KVIdentificationResult::deltaEpedestal_UNKNOWN) {
370 // // no explicit treatment of 'neutron-like' particles with a cut in Si-CsI id grid
371 // // First we check that we are in the domain where proton dE can be distinguished from pedestal.
372 // // If so, if the measured dE is below [ped + factor*(dE_exp - ped)], then we label the particle as a neutron.
373 // // 'factor' depends on the Si-CsI telescope: if it has mass identification, factor=0.3; if not, factor=0.1
374 // // (these empirical values correspond to 5th campaign data)
375 // if (idt_sicsi) {
376 // Double_t ped = idt_sicsi->GetPedestalY();
377 // Int_t status;
378 // Double_t dE_exp = idt_sicsi->GetMeanDEFromID(status, 1, 1);
379 // if (status == KVIDTelescope::kMeanDE_OK) { // proton/Z=1 line exists, and we are in its energy range
380 // if (dE_exp > ped + 5.) { // arbitrary choice, must have expected dE at least 5 channels above pedestal
381 
382 // // if Si-CsI has no isotopic identification, reduce factor
383 // Double_t factor = (idt_sicsi->HasMassID() ? 0.3 : 0.1);
384 // if (idt_sicsi->GetIDMapY() < (ped + factor * (dE_exp - ped))) {
385 // partID = *IDsicsi;
386 // identifying_telescope = idt_sicsi;
387 // partID.IDOK = kTRUE;
388 // partID.Zident = kTRUE;
389 // partID.Aident = kTRUE;
390 // partID.Z = 0;
391 // partID.A = 1;
392 // partID.IDcode = kIDCode1; // general code for neutrons
393 // PART.SetParameter("Coherent", fCoherent);
394 // PART.SetParameter("Pileup", fPileup);
395 // return kTRUE;
396 // }
397 // }
398 // }
399 // }
400 // }
402  // explicit treatment of 'neutron-like' particles with a cut in Si-CsI id grid
403  partID = *IDsicsi;
404  identifying_telescope = idt_sicsi;
405  partID.IDOK = kTRUE;
406  partID.Zident = kTRUE;
407  partID.Aident = kTRUE;
408  partID.Z = 0;
409  partID.A = 1;
410  partID.IDcode = KVINDRA::IDCodes::ID_NEUTRON; // general code for neutrons
411  PART.SetParameter("Coherent", fCoherent);
412  PART.SetParameter("Pileup", fPileup);
413  return kTRUE;
414  }
415  }
416 
417  // We check the coherency of the mass and charge identifications
418  // If a successful Si-CsI identification is available we check:
419  // if Si-CsI gives A & Z - must have same Z, A within +/-1 unit
420  // if Z or A smaller => incoherency : pile-up of two particles in CsI ?
421  // or bad signal from Si detector (dead zones) ?
422  // if Z or A larger, CsI identification is good,
423  // assume another particle stopped in Si (identify in ChIo-Si)
424  // if Si-CsI gives just Z - must have same Z
425  // if Z smaller => incoherency : pile-up of two particles in CsI ?
426  // or bad signal from Si detector (dead zones) ?
427  // if Z larger => CsI identification is good,
428  // assume another particle stopped in Si (identify in ChIo-Si)
429  //
430  // If CsI identification gives code KVIDGCsI::kICode1 ou KVIDGCsI::kICode3 and the
431  // Si-CsI gives the same Z but A = Acsi + 1, we use the Si-CsI identification.
432  //
433  // If CsI identification gives code KVIDGCsI::kICode2 ou KVIDGCsI::kICode3 and the
434  // Si-CsI gives the same Z but A = Acsi - 1, we use the Si-CsI identification.
435  //
436  // N.B. if CsI-R/L identification gives "8Be" (2 alpha particles) then there are two correct possibilities:
437  // 1) Si-CsI identification gives 7Li => CsI identification is correct ("8Be")
438  // 2) Si-CsI identification gives 8He => the particle is 8He (falls on same R/L line as 2*alpha)
439  // Seeing the very low statistics for 8He compared to 8Be/2alpha, we assume that if Si-CsI id
440  // gives something above 8He it is either incoherent (below 7Li) or 8Be + something else in ChIo-Si
441  // (above 7Li).
442  Int_t Zref = IDcsi->Z;
443  Int_t Aref = IDcsi->A;
444  if (IDsicsi->IDOK) {
445  if (IDsicsi->Aident) { // Si-CsI provides mass identification
446 
447  if (IDcsi->Z == 4 && IDcsi->A == 8) {
448  // traitement special 8Be
449  // if sicsi => 7Li, it is 8Be (2alpha)
450  // if sicsi => 8He, it is 8He
451  if (IDsicsi->Z < 2 || (IDsicsi->Z == 2 && IDsicsi->A < 7)) {
452  fCoherent = kFALSE;
453  IDsicsi->SetComment("CsI-R/L & Si-CsI identifications not coherent");
454  PART.SetParameter("Coherent", fCoherent);
455  PART.SetParameter("Pileup", fPileup);
456  return kTRUE;
457  }
458  else if (IDsicsi->Z == 2 && IDsicsi->A > 6 && IDsicsi->A < 10) {
459  // accept helium-7,8,9 as 8He
460  partID = *IDsicsi;
461  identifying_telescope = idt_sicsi;
462  PART.SetParameter("Coherent", fCoherent);
463  PART.SetParameter("Pileup", fPileup);
464  return kTRUE;
465  }
466  else if ((IDsicsi->Z == 2 && IDsicsi->A > 9) || (IDsicsi->Z == 3 && IDsicsi->A < 6)) {
467  fCoherent = kFALSE;
468  IDsicsi->SetComment("CsI-R/L & Si-CsI identifications not coherent");
469  PART.SetParameter("Coherent", fCoherent);
470  PART.SetParameter("Pileup", fPileup);
471  return kTRUE;
472  }
473  else if (IDsicsi->Z == 3 && IDsicsi->A > 5 && IDsicsi->A < 9) {
474  // accept lithium-6,7,8 as 7Li
475  PART.SetParameter("Coherent", fCoherent);
476  PART.SetParameter("Pileup", fPileup);
477  return kTRUE;
478  }
479  else if ((IDsicsi->Z == 3 && IDsicsi->A > 8) || IDsicsi->Z > 3) {
480  fPileup = kTRUE;
481  IDsicsi->SetComment("Second particle stopping in Si, identification ChIo-Si required");
482  PART.SetParameter("Coherent", fCoherent);
483  PART.SetParameter("Pileup", fPileup);
484  return kTRUE;
485  }
486  }
487  // if CsI says A could be bigger and Si-CsI gives same Z and A+1, use Si-CsI
488  if ((IDsicsi->Z == Zref) && (IDsicsi->A == (Aref + 1))
489  && (IDcsi->IDquality == KVIDGCsI::kICODE1 || IDcsi->IDquality == KVIDGCsI::kICODE3)) {
490  partID = *IDsicsi;
491  identifying_telescope = idt_sicsi;
492  PART.SetParameter("Coherent", fCoherent);
493  PART.SetParameter("Pileup", fPileup);
494  return kTRUE;
495  }
496  // if CsI says A could be smaller and Si-CsI gives same Z and A-1, use Si-CsI
497  if ((IDsicsi->Z == Zref) && (IDsicsi->A == (Aref - 1))
498  && (IDcsi->IDquality == KVIDGCsI::kICODE2 || IDcsi->IDquality == KVIDGCsI::kICODE3)) {
499  partID = *IDsicsi;
500  identifying_telescope = idt_sicsi;
501  PART.SetParameter("Coherent", fCoherent);
502  PART.SetParameter("Pileup", fPileup);
503  return kTRUE;
504  }
505  // everything else - Z must be same, A +/- 1 unit
506  if (IDsicsi->Z == Zref && TMath::Abs(IDsicsi->A - Aref) < 2) {
507  PART.SetParameter("Coherent", fCoherent);
508  PART.SetParameter("Pileup", fPileup);
509  return kTRUE;
510  }
511  else if (IDsicsi->Z < Zref || (IDsicsi->Z == Zref && IDsicsi->A < (Aref - 1))) {
512  fCoherent = kFALSE;
513  IDsicsi->SetComment("CsI-R/L & Si-CsI identifications not coherent");
514  PART.SetParameter("Coherent", fCoherent);
515  PART.SetParameter("Pileup", fPileup);
516  return kTRUE;
517  }
518  else if (IDsicsi->Z > Zref || (IDsicsi->Z == Zref && IDsicsi->A > (Aref + 1))) {
519  fPileup = kTRUE;
520  IDsicsi->SetComment("Second particle stopping in Si, identification ChIo-Si required");
521  PART.SetParameter("Coherent", fCoherent);
522  PART.SetParameter("Pileup", fPileup);
523  return kTRUE;
524  }
525  }
526  else { // only Z identification from Si-CsI
527  if (IDcsi->Z == 4 && IDcsi->A == 8) {
528  // traitement special 8Be
529  // we ask for Z to be equal 3 in SiCsI, but with no mass identification
530  // we do not try for 8He identification
531  if (IDsicsi->Z < 3) {
532  fCoherent = kFALSE;
533  IDsicsi->SetComment("CsI-R/L & Si-CsI identifications not coherent");
534  PART.SetParameter("Coherent", fCoherent);
535  PART.SetParameter("Pileup", fPileup);
536  return kTRUE;
537  }
538  else if (IDsicsi->Z == 3) {
539  PART.SetParameter("Coherent", fCoherent);
540  PART.SetParameter("Pileup", fPileup);
541  return kTRUE;
542  }
543  else {
544  fPileup = kTRUE;
545  IDsicsi->SetComment("Second particle stopping in Si, identification ChIo-Si required");
546  PART.SetParameter("Coherent", fCoherent);
547  PART.SetParameter("Pileup", fPileup);
548  return kTRUE;
549  }
550  }
551  // everything else
552  if (IDsicsi->Z == Zref) {
553  PART.SetParameter("Coherent", fCoherent);
554  PART.SetParameter("Pileup", fPileup);
555  return kTRUE;
556  }
557  else if (IDsicsi->Z < Zref) {
558  fCoherent = kFALSE;
559  IDsicsi->SetComment("CsI-R/L & Si-CsI identifications not coherent");
560  PART.SetParameter("Coherent", fCoherent);
561  PART.SetParameter("Pileup", fPileup);
562  return kTRUE;
563  }
564  else {
565  fPileup = kTRUE;
566 
567  IDsicsi->SetComment("Second particle stopping in Si, identification ChIo-Si required");
568  PART.SetParameter("Coherent", fCoherent);
569  PART.SetParameter("Pileup", fPileup);
570  return kTRUE;
571  }
572  }
573  }
574  else if (IDsicsi->IDattempted && (IDsicsi->IDquality == 4 || IDsicsi->IDquality == 5)) {
575  // "noise" in between Si-CsI identification lines => pile-up with good particle
576  // in CsI plus another particle stopped in the Silicon
577  if (IDsicsi->Z < Zref) fCoherent = kFALSE;
578  else fPileup = kTRUE;
579  }
580  else if (IDsicsi->IDattempted && IDsicsi->IDquality == 7) {
581  // Point to identify in Si-CsI matrix is above the last line in the grid
582  // Z given to identification result is Zmin = lastZ + 1
583  // if this is > Z from CsI identification, pileup in Si
584  if (IDsicsi->Z > Zref) fPileup = kTRUE;
585  }
586  PART.SetParameter("Coherent", fCoherent);
587  PART.SetParameter("Pileup", fPileup);
588  return kTRUE;
589  }
590  PART.SetParameter("Coherent", fCoherent);
591  PART.SetParameter("Pileup", fPileup);
592  return kFALSE;
593 }
594 
595 
596 
606 
608 {
609  // calculate fESi from fECsI
610  // returns kTRUE if OK
611  //
612  // this sets directly the value of fESi
613  //
614  // if result is not good, bad calibration status is set for particle and we return false: in this case fESi=0
615  //
616  // if result is good, particle calibration status set to SOME_ENERGY_LOSSES_CALCULATED and fESi<0
617 
618  Double_t e0 = si->GetDeltaEFromERes(n->GetZ(), n->GetA(), TMath::Abs(fECsI));
620  fESi = si->GetCorrectedEnergy(n, e0);
621  if (fESi <= 0) {
622  // can't calculate fESi from CsI energy - bad
624  fESi = 0;
625  return kFALSE;
626  }
627  else {
628  // calculated energy: negative
629  fESi = -TMath::Abs(fESi);
630  SetCalibrationStatus(*n, KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED);
631  }
632  return kTRUE;
633 }
634 
635 
636 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
double Double_t
const Bool_t kTRUE
virtual Bool_t IsType(const Char_t *typ) const
Definition: KVBase.h:178
const Char_t * GetType() const
Definition: KVBase.h:170
Base class for detector geometry description, interface to energy-loss calculations.
Definition: KVDetector.h:121
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Definition: KVDetector.h:405
Bool_t IsCalibrated() const
Definition: KVDetector.h:359
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:576
virtual Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres)
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Definition: KVDetector.cpp:949
const KVSeqCollection * GetIDTelescopes() const
KVIDTelescope * identifying_telescope
telescope which identified current particle
void SetCalibrationStatus(KVReconstructedNucleus &PART, UShort_t code)
KVIdentificationResult partID
identification to be applied to current particle
@ k_BelowPunchThrough
Definition: KVIDGChIoSi.h:76
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:88
Reconstruct data in rings 1-9 of INDRA.
Bool_t CalculateSiliconDEFromResidualEnergy(KVReconstructedNucleus *n, KVDetector *si)
void DoNeutronCalibration(KVReconstructedNucleus *PART)
Bool_t CoherencyChIoSiCsI(KVReconstructedNucleus &PART)
void DoCalibration(KVReconstructedNucleus *PART)
KVDetector * GetSi(KVReconstructedNucleus *n)
Bool_t CoherencySiCsI(KVReconstructedNucleus &PART)
void SetNoCalibrationStatus(KVReconstructedNucleus *n)
Bool_t CalculateChIoDEFromResidualEnergy(KVReconstructedNucleus *n, Double_t ERES)
double DoBeryllium8Calibration(KVReconstructedNucleus *n)
KVDetector * GetCsI(KVReconstructedNucleus *n)
void SetBadCalibrationStatus(KVReconstructedNucleus *n)
KVDetector * theChio
the ChIo of the group
Full result of one attempted particle identification.
Bool_t IDattempted
=kTRUE if identification was attempted
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
void SetComment(const Char_t *c)
Bool_t Aident
= kTRUE if A of particle established
Int_t deltaEpedestal
special code for handling particles which give no signal in deltaE
Int_t A
A of particle found (if Aident==kTRUE)
Int_t Z
Z of particle found (if Zident==kTRUE)
Int_t IDquality
specific quality code returned by identification procedure
Int_t IDcode
a general identification code for this type of identification
Bool_t Zident
=kTRUE if Z of particle established
Bool_t GetBoolValue(const Char_t *name) const
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Bool_t IsIsotope(Int_t Z, Int_t A) const
Definition: KVNucleus.h:336
KVNameValueList * GetParameters() const
Definition: KVParticle.h:735
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:739
void SetEnergy(Double_t e)
Definition: KVParticle.h:560
Nuclei reconstructed from data measured by a detector array ,.
virtual Int_t GetECode() const
KVIdentificationResult * GetIdentificationResult(Int_t i)
const KVReconNucTrajectory * GetReconstructionTrajectory() const
virtual Int_t GetIDCode() const
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
virtual TObject * FindObjectByType(const Char_t *) const
const Int_t n
Double_t Abs(Double_t d)