KaliVeda
Toolkit for HIC analysis
KVINDRAFilterGroupReconstructor.cpp
1 #include "KVINDRAFilterGroupReconstructor.h"
2 #include "KVINDRA.h"
3 
4 #include <KVIDGCsI.h>
5 
7 
8 
9 
12 void KVINDRAFilterGroupReconstructor::identify_particle(KVIDTelescope* idt, KVIdentificationResult* IDR, KVReconstructedNucleus& nuc)
13 {
14  // Treat special case of code 5 in CI-SI/SI75/CSI identifications
15 
16  KVFilterGroupReconstructor::identify_particle(idt, IDR, nuc);
17  if (!IDR->IDOK && (IDR->IsType("CI_SI") || IDR->IsType("CI_CSI") || IDR->IsType("CI_SI75"))
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();
41  try {
43  dynamic_cast<KVGeoDNTrajectory*>(theChIo->GetNode()->GetTrajectories()->First()),
44  theChIo->GetNode());
45  } catch (const std::exception& e) {
46  KVError::Warning(this, "Reconstruct", "Caught exception: %s", e.what());
47  return;
48  }
50  PostReconstructionProcessing();
51  }
52  }
53 }
54 
55 
56 
63 
65 {
66  //UNIDENTIFIED PARTICLES
67  //Unidentified particles receive the general ID code for non-identified particles (kIDCode14)
68  //EXCEPT if their CsI identification was attempted but they are too heavy (Z>5) for CsI identification
69  //(Zmin) then they are relabelled "Identified" with IDcode = 9 (ident. incomplete dans CsI ou Phoswich (Z.min))
70  //Their "identifying" telescope is set to the CsI ID telescope
71 
73 
74  if (!PART.IsIdentified()) {
75  /*** general ID code for non-identified particles ***/
76  PART.SetIDCode(KVINDRA::IDCodes::NO_IDENTIFICATION);
77  auto csirl = id_by_type.find(gIndra->GetCsIIDType().Data());
78  if (csirl != id_by_type.end()) {
79  if (csirl->second->IDattempted) {
81  if (!idt->CanIdentify(PART.GetParameters()->GetIntValue("SIM:Z"), PART.GetParameters()->GetIntValue("SIM:A"))) {
82  PART.SetIsIdentified();
83  csirl->second->IDcode = KVINDRA::IDCodes::ID_CSI_FRAGMENT;
84  partID = *(csirl->second);
85  identifying_telescope = idt;
86  PART.SetIdentification(&partID, identifying_telescope);
88  KVGeoDetectorNode* node;
89  while ((node = PART.GetReconstructionTrajectory()->GetNextNode())) {
90  --number_unidentified[node->GetName()];
91  }
92  }
93  }
94  }
95  }
96 }
97 
98 
#define e(i)
virtual Bool_t IsType(const Char_t *typ) const
Definition: KVBase.h:185
virtual Bool_t Fired(Option_t *opt="any") const
Definition: KVDetector.h:461
KVGeoDetectorNode * GetNode()
Definition: KVDetector.h:354
void IdentifyParticle(KVReconstructedNucleus &PART) override
void ReconstructParticle(KVReconstructedNucleus *part, const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node) override
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 KVSeqCollection * GetTrajectories() const
const Char_t * GetName() const override
Name of node is same as name of associated detector.
KVReconstructedEvent * GetEventFragment() const
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:85
virtual Bool_t CanIdentify(Int_t Z, Int_t)
Reconstruct simulated events after filtering with INDRA.
void IdentifyParticle(KVReconstructedNucleus &) override
Int_t GetIDCodeForParticlesStoppingInFirstStageOfTelescopes() const override
Definition: KVINDRA.h:202
TString GetCsIIDType() const
Definition: KVINDRA.cpp:775
Full result of one attempted particle identification.
Bool_t IDOK
general quality of identification, =kTRUE if acceptable identification made
Bool_t Aident
= kTRUE if A of particle established
Int_t IDcode
a general identification code for this type of identification
Bool_t Zident
=kTRUE if Z of particle established
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 *)
TObject * First() const override
virtual TObject * FindObjectByType(const Char_t *) const
Particle * AddParticle()
const char * Data() const
void Warning(UserClass p, const char *location, const char *va_(fmt),...)
Definition: KVError.h:125
ClassImp(TPyArg)