182 gClient->GetColorByName(
"#ff0000", color);
187 fManagerName->SetToolTipText(
"Enter the geometry name");
196 gClient->GetColorByName(
"#ff0000", color);
216 gClient->GetColorByName(
"#ff0000", color);
221 gClient->GetColorByName(
"#0000ff", color);
226 fBSelTop->SetToolTipText(
"Select the top volume");
231 fCloseGeometry->SetToolTipText(
"Close geometry to make it ready for tracking");
245 gClient->GetColorByName(
"#ff0000", color);
255 fShapeButton[1]->SetToolTipText(
"Create a parallelipiped");
257 fShapeButton[2]->SetToolTipText(
"Create a TRD1 trapezoid");
259 fShapeButton[3]->SetToolTipText(
"Create a TRD2 trapezoid");
261 fShapeButton[4]->SetToolTipText(
"Create a general trapezoid");
263 fShapeButton[5]->SetToolTipText(
"Create a general twisted trapezoid");
264 for (ipict = 0; ipict < 6; ipict++)
269 fShapeButton[6]->SetToolTipText(
"Create a extruded polygone");
271 fShapeButton[7]->SetToolTipText(
"Create an arbitrary trapezoid with 8 vertices");
273 fShapeButton[8]->SetToolTipText(
"Create a cylindrical pipe");
275 fShapeButton[9]->SetToolTipText(
"Create a cylindrical pipe within a phi range");
277 fShapeButton[10]->SetToolTipText(
"Create a conical pipe");
279 fShapeButton[11]->SetToolTipText(
"Create a conical pipe within a phi range");
280 for (ipict = 0; ipict < 6; ipict++)
285 fShapeButton[12]->SetToolTipText(
"Create a spherical sector");
289 fShapeButton[14]->SetToolTipText(
"Create an elliptical tube");
291 fShapeButton[15]->SetToolTipText(
"Create a toroidal tube with a phi range");
293 fShapeButton[16]->SetToolTipText(
"Create a polycone shape");
295 fShapeButton[17]->SetToolTipText(
"Create a polygon shape");
296 for (ipict = 0; ipict < 6; ipict++)
301 fShapeButton[18]->SetToolTipText(
"Create a hyperboloid");
303 fShapeButton[19]->SetToolTipText(
"Create a paraboloid");
305 fShapeButton[20]->SetToolTipText(
"Create a composite shape");
306 for (ipict = 0; ipict < 3; ipict++)
315 gClient->GetColorByName(
"#ff0000", color);
321 gClient->GetColorByName(
"#0000ff", color);
326 fBSelShape->SetToolTipText(
"Select one of the existing shapes");
331 fEditShape->SetToolTipText(
"Edit selected shape");
345 gClient->GetColorByName(
"#ff0000", color);
353 fVolumeName->SetToolTipText(
"Enter the name for the new volume");
361 gClient->GetColorByName(
"#0000ff", color);
366 fBSelShape2->SetToolTipText(
"Select one of the existing shapes");
375 gClient->GetColorByName(
"#0000ff", color);
380 fBSelMedium2->SetToolTipText(
"Select one of the existing media");
388 fVolumeButton[0]->SetToolTipText(
"Create a new volume from shape and medium");
390 fVolumeButton[1]->SetToolTipText(
"Create a new volume assembly having the selected name");
391 for (ipict = 0; ipict < 2; ipict++)
399 gClient->GetColorByName(
"#ff0000", color);
405 gClient->GetColorByName(
"#0000ff", color);
410 fBSelVolume->SetToolTipText(
"Select one of the existing volumes");
417 fEditVolume->SetToolTipText(
"Edit selected volume");
421 fSetTopVolume->SetToolTipText(
"Set top volume for geometry");
437 gClient->GetColorByName(
"#ff0000", color);
444 fMaterialName->SetToolTipText(
"Enter the new material name");
481 fMaterialButton[0]->SetToolTipText(
"Create a new material from element and density");
483 fMaterialButton[1]->SetToolTipText(
"Create a new mixture with selected density");
484 for (ipict = 0; ipict < 2; ipict++)
493 gClient->GetColorByName(
"#ff0000", color);
499 gClient->GetColorByName(
"#0000ff", color);
504 fBSelMaterial->SetToolTipText(
"Select one of the existing materials");
523 gClient->GetColorByName(
"#ff0000", color);
531 fMediumName->SetToolTipText(
"Enter the new medium name");
549 gClient->GetColorByName(
"#0000ff", color);
554 fBSelMaterial2->SetToolTipText(
"Select one of the existing materials");
561 fMediumButton->SetToolTipText(
"Create a new medium from selected material");
571 gClient->GetColorByName(
"#ff0000", color);
577 gClient->GetColorByName(
"#0000ff", color);
582 fBSelMedium->SetToolTipText(
"Select one of the existing media");
587 fEditMedium->SetToolTipText(
"Edit selected medium");
601 gClient->GetColorByName(
"#ff0000", color);
609 fMatrixName->SetToolTipText(
"Enter the new matrix name");
620 fMatrixButton[2]->SetToolTipText(
"Create a rotation + translation");
621 for (ipict = 0; ipict < 3; ipict++)
629 gClient->GetColorByName(
"#ff0000", color);
635 gClient->GetColorByName(
"#0000ff", color);
640 fBSelMatrix->SetToolTipText(
"Select one of the existing matrices");
645 fEditMatrix->SetToolTipText(
"Edit selected matrix");
698 fTabMgr->GetVolumeTab()->Cleanup();
722 c->Connect(
"Selected(TVirtualPad*,TObject*,Int_t)",
"TGeoManagerEditor",
this,
723 "SelectedSlot(TVirtualPad*,TObject*,Int_t)");
732 "SelectedSlot(TVirtualPad*,TObject*,Int_t)");
740 fManagerName->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
741 fManagerTitle->Connect(
"TextChanged(const char *)",
"TGeoManagerEditor",
this,
"DoName()");
742 fExportButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoExportGeometry()");
743 fCloseGeometry->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCloseGeometry()");
744 fShapeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateBox()");
745 fShapeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePara()");
746 fShapeButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd1()");
747 fShapeButton[3]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrd2()");
748 fShapeButton[4]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTrap()");
749 fShapeButton[5]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateGtra()");
750 fShapeButton[6]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateXtru()");
751 fShapeButton[7]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateArb8()");
752 fShapeButton[8]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTube()");
753 fShapeButton[9]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTubs()");
754 fShapeButton[10]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCone()");
755 fShapeButton[11]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCons()");
756 fShapeButton[12]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateSphe()");
757 fShapeButton[13]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCtub()");
758 fShapeButton[14]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateEltu()");
759 fShapeButton[15]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTorus()");
760 fShapeButton[16]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePcon()");
761 fShapeButton[17]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreatePgon()");
762 fShapeButton[18]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateHype()");
763 fShapeButton[19]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateParab()");
764 fShapeButton[20]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateComposite()");
765 fMatrixButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateTranslation()");
766 fMatrixButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateRotation()");
767 fMatrixButton[2]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateCombi()");
768 fVolumeButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateVolume()");
769 fVolumeButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateAssembly()");
770 fBSelTop->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectTopVolume()");
771 fBSelVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectVolume()");
772 fBSelShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape()");
773 fBSelShape2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectShape2()");
774 fBSelMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMatrix()");
775 fBSelMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial()");
776 fBSelMaterial2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMaterial2()");
777 fBSelMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium()");
778 fBSelMedium2->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSelectMedium2()");
779 fSetTopVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoSetTopVolume()");
780 fEditShape->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditShape()");
781 fEditMedium->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMedium()");
782 fEditMaterial->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMaterial()");
783 fEditMatrix->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditMatrix()");
784 fEditVolume->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoEditVolume()");
786 fMaterialButton[0]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMaterial()");
787 fMaterialButton[1]->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMixture()");
788 fMediumButton->Connect(
"Clicked()",
"TGeoManagerEditor",
this,
"DoCreateMedium()");
816 if (!
fGeometry->GetListOfShapes()->GetEntries() || !
fGeometry->GetListOfMedia()->GetSize())
820 if (!
fGeometry->GetListOfShapes()->GetEntries())
824 if (!
fGeometry->GetListOfVolumes()->GetEntries())
828 if (!
fGeometry->GetListOfMedia()->GetSize())
832 if (!
fGeometry->GetListOfMatrices()->GetEntries())
838 if (!
fGeometry->GetListOfMaterials()->GetSize()) {
892 if (
fGeometry->GetListOfMedia()->GetSize())
905 if (
fGeometry->GetListOfMedia()->GetSize())
918 if (
fGeometry->GetListOfMedia()->GetSize())
931 if (
fGeometry->GetListOfMedia()->GetSize())
942 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.);
944 if (
fGeometry->GetListOfMedia()->GetSize())
956 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.);
958 if (
fGeometry->GetListOfMedia()->GetSize())
982 if (
fGeometry->GetListOfMedia()->GetSize())
995 if (
fGeometry->GetListOfMedia()->GetSize())
1008 if (
fGeometry->GetListOfMedia()->GetSize())
1021 if (
fGeometry->GetListOfMedia()->GetSize())
1034 if (
fGeometry->GetListOfMedia()->GetSize())
1045 fSelectedShape =
new TGeoCtub(
TString::Format(
"ctub_%i",
id), 0.5, 1., 1., 0., 45., 0., 0., -1, 0., 0., 1);
1047 if (
fGeometry->GetListOfMedia()->GetSize())
1060 if (
fGeometry->GetListOfMedia()->GetSize())
1073 if (
fGeometry->GetListOfMedia()->GetSize())
1088 if (
fGeometry->GetListOfMedia()->GetSize())
1103 if (
fGeometry->GetListOfMedia()->GetSize())
1116 if (
fGeometry->GetListOfMedia()->GetSize())
1138 Error(
"DoCreateMaterial",
"Cannot find selected element in list");
1175 if (
fGeometry->GetListOfShapes()->GetEntries())
1272 fTabMgr->GetPad()->GetView()->ShowAxis();
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
@ kMANAGER_MATERIAL_SELECT
@ kMANAGER_MATERIAL_SELECT2
@ kMANAGER_ELEMENT_SELECT
@ kMANAGER_MEDIUM_SELECT2
@ kMANAGER_DENSITY_SELECT
externTGeoManager * 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.
TGeoElement * GetElement(Int_t z)
Int_t GetNelements() const
Base class for chemical elements.
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 ...
Class describing rotations.
Base abstract class for all shapes.
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.
Class describing translations.
static TObject * GetSelected()
static; return selected object
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.