KaliVeda
Toolkit for HIC analysis
KVINDRAFilterEtalonGroupReconstructor.cpp
1 #include "KVINDRAFilterEtalonGroupReconstructor.h"
2 
3 
11 
14 {
15  // Analysis of etalon group is carried out in order to identify:
16  // * the CSI behind each etalon telescope
17  // * the long ('etalon') trajectory for each CSI (CSI/SILI/SI75/CI/)
18  // * the short ('not_etalon') trajectory (CSI/CI)
19  // * the SILI detector on each etalon trajectory
20  //
21  TIter it_traj(GetGroup()->GetTrajectories());
22  KVGeoDNTrajectory* traj;
23  // first find trajectory with etalons + csi behind etalons
24  while ((traj = (KVGeoDNTrajectory*)it_traj())) {
25  traj->IterateFrom();
26  auto det = traj->GetNextNode()->GetDetector();
27  auto ring_number = dynamic_cast<KVINDRADetector*>(det)->GetRingNumber();
28  if (traj->Contains(Form("SILI_%d", ring_number))) {
29  etalons[ring_number].etalon_trajectory = traj;
30  etalons[ring_number].csi_etalon = det->GetNode();
31  etalon_csi_rings[det->GetNode()] = ring_number;
32  etalons[ring_number].sili = traj->GetNode(Form("SILI_%d", ring_number))->GetDetector();
33  }
34  }
35  it_traj.Reset();
36  while ((traj = (KVGeoDNTrajectory*)it_traj())) {
37  for (auto& etal : etalons) {
38  auto& etalel = etal.second;
39  if (traj != etalel.etalon_trajectory) {
40  if (traj->BeginsAt(etalel.csi_etalon)) {
41  etalel.not_etalon_trajectory = traj;
42  }
43  }
44  }
45  }
46  // now reiterate over trajectories, put all except the etalon trajectories in temporary list
47  TList trajectories;
48  it_traj.Reset();
49  while ((traj = (KVGeoDNTrajectory*)it_traj())) {
50  bool not_an_etalon = true;
51  for (auto& etal : etalons) {
52  if (traj == etal.second.etalon_trajectory || traj == etal.second.not_etalon_trajectory) {
53  not_an_etalon = false;
54  }
55  }
56  if (not_an_etalon) trajectories.Add(traj);
57  }
58  // finally add etalon trajectories to list & to map
59  for (auto& etal : etalons) {
60  trajectories.Add(etal.second.etalon_trajectory);
61  trajectories.Add(etal.second.not_etalon_trajectory);
62  }
63  // now replace group's list of trajectories with this one
64  GetGroup()->ReplaceTrajectories(&trajectories);
65 }
66 
67 
69 
70 
71 
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
char * Form(const char *fmt,...)
Path taken by particles through multidetector geometry.
KVGeoDetectorNode * GetNextNode() const
Bool_t Contains(const Char_t *name) const
void IterateFrom(const KVGeoDetectorNode *node0=nullptr) const
Bool_t BeginsAt(const Char_t *node_name) const
KVGeoDetectorNode * GetNode(const Char_t *name) const
KVDetector * GetDetector() const
KVGroup * GetGroup() const
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
void ReplaceTrajectories(const TCollection *c)
Definition: KVGroup.h:80
Base class for detectors of INDRA array.
Special reconstructor for filtered simulations and INDRA etalon groups.
std::map< const KVGeoDetectorNode *, int > etalon_csi_rings
Reconstruct simulated events after filtering with INDRA.
void Reset()
void Add(TObject *obj) override
ClassImp(TPyArg)