4 #include "KVINDRAForwardGroupReconstructor.h"
5 #include "KVINDRACodeMask.h"
6 #include "KVIDGChIoSi.h"
10 #include <KVSilicon.h>
23 if (PART.GetStoppingDetector()->IsType(
"CSI")) {
26 ok = CoherencySiCsI(PART);
32 PART.SetParameter(
"UseFullChIoEnergyForCalib", CoherencyChIoSiCsI(PART));
37 ok = PART.IsIdentified() && identifying_telescope;
39 PART.SetParameter(
"UseFullChIoEnergyForCalib", !(theChio->GetNHits() > 1));
128 if (PART->
GetIDCode() == KVINDRA::IDCodes::ID_NEUTRON) {
135 auto si =
GetSi(PART);
138 stopped_in_silicon =
kFALSE;
139 if (csi->IsCalibrated() && csi->GetDetectorSignalValue(
"TotLight") > 0) {
145 fECsI = csi->GetCorrectedEnergy(PART, -1.,
kFALSE);
147 else if ((PART->
GetIDCode()!=KVINDRA::IDCodes::ID_GAMMA) && si && !fPileup && fCoherent && si->IsCalibrated()) {
149 fESi = si->GetCorrectedEnergy(PART);
157 auto de_max = csi->GetMaxDeltaE(PART->
GetZ(), PART->
GetA());
168 if (
fECsI <= 0 && (PART->
GetECode() != KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED)) {
173 if (si && (PART->
GetIDCode()!=KVINDRA::IDCodes::ID_GAMMA)) {
180 if (PART->
GetIDCode() == KVINDRA::IDCodes::ID_STOPPED_IN_FIRST_STAGE && stopped_in_silicon) {
183 if (si->IsCalibrated())
190 if (!fPileup && fCoherent && si->IsCalibrated()) {
193 if (stopped_in_silicon) {
199 fESi = si->GetCorrectedEnergy(PART, -1., si_transmission);
274 if (csi && csi->IsCalibrated()) {
275 fECsI = csi->GetCorrectedEnergy(&tmp, -1.,
kFALSE);
369 bool fCoherent =
kTRUE;
378 for(
int i_id=2; i_id<=nid; ++i_id)
381 if(next_idr && next_idr->IDattempted && next_idr->IDOK)
386 if(next_idt->HasDetector(the_CsI))
399 auto new_stop_det = next_idt->GetDetector(next_idt->GetSize());
400 auto traj = (
KVGeoDNTrajectory*)new_stop_det->GetNode()->GetTrajectories()->First();
435 for(
int i_id=2; i_id<=nid; ++i_id)
438 if(next_idr && next_idr->IDattempted && next_idr->IDOK)
443 if(next_idt->HasDetector(the_CsI))
453 PART.
SetParameter(
"Bad gamma id",
Form(
"switched to %s id: Z=%d A=%d",next_idr->GetIDType(),next_idr->Z,next_idr->A));
461 auto new_stop_det = next_idt->GetDetector(next_idt->GetSize());
464 &PART, new_stop_det->GetNode(), (
KVGeoDNTrajectory*)the_CsI->GetNode()->GetTrajectories()->First(), next_idt, i_id, nid
470 PART.
SetParameter(
"Gamma pileup",
Form(
"added new particle identified in %s", next_idt->GetName()));
482 if ((IDcsi->
Z == 1 || IDcsi->
Z == 2) && IDsicsi->
IDattempted) {
530 if (IDcsi->
Z == 4 && IDcsi->
A == 8) {
534 if (IDsicsi->
Z < 2 || (IDsicsi->
Z == 2 && IDsicsi->
A < 7)) {
536 IDsicsi->
SetComment(
"CsI-R/L & Si-CsI identifications not coherent");
541 else if (IDsicsi->
Z == 2 && IDsicsi->
A > 6 && IDsicsi->
A < 10) {
549 else if ((IDsicsi->
Z == 2 && IDsicsi->
A > 9) || (IDsicsi->
Z == 3 && IDsicsi->
A < 6)) {
551 IDsicsi->
SetComment(
"CsI-R/L & Si-CsI identifications not coherent");
556 else if (IDsicsi->
Z == 3 && IDsicsi->
A > 5 && IDsicsi->
A < 9) {
562 else if ((IDsicsi->
Z == 3 && IDsicsi->
A > 8) || IDsicsi->
Z > 3) {
564 IDsicsi->
SetComment(
"Second particle stopping in Si, identification ChIo-Si required");
571 if ((IDsicsi->
Z == Zref) && (IDsicsi->
A == (Aref + 1))
580 if ((IDsicsi->
Z == Zref) && (IDsicsi->
A == (Aref - 1))
589 if((IDsicsi->
Z == Zref) && (IDsicsi->
A < Aref)
599 if (IDsicsi->
Z == Zref &&
TMath::Abs(IDsicsi->
A - Aref) < 2) {
604 else if (IDsicsi->
Z < Zref || (IDsicsi->
Z == Zref && IDsicsi->
A < (Aref - 1))) {
606 IDsicsi->
SetComment(
"CsI-R/L & Si-CsI identifications not coherent");
611 else if (IDsicsi->
Z > Zref || (IDsicsi->
Z == Zref && IDsicsi->
A > (Aref + 1))) {
613 IDsicsi->
SetComment(
"Second particle stopping in Si");
620 if (IDcsi->
Z == 4 && IDcsi->
A == 8) {
624 if (IDsicsi->
Z < 3) {
626 IDsicsi->
SetComment(
"CsI-R/L & Si-CsI identifications not coherent");
631 else if (IDsicsi->
Z == 3) {
638 IDsicsi->
SetComment(
"Second particle stopping in Si, identification ChIo-Si required");
645 if (IDsicsi->
Z == Zref) {
650 else if (IDsicsi->
Z < Zref) {
652 IDsicsi->
SetComment(
"CsI-R/L & Si-CsI identifications not coherent");
660 IDsicsi->
SetComment(
"Second particle stopping in Si, identification ChIo-Si required");
667 else if (IDsi && IDsi->
IDOK)
676 &PART, new_stop_det->GetNode(), (
KVGeoDNTrajectory*)the_CsI->GetNode()->GetTrajectories()->First(),
693 if (IDsicsi->
Z < Zref) fCoherent =
kFALSE;
694 else fPileup =
kTRUE;
701 if (IDsicsi->
Z > Zref) fPileup =
kTRUE;
char * Form(const char *fmt,...)
virtual const Char_t * GetType() const
virtual Bool_t IsType(const Char_t *typ) const
Base class for detector geometry description, interface to energy-loss calculations.
Int_t GetNHits() const
Return the number of particles hitting this detector in an event.
Bool_t IsCalibrated() const
virtual void SetEResAfterDetector(Double_t e)
Double_t GetDeltaEFromERes(Int_t Z, Int_t A, Double_t Eres) override
virtual Double_t GetCorrectedEnergy(KVNucleus *, Double_t e=-1., Bool_t transmission=kTRUE)
Path taken by particles through multidetector geometry.
const KVSeqCollection * GetIDTelescopes() const
KVIDTelescope * identifying_telescope
telescope which identified current particle
KVGroup * GetGroup() const
void SetCalibrationStatus(KVReconstructedNucleus &PART, UShort_t code)
KVIdentificationResult partID
identification to be applied to current particle
std::vector< particle_to_add_from_coherency_analysis > coherency_particles
const KVGeoDNTrajectory * GetTrajectoryForReconstruction(const KVGeoDNTrajectory *t, const KVGeoDetectorNode *n) const
Base class for all detectors or associations of detectors in array which can identify charged particl...
KVDetector * GetDetector(UInt_t n) const
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) override
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
@ WARNING_CSI_MAX_ENERGY
particle calibration OK, although apparent energy would mean punching through the CsI
@ SOME_ENERGY_LOSSES_CALCULATED
particle calibration OK, with some detector energies calculated
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
const Char_t * GetIDType() const
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.
Bool_t IsIsotope(Int_t Z, Int_t A) const
Int_t GetZ() const
Return the number of proton / atomic number.
KVNameValueList * GetParameters() const
void SetParameter(const Char_t *name, ValType value) const
void SetEnergy(Double_t e)
Path through detector array used to reconstruct detected particle.
Nuclei reconstructed from data measured by a detector array .
virtual Int_t GetECode() const
Int_t GetNumberOfIdentificationResults() const
KVIdentificationResult * GetIdentificationResult(Int_t i)
const KVReconNucTrajectory * GetReconstructionTrajectory() const
Bool_t IsIdentified() const
virtual Int_t GetIDCode() const
KVDetector * GetStoppingDetector() const
void SetDetector(int i, KVDetector *);
void ModifyReconstructionTrajectory(const KVReconNucTrajectory *t)
virtual TObject * FindObjectByType(const Char_t *) const
const char * GetName() const override