KaliVeda
Toolkit for HIC analysis
KVFilterGroupReconstructor.h
1 #ifndef __KVFILTERGROUPRECONSTRUCTOR_H
2 #define __KVFILTERGROUPRECONSTRUCTOR_H
3 
4 #include "KVGroupReconstructor.h"
5 #include "KVDataQualityAudit.h"
6 #include <unordered_map>
21 
22  const KVDataQualityAudit* fDataQAudit = nullptr;
23 
24 protected:
25  std::unique_ptr<KVEvent> fSimEvent;
26  std::unordered_map<std::string, int> hits;
27  std::unordered_map<KVReconstructedNucleus*, TList> part_correspond;
29 
30  std::unordered_map<std::string, double> energy_loss;
31  std::unordered_map<std::string, int> number_uncalibrated;
32  std::unordered_map<std::string, int> number_unidentified;
35 
37 
38 public:
40 
42  {
44 
45  fSimEvent.reset(static_cast<KVEvent*>(e->IsA()->New()));
46  }
47  void AddSimParticle(const KVNucleus* n)
48  {
52 
53  KVNucleus* nuc;
54  n->Copy(*(nuc = fSimEvent->AddNucleus()));
55  auto traj = GetGroup()->FindReconTraj(n->GetParameters()->GetStringValue("TRAJECTORY"));
56  traj->IterateFrom();
57  while (auto node = traj->GetNextNode()) {
58  ++hits[node->GetName()];
59  ++number_unidentified[node->GetName()];
60  }
61  }
62  void Clear(Option_t* = "") override
63  {
65  fSimEvent->Clear();
66  hits.clear();
67  part_correspond.clear();
68  energy_loss.clear();
69  number_uncalibrated.clear();
70  number_unidentified.clear();
71  }
72  void ReconstructParticle(KVReconstructedNucleus* part, const KVGeoDNTrajectory* traj, const KVGeoDetectorNode* node) override;
73  void IdentifyParticle(KVReconstructedNucleus& PART) override;
74  void CalibrateParticle(KVReconstructedNucleus* PART) override;
75 
77  {
78  fDataQAudit = DQA;
79  }
80 
81  ClassDefOverride(KVFilterGroupReconstructor, 1) //Reconstruct simulated events after filtering
82 };
83 
84 #endif
#define e(i)
const char Option_t
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Audit of experimental data identification and calibrations.
Abstract base class container for multi-particle events.
Definition: KVEvent.h:67
Reconstruct particles in group of detectors after filtering simulated events.
KVReconstructedNucleus * current_nuc_recon
correspondence between reconstructed and simulated particles
std::unordered_map< std::string, int > hits
particles of simulated event detected in this group
void IdentifyParticle(KVReconstructedNucleus &PART) override
void PerformSecondaryAnalysis()
After first round of identification in group, try to identify remaining particles.
std::unique_ptr< KVEvent > fSimEvent
experimental data on identification thresholds & capabilities
void Clear(Option_t *="") override
std::unordered_map< std::string, double > energy_loss
temporary, store argument to ReconstructParticle
KVReconNucTrajectory * get_recon_traj_for_particle(const KVGeoDNTrajectory *, const KVGeoDetectorNode *node) override
number of particles hitting detector aas yet unidentified
void AddSimParticle(const KVNucleus *n)
std::unordered_map< KVReconstructedNucleus *, TList > part_correspond
count simulated particles in stopping detectors
void ReconstructParticle(KVReconstructedNucleus *part, const KVGeoDNTrajectory *traj, const KVGeoDetectorNode *node) override
std::unordered_map< std::string, int > number_uncalibrated
energy losses in detectors
const KVDataQualityAudit * fDataQAudit
KVFilterGroupReconstructor(const KVGroup *g=nullptr)
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
void SetDataQualityAudit(const KVDataQualityAudit *DQA)
void CalibrateParticle(KVReconstructedNucleus *PART) override
Path taken by particles through multidetector geometry.
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Information on relative positions of detectors & particle trajectories.
Base class for particle reconstruction in one group of a detector array.
KVGroup * GetGroup() const
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
const KVGeoDNTrajectory * FindReconTraj(const KVString &path)
Definition: KVGroup.h:92
Base class for all detectors or associations of detectors in array which can identify charged particl...
Definition: KVIDTelescope.h:84
Full result of one attempted particle identification.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Path through detector array used to reconstruct detected particle.
Nuclei reconstructed from data measured by a detector array .
const Int_t n