27 while ((currentNode = next())) {
29 next.GetPath(currentPath);
31 if (currentPath == targetPath) {
33 printf(
"Node found: %s\n", currentNode->
GetName());
38 const TGeoMatrix *mat = next.GetCurrentMatrix();
86 rgs->RefMainTrans().SetFrom(
m);
90void write_geo_extract()
94 auto eveMng = REveManager::Create();
96 auto s_geoManager =
TGeoManager::Import(
"http://xrd-cache-1.t2.ucsd.edu/alja/mail/geo/cmsSimGeo2026.root");
99 REveGeoShape *tracker = makeShape(
"cms:OCMS/tracker:Tracker_1/otst:supportR1190Z1450_1",
"tracker");
100 tracker->SetMainColor(
kRed);
101 tracker->SetMainTransparency(50);
105 makeShape(
"cms:OCMS/tracker:Tracker_1/pixbar:Phase2OTBarrel_1/tracker:supportR212Z604_1",
"barrel");
106 tracker->AddElement(barrel);
109 REveGeoShape *e1 = makeShape(
"cms:OCMS/tracker:Tracker_1/pixfwd:Phase2OTForward_1",
"endcap_1");
110 tracker->AddElement(e1);
111 REveGeoShape *e2 = makeShape(
"cms:OCMS/tracker:Tracker_1/pixfwd:Phase2OTForward_2",
"endcap_2");
112 tracker->AddElement(e2);
115 tracker->SaveExtract(
"testShapeExtract.root",
"VSDGeo");
117 eveMng->GetEventScene()->AddElement(tracker);
double Double_t
Double 8 bytes.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TGeoManager * gGeoManager
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
TGeoVolume * GetTopVolume() const
Geometrical transformation package.
virtual const Double_t * GetTranslation() const =0
virtual const Double_t * GetScale() const =0
virtual const Double_t * GetRotationMatrix() const =0
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TGeoVolume * GetVolume() const
Base abstract class for all shapes.
TGeoShape * GetShape() const
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Namespace for ROOT features in testing.