4 #include "KVINDRAGroupReconstructor.h"
5 #include "KVCalibratedSignal.h"
7 #include <KVIDINDRACsI.h>
8 #include <KVINDRADetector.h>
22 if (!rnuc.IsIdentified()) rnuc.SetIDCode(KVINDRA::IDCodes::NO_IDENTIFICATION);
94 partID.
IDcode = KVINDRA::IDCodes::ID_CSI_MASS_OUT_OF_RANGE;
115 PART.
SetIDCode(KVINDRA::IDCodes::NO_IDENTIFICATION);
135 idr->
IDcode = KVINDRA::IDCodes::ID_CSI_PSA;
139 idr->
SetComment(
Form(
"Z=%d identified without mass discrimination (due to CsI crystal defects)", z));
146 idr->
IDcode = KVINDRA::IDCodes::ID_CSI_FRAGMENT;
153 idr->
IDcode = KVINDRA::IDCodes::ID_CSI_MASS_OUT_OF_RANGE;
190 n->SetECode(KVINDRA::ECodes::SOME_ENERGY_LOSSES_CALCULATED);
224 if (PART->
GetIDCode() != KVINDRA::IDCodes::ID_CSI_FRAGMENT && PART->
GetIDCode() != KVINDRA::IDCodes::ID_CSI_MASS_OUT_OF_RANGE) {
266 auto input_signal = ((
KVCalibratedSignal*)csi->GetDetectorSignal(
"Energy"))->GetInputSignal();
267 Double_t half_light = input_signal->GetValue(
Form(
"Z=%d,A=%d",
n->GetZ(),
n->GetA())) * 0.5;
269 double ecsi = 2.*csi->GetCorrectedEnergy(&tmp, half_light,
kFALSE);
296 if (
n->GetIDCode() == KVINDRA::IDCodes::ID_CSI_PSA && !
n->IsAMeasured()) {
328 rnuc->SetReconstructionTrajectory(Rtraj);
329 rnuc->SetParameter(
"ARRAY",
"INDRA");
330 rnuc->SetParameter(
"COHERENCY",
331 "Particle added to event after consistency checks between identifications and calibrations of other nuclei");
336 if(part.original_particle->GetParameters()->HasParameter(
"Ion pileup"))
341 while( (
N = Rtraj->GetNextNode() ))
343 auto d =
N->GetDetector();
344 if(!
d->IsCalibrated())
352 Rtraj->IterateFrom();
353 while( (
N = Rtraj->GetNextNode() ))
355 auto d =
N->GetDetector();
357 if(part.original_particle->GetParameters()->HasParameter(eparam))
359 auto de =
TMath::Abs(part.original_particle->GetParameters()->GetDoubleValue(eparam));
362 if(cal->GetParentSignal() &&
de < e_orig)
365 part.original_particle->SetParameter(
Form(
"%s.%s",
d->GetType(),cal->GetParentSignal()->GetType()), cal->GetParentSignal()->GetValue());
366 ok = cal->SetRawValueFromCalibrated(e_orig -
de);
383 for (
int i = part.first_id_result_to_copy; i <= part.max_id_result_index; ++i) {
384 auto IDR = rnuc->GetIdentificationResult(idnumber++);
386 part.original_particle->GetIdentificationResult(i)->Copy(*IDR);
388 rnuc->SetIsIdentified();
389 rnuc->SetIdentification(rnuc->GetIdentificationResult(1), part.identifying_telescope);
390 rnuc->SetParameter(
"Pileup",
false);
391 rnuc->SetParameter(
"Coherent",
true);
char * Form(const char *fmt,...)
virtual Bool_t IsType(const Char_t *typ) const
Output signal from detector obtained by calibration.
Double_t GetValue(const KVNameValueList ¶ms="") const override
Base class for detector geometry description, interface to energy-loss calculations.
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList ¶ms="") const
virtual void SetEResAfterDetector(Double_t e)
Double_t GetMaxDeltaE(Int_t Z, Int_t A) override
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)
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
const KVSeqCollection * GetIDTelescopes() const
Information on relative positions of detectors & particle trajectories.
KVIDTelescope * identifying_telescope
telescope which identified current particle
KVGroup * GetGroup() const
std::unordered_map< std::string, KVIdentificationResult * > id_by_type
identification results by type for current particle
KVReconstructedEvent * GetEventFragment() const
Double_t GetTargetEnergyLossCorrection(KVReconstructedNucleus *ion)
void SetCalibrationStatus(KVReconstructedNucleus &PART, UShort_t code)
virtual void IdentifyParticle(KVReconstructedNucleus &)
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...
Reconstruct particles in INDRA groups.
void SetNoCalibrationStatus(KVReconstructedNucleus *n)
void CalibrateParticle(KVReconstructedNucleus *PART) override
void IdentifyParticle(KVReconstructedNucleus &PART) override
Bool_t CalculateChIoDEFromResidualEnergy(KVReconstructedNucleus *n, Double_t ERES)
double DoBeryllium8Calibration(KVReconstructedNucleus *n)
static TString CSI_ID_TYPE
virtual bool DoCoherencyAnalysis(KVReconstructedNucleus &)=0
void CheckCsIEnergy(KVReconstructedNucleus *n)
KVDetector * GetCsI(KVReconstructedNucleus *n)
void CalibrateCoherencyParticle(KVReconstructedNucleus *) override
virtual void DoCalibration(KVReconstructedNucleus *)
void SetBadCalibrationStatus(KVReconstructedNucleus *n)
void AddCoherencyParticles() override
KVDetector * theChio
the ChIo of the group
Full result of one attempted particle identification.
Bool_t IDattempted
=kTRUE if identification was attempted
void SetComment(const Char_t *c)
Bool_t IdentifyingGridHasFlagWhichBegins(TString flag_beginning)
Bool_t Aident
= kTRUE if A of particle established
TString IdentifyingGridGetFlagWhichBegins(TString flag_beginning)
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
Description of properties and kinematics of atomic nuclei.
Int_t GetZ() const
Return the number of proton / atomic number.
Double_t GetEnergy() 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 void SetIDCode(UShort_t s)
const KVReconNucTrajectory * GetReconstructionTrajectory() const
void SetIdentification(KVIdentificationResult *, KVIDTelescope *)
Bool_t IsIdentified() const
virtual Int_t GetIDCode() const
virtual void SetTargetEnergyLoss(Double_t e)
virtual void GetAnglesFromReconstructionTrajectory(Option_t *opt="random")
virtual TObject * FindObjectByType(const Char_t *) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Wrapper class for iterating over nuclei in KVReconstructedEvent accessed through base pointer or refe...
const char * Data() const