183 gClient->GetColorByName(
"#ff0000", color);
188 fManagerName->SetToolTipText(
"Enter the geometry name");
197 gClient->GetColorByName(
"#ff0000", color);
217 gClient->GetColorByName(
"#ff0000", color);
222 gClient->GetColorByName(
"#0000ff", color);
227 fBSelTop->SetToolTipText(
"Select the top volume");
232 fCloseGeometry->SetToolTipText(
"Close geometry to make it ready for tracking");
246 gClient->GetColorByName(
"#ff0000", color);
256 fShapeButton[1]->SetToolTipText(
"Create a parallelipiped");
258 fShapeButton[2]->SetToolTipText(
"Create a TRD1 trapezoid");
260 fShapeButton[3]->SetToolTipText(
"Create a TRD2 trapezoid");
262 fShapeButton[4]->SetToolTipText(
"Create a general trapezoid");
264 fShapeButton[5]->SetToolTipText(
"Create a general twisted trapezoid");
265 for (ipict = 0; ipict < 6; ipict++)
270 fShapeButton[6]->SetToolTipText(
"Create a extruded polygone");
272 fShapeButton[7]->SetToolTipText(
"Create an arbitrary trapezoid with 8 vertices");
274 fShapeButton[8]->SetToolTipText(
"Create a cylindrical pipe");
276 fShapeButton[9]->SetToolTipText(
"Create a cylindrical pipe within a phi range");
278 fShapeButton[10]->SetToolTipText(
"Create a conical pipe");
280 fShapeButton[11]->SetToolTipText(
"Create a conical pipe within a phi range");
281 for (ipict = 0; ipict < 6; ipict++)
286 fShapeButton[12]->SetToolTipText(
"Create a spherical sector");
290 fShapeButton[14]->SetToolTipText(
"Create an elliptical tube");
292 fShapeButton[15]->SetToolTipText(
"Create a toroidal tube with a phi range");
294 fShapeButton[16]->SetToolTipText(
"Create a polycone shape");
296 fShapeButton[17]->SetToolTipText(
"Create a polygon shape");
297 for (ipict = 0; ipict < 6; ipict++)
302 fShapeButton[18]->SetToolTipText(
"Create a hyperboloid");
304 fShapeButton[19]->SetToolTipText(
"Create a paraboloid");
306 fShapeButton[20]->SetToolTipText(
"Create a composite shape");
307 for (ipict = 0; ipict < 3; ipict++)
316 gClient->GetColorByName(
"#ff0000", color);
322 gClient->GetColorByName(
"#0000ff", color);
327 fBSelShape->SetToolTipText(
"Select one of the existing shapes");
332 fEditShape->SetToolTipText(
"Edit selected shape");
346 gClient->GetColorByName(
"#ff0000", color);
354 fVolumeName->SetToolTipText(
"Enter the name for the new volume");
362 gClient->GetColorByName(
"#0000ff", color);
367 fBSelShape2->SetToolTipText(
"Select one of the existing shapes");
376 gClient->GetColorByName(
"#0000ff", color);
381 fBSelMedium2->SetToolTipText(
"Select one of the existing media");
389 fVolumeButton[0]->SetToolTipText(
"Create a new volume from shape and medium");
391 fVolumeButton[1]->SetToolTipText(
"Create a new volume assembly having the selected name");
392 for (ipict = 0; ipict < 2; ipict++)
400 gClient->GetColorByName(
"#ff0000", color);
406 gClient->GetColorByName(
"#0000ff", color);
411 fBSelVolume->SetToolTipText(
"Select one of the existing volumes");
418 fEditVolume->SetToolTipText(
"Edit selected volume");
422 fSetTopVolume->SetToolTipText(
"Set top volume for geometry");
438 gClient->GetColorByName(
"#ff0000", color);
445 fMaterialName->SetToolTipText(
"Enter the new material name");
482 fMaterialButton[0]->SetToolTipText(
"Create a new material from element and density");
484 fMaterialButton[1]->SetToolTipText(
"Create a new mixture with selected density");
485 for (ipict = 0; ipict < 2; ipict++)
494 gClient->GetColorByName(
"#ff0000", color);
500 gClient->GetColorByName(
"#0000ff", color);
505 fBSelMaterial->SetToolTipText(
"Select one of the existing materials");
524 gClient->GetColorByName(
"#ff0000", color);
532 fMediumName->SetToolTipText(
"Enter the new medium name");
550 gClient->GetColorByName(
"#0000ff", color);
555 fBSelMaterial2->SetToolTipText(
"Select one of the existing materials");
562 fMediumButton->SetToolTipText(
"Create a new medium from selected material");
572 gClient->GetColorByName(
"#ff0000", color);
578 gClient->GetColorByName(
"#0000ff", color);
583 fBSelMedium->SetToolTipText(
"Select one of the existing media");
588 fEditMedium->SetToolTipText(
"Edit selected medium");
602 gClient->GetColorByName(
"#ff0000", color);
610 fMatrixName->SetToolTipText(
"Enter the new matrix name");
621 fMatrixButton[2]->SetToolTipText(
"Create a rotation + translation");
622 for (ipict = 0; ipict < 3; ipict++)
630 gClient->GetColorByName(
"#ff0000", color);
636 gClient->GetColorByName(
"#0000ff", color);
641 fBSelMatrix->SetToolTipText(
"Select one of the existing matrices");
646 fEditMatrix->SetToolTipText(
"Edit selected matrix");
699 fTabMgr->GetVolumeTab()->Cleanup();
723 c->Connect(
"Selected(TVirtualPad*,TObject*,Int_t)",
"TGeoManagerEditor",
this,
724 "SelectedSlot(TVirtualPad*,TObject*,Int_t)");
733 "SelectedSlot(TVirtualPad*,TObject*,Int_t)");
741 fManagerName->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
742 fManagerTitle->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
743 fExportButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoExportGeometry()");
744 fCloseGeometry->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCloseGeometry()");
745 fShapeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateBox()");
746 fShapeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePara()");
747 fShapeButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd1()");
748 fShapeButton[3]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd2()");
749 fShapeButton[4]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrap()");
750 fShapeButton[5]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateGtra()");
751 fShapeButton[6]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateXtru()");
752 fShapeButton[7]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateArb8()");
753 fShapeButton[8]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTube()");
754 fShapeButton[9]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTubs()");
755 fShapeButton[10]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCone()");
756 fShapeButton[11]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCons()");
757 fShapeButton[12]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateSphe()");
758 fShapeButton[13]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCtub()");
759 fShapeButton[14]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateEltu()");
760 fShapeButton[15]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTorus()");
761 fShapeButton[16]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePcon()");
762 fShapeButton[17]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePgon()");
763 fShapeButton[18]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateHype()");
764 fShapeButton[19]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateParab()");
765 fShapeButton[20]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateComposite()");
766 fMatrixButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTranslation()");
767 fMatrixButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateRotation()");
768 fMatrixButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCombi()");
769 fVolumeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateVolume()");
770 fVolumeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateAssembly()");
771 fBSelTop->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectTopVolume()");
772 fBSelVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectVolume()");
773 fBSelShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape()");
774 fBSelShape2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape2()");
775 fBSelMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMatrix()");
776 fBSelMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial()");
777 fBSelMaterial2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial2()");
778 fBSelMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium()");
779 fBSelMedium2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium2()");
780 fSetTopVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSetTopVolume()");
781 fEditShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditShape()");
782 fEditMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMedium()");
783 fEditMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMaterial()");
784 fEditMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMatrix()");
785 fEditVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditVolume()");
787 fMaterialButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMaterial()");
788 fMaterialButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMixture()");
789 fMediumButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMedium()");
817 if (!
fGeometry->GetListOfShapes()->GetEntries() || !
fGeometry->GetListOfMedia()->GetSize())
821 if (!
fGeometry->GetListOfShapes()->GetEntries())
825 if (!
fGeometry->GetListOfVolumes()->GetEntries())
829 if (!
fGeometry->GetListOfMedia()->GetSize())
833 if (!
fGeometry->GetListOfMatrices()->GetEntries())
839 if (!
fGeometry->GetListOfMaterials()->GetSize()) {
893 if (
fGeometry->GetListOfMedia()->GetSize())
906 if (
fGeometry->GetListOfMedia()->GetSize())
919 if (
fGeometry->GetListOfMedia()->GetSize())
932 if (
fGeometry->GetListOfMedia()->GetSize())
943 fSelectedShape =
new TGeoTrap(
TString::Format(
"trap_%i",
id), 1., 15., 45., 0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
945 if (
fGeometry->GetListOfMedia()->GetSize())
957 new TGeoGtra(
TString::Format(
"gtra_%i",
id), 1., 15., 45., 45., 0.5, 0.3, 0.5, 30., 0.5, 0.3, 0.5, 30.);
959 if (
fGeometry->GetListOfMedia()->GetSize())
983 if (
fGeometry->GetListOfMedia()->GetSize())
996 if (
fGeometry->GetListOfMedia()->GetSize())
1009 if (
fGeometry->GetListOfMedia()->GetSize())
1022 if (
fGeometry->GetListOfMedia()->GetSize())
1035 if (
fGeometry->GetListOfMedia()->GetSize())
1046 fSelectedShape =
new TGeoCtub(
TString::Format(
"ctub_%i",
id), 0.5, 1., 1., 0., 45., 0., 0., -1, 0., 0., 1);
1048 if (
fGeometry->GetListOfMedia()->GetSize())
1061 if (
fGeometry->GetListOfMedia()->GetSize())
1074 if (
fGeometry->GetListOfMedia()->GetSize())
1089 if (
fGeometry->GetListOfMedia()->GetSize())
1104 if (
fGeometry->GetListOfMedia()->GetSize())
1117 if (
fGeometry->GetListOfMedia()->GetSize())
1139 Error(
"DoCreateMaterial",
"Cannot find selected element in list");
1176 if (
fGeometry->GetListOfShapes()->GetEntries())
1273 fTabMgr->GetPad()->GetView()->ShowAxis();
ULong_t Pixel_t
Pixel value.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
@ kMANAGER_MATERIAL_SELECT
@ kMANAGER_MATERIAL_SELECT2
@ kMANAGER_ELEMENT_SELECT
@ kMANAGER_MEDIUM_SELECT2
@ kMANAGER_DENSITY_SELECT
R__EXTERN TGeoManager * gGeoManager
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
TGHotString is a string with a "hot" character underlined.
This class handles GUI labels.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
This class describes layout hints used by the layout classes.
TGNumberEntry is a number entry input widget with up/down buttons.
TGClient * fClient
Connection to display server.
TGFrame * GetContainer() const
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
TGedEditor * fGedEditor
manager of this frame
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
Class describing rotation + translation.
A cone segment is a cone having a range in phi.
The cones are defined by 5 parameters:
The cut tubes constructor has the form:
TGeoElement * GetElement(Int_t z)
Int_t GetNelements() const
Base class for chemical elements.
An elliptical tube is defined by the two semi-axes A and B.
A hyperboloid is represented as a solid limited by two planes perpendicular to the Z axis (top and bo...
Editor for TGeoManager class.
void DoCreateCons()
Create a cone segment.
void DoCreateArb8()
Create an arbitrary polygone with maximum 8 vertices sitting on 2 parallel planes.
void DoCreatePgon()
Create a polygone shape.
void DoSelectMedium()
Slot for selecting an existing medium.
TGeoMaterial * fSelectedMaterial
void DoCreateAssembly()
Create a new volume assembly.
TGNumberEntry * fMediumId
TGPictureButton * fBSelMedium2
void DoCreateHype()
Create a hyperboloid.
void ConnectSelected(TCanvas *c)
void DoSelectMaterial()
Slot for selecting an existing material.
TGCompositeFrame * fVolumeTab
TGPictureButton * fVolumeButton[2]
void DoSelectShape()
Slot for selecting an existing shape.
void DoEditVolume()
Slot for editing selected volume.
void DoSelectShape2()
Slot for selecting a shape for making a volume.
TGPictureButton * fBSelMatrix
TGPictureButton * fMatrixButton[3]
TGPictureButton * fMediumButton
void DoEditMedium()
Slot for editing selected medium.
TGTextButton * fEditMedium
void DoCreatePara()
Create a parallelipiped.
void DoSelectTopVolume()
Slot for setting top geometry volume.
void DoCreateTubs()
Create a tube segment.
TGTextEntry * fMediumName
void DoCreateTrd1()
Create a Trd1.
void SetModel(TObject *obj) override
Refresh editor according the selected obj.
TGTextButton * fEditVolume
TGeoMedium * fSelectedMedium2
void DisconnectSelected()
void DoCreateGtra()
Create a twisted trapezoid.
TGTextButton * fEditMaterial
void DoEditMatrix()
Slot for editing selected matrix.
void DoCloseGeometry()
Slot for closing the geometry.
TGPictureButton * fBSelShape2
void DoCreateParab()
Create a paraboloid.
void DoSelectMedium2()
Slot for selecting an existing medium for making a volume.
void DoCreateBox()
Create a box.
TGComboBox * fElementList
void DoSetTopVolume()
Set top volume for the geometry.
TGTextButton * fEditShape
TGTextEntry * fManagerName
void DoSelectVolume()
Slot for selecting an existing volume.
void DoName()
Change name/title of the geometry.
void DoEditMaterial()
Slot for editing selected material.
virtual void ConnectSignals2Slots()
Connect signals to slots.
void DoCreateTranslation()
Create a new translation.
void DoCreateMixture()
Create a new mixture.
TGPictureButton * fBSelMaterial
TGeoMaterial * fSelectedMaterial2
TGTextEntry * fVolumeName
TGPictureButton * fBSelVolume
void ShowSelectMaterial(Bool_t show=kTRUE)
Show/hide interface for material selection.
void DoCreateTrd2()
Create a Trd2.
TGeoMatrix * fSelectedMatrix
void DoCreateVolume()
Create a new volume.
void DoCreateCone()
Create a cone.
void DoCreateXtru()
Create an extruded polygone.
TGTextButton * fSetTopVolume
TGeoShape * fSelectedShape
TGeoVolume * fSelectedVolume
void DoExportGeometry()
Export geometry as .root or .C file.
TGTextEntry * fMatrixName
void DoCreateTube()
Create a tube.
TGPictureButton * fBSelMaterial2
TGTextButton * fEditMatrix
TGTextButton * fExportButton
TGeoMedium * fSelectedMedium
TGTextEntry * fMaterialName
void DoCreatePcon()
Create a polycone shape.
TGTextEntry * fManagerTitle
void DoCreateTorus()
Create a torus shape.
void DoCreateTrap()
Create a general trapezoid.
TGTextButton * fCloseGeometry
void DoCreateSphe()
Create a sphere.
TGPictureButton * fBSelShape
TGRadioButton * fExportOption[2]
void DoSelectMaterial2()
Slot for selecting an existing material and making a medium.
void DoCreateMaterial()
Create a new material.
TGPictureButton * fBSelTop
~TGeoManagerEditor() override
Destructor.
void ShowSelectMedium(Bool_t show=kTRUE)
Show/hide interface for medium selection.
virtual void SelectedSlot(TVirtualPad *pad, TObject *obj, Int_t event)
Connected to TCanvas::Selected.
TGeoShape * fSelectedShape2
void ShowSelectVolume(Bool_t show=kTRUE)
Show/hide interface for volume selection.
void DoCreateMedium()
Create a new medium.
TCanvas * fConnectedCanvas
void ShowSelectShape(Bool_t show=kTRUE)
Show/hide interface for shape selection.
void ShowSelectMatrix(Bool_t show=kTRUE)
Show/hide interface for matrix selection.
void DoSelectMatrix()
Slot for selecting an existing matrix.
static void LoadLib()
Dummy static function, used to load plugin.
TGPictureButton * fMaterialButton[2]
TGNumberEntry * fEntryDensity
void DoEditShape()
Slot for editing selected shape.
void DoCreateEltu()
Create an elliptical tube.
void DoCreateCombi()
Create a new translation + rotation.
void DoCreateComposite()
Create a composite shape.
void DoCreateRotation()
Create a new rotation.
TGPictureButton * fBSelMedium
TGPictureButton * fShapeButton[21]
void DoCreateCtub()
Create a cut tube.
TGeoManagerEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for manager editor.
The manager class for any TGeo geometry.
Base class describing materials.
Geometrical transformation package.
Media are used to store properties related to tracking and which are useful only when using geometry ...
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
Polygons are defined in the same way as polycones, the difference being just that the segments betwee...
Class describing rotations.
Base abstract class for all shapes.
TGeoSphere are not just balls having internal and external radii, but sectors of a sphere having defi...
static TGeoTabManager * GetMakeTabManager(TGedEditor *ged)
Static method to return the tab manager currently appended to the pad or create one if not existing.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
The torus is defined by its axial radius, its inner and outer radius.
Class describing translations.
A trapezoid with only X varying with Z.
A trapezoid with only X varying with Z.
static TObject * GetSelected()
static; return selected object
A tube segment is a tube having a range in phi.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
const char * GetTitle() const override
Returns title of object.
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
TVirtualPad is an abstract base class for the Pad and Canvas classes.