KaliVeda
Toolkit for HIC analysis
KVElasticScatter Class Reference

Detailed Description

Calculate elastic scattering spectra in specific detectors of a multidetector array ,.

KVElasticScatter can be used to simulate elastic and inelastic scattering of projectile nuclei in experimental targets, and calculate the energy spectra of the scattered projectile- or target-like nuclei in all detectors on a given trajectory through the array.

See also
KVElasticCountRates

To begin, build the geometry of the multidetector array for a given dataset:

static KVMultiDetArray * MakeMultiDetector(const Char_t *dataset_name, Int_t run=-1, TString classname="KVMultiDetArray", KVExpDB *db=nullptr)

Then initialise a KVElasticScatter with the required run number which will be used to define the default kinematics and the target properties (for energy loss calculations before and after the scattering occurs), e.g.

Calculate elastic scattering spectra in specific detectors of a multidetector array ,...

To define the trajectory for the scattering, give the name of a detector in the array:

es.SetDetector("SI2-111");
Info in <SetDetector>: Using trajectory: CSI-111/SI2-111/SI1-111/
void Info(const char *location, const char *fmt,...)

All particles in the simulation will be scattered into random \(\theta,\phi\) angles corresponding to the direction of these detectors.

Call the Print() method to see the current definitions that will be used by the simulation:

es.Print();
Info in <Print>: CALCULATION DETAILS:
Info in <Print>: Entrance channel is: 12C + 1H 11.0 MeV/A
Info in <Print>: Target used is:
Target CH2[193], Target for experiment
Collection name='KVSeqCollection_1269', embedded list class='TList', size=1
KVMaterial: Polyethylene (CH2)
Thickness 0.000205319 cm
Area density 0.000193 g/cm**2
-----------------------------------------------
Z = 2.66667 atomic mass = 4.66667
Density = 0.94 g/cm**3
-----------------------------------------------
Info in <Print>: Scattering will be calculated for outgoing PROJECTILE_LIKE
Info in <Print>: We will use the HIGH ENERGY kinematic solutions
Info in <Print>: Particles scattered towards SI2-111: theta:[3.330839,5.169196] phi:[22.297653,46.662894]
size_t size(const MatrixT &matrix)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
char name[80]
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:90
constexpr Double_t C()
constexpr Double_t H()
const long double cm
Definition: KVUnits.h:69
const long double MeV
energies
Definition: KVUnits.h:91

If all is correct, run the simulation for a given number of events by calling:

es.CalculateScattering(1000);

Afterwards, you can retrieve the histograms of energy loss in each of the detectors on the chosen trajectory using the label (not the type) of each detector:

es.GetEnergy("SI1")->GetMean();
(double) 120.07858
es.GetEnergy("SI2")->Draw();

etc. etc.

Setting/changing the target nucleus for the kinematics

In the previous example with a carbon beam and polyethylene target, you can see that of the two possible target nuclei in this compound target, it is the protons which are used by default: this has been defined for the systemm corresponding to the chosen run in the database. If you want to change the target nucleus to use for the kinematics, for example to scatter on carbon nuclei, do

es.SetTargetNucleusForScattering("12C");

You can call the Print() method at any moment to check the updated details of the simulation:

es.Print();
Info in <Print>: CALCULATION DETAILS:
Info in <Print>: Entrance channel is: 12C + 12C 11.0 MeV/A
...

If the physical target for the chosen run has several layers, by default the scattering will take place in different layers from one event to the next. In this case a different target nucleus can be used for each scattering, depending on the interaction point in the target, if you call:

es.GetTargetNucleusFromTargetLayer(kTRUE);
es.Print()
Info in <Print>: CALCULATION DETAILS:
Info in <Print>: Projectile is 12C 11.0 MeV/u; target nucleus depends on scattering layer.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Note
In this case, each layer of the target must be made of a single element, not a compound!

Setting/changing the outgoing nucleus of interest

As you can see above, by default the spectra of energy losses in the different detectors are calculated for the outgoing projectile-like nuclei: to change this, i.e. to calculate for outgoing target-like nuclei, do

es.SetNucleusOfInterest(KV2Body::target_like);
@ target_like
Definition: KV2Body.h:267

Choice of kinematic solution

As also indicated above, in case there are 2 kinematic solutions for the chosen kinematics and lab angle (detector), by default the high-energy solution corresponding to the most forward centre-of-mass angle solution is used. To change, you can do either

es.SetKinematicSolution(KV2Body::low_E_branch);
@ low_E_branch
Definition: KV2Body.h:271

to use the solution for backward centre-of-mass angles, or

es.SetKinematicSolution(KV2Body::both_branches);
@ both_branches
Definition: KV2Body.h:272

to randomly choose, event by event, one of the two solutions according to the ratio of the corresponding (Rutherford scattering) cross-sections.

Multilayer targets

When multilayer targets are used, the user can restrict the scattering calculation to one specific layer. Energy losses before and after the scattering in the other layers of the target are of course still taken into account. To set the part of the target where scattering takes place use e.g.

es.SetTargetScatteringLayer("Ni")

with the name of the layer you require (this is normally the name of the element making up the layer - see KVTarget for details).

Inelastic scattering

Calculations can also be performed for inelastic scattering e.g. when either the outgoing projectile- or target-like nucleus is left in an excited state (N.B. we still use the Rutherford elastic scattering cross-section for weighting the energy loss distributions). In order to do this, call

es.SetExcitation(4.438);

with the excitation energy after inelastic scattering.

Definition at line 190 of file KVElasticScatter.h.

#include <KVElasticScatter.h>

Inheritance diagram for KVElasticScatter:

Public Member Functions

 KVElasticScatter (Int_t run)
 Default constructor. More...
 
virtual ~ KVElasticScatter ()
 
void CalculateScattering (Int_t N)
 Perform scattering 'N' times. More...
 
TH1FGetDepth ()
 Return pointer to histogram of 'depth' of scattering point in target (in mg/cm2) More...
 
Int_t GetEbinning (void)
 Returns the number of bins of the GetEnergy histogram. More...
 
TH1FGetEnergy ()
 Return pointer to energy loss histogram for chosen detector (in MeV) More...
 
TH1FGetEnergy (const Char_t *label)
 Energy loss in detector with given 'label' through which scattered particle passes. More...
 
TH1FGetEnergy (Int_t index)
 
auto GetKinematics ()
 
Int_t GetNDets () const
 Returns the number of detectors crossed by the scattered particle. More...
 
void GetTargetNucleusFromTargetLayer (Bool_t yes=kTRUE)
 
TH1FGetTheta ()
 Return pointer to polar angle distribution of scattered particle (in degrees) More...
 
void Print () const
 Print details of calculation to be performed. More...
 
void SetBeamDirection (const TVector3 &beam_dir)
 
void SetDetector (const Char_t *det)
 
void SetEbinning (Int_t nbins)
 
void SetExcitation (Double_t ex)
 
void SetKinematicSolution (KV2Body::kinematic_solution ik)
 
void SetNucleusOfInterest (KV2Body::nucleus_of_interest noi)
 
void SetOutGoingProjectileLike (const KVNucleus &opl)
 
void SetTargetNucleusForScattering (const KVNucleus &tn)
 
void SetTargetScatteringLayer (const Char_t *name)
 

Private Member Functions

virtual void detect_particle_fill_histograms (KVNucleus *ejectile, double theta, double phi, double xsec)
 
virtual void end_of_run ()
 
virtual std::pair< double, double > get_random_angles_for_scattering (const KV2Body &scattering_kinematics)
 
virtual bool initial_checks_and_reset ()
 
virtual void reset_before_new_scattering ()
 
void SetRun (Int_t run)
 

Private Attributes

TList fAlignedDetectors
 all aligned detectors More...
 
Double_t fAtomicDensity
 number of atoms per barn (10^-24 cm2) in target More...
 
TVector3 fBeamDirection {0, 0, 1}
 
Int_t fBinE = 100
 
TH1FfDepth = nullptr
 
KVDetectorfDetector = nullptr
 
KVNameValueList fDetInd
 detector type-index association More...
 
Double_t fExx = 0.0
 
Bool_t fGetTargFromLay = false
 
TObjArray fHistos
 energy loss histograms for all hit detectors More...
 
Int_t fIntLayer = 0
 
KV2BodyfKinematics = nullptr
 
KV2Body::kinematic_solution fKineSol = KV2Body::kinematic_solution::high_E_branch
 
Bool_t fMultiLayer = false
 
Int_t fNDets
 number of aligned detectors More...
 
Double_t fNtirages
 
KV2Body::nucleus_of_interest fNucleusOfInterest = KV2Body::nucleus_of_interest::projectile_like
 
std::optional< KVNucleusfOutgoingPL
 optional different nucleus for outgoing projectile-like More...
 
KVTargetfTarget = nullptr
 
std::optional< KVNucleusfTargetNuc
 optional different target nucleus for scattering More...
 
TH1FfTheta = nullptr
 

Constructor & Destructor Documentation

◆ KVElasticScatter()

KVElasticScatter::KVElasticScatter ( Int_t  run)

Default constructor.

Definition at line 28 of file KVElasticScatter.cpp.

◆ ~ KVElasticScatter()

virtual KVElasticScatter::~ KVElasticScatter ( )
virtual

Member Function Documentation

◆ CalculateScattering()

void KVElasticScatter::CalculateScattering ( Int_t  N)

Perform scattering 'N' times.

Definition at line 244 of file KVElasticScatter.cpp.

◆ detect_particle_fill_histograms()

void KVElasticScatter::detect_particle_fill_histograms ( KVNucleus ejectile,
double  theta,
double  phi,
double  xsec 
)
privatevirtual

Reimplemented in KVElasticCountRates.

Definition at line 224 of file KVElasticScatter.cpp.

◆ end_of_run()

virtual void KVElasticScatter::end_of_run ( )
inlineprivatevirtual

Reimplemented in KVElasticCountRates.

Definition at line 220 of file KVElasticScatter.h.

◆ get_random_angles_for_scattering()

std::pair< double, double > KVElasticScatter::get_random_angles_for_scattering ( const KV2Body scattering_kinematics)
privatevirtual

Reimplemented in KVElasticCountRates.

Definition at line 199 of file KVElasticScatter.cpp.

◆ GetDepth()

TH1F* KVElasticScatter::GetDepth ( )
inline

Return pointer to histogram of 'depth' of scattering point in target (in mg/cm2)

Definition at line 293 of file KVElasticScatter.h.

◆ GetEbinning()

Int_t KVElasticScatter::GetEbinning ( void  )
inline

Returns the number of bins of the GetEnergy histogram.

Definition at line 315 of file KVElasticScatter.h.

◆ GetEnergy() [1/3]

TH1F* KVElasticScatter::GetEnergy ( )
inline

Return pointer to energy loss histogram for chosen detector (in MeV)

Definition at line 298 of file KVElasticScatter.h.

◆ GetEnergy() [2/3]

TH1F * KVElasticScatter::GetEnergy ( const Char_t label)

Energy loss in detector with given 'label' through which scattered particle passes.

Definition at line 409 of file KVElasticScatter.cpp.

◆ GetEnergy() [3/3]

TH1F * KVElasticScatter::GetEnergy ( Int_t  index)

Energy loss in any detector through which scattered particle passes.

The index corresponds to the order in which detectors are crossed by the particle, beginning with 0 for the first detector, and ending with (GetNDets()-1)

Definition at line 426 of file KVElasticScatter.cpp.

◆ GetKinematics()

auto KVElasticScatter::GetKinematics ( )
inline

Definition at line 319 of file KVElasticScatter.h.

◆ GetNDets()

Int_t KVElasticScatter::GetNDets ( ) const
inline

Returns the number of detectors crossed by the scattered particle.

Definition at line 310 of file KVElasticScatter.h.

◆ GetTargetNucleusFromTargetLayer()

void KVElasticScatter::GetTargetNucleusFromTargetLayer ( Bool_t  yes = kTRUE)
inline

Call with yes=kTRUE if you have a multilayer target with random sampling of interaction point, and you want to calculate the scattering from the different target nucleus in each layer.

Note: this will only work if all layers of the target are single elements (i.e. a single type of nucleus in each layer), not compounds.

Definition at line 275 of file KVElasticScatter.h.

◆ GetTheta()

TH1F* KVElasticScatter::GetTheta ( )
inline

Return pointer to polar angle distribution of scattered particle (in degrees)

Definition at line 303 of file KVElasticScatter.h.

◆ initial_checks_and_reset()

bool KVElasticScatter::initial_checks_and_reset ( )
privatevirtual

Reimplemented in KVElasticCountRates.

Definition at line 177 of file KVElasticScatter.cpp.

◆ Print()

void KVElasticScatter::Print ( void  ) const

Print details of calculation to be performed.

Definition at line 441 of file KVElasticScatter.cpp.

◆ reset_before_new_scattering()

virtual void KVElasticScatter::reset_before_new_scattering ( )
inlineprivatevirtual

Reimplemented in KVElasticCountRates.

Definition at line 217 of file KVElasticScatter.h.

◆ SetBeamDirection()

void KVElasticScatter::SetBeamDirection ( const TVector3 beam_dir)
inline

Use to change alignment of beam (default is {0,0,1})

Definition at line 226 of file KVElasticScatter.h.

◆ SetDetector()

void KVElasticScatter::SetDetector ( const Char_t det)

Give name of detector towards which elastic scattering will occur.

Note
this does not necessarily mean that the particle will actually arrive in the given detector (it may stop before it), but the aim is to define the trajectory of the particle in the array.

Definition at line 91 of file KVElasticScatter.cpp.

◆ SetEbinning()

void KVElasticScatter::SetEbinning ( Int_t  nbins)

Set binning of the GetEnergy histogram Default value is 500

Definition at line 166 of file KVElasticScatter.cpp.

◆ SetExcitation()

void KVElasticScatter::SetExcitation ( Double_t  ex)
inline

To simulate inelastic scattering use this method to set the total excitation energy (in MeV).

This value will be used for all subsequent calculations.

Use SetExcitation(0) to return to elastic scattering.

Definition at line 260 of file KVElasticScatter.h.

◆ SetKinematicSolution()

void KVElasticScatter::SetKinematicSolution ( KV2Body::kinematic_solution  ik)
inline

Except for projectile-like nuclei in direct kinematics, for almost every other case the kinematics of outgoing nuclei is double-valued, i.e. to each c.m. scattering angle corresponds 2 lab scattering angles, with different energies.

The case with the smallest (most forward) c.m./lab angles is referred to as the 'high energy branch', while the solution at more backward angles has lower energies.

By default we use the high energy branch; you can choose the low energy here.

Definition at line 244 of file KVElasticScatter.h.

◆ SetNucleusOfInterest()

void KVElasticScatter::SetNucleusOfInterest ( KV2Body::nucleus_of_interest  noi)
inline

Define the the nucleus of interest in the outgoing channel of the reaction

PROJECTILE + TARGET -> PROJECTILE_LIKE + TARGET_LIKE

Note that the identity of the outgoing PROJECTILE_LIKE can be changed with method SetOutgoingProjectileLike() which will of course change TARGET_LIKE to conserve mass and charge.

Definition at line 232 of file KVElasticScatter.h.

◆ SetOutGoingProjectileLike()

void KVElasticScatter::SetOutGoingProjectileLike ( const KVNucleus opl)
inline

Definition at line 269 of file KVElasticScatter.h.

◆ SetRun()

void KVElasticScatter::SetRun ( Int_t  run)
private

Set beam, detector parameters, target, etc. for run

The default reaction kinematics is that of the KVDBSystem associated to the run.

The default scattering position in the target is random.

Definition at line 63 of file KVElasticScatter.cpp.

◆ SetTargetNucleusForScattering()

void KVElasticScatter::SetTargetNucleusForScattering ( const KVNucleus tn)
inline

call this method to change the default target nucleus of the kinematics for the run

Definition at line 284 of file KVElasticScatter.h.

◆ SetTargetScatteringLayer()

void KVElasticScatter::SetTargetScatteringLayer ( const Char_t name)

For multilayer targets, use this method to choose in which layer the scattering will take place.

If name="", reset any previous choice so that scattering can take place in any layer

Definition at line 141 of file KVElasticScatter.cpp.

Member Data Documentation

◆ fAlignedDetectors

TList KVElasticScatter::fAlignedDetectors
private

all aligned detectors

Definition at line 197 of file KVElasticScatter.h.

◆ fAtomicDensity

Double_t KVElasticScatter::fAtomicDensity
private

number of atoms per barn (10^-24 cm2) in target

Definition at line 215 of file KVElasticScatter.h.

◆ fBeamDirection

TVector3 KVElasticScatter::fBeamDirection {0, 0, 1}
private

Definition at line 202 of file KVElasticScatter.h.

◆ fBinE

Int_t KVElasticScatter::fBinE = 100
private

Definition at line 194 of file KVElasticScatter.h.

◆ fDepth

TH1F* KVElasticScatter::fDepth = nullptr
private

Definition at line 192 of file KVElasticScatter.h.

◆ fDetector

KVDetector* KVElasticScatter::fDetector = nullptr
private

Definition at line 196 of file KVElasticScatter.h.

◆ fDetInd

KVNameValueList KVElasticScatter::fDetInd
private

detector type-index association

Definition at line 205 of file KVElasticScatter.h.

◆ fExx

Double_t KVElasticScatter::fExx = 0.0
private

Definition at line 206 of file KVElasticScatter.h.

◆ fGetTargFromLay

Bool_t KVElasticScatter::fGetTargFromLay = false
private

Definition at line 201 of file KVElasticScatter.h.

◆ fHistos

TObjArray KVElasticScatter::fHistos
private

energy loss histograms for all hit detectors

Definition at line 204 of file KVElasticScatter.h.

◆ fIntLayer

Int_t KVElasticScatter::fIntLayer = 0
private

Definition at line 203 of file KVElasticScatter.h.

◆ fKinematics

KV2Body* KVElasticScatter::fKinematics = nullptr
private

Definition at line 195 of file KVElasticScatter.h.

◆ fKineSol

KV2Body::kinematic_solution KVElasticScatter::fKineSol = KV2Body::kinematic_solution::high_E_branch
private

Definition at line 211 of file KVElasticScatter.h.

◆ fMultiLayer

Bool_t KVElasticScatter::fMultiLayer = false
private

Definition at line 200 of file KVElasticScatter.h.

◆ fNDets

Int_t KVElasticScatter::fNDets
private

number of aligned detectors

Definition at line 198 of file KVElasticScatter.h.

◆ fNtirages

Double_t KVElasticScatter::fNtirages
private

Definition at line 214 of file KVElasticScatter.h.

◆ fNucleusOfInterest

KV2Body::nucleus_of_interest KVElasticScatter::fNucleusOfInterest = KV2Body::nucleus_of_interest::projectile_like
private

Definition at line 210 of file KVElasticScatter.h.

◆ fOutgoingPL

std::optional<KVNucleus> KVElasticScatter::fOutgoingPL
private

optional different nucleus for outgoing projectile-like

Definition at line 207 of file KVElasticScatter.h.

◆ fTarget

KVTarget* KVElasticScatter::fTarget = nullptr
private

Definition at line 199 of file KVElasticScatter.h.

◆ fTargetNuc

std::optional<KVNucleus> KVElasticScatter::fTargetNuc
private

optional different target nucleus for scattering

Definition at line 208 of file KVElasticScatter.h.

◆ fTheta

TH1F* KVElasticScatter::fTheta = nullptr
private

Definition at line 193 of file KVElasticScatter.h.