Viewing the geometry directly in Root
Finding Overlaps
Current MIPP Overlaps
It is pretty easy to load just the geometry in Root, so you can make use of the interactive drawing and checking tools:
- Check out the
Geometrymodule from CVS:$ echo $CVSROOT e907cvs@cdcvs.fnal.gov:/cvs/e907 $ cvs checkout mipp/offline/Geometry- Create a
rootlogon.Cfile:$ cat rootlogon.C // // start a browser on the MIPP geometry // { gROOT->ProcessLine(".L GMIPPGeo.cxx") ; GMIPPGeo::Instance(); gGeoManager->GetVolume("HTPC")->Draw(); b = new TBrowser ; }Here, I've chosen to draw the tree starting at the
HTPCnode, which is the mother for the TPC. However, it's easy to start anywhere from the browser, just by opening thee907geofolder and right clicking onCAVEto selectDRAW. Or, at theroot[]prompt, use the commandgGeoManager->GetVolume("CAVE")->Draw();.- Start root:
$ root Geometry e907geo, e907geo.C created Warning in <TGeoMaterial::ctor>: Material Air defined with fractional Z=7.300000 Warning in <TGeoMaterial::ctor>: Material Beamline air defined with fractional Z=7.300000 Warning in <TGeoMixture::DefineElement>: Mixture copper_air has element defined with fractional Z=7.300000 Top volume is CAVE. Master volume is CAVE List of materials : Fixing runtime shapes... --- nothing to fix Counting nodes... Voxelizing... Building caches for nodes and matrices... --- node ID tracking disabled ### 17426 nodes/ 600 volume UID's in e907geo.C ----------------modeler ready---------------- GMIPPGeo: Geometry loaded from .//Geometry/e907geo.C GMIPPGeo::SetVisibility() Could not find node HTPC --- node ID tracking disabled Top volume is HTPC. Master volume is CAVE Painter created --- Drawing 242 nodes with 2 visible levels <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 root [0]The last two lines of the
rootlogon.Cscript create a Root browser and a canvas:![]()
![]()
Root has a few tools to find and examine overlaps:
- First, to find and print overlaps:
root [0] gGeoManager->GetVolume("HTPC")->CheckOverlaps(0.1); === Checking overlaps vor volume HTPC === number of illegal overlaps/extrusions : 5 root [1] gGeoManager->PrintOverlaps(); === Overlaps for e907geo === * extrusion ov0/HTPC_x_6: vol=HTPC node=PPSS_1 extr=19.125 * extrusion ov1/HTPC_x_0: vol=HTPC node=GCVM_1 extr=0.403999 * overlap ov2/HTPC_o_0_1: vol=HTPC <GCVM_1<->GFBX_1> ovlp=0.969999 * overlap ov3/HTPC_o_0_2: vol=HTPC <GCVM_1<->GFSX_1> ovlp=0.969999 * overlap ov4/HTPC_o_0_3: vol=HTPC <GCVM_1<->GFSX_2> ovlp=0.969999The argument to
CheckOverlapsis the precision, in mm. I interpret this to mean the minimum overlap that will be detected.Root labels the overlap as an
extrusionif a daughter volume extends outside its mother. Overlapping volumes that are direct descendents of a common mother (i.e., siblings) are labeledoverlap.- To draw a specific overlap, create an iterator on the list of overlaps, then draw each one:
root [2] TIter next(gGeoManager->GetListOfOverlaps()); root [3] TGeoOverlap *ov = (TGeoOverlap*) next(); root [4] ov->Draw(); * extrusion ov0/HTPC_x_6: vol=HTPC node=PPSS_1 extr=19.125Root draws just the two offending volumes on the canvas:
![]()
At this point, you have some hard work to do: figuring out in the code where the volume sizes and positions are set, and deciding what to do to remove the overlap.
Note that in general, you don't want to just increase the size of the mother volume to encompass the complete daughter, because this will move center of the mother relative to its other contents.
Just for fun, here are the 52 (!) overlaps in the current geometry.Do any of these belong to you?
PDB,