Problem with spherical shapes in slitrani

I am trying to model a scintillation detector with a PMT window which has a spherical interior surface and a thin cathode film next to the spherical surface of the window. I first modeled this as a flat window (tube) and flat cathode (another tube) with no problems. I then cut out the surface of the window tube with a sphere and began to have problems. The relevant spherical volume code is as follows:

// TGeocompositeshape of PMwin // // TGeoVolume *PMwin = geom->MakeTube("PMWIN",sodocal,0,PMwin_r,PMwin_dz); Double_t shiftup; shiftup=7.0*PMwin_r; TGeoTube *WTube = new TGeoTube("WT",0,PMwin_r,PMwin_dz); TGeoSphere *WSph = new TGeoSphere("WS",0,shiftup,0,180,0,360); TGeoTranslation *tsph = new TGeoTranslation("tsph",0,0,shiftup); tsph->RegisterYourself(); TGeoCompositeShape *win = new TGeoCompositeShape("win","(WT-WS:tsph)*(WT-WS:tsph)"); TGeoVolume *PMwin = new TGeoVolume("PMWIN",win,sodocal); tot->AddNode(PMwin,1,t7); // // TGeocompositeshape PMT cathode // // TGeoVolume *apd = geom->MakeTube("APD",CATHODE,0,apd_dy,apd_dz); TGeoTube *CatTube = new TGeoTube("CT",0,PMwin_r,PMwin_dz+1.0); shiftup=shiftup + apd_dz; TGeoTranslation *tsph2 = new TGeoTranslation("tsph2",0,0,shiftup); tsph2->RegisterYourself(); TGeoCompositeShape *cat = new TGeoCompositeShape("cat","(CT*(WS:tsph-WS:tsph2))"); TGeoVolume *apd = new TGeoVolume("APD",cat,sodocal); tot->AddNode(apd,1,t4); //

Without the odd union with PMT window with itself “(WT-WS:tsph)*(WT-WS:tsph)” I get AgainstRev errors. Also, without the added cathode layer (with just the window), it seems to run OK but when I add the cathode SLitrani goes into some kind of an infinite loop. No errors … just consumes CPU time. The opengl image of the geometry looks OK (see attachment - cyan is PMT window and red is cathode layer … tan is totally reflecting layer, magenta is glue and blue is scintillator)


and I get no overlap errors. Any idea of what’s going wrong or how to diagnose this (given that I don’t get errors … just stuck in an infinite loop)?

Thanks in advance,
Ken