9void nucleus(
Int_t nProtons = 40,
Int_t nNeutrons = 60)
11 Double_t NeutronRadius = 60, ProtonRadius = 60, NucleusRadius, distance = 60;
44 while (i < nProtons) {
48 x = (2 *
x - 1) * NucleusRadius;
49 y = (2 *
y - 1) * NucleusRadius;
50 z = (2 * z - 1) * NucleusRadius;
56 while (i < nNeutrons) {
60 x = (2 *
x - 1) * NucleusRadius;
61 y = (2 *
y - 1) * NucleusRadius;
62 z = (2 * z - 1) * NucleusRadius;
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
void SetVisLevel(Int_t level=3)
void CloseGeometry(Option_t *option="d")
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
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)
void SetTopVolume(TGeoVolume *vol)
void SetNsegments(Int_t nseg)
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.
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.