KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVTarget.h
1/***************************************************************************
2 KVTarget.h - description
3 -------------------
4 begin : 2/12/2003
5 copyright : (C) 2003 by J.D. Frankland
6 email : frankland@ganil.fr
7
8$Id: KVTarget.h,v 1.23 2008/12/11 16:39:47 ebonnet Exp $
9 ***************************************************************************/
10#ifndef _KV_TARGET_H_
11#define _KV_TARGET_H_
12
13#include "KVMaterial.h"
14
15class KVEvent;
16class KVParticle;
17
127class KVTarget: public KVMaterial {
128
129private:
130
131 enum {
132 kRandom = BIT(14), //random interaction depth or half-way ?
133 kIncoming = BIT(15), //calculate only energy loss from entrance up to interaction depth
134 kOutgoing = BIT(16) //calculate energy loss from interaction depth to exit
135 };
136
137protected:
138
143
144 void init();
145
146public:
147
148 KVTarget();
149 KVTarget(const KVTarget&);
150 ROOT_COPY_ASSIGN_OP(KVTarget)
151 KVTarget(const Char_t* material, Double_t thick = 0.0);
152 virtual ~ KVTarget();
153
155 {
157 return fNormal;
158 }
159 void SetAngleToBeam(Double_t a);
161
162 virtual void SetMaterial(const Char_t* type);
163 void SetLayerThickness(Float_t thick, Int_t ilayer = 1);
164
165 void AddLayer(const Char_t* material, Double_t thick);
167 {
168 return fNLayers;
169 };
171 {
172 return fTargets;
173 };
175 {
176 return (ilayer >
177 0 ? (ilayer <=
179 At(ilayer - 1) : 0) : 0);
180 };
185 KVMaterial* GetLayer(const Char_t* name);
186 Int_t GetLayerIndex(const Char_t* name);
187
191 {
192 return const_cast <KVTarget* >(this)->GetTotalThickness();
193 };
196 1, Int_t lay2 = 0);
197 Double_t GetEffectiveThickness(KVParticle* part = 0, Int_t ilayer = 1);
198 Double_t GetEffectiveThickness(TVector3& direction, Int_t ilayer = 1);
199 Double_t GetThickness(Int_t ilayer) const;
200
202 void SetInteractionLayer(Int_t ilayer, TVector3& dir);
203 void SetInteractionLayer(const Char_t* name, TVector3& dir);
204 void SetInteractionLayer(const Char_t* name, KVParticle* part);
205
207 {
208 return TestBit(kIncoming);
209 };
217 void SetIncoming(Bool_t r = kTRUE)
218 {
219 if (r) {
222 } else
224 };
226 {
227 return TestBit(kOutgoing);
228 };
237 void SetOutgoing(Bool_t r = kTRUE)
238 {
239 if (r) {
242 } else
244 };
245
247 {
248 return TestBit(kRandom);
249 };
250 void SetRandomized(Bool_t r = kTRUE)
251 {
252 if (r)
254 else
256 };
257
258 virtual void DetectParticle(KVNucleus*, TVector3* norm = 0);
259 virtual Double_t GetELostByParticle(KVNucleus*, TVector3* norm = 0);
262 Double_t Eres);
263 void DetectEvent(KVEvent*);
264
265 void Print(Option_t* opt = "") const;
266 void Clear(Option_t* opt = "");
267#if ROOT_VERSION_CODE >= ROOT_VERSION(3,4,0)
268 virtual void Copy(TObject& obj) const;
269#else
270 virtual void Copy(TObject& obj);
271#endif
273
274 Double_t GetAtomsPerCM2() const;
275
276 ClassDef(KVTarget, 1) //Simulate targets for experiments
277};
278
279
280
281#endif
int Int_t
ROOT::R::TRInterface & r
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define ClassDef(name, id)
#define BIT(n)
Abstract base class container for multi-particle events.
Definition KVEvent.h:67
Extended TList class which owns its objects by default.
Definition KVList.h:28
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition KVMaterial.h:94
Description of properties and kinematics of atomic nuclei.
Definition KVNucleus.h:126
Base class for relativistic kinematics of massive particles.
Definition KVParticle.h:396
Calculation/correction of energy losses of particles through an experimental target.
Definition KVTarget.h:127
void Print(Option_t *opt="") const
Definition KVTarget.cpp:736
Bool_t IsIncoming() const
Definition KVTarget.h:206
void SetIncoming(Bool_t r=kTRUE)
Definition KVTarget.h:217
KVTarget()
Default costructor.
Definition KVTarget.cpp:35
void SetAngleToBeam(Double_t a)
Definition KVTarget.cpp:178
const TVector3 & GetNormal()
Definition KVTarget.h:154
void init()
Default initialisations.
Definition KVTarget.cpp:15
virtual void Copy(TObject &obj) const
Copy this to obj.
Definition KVTarget.cpp:81
virtual void DetectParticle(KVNucleus *, TVector3 *norm=0)
Definition KVTarget.cpp:485
virtual Double_t GetELostByParticle(KVNucleus *, TVector3 *norm=0)
Definition KVTarget.cpp:593
@ kOutgoing
Definition KVTarget.h:134
@ kIncoming
Definition KVTarget.h:133
Int_t NumberOfLayers() const
Definition KVTarget.h:166
virtual Double_t GetParticleEIncFromERes(KVNucleus *, TVector3 *norm=0)
Definition KVTarget.cpp:957
KVList * fTargets
list of layers
Definition KVTarget.h:139
Bool_t IsOutgoing() const
Definition KVTarget.h:225
virtual Double_t GetIncidentEnergyFromERes(Int_t Z, Int_t A, Double_t Eres)
void Clear(Option_t *opt="")
Definition KVTarget.cpp:747
TVector3 & GetInteractionPoint(KVParticle *part=0)
Definition KVTarget.cpp:767
void SetRandomized(Bool_t r=kTRUE)
Definition KVTarget.h:250
KVMaterial * GetLayerByIndex(Int_t ilayer) const
Definition KVTarget.h:174
Int_t fNLayers
number of layers
Definition KVTarget.h:140
Double_t GetEffectiveThickness(KVParticle *part=0, Int_t ilayer=1)
Definition KVTarget.cpp:214
KVMaterial * GetLayer(TVector3 &depth)
Definition KVTarget.cpp:272
KVMaterial * GetLayerByDepth(Double_t depth)
Definition KVTarget.cpp:321
void AddLayer(const Char_t *material, Double_t thick)
Definition KVTarget.cpp:111
Double_t GetTotalEffectiveThickness(KVParticle *part=0)
Definition KVTarget.cpp:412
Double_t GetThickness() const
Definition KVTarget.h:190
void SetInteractionLayer(Int_t ilayer, TVector3 &dir)
Definition KVTarget.cpp:809
void DetectEvent(KVEvent *)
Definition KVTarget.cpp:716
virtual void SetMaterial(const Char_t *type)
Set material of first layer.
Definition KVTarget.cpp:899
TVector3 fNormal
normal to target - (0,0,1) by default
Definition KVTarget.h:141
Bool_t IsRandomized() const
Definition KVTarget.h:246
void SetOutgoing(Bool_t r=kTRUE)
Definition KVTarget.h:237
Double_t GetTotalThickness()
Definition KVTarget.cpp:138
Double_t GetAtomsPerCM2() const
virtual UInt_t GetUnits() const;
Definition KVTarget.cpp:926
Double_t GetAngleToBeam()
Gives angle of target to incident beam direction in degrees.
Definition KVTarget.cpp:193
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.
Definition KVTarget.cpp:912
Int_t GetLayerIndex(TVector3 &depth)
Definition KVTarget.cpp:292
TVector3 fIntPoint
last randomly generated interaction point
Definition KVTarget.h:142
KVList * GetLayers() const
Definition KVTarget.h:170
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void ResetBit(UInt_t f)