9void nucleus(
Int_t nProtons = 40,
Int_t nNeutrons = 60)
47 while ( i< nProtons) {
51 x = (2 *
x - 1) * NucleusRadius;
52 y = (2 *
y - 1) * NucleusRadius;
53 z = (2 * z - 1) * NucleusRadius;
59 while ( i < nNeutrons) {
63 x = (2 *
x - 1) * NucleusRadius;
64 y = (2 *
y - 1) * NucleusRadius;
65 z = (2 * z - 1) * NucleusRadius;
R__EXTERN TRandom * gRandom
The manager class for any TGeo geometry.
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
TGeoVolume * MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin=0, Double_t themax=180, Double_t phimin=0, Double_t phimax=360)
Make in one step a volume pointing to a sphere shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
Class describing translations.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void Draw(Option_t *option="") override
draw top volume according to option
void SetLineColor(Color_t lcolor) override
Set the line color.
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.