29 while ((currentNode = next())) {
31 next.GetPath(currentPath);
33 if (currentPath == targetPath) {
35 printf(
"Node found: %s\n", currentNode->
GetName());
40 const TGeoMatrix *mat = next.GetCurrentMatrix();
88 rgs->RefMainTrans().SetFrom(
m);
92void write_geo_extract()
98 auto s_geoManager =
TGeoManager::Import(
"http://xrd-cache-1.t2.ucsd.edu/alja/mail/geo/cmsSimGeo2026.root");
101 REveGeoShape *tracker = makeShape(
"cms:OCMS/tracker:Tracker_1/otst:supportR1190Z1450_1",
"tracker");
102 tracker->SetMainColor(
kRed);
103 tracker->SetMainTransparency(50);
107 makeShape(
"cms:OCMS/tracker:Tracker_1/pixbar:Phase2OTBarrel_1/tracker:supportR212Z604_1",
"barrel");
108 tracker->AddElement(barrel);
111 REveGeoShape *e1 = makeShape(
"cms:OCMS/tracker:Tracker_1/pixfwd:Phase2OTForward_1",
"endcap_1");
112 tracker->AddElement(e1);
113 REveGeoShape *e2 = makeShape(
"cms:OCMS/tracker:Tracker_1/pixfwd:Phase2OTForward_2",
"endcap_2");
114 tracker->AddElement(e2);
117 tracker->SaveExtract(
"testShapeExtract.root",
"VSDGeo");
119 eveMng->GetEventScene()->AddElement(tracker);
double Double_t
Double 8 bytes.
externTGeoManager * gGeoManager
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
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
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.
ROOT::Experimental::REveManager * eveMng
Namespace for ROOT features in testing.