21 "Geometry using assemblies");
27 auto Vacuum =
new TGeoMedium(
"Vacuum",1, matVacuum);
28 auto Al =
new TGeoMedium(
"Aluminium",2, matAl);
31 auto top = geom->MakeBox(
"TOP", Vacuum, 1000., 1000., 100.);
32 geom->SetTopVolume(top);
42 Double_t dshift = 2.*xplate + xtooth;
45 auto plate = geom->MakeBox(
"PLATE", Al, xplate,yplate,1);
46 plate->SetLineColor(
kBlue);
47 auto tooth = geom->MakeBox(
"TOOTH", Al, xtooth,ytooth,1);
48 tooth->SetLineColor(
kBlue);
49 tplate->AddNode(plate,1);
50 for (i=0; i<ntooth; i++) {
52 yt = -yplate + (4*i+1)*ytooth;
55 yt = -yplate + (4*i+3)*ytooth;
80 for (i=0; i<ncells; i++) {
81 Double_t ycell = (2*i+1)*(dshift+10);
89 for (i=0; i<nrows; i++) {
92 if ((i%2)==0) yrow = -yrow;
98 geom->CloseGeometry();
105 en->GetNode()->GetVolume()->SetVisibility(
kFALSE);
111 en->ExpandIntoListTreesRecursively();
112 en->Save(
"assembly.root",
"Assembly");
R__EXTERN TEveManager * gEve
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TSystem * gSystem
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
void AddGlobalElement(TEveElement *element, TEveElement *parent=nullptr)
Add a global element, i.e.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Class describing rotation + translation.
The manager class for any TGeo geometry.
TGeoNode * GetTopNode() const
Base class describing materials.
Media are used to store properties related to tracking and which are useful only when using geometry ...
Class describing rotations.
void RotateZ(Double_t angle) override
Rotate about Z axis of the master frame with angle expressed in degrees.
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.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
constexpr Double_t DegToRad()
Conversion from degree to radian: .
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.