4#include "KVDetectionSimulator.h"
5#include "KVGeoNavigator.h"
16 KVBase(Form("DetectionSimulator_%s", a->GetName()),
17 Form("Simulate detection of particles or events in detector array %s", a->GetTitle())),
18 fArray(a), fCalcTargELoss(kTRUE)
111 if (part.GetZ() == 0) {
112 det_stat.
SetValue(
"UNDETECTED",
"NEUTRON");
114 part.AddGroup(
"UNDETECTED");
115 part.AddGroup(
"NEUTRON");
118 det_stat.
SetValue(
"UNDETECTED",
"NO ENERGY");
120 part.AddGroup(
"UNDETECTED");
121 part.AddGroup(
"NO ENERGY");
130 eLostInTarget = ebef - _part->
GetKE();
132 det_stat.
SetValue(
"UNDETECTED",
"STOPPED IN TARGET");
134 part.AddGroup(
"UNDETECTED");
135 part.AddGroup(
"STOPPED IN TARGET");
146 det_stat.
SetValue(
"UNDETECTED",
"DEAD ZONE");
148 part.AddGroup(
"UNDETECTED");
149 part.AddGroup(
"DEAD ZONE");
153 part.AddGroup(
"DETECTED");
162 if (part.GetE() <
GetMinKECutOff() || part.GetParameters()->HasParameter(
"DEADZONE")) {
163 part.SetParameter(
"STOPPING DETECTOR", LastDet.
Data());
164 det_stat.
SetValue(
"DETECTED",
"OK");
167 det_stat.
SetValue(
"DETECTED",
"PUNCHED THROUGH");
233 Error(
"DetectParticle",
234 "Cannot find detector %s corresponding to particle energy loss %s",
276 Error(
"DetectParticleIn",
"Detector %s not found", detname);
Class for iterating over nuclei in events accessed through base pointer/reference.
Base class for KaliVeda framework.
Simulate detection of particles or events in a detector array.
KVTarget * GetTarget() const
void DetectEvent(KVEvent *event, const Char_t *detection_frame="")
Double_t GetMinKECutOff() const
KVMultiDetArray * GetArray() const
KVNameValueList DetectParticleIn(const Char_t *detname, KVNucleus *kvp)
Bool_t IncludeTargetEnergyLoss() const
KVNameValueList DetectParticle(KVNucleus *)
KVDetectorEvent fHitGroups
used to reset hit detectors in between events
KVMultiDetArray * fArray
array used for detection
void AddGroup(KVGroup *grp)
Base class for detector geometry description.
KVGroup * GetGroup() const
TVector3 GetRandomDirection(Option_t *t="isotropic")
Abstract base class container for multi-particle events.
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
Base class for describing the geometry of a detector array.
KVGeoNavigator * GetNavigator() const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Double_t GetDoubleValue(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
const Char_t * GetStringValue(const Char_t *name) const
KVHashList * GetList() const
A generic named parameter storing values of different types.
Double_t GetDouble() const
Description of properties and kinematics of atomic nuclei.
TVector3 GetMomentum() const
Double_t GetEnergy() const
void SetMomentum(const TVector3 *v)
KVNameValueList * GetParameters() const
KVParticle const * GetFrame(const Char_t *frame, Bool_t warn_and_return_null_if_unknown=kTRUE) const
Propagate particles through array geometry calculating energy losses.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
void SetOutgoing(Bool_t r=kTRUE)
const char * GetName() const override
virtual void Clear(Option_t *="")
virtual void Error(const char *method, const char *msgfmt,...) const
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const