KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVINDRABackwardGroupReconstructor.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Tue Feb 27 11:35:25 2018
2 //Author: John Frankland,,,
3 
5 
7 
8 
9 
13 {
14  // Coherency analysis for backward rings 10-17 of INDRA
15 
16  PART.SetParameter("UseFullChIoEnergyForCalib", !(theChio && theChio->GetNHits() > 1));
17  bool ok = false;
18  if (PART.GetStoppingDetector()->IsType("CSI")) {
19  // particles stopping in CsI detectors
20  // check coherency of CsI-R/L and Si-CsI identifications
21  ok = CoherencyChIoCsI(PART);
22  }
23  else {
24  // particle stopped in ChIo (=> Zmin)
25  ok = PART.IsIdentified() && identifying_telescope;
26  }
27 
28  return ok;
29 }
30 
31 
32 
47 
49 {
50  // Special calibration for particles in rings 10 to 17
51  // We set the energy calibration code for the particle here
52  // kECode0 = no calibration (e.g. gammas)
53  // kECode1 = everything OK
54  // kECode2 = small warning, for example if energy loss in a detector is calculated
55  // kECode15 = bad, calibration is no good
56  // The contributions from ChIo & CsI are stored in particle parameters
57  // INDRA.ECHIO and INDRA.ECSI
58  // If the contribution is calculated rather than measured, it is stored as a negative value
59 
60  // change fUseFullChioenergyforcalib for "coherency" particles
61  // we assume they are calibrated after all other particles in group have
62  // been identified, calibrated, and their energy contributions removed
63  // from the ChIo
64  if (PART->GetIDCode() == KVINDRA::IDCodes::ID_CI_SI_COHERENCY
65  || PART->GetIDCode() == KVINDRA::IDCodes::ID_CI_COHERENCY
66  || PART->GetIDCode() == KVINDRA::IDCodes::ID_CI_MULTIHIT)
67  PART->SetParameter("UseFullChIoEnergyForCalib", kTRUE);
68 
69  Bool_t stopped_in_chio = kTRUE;
70  auto csi = GetCsI(PART);
71  if (csi) {
72  stopped_in_chio = kFALSE;
73  if (csi->IsCalibrated() && csi->GetDetectorSignalValue("TotLight") > 0) {
74  /* CSI ENERGY CALIBRATION */
75  if (PART->GetIDCode() == KVINDRA::IDCodes::ID_CSI_PSA && PART->IsIsotope(4, 8)) {
77  }
78  else
79  fECsI = csi->GetCorrectedEnergy(PART, -1., kFALSE);
80  }
81  else {
83  return;
84  }
85  if (fECsI <= 0 && (PART->GetECode() != KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED)) { // DoBeryllium8Calibration returns fECsI<0 with ECode=SOME_ENERGY_LOSSES_CALCULATED if OK
86  SetBadCalibrationStatus(PART);// problem with CsI energy - no calibration
87  return;
88  }
89  }
90 
91  if (theChio) {
92  /* IONISATION CHAMBER ENERGY CONTRIBUTION */
93  // if fUseFullChIoEnergyForCalib = kFALSE, ChIo was hit by other particles in group
94  // therefore we have to estimate the ChIo energy for this particle using the CsI energy
95  // if fPileupChIo = kTRUE, there appears to be another particle stopped in the ChIo
96  // therefore we have to estimate the ChIo energy for this particle using the CsI energy
97  Double_t ERES = TMath::Abs(fECsI);
98  if (!PART->GetParameters()->GetBoolValue("PileupChIo") &&
99  PART->GetParameters()->GetBoolValue("UseFullChIoEnergyForCalib")
100  && theChio->IsCalibrated()) {
101  // all is apparently well
102  Bool_t ci_transmission = kTRUE;
103  if (stopped_in_chio) {
104  ci_transmission = kFALSE;
105  }
106  else {
108  }
109  fEChIo = theChio->GetCorrectedEnergy(PART, -1., ci_transmission);
110  if (fEChIo <= 0) {
111  if (!stopped_in_chio && ERES > 0) {
112  if (!CalculateChIoDEFromResidualEnergy(PART, ERES)) return;
113  }
114  }
115  }
116  else {
117  if (!stopped_in_chio && ERES > 0) {
118  if (!CalculateChIoDEFromResidualEnergy(PART, ERES)) return;
119  }
120  else {
121  // particle stopped in ChIo, no calibration available
123  return;
124  }
125  }
126  }
127 
129 }
130 
131 
132 
141 
143 {
144  // Called by Identify() for particles stopping in CsI detectors on rings 10-17,
145  // which have a ChIo detector just in front of them.
146  //
147  // fPileupChIo = kTRUE if ChIo-CsI identification gives Z >> CsI-R/L identification
148  // this means that the particle identified in CsI-R/L is correct,
149  // and there is probably a second particle which stopped in the ChIo
150  // detector at the same time (will be added as a Zmin/code5)
151 
156 
157  PART.SetParameter("PileupChIo", kFALSE);
158 
159  // Unsuccessful/no CsI id attempt with successful ChIo-CsI id ?
160  // Then use ChIo-CsI identification result
161  if (IDcsi && !IDcsi->IDOK) {
162  if (IDcicsi && IDcicsi->IDOK) {
163  partID = *IDcicsi;
164  identifying_telescope = idt_cicsi;
165  return kTRUE;
166  }
167  }
168 
169  // check coherency of CsI-R/L and ChIo-CsI identifications
170  if (IDcsi && IDcsi->IDOK) {
171 
172  // We check the coherency of the identifications
173  // Because ChIo-Csi identification is not of very high quality (compared to CsI R-L),
174  // we only check that the Z given by ChIo-CsI is < Zref+1
175  // If not, we can suspect the presence of another particle in the ChIo
176 
177  if (IDcicsi && IDcicsi->IDOK) {
178  Int_t Zref = IDcsi->Z;
179  if (IDcicsi->Z > (Zref + 1) && PART.GetParameters()->GetBoolValue("UseFullChIoEnergyForCalib")) {
180  PART.SetParameter("PileupChIo", kTRUE);
181  IDcicsi->SetComment("Possible pile-up in ChIo");
182  }
183  }
184 
185  // in all other cases accept CsI identification
186  partID = *IDcsi;
187  identifying_telescope = idt_csi;
188  return kTRUE;
189  }
190  return kFALSE;
191 }
192 
193 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
const Bool_t kFALSE
bool Bool_t
double Double_t
const Bool_t kTRUE
virtual const Char_t * GetType() const
Definition: KVBase.h:176
Bool_t IsCalibrated() const
Definition: KVDetector.h:389
virtual void SetEResAfterDetector(Double_t e)
Definition: KVDetector.h:629
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Definition: KVDetector.cpp:810
const KVSeqCollection * GetIDTelescopes() const
KVIDTelescope * identifying_telescope
telescope which identified current particle
KVIdentificationResult partID
identification to be applied to current particle
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:83
Reconstruct data in rings 10-17 of INDRA.
Bool_t CoherencyChIoCsI(KVReconstructedNucleus &PART)
void DoCalibration(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 IDOK
general quality of identification, =kTRUE if acceptable identification made
void SetComment(const Char_t *c)
Int_t Z
Z of particle found (if Zident==kTRUE)
Bool_t GetBoolValue(const Char_t *name) const
Bool_t IsIsotope(Int_t Z, Int_t A) const
Definition: KVNucleus.h:333
KVNameValueList * GetParameters() const
Definition: KVParticle.h:816
void SetParameter(const Char_t *name, ValType value) const
Definition: KVParticle.h:820
void SetEnergy(Double_t e)
Definition: KVParticle.h:601
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
virtual TObject * FindObjectByType(const Char_t *) const
Double_t Abs(Double_t d)