KaliVeda
Toolkit for HIC analysis
KVINDRAFilterGroupReconstructor.cpp
1 #include "KVINDRAFilterGroupReconstructor.h"
2 #include "KVINDRA.h"
3 
4 #include <KVIDGCsI.h>
5 
7 
8 
9 
13 {
14  // Treat special case of code 5 in CI-SI/SI75/CSI identifications
15 
17  if (!IDR->IDOK && (IDR->IsType("CI_SI") || IDR->IsType("CI_CSI") || IDR->IsType("CI_SI75"))
18  && IDR->IDcode == gIndra->GetIDCodeForParticlesStoppingInFirstStageOfTelescopes()) {
19  IDR->IDOK = true;
20  IDR->Zident = false;
21  IDR->Aident = false;
22  }
23 }
24 
25 
26 
30 
32 {
33  // If after reconstruction no particles are created in the group, we check if the CI (if present)
34  // fired and if so add a particle stopped in the CI.
35 
37 
38  if (GetEventFragment()->GetMult() == 0) {
39  if (theChIo && theChIo->Fired(GetPartSeedCond())) {
40  auto kvdp = GetEventFragment()->AddParticle();
42  dynamic_cast<KVGeoDNTrajectory*>(theChIo->GetNode()->GetTrajectories()->First()),
43  theChIo->GetNode());
46  }
47  }
48 }
49 
50 
51 
58 
60 {
61  //UNIDENTIFIED PARTICLES
62  //Unidentified particles receive the general ID code for non-identified particles (kIDCode14)
63  //EXCEPT if their CsI identification was attempted but they are too heavy (Z>5) for CsI identification
64  //(Zmin) then they are relabelled "Identified" with IDcode = 9 (ident. incomplete dans CsI ou Phoswich (Z.min))
65  //Their "identifying" telescope is set to the CsI ID telescope
66 
68 
69  if (!PART.IsIdentified()) {
70  /*** general ID code for non-identified particles ***/
71  PART.SetIDCode(KVINDRA::IDCodes::NO_IDENTIFICATION);
72  auto csirl = id_by_type.find(gIndra->GetCsIIDType().Data());
73  if (csirl != id_by_type.end()) {
74  if (csirl->second->IDattempted) {
76  if (!idt->CanIdentify(PART.GetParameters()->GetIntValue("SIM:Z"), PART.GetParameters()->GetIntValue("SIM:A"))) {
77  PART.SetIsIdentified();
78  csirl->second->IDcode = KVINDRA::IDCodes::ID_CSI_FRAGMENT;
79  partID = *(csirl->second);
83  KVGeoDetectorNode* node;
84  while ((node = PART.GetReconstructionTrajectory()->GetNextNode())) {
85  --number_unidentified[node->GetName()];
86  }
87  }
88  }
89  }
90  }
91 }
92 
93 
void IdentifyParticle(KVReconstructedNucleus &PART) override
void ReconstructParticle(KVReconstructedNucleus *part, const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node) override
void identify_particle(KVIDTelescope *idt, KVIdentificationResult *IDR, KVReconstructedNucleus &nuc) override
std::unordered_map< std::string, int > number_unidentified
number of particles for which the energy contribution of detector has not yet been set
Path taken by particles through multidetector geometry.
KVGeoDetectorNode * GetNextNode() const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
const KVSeqCollection * GetIDTelescopes() const
Information on relative positions of detectors & particle trajectories.
const Char_t * GetName() const override
Name of node is same as name of associated detector.
KVIDTelescope * identifying_telescope
telescope which identified current particle
std::unordered_map< std::string, KVIdentificationResult * > id_by_type
identification results by type for current particle
KVReconstructedEvent * GetEventFragment() const
TString GetPartSeedCond() const
KVIdentificationResult partID
identification to be applied to current particle
virtual void PostReconstructionProcessing()
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:84
Reconstruct simulated events after filtering with INDRA.
void IdentifyParticle(KVReconstructedNucleus &) override
Int_t GetIDCodeForParticlesStoppingInFirstStageOfTelescopes() const override
Definition: KVINDRA.h:199
TString GetCsIIDType() const
Definition: KVINDRA.cpp:769
Full result of one attempted particle identification.
Int_t GetIntValue(const Char_t *name) const
KVNameValueList * GetParameters() const
Definition: KVParticle.h:818
Nuclei reconstructed from data measured by a detector array .
virtual void SetIDCode(UShort_t s)
const KVReconNucTrajectory * GetReconstructionTrajectory() const
void SetIdentification(KVIdentificationResult *, KVIDTelescope *)
virtual TObject * FindObjectByType(const Char_t *) const
Particle * AddParticle()
const char * Data() const
ClassImp(TPyArg)