Model of a nucleus built from TGeo classes.
void nucleus(
Int_t nProtons = 40,
Int_t nNeutrons = 60)
{
ProtonRadius = 60,
NucleusRadius,
distance = 60;
while ( i< nProtons) {
x = (2 *
x - 1) * NucleusRadius;
y = (2 *
y - 1) * NucleusRadius;
z = (2 * z - 1) * NucleusRadius;
i++;
}
}
i = 0;
while ( i < nNeutrons) {
x = (2 *
x - 1) * NucleusRadius;
y = (2 *
y - 1) * NucleusRadius;
z = (2 * z - 1) * NucleusRadius;
i++;
}
}
}
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=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
virtual void Draw(Option_t *option="")
draw top volume according to option
virtual void SetLineColor(Color_t lcolor)
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)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)