2 #include "KVNucleusEvent.h" 
   23    SetTitle(
"Target for experiment");
 
   26    fNormal.SetXYZ(0, 0, 1);
 
   27    fIntPoint.SetXYZ(0, 0, 0);
 
   54    AddLayer(material, thick);
 
   67 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0) 
   76 #if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0) 
   90    ((
KVTarget&) obj).SetRandomized(IsRandomized());
 
   91    ((
KVTarget&) obj).SetIncoming(IsIncoming());
 
   92    ((
KVTarget&) obj).SetOutgoing(IsOutgoing());
 
   96    TIter next(GetLayers());
 
  165    for (
int i = lay1; i <= lay2; i++) {
 
  255       Error(
"GetEffectiveThickness(Int_t ilayer, TVector3& direction)",
 
  256             "Layer number %d is illegal. Valid values are between 1 and %d.",
 
  309    return (thick < D ? 0 : i);
 
  345    return (mat ? 
GetLayers()->IndexOf(mat) + 1 : 0);
 
  399    return (thick < depth ? 0 : i);
 
  454    for (
Int_t i = ilay1; i <= ilay2; i++) {
 
  465 KVTarget::~KVTarget()
 
  496    if (kvp->
GetKE() <= 0.)
 
  512       cout << 
"IP is in layer " << iplay_index << endl;
 
  518       cout << 
"Particle is going ";
 
  519       backwards ? cout << 
"backwards" : cout << 
"forwards";
 
  537              e_thick_iplay : e_thick_iplay);
 
  542          cout << 
"Effective thickness of IP layer is " << e_thick_iplay <<
 
  559                   i >= ilay2 && kvp->
GetKE() > 0.; i--)
 
  564                   i <= ilay2 && kvp->
GetKE() > 0.; i++)
 
  573          Error(
"DetectParticle", 
"Interaction point is outside of target");
 
  622          clone_part.
SetKE(E0 - Eloss);
 
  630       cout << 
"IP is in layer " << iplay_index << endl;
 
  636       cout << 
"Particle is going ";
 
  637       backwards ? cout << 
"backwards" : cout << 
"forwards";
 
  655              e_thick_iplay : e_thick_iplay);
 
  660          cout << 
"Effective thickness of IP layer is " << e_thick_iplay <<
 
  677                   i >= ilay2 && clone_part.
GetKE() > 0.; i--) {
 
  681                clone_part.
SetKE(E0 - Eloss);
 
  686                   i <= ilay2 && clone_part.
GetKE() > 0.; i++) {
 
  690                clone_part.
SetKE(E0 - Eloss);
 
  699          Error(
"DetectParticle", 
"Interaction point is outside of target");
 
  823         "total effective thickness (along 'dir') of all layers before 'ilayer'=" 
  832    cout << 
"dpeth inside interaction layer=" << depth << endl;
 
  836    cout << 
"generated IP vector:" << endl;
 
  863       Error(
"SetInteractionLayer",
 
  864             "No layer in target with material type %s", 
name);
 
  983          clone_part.
SetKE(ERes);
 
  993       cout << 
"IP is in layer " << iplay_index << endl;
 
  999       cout << 
"Particle is going ";
 
 1000       backwards ? cout << 
"backwards" : cout << 
"forwards";
 
 1018              e_thick_iplay : e_thick_iplay);
 
 1023          cout << 
"Effective thickness of IP layer is " << e_thick_iplay <<
 
 1046                clone_part.
SetKE(ERes);
 
 1057                clone_part.
SetKE(ERes);
 
 1067          Error(
"GetParticleEIncFromERes", 
"Interaction point is outside of target");
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
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 Atom_t Time_t type
 
R__EXTERN TRandom * gRandom
 
char * Form(const char *fmt,...)
 
Class for iterating over nuclei in events accessed through base pointer/reference.
 
Abstract base class container for multi-particle events.
 
Extended TList class which owns its objects by default.
 
Description of physical materials used to construct detectors & targets; interface to range tables.
 
virtual void Copy(TObject &obj) const
Make a copy of this material object.
 
Double_t GetEffectiveAreaDensity(TVector3 &norm, TVector3 &direction)
 
void SetAreaDensity(Double_t dens)
 
Double_t GetAreaDensity() const
 
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=nullptr)
 
virtual void DetectParticle(KVNucleus *, TVector3 *norm=nullptr)
 
virtual void SetMaterial(const Char_t *type)
 
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=nullptr)
 
virtual void Clear(Option_t *opt="")
Reset absorber - set stored energy lost by particles in absorber to zero.
 
Description of properties and kinematics of atomic nuclei.
 
Int_t GetZ() const
Return the number of proton / atomic number.
 
Base class for relativistic kinematics of massive particles.
 
TVector3 GetMomentum() const
 
void SetKE(Double_t ecin)
 
void SetMomentum(const TVector3 *v)
 
virtual void Execute(const char *method, const char *params, Int_t *error=0)
 
virtual TObject * FindObjectByType(const Char_t *) const
 
virtual void Add(TObject *obj)
 
Calculation/correction of energy losses of particles through an experimental target.
 
void Print(Option_t *opt="") const
 
Bool_t IsIncoming() const
 
KVTarget()
Default costructor.
 
void SetAngleToBeam(Double_t a)
 
void init()
Default initialisations.
 
virtual void Copy(TObject &obj) const
Copy this to obj.
 
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
 
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0)
 
Int_t NumberOfLayers() const
 
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
 
KVList * fTargets
list of layers
 
Bool_t IsOutgoing() const
 
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
 
void Clear(Option_t *opt="")
 
TVector3 & GetInteractionPoint(KVParticle *part=0)
 
Int_t fNLayers
number of layers
 
Double_t GetEffectiveThickness(KVParticle *part=0, Int_t ilayer=1)
 
KVMaterial * GetLayer(TVector3 &depth)
 
KVMaterial * GetLayerByDepth(Double_t depth)
 
void AddLayer(const Char_t *material, Double_t thick)
 
Double_t GetTotalEffectiveThickness(KVParticle *part=0)
 
Double_t GetThickness() const
 
void SetInteractionLayer(Int_t ilayer, TVector3 &dir)
 
void DetectEvent(KVEvent *)
 
virtual void SetMaterial(const Char_t *type)
Set material of first layer.
 
TVector3 fNormal
normal to target - (0,0,1) by default
 
Bool_t IsRandomized() const
 
KVList * GetLayers() const
 
const TVector3 & GetNormal()
 
void SetOutgoing(Bool_t r=kTRUE)
 
Double_t GetTotalThickness()
 
Double_t GetAtomsPerCM2() const
virtual UInt_t GetUnits() const;
 
Double_t GetAngleToBeam()
Gives angle of target to incident beam direction in degrees.
 
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.
 
Int_t GetLayerIndex(TVector3 &depth)
 
TVector3 fIntPoint
last randomly generated interaction point
 
KVMaterial * GetLayerByIndex(Int_t ilayer) const
 
virtual void Print(Option_t *option, const char *wildcard, Int_t recurse=1) const
 
const char * GetName() const override
 
const char * GetTitle() const override
 
virtual void SetName(const char *name)
 
virtual void Error(const char *method, const char *msgfmt,...) const
 
virtual Double_t Uniform(Double_t x1, Double_t x2)
 
const char * Data() const
 
void SetXYZ(Double_t x, Double_t y, Double_t z)
 
void Print(Option_t *option="") const override
 
Double_t Angle(const TVector3 &) const
 
constexpr Double_t DegToRad()
 
constexpr Double_t RadToDeg()