1#include "KVRangeTableGeoNavigator.h"
7#include <KVIonRangeTableMaterial.h>
49 if (
e <= fCutOffEnergy) {
53 AddPointToCurrentTrack(GetEntryPoint().
X(), GetEntryPoint().Y(), GetEntryPoint().Z());
54 AddPointToCurrentTrack(GetExitPoint().
X(), GetExitPoint().Y(), GetExitPoint().Z());
60 TGeoMaterial* material = GetCurrentVolume()->GetMaterial();
62 if ((irmat = fRangeTable->GetMaterial(material))) {
64 part->GetZ(), part->GetA(),
e, GetStepSize(), 0.,
68 if (
e <= fCutOffEnergy) {
73 part->SetIsDetected();
76 if (!part->GetPInitial()) part->SetE0();
79 KVDetector* theDet = GetDetectorFromPath(GetCurrentPath());
83 absorber_name.
Form(
"%s/%s", theDet->
GetName(), GetCurrentNode()->GetName());
84 if (strncmp(GetCurrentNode()->GetName(),
"ACTIVE", 6) == 0) active_layer =
kTRUE;
87 absorber_name = theDet->
GetName();
92 absorber_name = irmat->
GetName();
95 part->GetParameters()->SetValue(
Form(
"DE:%s", absorber_name.
Data()),
de);
106 if (StopPropagation()) {
110 TVector3 path = GetExitPoint() - GetEntryPoint();
111 TVector3 midVol = GetEntryPoint() + (
r / path.
Mag()) * path;
116 AddPointToCurrentTrack(GetEntryPoint().
X(), GetEntryPoint().Y(), GetEntryPoint().Z());
117 AddPointToCurrentTrack(midVol.
X(), midVol.
Y(), midVol.
Z());
125 AddPointToCurrentTrack(GetEntryPoint().
X(), GetEntryPoint().Y(), GetEntryPoint().Z());
126 AddPointToCurrentTrack(GetExitPoint().
X(), GetExitPoint().Y(), GetExitPoint().Z());
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Base class for detector geometry description.
virtual void SetEnergyLoss(Double_t e) const
virtual Double_t GetEnergyLoss() const
Bool_t IsSingleLayer() const
Bool_t IsTracking() const
const TVector3 & GetEntryPoint() const
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
Material for use in energy loss & range calculations.
virtual Double_t GetLinearDeltaEOfIon(Int_t Z, Int_t A, Double_t E, Double_t e, Double_t isoAmat=0., Double_t T=-1., Double_t P=-1.)
Double_t GetDensity() const
Double_t GetRangeOfLastDE() const
Bool_t HasParameter(const Char_t *name) const
Description of properties and kinematics of atomic nuclei.
const Char_t * GetSymbol(Option_t *opt="") const
Int_t GetN() const
Return the number of neutron.
Int_t GetZ() const
Return the number of proton / atomic number.
KVNameValueList * GetParameters() const
Propagate particles through array geometry calculating energy losses.
void InitialiseTrack(KVNucleus *part, TVector3 *TheOrigin)
Start a new track to visualise trajectory of nucleus through the array.
TVirtualGeoTrack * fCurrentTrack
current track of nucleus being propagated
void AddPointToCurrentTrack(Double_t x, Double_t y, Double_t z)
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
We start a new track to represent the particle's trajectory through the array.
Double_t fTrackTime
track "clock"
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
void SetPdgName(Int_t pdg, const char *name)
TVirtualGeoTrack * GetTrack(Int_t index)
Double_t GetTemperature() const
Double_t GetPressure() const
const char * GetName() const override
const char * Data() const
void Form(const char *fmt,...)