KaliVeda
Toolkit for HIC analysis
KVDetectionSimulator.h
1 
4 #ifndef __KVDETECTIONSIMULATOR_H
5 #define __KVDETECTIONSIMULATOR_H
6 
7 #include "KVBase.h"
8 #include "KVMultiDetArray.h"
9 #include "KVNucleusEvent.h"
10 #include "KVDetectorEvent.h"
11 #include "KVTarget.h"
12 #include "KVRangeTableGeoNavigator.h"
13 
20 class KVDetectionSimulator : public KVBase {
21 
22  KVMultiDetArray* fArray = nullptr;
27 
29  {
30  return static_cast<KVRangeTableGeoNavigator*>(fArray->GetNavigator());
31  }
33 public:
35  KVDetectionSimulator(KVMultiDetArray* a, Double_t cut_off = 1.e-3);
36 
38  {
42  fGeoFilter = kTRUE;
43  }
44 
45  void SetArray(KVMultiDetArray* a, Double_t e_cut_off = 1.e-3)
46  {
47  fArray = a;
48  a->Clear();
49  a->SetSimMode(kTRUE);
52  if (GetTarget()) GetTarget()->SetOutgoing();
53  }
55  {
56  return fArray;
57  }
59  {
60  return fArray->GetTarget();
61  }
63  {
64  fCalcTargELoss = y;
65  }
67  {
68  return fCalcTargELoss;
69  }
71  {
73  }
74  void SetMinKECutOff(Double_t cutoff)
75  {
77  }
78 
79  void DetectEvent(KVEvent* event, const Char_t* detection_frame = "");
80 
82  {
84  fHitGroups.Clear();
85  }
86 
88  {
90 
91  return fDetectionFrame;
92  }
93 
94  ClassDef(KVDetectionSimulator, 0) //Simulate detection of particles or events in a detector array
95 };
96 
97 #endif
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
#define ClassDef(name, id)
Base class for KaliVeda framework.
Definition: KVBase.h:139
Simulate detection of events in a detector array.
void SetArray(KVMultiDetArray *a, Double_t e_cut_off=1.e-3)
KVMultiDetArray * GetArray() const
void SetIncludeTargetEnergyLoss(Bool_t y=kTRUE)
KVTarget * GetTarget() const
void DetectEvent(KVEvent *event, const Char_t *detection_frame="")
void SetMinKECutOff(Double_t cutoff)
Double_t GetMinKECutOff() const
KVNameValueList PropagateParticle(KVNucleus *)
TString fDetectionFrame
when true, only consider geometry, not particle energies
KVRangeTableGeoNavigator * get_array_navigator() const
name of kinematical frame used in last call to DetectEvent()
Bool_t IncludeTargetEnergyLoss() const
KVDetectorEvent fHitGroups
array used for detection
KVMultiDetArray * fArray
TString GetDetectionFrame() const
Bool_t fGeoFilter
whether to include energy loss in target, if defined
List of hit groups in a multidetector array.
void Clear(Option_t *opt="") override
Abstract base class container for multi-particle events.
Definition: KVEvent.h:67
Base class for describing the geometry of a detector array.
KVTarget * GetTarget()
KVGeoNavigator * GetNavigator() const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Propagate particles through array geometry calculating energy losses.
Double_t GetCutOffKEForPropagation() const
void SetCutOffKEForPropagation(Double_t e)
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:128
void SetOutgoing(Bool_t r=kTRUE)
Definition: KVTarget.h:239
virtual void Clear(Option_t *="")
Double_t y[n]
TArc a