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))) {
66 part->GetZ(), part->GetA(),
e, GetStepSize(), 0.,
70 if (
e <= fCutOffEnergy) {
75 part->SetIsDetected();
78 if (!part->GetPInitial()) part->SetE0();
81 KVDetector* theDet = GetDetectorFromPath(GetCurrentPath());
84 int subdet_number = -1;
86 if (theDet->IsSegmented())
87 subdet_number = GetSubDetectorFromPathAndNodeName(theDet, GetCurrentPath(), GetCurrentNode()->GetName());
88 if (!theDet->IsSingleLayer()) {
89 absorber_name.
Form(
"%s/%s", theDet->GetName(), GetCurrentNode()->GetName());
90 if (strncmp(GetCurrentNode()->GetName(),
"ACTIVE", 6) == 0) active_layer =
kTRUE;
93 absorber_name = theDet->GetName();
98 absorber_name = irmat->
GetName();
101 part->GetParameters()->SetValue(
Form(
"DE:%s", absorber_name.
Data()),
de);
102 part->GetParameters()->SetValue(
Form(
"DX:%s", absorber_name.
Data()), GetStepSize());
103 if (subdet_number > -1)
104 part->GetParameters()->SetValue(
Form(
"%s:SUBDET", absorber_name.
Data()), subdet_number);
109 theDet->SetEnergyLoss(
E);
111 else if (theDet->IsSegmented()) {
112 theDet->AddEnergyLossInSubDetector(subdet_number,
de);
119 if (StopPropagation()) {
123 TVector3 path = GetExitPoint() - GetEntryPoint();
124 TVector3 midVol = GetEntryPoint() + (
r / path.
Mag()) * path;
129 AddPointToCurrentTrack(GetEntryPoint().
X(), GetEntryPoint().Y(), GetEntryPoint().Z());
130 AddPointToCurrentTrack(midVol.
X(), midVol.
Y(), midVol.
Z());
138 AddPointToCurrentTrack(GetEntryPoint().
X(), GetEntryPoint().Y(), GetEntryPoint().Z());
139 AddPointToCurrentTrack(GetExitPoint().
X(), GetExitPoint().Y(), GetExitPoint().Z());
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Bool_t IsTracking() const
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
const TVector3 & GetEntryPoint() const
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.
void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0) override
We start a new track to represent the particle's trajectory through the array.
TVirtualGeoTrack * fCurrentTrack
current track of nucleus being propagated
Double_t fTrackTime
track "clock"
void AddPointToCurrentTrack(Double_t x, Double_t y, Double_t z) override
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,...)