This page has an introduction to viewing the Mu2e geometry using ROOT's TGeometry browser. The input to this exercise is a GDML file that was created by running Mu2e Offline and telling it to export the geometry to a GDML file.
tar xzf ~/Downloads/GeometryBrowsing.tar.gzThis will create a subdirectory named GeometryBrowsing, with the content:
ls GeometryBrowsing/ DS3.C InVacuum.cc NoBuildingOrCRV.C TrackerColored.C notes.txt InPSVacuum.C InVacuum.hh NoBuildingOrCRV.cc TrackerMother.C volumeDetails.txt InPSVacuum.cc InsideDS.C NoBuildingOrCRV.hh VDs.C volumeHierarchy.txt InPSVacuum.hh InsideDS.cc SelectVirtualDetectors.cc mu2e.gdml world.C InVacuum.C InsideDS.hh SelectVirtualDetectors.hh mu2e_v5_7_7.gdmlThe files ending in .C are ROOT CINT scripts to view different parts of the geometry. The files ending in .hh and .cc are C++ code that are used by some of the .C files. The files volumeHierarchy.txt and volumeDetails.txt contain some summary information about each volume. The following items will walk you through using these files.
cd GeometryBrowsing setup mu2e setup root v5_34_32 -qe9:profIf you prefer you can setup a base release of the Mu2e Offline software, for example:
source /cvmfs/mu2e.opensciencegrid.org/Offline/v5_7_7/SLF6/prof/Offline/setup.shAmong many other things, this will setup a modern version of root.
root -l world.CIf you see no display and you see an error message "cannot load swrast driver", follow the instructions on the page that discusses the OPEN GL 3D graphics error.
root -l world.CAfter viewing the video, practice clipping yourself.
root -l TrackerMother.CExperiment a bit with zooming, rotating and picking volumes; don't spend too much time because the next exercise will highlight a few of the volumes with color. You can read about the tracker geometry in Mu2e-doc-888
Some facts about the tracker mother volume:
root -l TrackerColored.CIn this figure the upstream stiffening ring has been colored red; the two half-rings that form the interface to the rail system have also been colored red. And the three longitudinal support beams have been colored green. The virtual detector at the mid-plane of the track has been colored blue; because the tracker mother volume is the annulus of a tube, the virtual detector is the annulus of a disk. The remaining structures are all tracker planes, arranged as stations of two planes each.
If you carefully compare the display to Mu2e-doc-888 you will see that the two downstream stiffening rings are missing from this drawing; they will be added in a future version of Mu2e Offline.
Next watch the video that shows how to navigate the volume heirarchy (.mov) ((.mp4) using the TBrowser. To finish this part of exercise, repeat the example shown in the video.
Another way to learn about the volume hierarchy is to look at the two files volumeHierarchy.txt and volumeDetails.txt that were included in the gzipped tar file that you unpacked. These files were created for Mu2e Offline v5_7_7.
This file contains one line for each volume in the volume hierarchy. The content of each column is:
Comment on the copy number and the total number of placements: one tracker panel contains 96 straws; each has a unique copy number, 0...95. We make one panel object and place it 216 times:
18 stations x 2 planes per station x 6 panels per plane = 216 panels
This file is a work in progress and is not yet complete; the description below is a complete description of the parts that are present.
In this file there is one group of lines for each entry in volumeHierarchy.txt, typically four or seven lines. The content of the lines is:
The placement algorithm is to place the object in it's standard orientation at the center of the mother; then rotate; then translate. Rotations are specified as passive rotations. A planned future improvement is to express the rotation matrices in a more readable format, perhaps as 3 Euler angles in the Goldstein convention.
A forseen future version of this file will include an option to display the translation and rotation relative to the Mu2e origin and the standard Mu2e coordinate axes.
root -l DS3.C
So what is DS3? For techinical reasons we split the DS vacuum into 3 parts, DS1, DS2, DS3. DS1 is not interesting; it is the outer annulus of the DS vaccum in the region in which the TS5 assembly penetrates into the DS. The DS2 region extends from DS1 up to a value of z just upstream of the tracker. The remainder of DS, from DS2 downstream, is called DS3. Upstream of this is the DS2 and downstream is the DS3.
When you view the figure you can identify the major structures inside theDS3: the tracker, the calorimeter and the muon beam stop. The model of the calorimeter includes the crates that will hold the front end boards; these live in the space above the calorimeter crystals. Other structures include the rails and bearing blocks. THe last structure of note is the piece of the Outer proton absorber that lives inside DS3; this is the green ring just upstream of the tracker.
Do not confuse this use of DS1, DS2 etc with similar names with different meanings used by the magnetic group.
InsideDS d(geom->GetTopNode(),false);The first of these tells ROOT to compile, link and load the helper class. The second line invokes the helper function. If you look at the code for the helper function you will see that it traverses the geometry hierarchy and sets all volumes inside the DS2 or DS3 to be visible and all other volumes to be invisible. The entire hierarchy below DS2 and DS3 is made visible so one can use the browser to remove or clip outer volumes and look inside them.
In this example the draw command starts from the top of the volume hierarchy; another option would have been to start it at the HallAir volume. These are the only two volumes in the hierarchy that contain both DS2 and DS3 as descendants.
To run this exercise:
root -l InsideDS.CCompared to DS.C one can see the complete outer proton absorber, named protonabs3. Right click on this volume and set it invisible. With this removed one can see:
So where is protonabs2? In this model there is none; it is reserved in case we extend the inner proton absorber to higher z; if it extends into the DS3, we will need to make it in two pieces, one in DS2 and one in DS3. The name protonabs2 is reserved for the fragment inside the DS3. Our present understanding of the optimal design for the inner proton absorber does not require such a fragment.
root -l InVacuum.CIn this figure one can see all of the elements of the previous figure plus, the PS and the collimators at TS1, TS3 and TS5; one can also see many virtual detectors. Virtual detectors do not correspond to any real object in the detector; they are thin volumes, made of the same material as their parent; their job is to record any particles that pass through them.
To complete he exercise, explore the new objects in the figure.
root -l VDs.COn some computers the TBrowser screen stays white and there appears to be nothing on the screen. Open the OpenGL window and you will see the intended scene.
Most of the virutal detectors appear in grey and most are either thin disks or thin boxes. Those associated with the tracker are colored. Zoom in on the tracker. The yellow object is a thin walled tube that sits just inside the outer surface of the tracker mother. Right click on this and set it invisible. The cyan object is a thin walled tube that sits just inside the tracker mother, at its inside edge; remember that the tracker mother is the annulus of a tube so that the many low energy electrons that travel along the beamline never enter the tracker mother. Right click on the cyan tube and set it invisible. There are green virtual detectors at the front and back of the tracker mother. These extend all the way to a radius of 0 mm. These are used to record the MC truth about conversion electrons and the tracking debug code compares measured-generated quantities at these surfaces. This leaves the blue and red colored object at the mid plane of the tracker. Together they form the virtual detector at the z mid-plane of the tracker that is used in the same way as the green virtual detectors. The blue part is a volume inside the tracker mother. The red part is a separate volume outside of the tracker mother. It is not legal in Geant4 to create this as a single volume, part of which is inside the tracker mother and part of which is outside; therefore two volumes are needed.
If you look carefully in the calorimeter region you will see that each disk is surrounded by 4 virtual detectors, one each on the front face, the rear face, the inner edge and the outer edge. These are used to record MC truth information to assist in debugging and characterizing reconstruction algorithms.
root -l InPSVacuum.CAgain it might be hard to see anything in the TBrowser window. Open the OpenGL window; you may need to zoom out a little to get two assemblies into the scene, the prodution target plus its mounting system, on the left,, and the pbar asbosrber plus its mounting system, on the right. If you rotate, zoom and shift the scene you can view the details of the production target and the pbar absorber. For reference you can view figures of the production target assembly and the pbar abosrber assembly.
root -l NoBuildingOrCRV.COpen the OpenGL viewer and you should see a scene like the one in this pdf file. In this figure you can see the PS, DS and TS cryostats, plus their support systems. To the the right of the scene you can see the proton beam dump and elements of the extinction monitor system. To the far left of the scene is the muon stopping target monitor and its physical supports. Immediately downstream of the DS are the magnet and collimator that sweep charged particles out of the beam that is incident on the stopping target monitor. Two other items in the scene are an electronnics rack, near the downstream end of the DS and two pipes near the top of the scene.
Explore the scene. Open up the cryostat to look at the internal detail of the cryostat and the details of the collimators in TS1, TS3 and TS5.
|Security, Privacy, Legal|