40 serv->SetItemField(
"/",
"_drawitem",
"world");
41 serv->SetItemField(
"/",
"_drawopt",
"tracks");
47 mat->SetTransparency(50);
57 double x = -8+16*
rnd->Rndm();
58 double y = -8+16*
rnd->Rndm();
59 double z = -8+16*
rnd->Rndm();
60 tr->SetTranslation (
x,
y, z);
61 tr->RegisterYourself();
67 if (
rnd->Rndm() < 0.5)
72 for (
int j=0;
j<50;
j++)
76 if (
rnd->Rndm() < 0.5)
80 track->SetLineWidth(2);
83 track->AddPoint(-10 + 20*
rnd->Rndm(), -10 + 20*
rnd->Rndm(), -10 + 20*
rnd->Rndm(), 0);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Class describing rotation + translation.
The manager class for any TGeo geometry.
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
Add a track to the list of tracks.
TVirtualGeoTrack * GetTrack(Int_t index)
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.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
void DrawTracks(Option_t *option="")
Draw tracks over the geometry, according to option.
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
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.
Online http server for arbitrary ROOT application.
Handles synchronous and a-synchronous timer events.