KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | List of all members
KVTarget Class Reference

Calculation/correction of energy losses of particles through an experimental target.

MULTILAYER TARGET

In order to make a target with several absorber layers, proceed as follows:

KVTarget targ("Ta", 8.3); // first layer 8.3mg/cm2 Ta
targ.AddLayer("C", 20.0); // second layer 20mg/cm2 C
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:126

Note that all "thicknesses" for targets and target layers are in \(mg/cm^2\).

ORIENTATION OF TARGET

The target can be oriented in an arbitrary way, by defining the vector normal to its surface. By default, this vector is \((0,0,1)\) i.e. in the beam-direction. You can access this vector in order to modify it using GetNormal().

In order to change the target's angle to the beam, as for a rotation about the +ve x-axis (12 o'clock in lab frame) use SetAngleToBeam() with an angle in degrees. i.e. to set the angle of the target in the previous example to 30deg. w.r.t. the beam,

targ.SetAngleToBeam( 30.0 );

CALCULATE ENERGY LOSSES OF PARTICLES IN TARGET

To calculate the energy loss of particles created in a reaction in the target, set the target mode to outgoing and then use GetELostByParticle or DetectParticle:

KVNucleus *part; //pointer to particle
targ.SetOutgoing(); //calculate energy loss for particles leaving target
Double_t eloss = targ.GetELostByParticle(part);
double Double_t
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125

By default, the calculation is made for particles leaving an interaction point half- way through the target along the beam direction \((0,0,1)\). You can change this by calling SetRandomized() and/or calling GetInteractionPoint() with a pointer to a supposedly incident particle whose direction is different from that of the beam.

To simulate the energy losses of all particles in an event, use DetectEvent().

ELASTIC/INELASTIC SCATTERING

To simulate scattering requires:

See also
KVElasticScatter

1.) SETTING AN INTERACTION POINT

a.) Interaction point anywhere in the target

Calling GetInteractionPoint() with a pointer to the incident particle will generate a new interaction point, either halfway along the particle's trajectory through the target (default) or at a random point along the trajectory if SetRandomized() has previously been called.

Suppose that KVNucleus* proj is a pointer to the incident beam particle. Then, to set the interaction point a random distance inside the target:

targ.SetRandomized(); // only needs to be called once, all IPs are randomly generated afterwards
TVector3 IP = targ.GetInteractionPoint(proj);

Subsequent calls to GetInteractionPoint() WITHOUT an argument return the last generated IP vector

TVector3 IP2 = targ.GetInteractionPoint(); // IP2 and IP are the same

b.) Interaction point in a specific layer of the target

You can choose in which layer of the target you want to set the IP. To indicate the layer you can either give the name of the type of material it is made of (as long as no two layers are of the same type!), or the number of the layer. Layers are numbered 1,2, etc. in the order they are added to the target.

Suppose that KVNucleus* proj is a pointer to the incident beam particle. Then, to set the interaction point inside the carbon layer of our example target:

targ.SetInteractionLayer("C", proj); // <==> targ.SetInteractionLayer(2,proj) using index
TVector3 IP = targ.GetInteractionPoint(); // get generated IP

Note that if SetRandomized() has been used the IP will be set at a random depth inside the layer, or halfway through it by default.

2.) ENERGY LOSS OF INCIDENT PARTICLE BEFORE SCATTERING

To calculate the energy lost by incident particles in the target before they reach the IP, first set the 'mode' of the target to 'incoming':

targ.SetIncoming();
targ.DetectParticle(proj); //particle passes through target up to interaction point

3.) ENERGY LOSS OF PARTICLES AFTER SCATTERING

Set the 'mode' of the target to 'outgoing' and then:

targ.SetOutgoing();
targ.DetectParticle(proj);

CORRECTION OF PARTICLE ENERGIES FOR TARGET ENERGY LOSS

See method GetParticleEIncFromERes().

Definition at line 126 of file KVTarget.h.

Public Member Functions

 KVTarget ()
 Default costructor. More...
 
 KVTarget (const Char_t *material, Double_t thick=0.0)
 
 KVTarget (const KVTarget &)
 Copy ctor. More...
 
virtual ~ KVTarget ()
 
void AddLayer (const Char_t *material, Double_t thick)
 
void Clear (Option_t *opt="")
 Reset absorber - set energy lost by particles to zero. More...
 
virtual void Copy (TObject &obj) const
 Copy this to obj. More...
 
void DetectEvent (KVEvent *)
 
virtual void DetectParticle (KVNucleus *, TVector3 *norm=0)
 
Double_t GetAngleToBeam ()
 Gives angle of target to incident beam direction in degrees. More...
 
Double_t GetAtomsPerCM2 () const
 virtual UInt_t GetUnits() const; More...
 
Double_t GetEffectiveThickness (KVParticle *part=0, Int_t ilayer=1)
 
Double_t GetEffectiveThickness (TVector3 &direction, Int_t ilayer=1)
 
virtual Double_t GetELostByParticle (KVNucleus *, TVector3 *norm=0)
 
virtual Double_t GetIncidentEnergyFromERes (Int_t Z, Int_t A, Double_t Eres)
 
TVector3GetInteractionPoint (KVParticle *part=0)
 
KVMaterialGetLayer (const Char_t *name)
 Returns layer corresponding to absorber of type 'name'. More...
 
KVMaterialGetLayer (TVector3 &depth)
 
KVMaterialGetLayerByDepth (Double_t depth)
 
KVMaterialGetLayerByIndex (Int_t ilayer) const
 
Int_t GetLayerIndex (const Char_t *name)
 
Int_t GetLayerIndex (Double_t depth)
 
Int_t GetLayerIndex (TVector3 &depth)
 
KVListGetLayers () const
 
const TVector3GetNormal ()
 
virtual Double_t GetParticleEIncFromERes (KVNucleus *, TVector3 *norm=0)
 
Double_t GetThickness () const
 
Double_t GetThickness (Int_t ilayer) const
 'Thickness' in mg/cm**2 of layer 'ilayer' in target More...
 
Double_t GetTotalEffectiveThickness (KVParticle *part=0)
 
Double_t GetTotalEffectiveThickness (TVector3 &, Int_t lay1=1, Int_t lay2=0)
 
Double_t GetTotalThickness ()
 
Double_t GetTotalThickness (Int_t lay1, Int_t lay2)
 
Bool_t IsIncoming () const
 
Bool_t IsOutgoing () const
 
Bool_t IsRandomized () const
 
Int_t NumberOfLayers () const
 
void Print (Option_t *opt="") const
 Show information on this material. More...
 
void SetAngleToBeam (Double_t a)
 
void SetIncoming (Bool_t r=kTRUE)
 
void SetInteractionLayer (const Char_t *name, KVParticle *part)
 
void SetInteractionLayer (const Char_t *name, TVector3 &dir)
 
void SetInteractionLayer (Int_t ilayer, TVector3 &dir)
 
void SetLayerThickness (Float_t thick, Int_t ilayer=1)
 Set 'thickness' in mg/cm**2 of a layer, by default this is the first layer. More...
 
virtual void SetMaterial (const Char_t *type)
 Set material of first layer. More...
 
void SetOutgoing (Bool_t r=kTRUE)
 
void SetRandomized (Bool_t r=kTRUE)
 
- Public Member Functions inherited from KVMaterial
 KVMaterial ()
 default ctor More...
 
 KVMaterial (const Char_t *gas, const Double_t thick, const Double_t pressure, const Double_t temperature=19.0)
 
 KVMaterial (const Char_t *type, const Double_t thick=0.0)
 Create material with given type and linear thickness in cm. More...
 
 KVMaterial (const KVMaterial &)
 Copy ctor. More...
 
 KVMaterial (Double_t area_density, const Char_t *type)
 Create material with given area density in g/cm**2 and given type. More...
 
virtual ~ KVMaterial ()
 
virtual TGeoVolumeGetAbsGeoVolume () const
 
virtual KVMaterialGetActiveLayer () const
 
Double_t GetAreaDensity () const
 Return area density of material in g/cm**2. More...
 
virtual Double_t GetDeltaE (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetDeltaEFromERes (Int_t Z, Int_t A, Double_t Eres)
 
Double_t GetDensity () const
 
Double_t GetEffectiveAreaDensity (TVector3 &norm, TVector3 &direction)
 
Double_t GetEffectiveThickness (TVector3 &norm, TVector3 &direction)
 
virtual Double_t GetEIncOfMaxDeltaE (Int_t Z, Int_t A)
 Incident energy for which the DE(E) curve has a maximum. More...
 
virtual Double_t GetEmaxValid (Int_t Z, Int_t A)
 
virtual Double_t GetEnergyLoss () const
 
virtual Double_t GetERes (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetEResFromDeltaE (Int_t Z, Int_t A, Double_t dE=-1.0, enum SolType type=kEmax)
 
virtual TGeoMediumGetGeoMedium (const Char_t *="")
 
virtual Double_t GetIncidentEnergy (Int_t Z, Int_t A, Double_t delta_e=-1.0, enum SolType type=kEmax)
 
virtual Double_t GetLinearRange (Int_t Z, Int_t A, Double_t Einc)
 
Double_t GetMass () const
 Returns atomic mass of material. Will be isotopic mass if set. More...
 
virtual Double_t GetMaxDeltaE (Int_t Z, Int_t A)
 
virtual Double_t GetPressure () const
 
virtual Double_t GetPunchThroughEnergy (Int_t Z, Int_t A)
 
virtual Double_t GetRange (Int_t Z, Int_t A, Double_t Einc)
 
virtual Double_t GetTemperature () const
 
Double_t GetZ () const
 Returns atomic number of material. More...
 
void init ()
 
Bool_t IsGas () const
 Returns kTRUE for gaseous materials/detectors. More...
 
Bool_t IsIsotopic () const
 
Bool_t IsNat () const
 
virtual void SetAbsGeoVolume (TGeoVolume *v)
 
void SetAreaDensity (Double_t dens)
 
virtual void SetEnergyLoss (Double_t e) const
 
void SetMass (Double_t a)
 
virtual void SetPressure (Double_t)
 
virtual void SetTemperature (Double_t)
 
virtual void SetThickness (Double_t thick)
 
- Public Member Functions inherited from KVBase
 KVBase ()
 Default constructor. More...
 
 KVBase (const Char_t *name, const Char_t *title="")
 Ctor for object with given name and type. More...
 
 KVBase (const KVBase &)
 copy ctor More...
 
virtual ~ KVBase ()
 
const Char_tGetLabel () const
 
UInt_t GetNumber () const
 
UInt_t GetNumberOfObjects () const
 
virtual TObjectGetObject () const
 
const Char_tGetType () const
 
Bool_t HasLabel () const
 
virtual Bool_t IsCalled (const Char_t *name) const
 
Bool_t IsLabelled (const Char_t *l) const
 
virtual Bool_t IsType (const Char_t *typ) const
 
virtual void List ()
 
KVBaseoperator= (const KVBase &)
 copy assignment operator More...
 
Double_t ProtectedGetX (const TF1 *func, Double_t val, int &status, Double_t xmin=0.0, Double_t xmax=0.0) const
 
void SetLabel (const Char_t *lab)
 
virtual void SetNumber (UInt_t num)
 
virtual void SetType (const Char_t *str)
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 
virtual TObjectClone (const char *newname="") const
 
virtual Int_t Compare (const TObject *obj) const
 
virtual void FillBuffer (char *&buffer)
 
virtual const char * GetName () const
 
virtual const char * GetTitle () const
 
virtual ULong_t Hash () const
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 
TNamedoperator= (const TNamed &rhs)
 
virtual void SetName (const char *name)
 
virtual void SetNameTitle (const char *name, const char *title)
 
virtual void SetTitle (const char *title="")
 
virtual Int_t Sizeof () const
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 
virtual ~TObject ()
 
void AbstractMethod (const char *method) const
 
virtual void AppendPad (Option_t *option="")
 
virtual void Browse (TBrowser *b)
 
ULong_t CheckedHash ()
 
virtual const char * ClassName () const
 
virtual void Delete (Option_t *option="")
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void Draw (Option_t *option="")
 
virtual void DrawClass () const
 
virtual TObjectDrawClone (Option_t *option="") const
 
virtual void Dump () const
 
virtual void Error (const char *method, const char *msgfmt,...) const
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 
virtual TObjectFindObject (const char *name) const
 
virtual TObjectFindObject (const TObject *obj) const
 
virtual Option_tGetDrawOption () const
 
virtual const char * GetIconName () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual Option_tGetOption () const
 
virtual UInt_t GetUniqueID () const
 
virtual Bool_t HandleTimer (TTimer *timer)
 
Bool_t HasInconsistentHash () const
 
virtual void Info (const char *method, const char *msgfmt,...) const
 
virtual Bool_t InheritsFrom (const char *classname) const
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 
virtual void Inspect () const
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 
virtual Bool_t IsFolder () const
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
void MayNotUse (const char *method) const
 
virtual Bool_t Notify ()
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 
void operator delete (void *ptr)
 
void operator delete[] (void *ptr)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 
virtual void Paint (Option_t *option="")
 
virtual void Pop ()
 
virtual Int_t Read (const char *name)
 
virtual void RecursiveRemove (TObject *obj)
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 
virtual void SetDrawOption (Option_t *option="")
 
virtual void SetUniqueID (UInt_t uid)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 

Protected Member Functions

void init ()
 Default initialisations. More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 
void MakeZombie ()
 

Protected Attributes

TVector3 fIntPoint
 last randomly generated interaction point More...
 
Int_t fNLayers
 number of layers More...
 
TVector3 fNormal
 normal to target - (0,0,1) by default More...
 
KVListfTargets
 list of layers More...
 
- Protected Attributes inherited from KVMaterial
TGeoVolumefAbsorberVolume
 pointer to corresponding volume in ROOT geometry More...
 
- Protected Attributes inherited from KVBase
TString fLabel
 label for the object More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 
- Protected Attributes inherited from TObject
 kOnlyPrepStep
 

Private Types

enum  { kRandom = BIT(14) , kIncoming = BIT(15) , kOutgoing = BIT(16) }
 

Additional Inherited Members

- Public Types inherited from KVMaterial
enum  SolType { kEmax , kEmin }
 
- Public Types inherited from KVBase
enum  EKaliVedaBits { kIsKaliVedaObject = BIT(23) }
 
- Public Types inherited from TObject
enum  EDeprecatedStatusBits
 
enum  EStatusBits
 
- Static Public Member Functions inherited from KVMaterial
static KVIonRangeTableChangeRangeTable (const Char_t *name)
 
static KVIonRangeTableGetRangeTable ()
 
- Static Public Member Functions inherited from KVBase
static Bool_t AreEqual (Double_t x, Double_t y, Long64_t maxdif=1)
 Comparison between two 64-bit floating-point values. More...
 
static void BackupFileWithDate (const Char_t *path)
 
static void CombineFiles (const Char_t *file1, const Char_t *file2, const Char_t *newfilename, Bool_t keep=kTRUE)
 
static void Deprecated (const char *method, const char *advice)
 
static Bool_t FindClassSourceFiles (const Char_t *class_name, KVString &imp_file, KVString &dec_file, const Char_t *dir_name=".")
 
static Bool_t FindExecutable (TString &exec, const Char_t *path="$(PATH)")
 
static const Char_tFindFile (const Char_t *search, TString &wfil)
 
static const Char_tGetBINDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetDATABASEFilePath ()
 
static const Char_tGetDATADIRFilePath (const Char_t *namefile="")
 
static Bool_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval)
 
static const Char_tGetDataSetEnv (const Char_t *dataset, const Char_t *type, const Char_t *defval)
 
static Double_t GetDataSetEnv (const Char_t *dataset, const Char_t *type, Double_t defval)
 
static const Char_tGetETCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetExampleFilePath (const Char_t *library, const Char_t *namefile)
 Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) More...
 
static const Char_tGetINCDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetKVBuildDate ()
 Returns KaliVeda build date. More...
 
static const Char_tGetKVBuildDir ()
 Returns top-level directory used for build. More...
 
static const Char_tGetKVBuildTime ()
 Returns KaliVeda build date. More...
 
static const Char_tGetKVBuildType ()
 Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) More...
 
static const Char_tGetKVBuildUser ()
 Returns username of person who performed build. More...
 
static const Char_tGetKVSourceDir ()
 Returns top-level directory of source tree used for build. More...
 
static const Char_tGetKVVersion ()
 Returns KaliVeda version string. More...
 
static const Char_tGetLIBDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetListOfPlugins (const Char_t *base)
 
static const Char_tGetListOfPluginURIs (const Char_t *base)
 
static const Char_tGetPluginURI (const Char_t *base, const Char_t *plugin)
 
static void GetTempFileName (TString &base)
 
static const Char_tGetTEMPLATEDIRFilePath (const Char_t *namefile="")
 
static const Char_tGetWORKDIRFilePath (const Char_t *namefile="")
 
static const Char_tgitBranch ()
 Returns git branch of sources. More...
 
static const Char_tgitCommit ()
 Returns last git commit of sources. More...
 
static void InitEnvironment ()
 
static bool is_gnuinstall ()
 
static Bool_t IsThisAPlugin (const TString &uri, TString &base)
 
static TPluginHandlerLoadPlugin (const Char_t *base, const Char_t *uri="0")
 
static Bool_t OpenContextMenu (const char *method, TObject *obj, const char *alt_method_name="")
 
static void OpenTempFile (TString &base, std::ofstream &fp)
 
static void PrintSplashScreen ()
 Prints welcome message and infos on version etc. More...
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ifstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchAndOpenKVFile (const Char_t *name, std::ofstream &file, const Char_t *kvsubdir="", KVLockfile *locks=0)
 
static Bool_t SearchKVFile (const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
 
static const Char_tWorkingDirectory ()
 
- Static Public Member Functions inherited from TObject
static Longptr_t GetDtorOnly ()
 
static Bool_t GetObjectStat ()
 
static void SetDtorOnly (void *obj)
 
static void SetObjectStat (Bool_t stat)
 
- Public Attributes inherited from TObject
 kBitMask
 
 kCanDelete
 
 kCannotPick
 
 kHasUUID
 
 kInconsistent
 
 kInvalidObject
 
 kIsOnHeap
 
 kIsReferenced
 
 kMustCleanup
 
 kNoContextMenu
 
 kNotDeleted
 
 kObjInCanvas
 
 kOverwrite
 
 kSingleKey
 
 kWriteDelete
 
 kZombie
 
- Static Protected Attributes inherited from KVMaterial
static KVIonRangeTablefIonRangeTable = 0x0
 pointer to class used to calculate charged particle ranges & energy losses More...
 

#include <KVTarget.h>

Inheritance diagram for KVTarget:
Inheritance graph
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kRandom 
kIncoming 
kOutgoing 

Definition at line 130 of file KVTarget.h.

Constructor & Destructor Documentation

◆ KVTarget() [1/3]

KVTarget::KVTarget ( )

Default costructor.

Definition at line 35 of file KVTarget.cpp.

◆ KVTarget() [2/3]

KVTarget::KVTarget ( const KVTarget obj)

Copy ctor.

Definition at line 63 of file KVTarget.cpp.

◆ KVTarget() [3/3]

KVTarget::KVTarget ( const Char_t material,
Double_t  thick = 0.0 
)

Just give the type & "thickness" of material for target The "thickness" is the area density of the target in mg/cm**2.

Definition at line 48 of file KVTarget.cpp.

◆ ~ KVTarget()

virtual KVTarget::~ KVTarget ( )
virtual

Member Function Documentation

◆ AddLayer()

void KVTarget::AddLayer ( const Char_t material,
Double_t  thick 
)

Add a layer to a target, with 'thickness' in mg/cm**2 (area density). Sets/updates name of target with name of material. In case of multi-layer target the name is material1/material2/material3/...

Definition at line 111 of file KVTarget.cpp.

◆ Clear()

void KVTarget::Clear ( Option_t opt = "")
virtual

Reset absorber - set energy lost by particles to zero.

Reimplemented from KVMaterial.

Definition at line 753 of file KVTarget.cpp.

◆ Copy()

void KVTarget::Copy ( TObject obj) const
virtual

Copy this to obj.

Reimplemented from KVMaterial.

Definition at line 81 of file KVTarget.cpp.

◆ DetectEvent()

void KVTarget::DetectEvent ( KVEvent event)

Simulate passage of particles from some simulation through the target material. The particles will be slowed down according to their calculated energy losses. First we SetOutgoing(): for a simulated event, energy losses are only calculated from some interaction point inside the target to the outside. This interaction point will be taken half-way through the target (by default) or at some random depth in the target if SetRandomized() is called first.

Definition at line 721 of file KVTarget.cpp.

◆ DetectParticle()

void KVTarget::DetectParticle ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Simulate passage of a particle through a target. Energy losses are calculated and the particle is slowed down. We take into account the direction of motion of the particle and an arbitrary orientation of the target.

The' 'TVector3* dummy'argument is not used.

If IsIncoming()=kFALSE & IsOutgoing()=kFALSE, the particle will pass through the whole of the target. If IsIncoming()=kTRUE, calculate energy loss up to interaction point If IsOutgoing()=kTRUE, calculate energy loss from interaction point onwards (outwards)

Reimplemented from KVMaterial.

Definition at line 485 of file KVTarget.cpp.

◆ GetAngleToBeam()

Double_t KVTarget::GetAngleToBeam ( )

Gives angle of target to incident beam direction in degrees.

Definition at line 193 of file KVTarget.cpp.

◆ GetAtomsPerCM2()

Double_t KVTarget::GetAtomsPerCM2 ( ) const

virtual UInt_t GetUnits() const;

Calculates total number of atoms per square centimetre of the target. For a multilayer target, the area densities for each layer are summed up.

Definition at line 932 of file KVTarget.cpp.

◆ GetEffectiveThickness() [1/2]

Double_t KVTarget::GetEffectiveThickness ( KVParticle part = 0,
Int_t  ilayer = 1 
)

Return effective 'thickness' (in mg/cm**2) of layer ilayer (ilayer=1, 2, ...) By default ilayer=1 (i.e. for single layer target) The effective thickness depends on the angle of the target (rotation about x-axis => theta wrt z- (beam)-axis). It also depends on the direction of motion of the incident particle. If no particle is given, effective thicknesses are calculated as for particles travelling in the beam direction. get (or make) vector in particle direction of motion (z-direction if no particle) Info("KVTarget::GetEffectiveThickness","(KVParticle * part, Int_t ilayer)");

Definition at line 214 of file KVTarget.cpp.

◆ GetEffectiveThickness() [2/2]

Double_t KVTarget::GetEffectiveThickness ( TVector3 direction,
Int_t  ilayer = 1 
)

Return effective 'thickness' (in mg/cm**2) of layer ilayer (ilayer=1, 2, ...) By default ilayer=1 (i.e. for single layer target) The effective thickness depends on the orientation of the target (given by the direction of the normal to its surface) and on the direction (e.g. direction of a particle) Info("KVTarget::GetEffectiveThickness","TVector3 & direction,Int_t ilayer");

Definition at line 246 of file KVTarget.cpp.

◆ GetELostByParticle()

Double_t KVTarget::GetELostByParticle ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Simulate passage of a particle through a target. Energy losses are calculated but the particle's energy is not modified. We take into account the direction of motion of the particle and an arbitrary orientation of the target.

The' 'TVector3* dummy'argument is not used.

If IsIncoming()=kFALSE & IsOutgoing()=kFALSE, the particle will pass through the whole of the target. If IsIncoming()=kTRUE, calculate energy loss up to interaction point If IsOutgoing()=kTRUE, calculate energy loss from interaction point onwards (outwards)

Reimplemented from KVMaterial.

Definition at line 594 of file KVTarget.cpp.

◆ GetIncidentEnergyFromERes()

Double_t KVTarget::GetIncidentEnergyFromERes ( Int_t  Z,
Int_t  A,
Double_t  Eres 
)
virtual

Calculate initial energy of nucleus (Z,A) from given residual energy Eres, assumed to correspond to the state of the particle after passage through all or some part of the target, taking into account an arbitrary orientation of the target.

*** WARNING *** Obviously we cannot know the particle's direction of motion, therefore we assume it to be travelling in the beam direction (0,0,1) Normally you should use GetParticleEIncFromERes

The' 'TVector3*' argument is not used.

If IsIncoming()=kFALSE & IsOutgoing()=kFALSE, we assume the particle passed through the whole of the target. If IsIncoming()=kTRUE, assume current energy is energy on reaching interaction point; we calculate energy of particle before entering target If IsOutgoing()=kTRUE, assume current energy is energy on exiting from target; we calculate energy of particle at interactio point Fake nucleus

Reimplemented from KVMaterial.

Definition at line 1094 of file KVTarget.cpp.

◆ GetInteractionPoint()

TVector3 & KVTarget::GetInteractionPoint ( KVParticle part = 0)

Returns last known interaction point (if part=0) or generates a new one if part!=0.

if IsRandomized()=kTRUE the generated interaction point is at a random distance along the direction 'of the incident particle's trajectory through target. if IsRandomized()=kFALSE the generated interaction point is half way along the direction.

If no interaction point is set by the user (i.e. GetInteractionPoint never called with the address of a KVParticle), the default is to generate an interaction point using the beam (+ve Z-)direction.

Definition at line 773 of file KVTarget.cpp.

◆ GetLayer() [1/2]

KVMaterial * KVTarget::GetLayer ( const Char_t name)

Returns layer corresponding to absorber of type 'name'.

Definition at line 354 of file KVTarget.cpp.

◆ GetLayer() [2/2]

KVMaterial * KVTarget::GetLayer ( TVector3 depth)

Returns absorber corresponding to 'depth' inside target, starting from the 'entrance' layer and following the direction of 'depth'. Note: 'depth' is measured in the same 'thickness' units as the thickness of the different layers of the target (mg/cm2) WARNING : returns 0 if no layer is found (depth is outside of target)

Definition at line 272 of file KVTarget.cpp.

◆ GetLayerByDepth()

KVMaterial * KVTarget::GetLayerByDepth ( Double_t  depth)

Returns absorber corresponding to 'depth' inside target, starting from the 'entrance' layer and following the normal direction. Note: 'depth' is measured in the same 'thickness' units as the thickness of the different layers of the target (mg/cm2, um, etc.) WARNING : returns 0 if no layer is found (depth is outside of target)

Definition at line 321 of file KVTarget.cpp.

◆ GetLayerByIndex()

KVMaterial* KVTarget::GetLayerByIndex ( Int_t  ilayer) const
inline

Definition at line 173 of file KVTarget.h.

◆ GetLayerIndex() [1/3]

Int_t KVTarget::GetLayerIndex ( const Char_t name)

Returns layer index corresponding to absorber of type 'name'. WARNING : user should check returned index is >0 If not, this means that the given material name does not correspond to a layer inside the target

Definition at line 339 of file KVTarget.cpp.

◆ GetLayerIndex() [2/3]

Int_t KVTarget::GetLayerIndex ( Double_t  depth)

Returns absorber index corresponding to 'depth' inside target, starting from the 'entrance' layer and following the normal direction. Note: 'depth' is measured in the same 'thickness' units as the thickness of the different layers of the target (mg/cm2) WARNING : user should check returned index is >0 If not, this means that the given depth does not correspond to a layer inside the target

Definition at line 383 of file KVTarget.cpp.

◆ GetLayerIndex() [3/3]

Int_t KVTarget::GetLayerIndex ( TVector3 depth)

Returns absorber index corresponding to 'depth' inside target, starting from the 'entrance' layer and following the direction of 'depth'. Note: 'depth' is measured in the same 'thickness' units as the thickness of the different layers of the target (mg/cm2) WARNING : user should check returned index is >0 If not, this means that the given depth does not correspond to a layer inside the target

Definition at line 292 of file KVTarget.cpp.

◆ GetLayers()

KVList* KVTarget::GetLayers ( ) const
inline

Definition at line 169 of file KVTarget.h.

◆ GetNormal()

const TVector3& KVTarget::GetNormal ( )
inline

Return vector normal to target

Definition at line 153 of file KVTarget.h.

◆ GetParticleEIncFromERes()

Double_t KVTarget::GetParticleEIncFromERes ( KVNucleus kvp,
TVector3 norm = 0 
)
virtual

Calculate initial energy of particle from its current (residual) energy, assumed to correspond to the state of the particle after passage through all or some part of the target, taking into account the particle's direction of motion and an arbitrary orientation of the target.

The 'TVector3*' argument is not used.

If IsIncoming()=kFALSE & IsOutgoing()=kFALSE, we assume the particle passed through the whole of the target. If IsIncoming()=kTRUE, assume current energy is energy on reaching interaction point; we calculate energy of particle before entering target If IsOutgoing()=kTRUE, assume current energy is energy on exiting from target; we calculate energy of particle at interactio point

Reimplemented from KVMaterial.

Definition at line 963 of file KVTarget.cpp.

◆ GetThickness() [1/2]

Double_t KVTarget::GetThickness ( ) const
inlinevirtual

Returns the linear thickness of the material in cm. Use Units to change units: mat.GetThickness()/KVUnitsum ; in microns

Reimplemented from KVMaterial.

Definition at line 189 of file KVTarget.h.

◆ GetThickness() [2/2]

Double_t KVTarget::GetThickness ( Int_t  ilayer) const

'Thickness' in mg/cm**2 of layer 'ilayer' in target

Definition at line 366 of file KVTarget.cpp.

◆ GetTotalEffectiveThickness() [1/2]

Double_t KVTarget::GetTotalEffectiveThickness ( KVParticle part = 0)

return sum of effective 'thicknesses' (mg/cm**2) of all layers in target taking into account the angle of the target to the beam and the direction of motion of the incident particle. If no particle is given, effective thicknesses are calculated as for particles travelling in the beam direction.

Definition at line 412 of file KVTarget.cpp.

◆ GetTotalEffectiveThickness() [2/2]

Double_t KVTarget::GetTotalEffectiveThickness ( TVector3 dir,
Int_t  ilay1 = 1,
Int_t  ilay2 = 0 
)

return sum of effective 'thicknesses' (mg/cm**2) of layers ilay1 to ilay2 in target taking into account the angle of the target to the beam and the given direction.

GetTotalEffectiveThickness(dir) --> thickness of all layers GetTotalEffectiveThickness(dir,ilay1) --> thickness of layers ilay1 to last GetTotalEffectiveThickness(dir,ilay1,ilay2) --> thickness of layers ilay1 to ilay2

Definition at line 436 of file KVTarget.cpp.

◆ GetTotalThickness() [1/2]

Double_t KVTarget::GetTotalThickness ( )

return sum of 'thicknesses' (area densities in mg/cm**2) of all layers in target

Definition at line 138 of file KVTarget.cpp.

◆ GetTotalThickness() [2/2]

Double_t KVTarget::GetTotalThickness ( Int_t  lay1,
Int_t  lay2 
)

return sum of 'thicknesses' (area densities in mg/cm**2) of layers lay1 to lay2 in target

Definition at line 159 of file KVTarget.cpp.

◆ init()

void KVTarget::init ( void  )
protected

Default initialisations.

Definition at line 15 of file KVTarget.cpp.

◆ IsIncoming()

Bool_t KVTarget::IsIncoming ( ) const
inline

Definition at line 205 of file KVTarget.h.

◆ IsOutgoing()

Bool_t KVTarget::IsOutgoing ( ) const
inline

Definition at line 225 of file KVTarget.h.

◆ IsRandomized()

Bool_t KVTarget::IsRandomized ( ) const
inline

Definition at line 247 of file KVTarget.h.

◆ NumberOfLayers()

Int_t KVTarget::NumberOfLayers ( ) const
inline

Definition at line 165 of file KVTarget.h.

◆ Print()

void KVTarget::Print ( Option_t option = "") const
virtual

Show information on this material.

Reimplemented from KVMaterial.

Definition at line 742 of file KVTarget.cpp.

◆ SetAngleToBeam()

void KVTarget::SetAngleToBeam ( Double_t  a)

Sets angle of target to incident beam direction by rotating about the +x axis (12 o'clock) Angle 'a' is given in degrees.

Definition at line 178 of file KVTarget.cpp.

◆ SetIncoming()

void KVTarget::SetIncoming ( Bool_t  r = kTRUE)
inline

Set mode of target for calculation of energy loss. target->SetIncoming() target->SetIncoming(kTRUE) : energy loss of particles calculated along beam direction up to interaction point inside target. Note that this automatically sets the 'Outgoing' flag to false. target->SetIncoming(kFALSE) : if used with target->SetOutgoing(kFALSE), energy loss calculated for particle passing through the whole of the target

Definition at line 216 of file KVTarget.h.

◆ SetInteractionLayer() [1/3]

void KVTarget::SetInteractionLayer ( const Char_t name,
KVParticle part 
)

Sets the interaction point inside the layer made of absorber type 'name'

if IsRandomized()=kTRUE the generated interaction point is at a random distance along the direction along the incident particle's trajectory through layer. if IsRandomized()=kFALSE the generated interaction point is half way along the direction inside the layer

Definition at line 886 of file KVTarget.cpp.

◆ SetInteractionLayer() [2/3]

void KVTarget::SetInteractionLayer ( const Char_t name,
TVector3 dir 
)

Sets the interaction point inside the layer made of absorber type 'name'

if IsRandomized()=kTRUE the generated interaction point is at a random distance along the direction 'dir' inside layer (e.g. incident particle's trajectory through layer). if IsRandomized()=kFALSE the generated interaction point is half way along the direction 'dir' inside the layer

Definition at line 858 of file KVTarget.cpp.

◆ SetInteractionLayer() [3/3]

void KVTarget::SetInteractionLayer ( Int_t  ilayer,
TVector3 dir 
)

Sets the interaction point inside the layer with index 'ilayer'

if IsRandomized()=kTRUE the generated interaction point is at a random distance along the direction 'dir' inside layer (e.g. incident particle's trajectory through layer). if IsRandomized()=kFALSE the generated interaction point is half way along the direction 'dir' inside the layer total effective thickness (along 'dir') of all layers before 'ilayer'

Definition at line 815 of file KVTarget.cpp.

◆ SetLayerThickness()

void KVTarget::SetLayerThickness ( Float_t  thick,
Int_t  ilayer = 1 
)

Set 'thickness' in mg/cm**2 of a layer, by default this is the first layer.

Definition at line 918 of file KVTarget.cpp.

◆ SetMaterial()

void KVTarget::SetMaterial ( const Char_t type)
virtual

Set material of first layer.

Reimplemented from KVMaterial.

Definition at line 905 of file KVTarget.cpp.

◆ SetOutgoing()

void KVTarget::SetOutgoing ( Bool_t  r = kTRUE)
inline

Set mode of target for calculation of energy loss. target->SetOutgoing() target->SetOutgoing(kTRUE) : energy loss calculated from interaction point inside target upto exit of particle from target taking into account particle's direction of motion. Note that this automatically sets the 'Incoming' flag to false. target->SetOutgoing(kFALSE) : if used with target->SetIncoming(kFALSE), energy loss calculated for particle passing through the whole of the target

Definition at line 237 of file KVTarget.h.

◆ SetRandomized()

void KVTarget::SetRandomized ( Bool_t  r = kTRUE)
inline

Definition at line 251 of file KVTarget.h.

Member Data Documentation

◆ fIntPoint

TVector3 KVTarget::fIntPoint
protected

last randomly generated interaction point

Definition at line 141 of file KVTarget.h.

◆ fNLayers

Int_t KVTarget::fNLayers
protected

number of layers

Definition at line 139 of file KVTarget.h.

◆ fNormal

TVector3 KVTarget::fNormal
protected

normal to target - (0,0,1) by default

Definition at line 140 of file KVTarget.h.

◆ fTargets

KVList* KVTarget::fTargets
protected

list of layers

Definition at line 138 of file KVTarget.h.


The documentation for this class was generated from the following files: