KaliVeda
Toolkit for HIC analysis
|
Calculation/correction of energy losses of particles through an experimental target.
In order to make a target with several absorber layers, proceed as follows:
Note that all "thicknesses" for targets and target layers are in \(mg/cm^2\).
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,
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:
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().
To simulate scattering requires:
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:
Subsequent calls to GetInteractionPoint() WITHOUT an argument return the last generated IP vector
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:
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.
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':
Set the 'mode' of the target to 'outgoing' and then:
See method GetParticleEIncFromERes().
Definition at line 127 of file KVTarget.h.
#include <KVTarget.h>
Public Member Functions | |
KVTarget () | |
Default costructor. | |
KVTarget (const Char_t *material, Double_t thick=0.0) | |
KVTarget (const KVTarget &) | |
Copy ctor. | |
virtual | ~KVTarget () |
void | AddLayer (const Char_t *material, Double_t thick) |
void | Clear (Option_t *opt="") |
virtual void | Copy (TObject &obj) const |
Copy this to obj. | |
void | DetectEvent (KVEvent *) |
virtual void | DetectParticle (KVNucleus *, TVector3 *norm=0) |
Double_t | GetAngleToBeam () |
Gives angle of target to incident beam direction in degrees. | |
Double_t | GetAtomsPerCM2 () const |
virtual UInt_t GetUnits() const; | |
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) |
TVector3 & | GetInteractionPoint (KVParticle *part=0) |
KVMaterial * | GetLayer (const Char_t *name) |
Returns layer corresponding to absorber of type 'name'. | |
KVMaterial * | GetLayer (TVector3 &depth) |
KVMaterial * | GetLayerByDepth (Double_t depth) |
KVMaterial * | GetLayerByIndex (Int_t ilayer) const |
Int_t | GetLayerIndex (const Char_t *name) |
Int_t | GetLayerIndex (Double_t depth) |
Int_t | GetLayerIndex (TVector3 &depth) |
KVList * | GetLayers () const |
const TVector3 & | GetNormal () |
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 | |
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 |
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. | |
virtual void | SetMaterial (const Char_t *type) |
Set material of first layer. | |
void | SetOutgoing (Bool_t r=kTRUE) |
void | SetRandomized (Bool_t r=kTRUE) |
Public Member Functions inherited from KVMaterial | |
KVMaterial () | |
default ctor | |
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. | |
KVMaterial (const KVMaterial &) | |
Copy ctor. | |
KVMaterial (Double_t area_density, const Char_t *type) | |
Create material with given area density in \(g/cm^{2}\) and given type. | |
virtual | ~KVMaterial () |
Destructor. | |
virtual TGeoVolume * | GetAbsGeoVolume () const |
virtual KVMaterial * | GetActiveLayer () const |
Double_t | GetAreaDensity () const |
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) |
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 TGeoMedium * | GetGeoMedium (const Char_t *="") |
virtual TGraph * | GetGraphOfDeltaEVsE (const KVNucleus &nuc, Int_t npts, Double_t Emin, Double_t Emax) |
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 |
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 |
void | init () |
Bool_t | IsGas () const |
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 (Int_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. | |
KVBase (const Char_t *name, const Char_t *title="") | |
Ctor for object with given name and type. | |
KVBase (const KVBase &) | |
copy ctor | |
virtual | ~KVBase () |
const Char_t * | GetLabel () const |
UInt_t | GetNumber () const |
UInt_t | GetNumberOfObjects () const |
virtual TObject * | GetObject () const |
virtual const Char_t * | GetType () 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 () |
KVBase & | operator= (const KVBase &) |
copy assignment operator | |
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 () |
void | Clear (Option_t *option="") override |
TObject * | Clone (const char *newname="") const override |
Int_t | Compare (const TObject *obj) const override |
void | Copy (TObject &named) const override |
virtual void | FillBuffer (char *&buffer) |
const char * | GetName () const override |
const char * | GetTitle () const override |
ULong_t | Hash () const override |
TClass * | IsA () const override |
Bool_t | IsSortable () const override |
void | ls (Option_t *option="") const override |
TNamed & | operator= (const TNamed &rhs) |
void | Print (Option_t *option="") const override |
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 |
void | Streamer (TBuffer &) override |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
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 TObject * | DrawClone (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=nullptr) |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
virtual TObject * | FindObject (const char *name) const |
virtual TObject * | FindObject (const TObject *obj) const |
virtual Option_t * | GetDrawOption () const |
virtual const char * | GetIconName () const |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
virtual Option_t * | GetOption () 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) |
Bool_t | IsDestructed () const |
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, void *vp) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, void *vp) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (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) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
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=nullptr, Int_t option=0, Int_t bufsize=0) |
virtual Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const |
Private Types | |
enum | { kRandom = BIT(14) , kIncoming = BIT(15) , kOutgoing = BIT(16) } |
Private Member Functions | |
void | init () |
Default initialisations. | |
Private Attributes | |
TVector3 | fIntPoint |
last randomly generated interaction point | |
Int_t | fNLayers |
number of layers | |
TVector3 | fNormal |
normal to target - (0,0,1) by default | |
KVList * | fTargets |
list of layers | |
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 KVIonRangeTable * | ChangeRangeTable (const Char_t *name) |
static KVIonRangeTable * | GetRangeTable () |
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. | |
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_t * | FindFile (const Char_t *search, TString &wfil) |
static const Char_t * | GetBINDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetDATABASEFilePath () |
static const Char_t * | GetDATADIRFilePath (const Char_t *namefile="") |
static Bool_t | GetDataSetEnv (const Char_t *dataset, const Char_t *type, Bool_t defval) |
static const Char_t * | GetDataSetEnv (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_t * | GetETCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetExampleFilePath (const Char_t *library, const Char_t *namefile) |
Return full path to example file for given library (="KVMultiDet", "BackTrack", etc.) | |
static const Char_t * | GetINCDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetKVBuildDate () |
Returns KaliVeda build date. | |
static const Char_t * | GetKVBuildDir () |
Returns top-level directory used for build. | |
static const Char_t * | GetKVBuildTime () |
Returns KaliVeda build time. | |
static const Char_t * | GetKVBuildType () |
Returns KaliVeda build type (cmake build: Release, Debug, RelWithDebInfo, ...) | |
static const Char_t * | GetKVBuildUser () |
Returns username of person who performed build. | |
static const Char_t * | GetKVSourceDir () |
Returns top-level directory of source tree used for build. | |
static const Char_t * | GetKVVersion () |
Returns KaliVeda version string. | |
static const Char_t * | GetLIBDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetListOfPlugins (const Char_t *base) |
static const Char_t * | GetListOfPluginURIs (const Char_t *base) |
static const Char_t * | GetPluginURI (const Char_t *base, const Char_t *plugin) |
static void | GetTempFileName (TString &base) |
static const Char_t * | GetTEMPLATEDIRFilePath (const Char_t *namefile="") |
static const Char_t * | GetWORKDIRFilePath (const Char_t *namefile="") |
static const Char_t * | gitBranch () |
Returns git branch of sources. | |
static const Char_t * | gitCommit () |
Returns last git commit of sources. | |
static void | InitEnvironment () |
static bool | is_gnuinstall () |
static Bool_t | IsThisAPlugin (const TString &uri, TString &base) |
static TPluginHandler * | LoadPlugin (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. | |
static Bool_t | SearchAndOpenKVFile (const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="") |
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_t * | WorkingDirectory () |
Static Public Member Functions inherited from TNamed | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
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 | |
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 inherited from TNamed | |
TString | fName |
TString | fTitle |
Protected Attributes inherited from TObject | |
kOnlyPrepStep | |
|
private |
Enumerator | |
---|---|
kRandom | |
kIncoming | |
kOutgoing |
Definition at line 131 of file KVTarget.h.
KVTarget::KVTarget | ( | ) |
Default costructor.
Definition at line 35 of file KVTarget.cpp.
KVTarget::KVTarget | ( | const KVTarget & | obj | ) |
Copy ctor.
Definition at line 63 of file KVTarget.cpp.
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.
|
virtual |
Definition at line 465 of file KVTarget.cpp.
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.
Reimplemented from KVMaterial.
Definition at line 747 of file KVTarget.cpp.
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 716 of file KVTarget.cpp.
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.
Double_t KVTarget::GetAngleToBeam | ( | ) |
Gives angle of target to incident beam direction in degrees.
Definition at line 193 of file KVTarget.cpp.
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 926 of file KVTarget.cpp.
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.
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.
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 593 of file KVTarget.cpp.
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 1095 of file KVTarget.cpp.
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 767 of file KVTarget.cpp.
KVMaterial * KVTarget::GetLayer | ( | const Char_t * | name | ) |
Returns layer corresponding to absorber of type 'name'.
Definition at line 354 of file KVTarget.cpp.
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.
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.
|
inline |
Definition at line 174 of file KVTarget.h.
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.
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.
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.
|
inline |
Definition at line 170 of file KVTarget.h.
|
inline |
Return vector normal to target
Definition at line 154 of file KVTarget.h.
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 957 of file KVTarget.cpp.
|
inlinevirtual |
Reimplemented from KVMaterial.
Definition at line 190 of file KVTarget.h.
'Thickness' in mg/cm**2 of layer 'ilayer' in target
Definition at line 366 of file KVTarget.cpp.
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.
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.
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.
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.
Default initialisations.
Definition at line 15 of file KVTarget.cpp.
|
inline |
Definition at line 206 of file KVTarget.h.
|
inline |
Definition at line 225 of file KVTarget.h.
|
inline |
Definition at line 246 of file KVTarget.h.
|
inline |
Definition at line 166 of file KVTarget.h.
Reimplemented from KVMaterial.
Definition at line 736 of file KVTarget.cpp.
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.
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 217 of file KVTarget.h.
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 880 of file KVTarget.cpp.
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 852 of file KVTarget.cpp.
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 809 of file KVTarget.cpp.
Set 'thickness' in mg/cm**2 of a layer, by default this is the first layer.
Definition at line 912 of file KVTarget.cpp.
Set material of first layer.
Reimplemented from KVMaterial.
Definition at line 899 of file KVTarget.cpp.
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.
Definition at line 250 of file KVTarget.h.
|
private |
last randomly generated interaction point
Definition at line 142 of file KVTarget.h.
|
private |
number of layers
Definition at line 140 of file KVTarget.h.
|
private |
normal to target - (0,0,1) by default
Definition at line 141 of file KVTarget.h.
|
private |
list of layers
Definition at line 139 of file KVTarget.h.