digraph "buildhier" {
	graph [dpi = 75];

	// builders
	node[group=builders, shape=box3d,style=filled]
	worldB[label="World Builder"];
	siteB[label="Site Builder"];
	detB[label="Detector Builder"];
	apaB[label="APA Builder"];
	{rank=same;worldB;siteB;detB;apaB}
		

	// logical volumes
	node[group=lvols, shape=ellipse, style=filled, color=lightgrey];
        worldLV[label="World LV"];
	siteLV[label="Site LV"];
	tankLV[label="Cryostat LV"];
	larLV[label="LAr LV"];
	apaLV[label="APA LV"];
	wiresLV[label="Wires LV"];
        
	// placements
	node[group=pvols, shape=diamond, style=filled, color=lightgrey];
	sitePV [label="Site PV"];
	tankPV [label="Cryostat PV"];
	larPV [label="Lar PV"];
	apaPV1 [label="APA1 PV"];
	apaPV2 [label="APA2 PV"];
	wiresPV [label="Wires PV"];

	// any other nodes are invisible
	node[shape=none, width=0, height=0, label=""];
	edge[color="red"];

	subgraph cluster_worldB {
		worldLV -> sitePV;
		edge[color=none];
		worldB->worldLV;
	}
	subgraph cluster_siteB {
		siteLV -> tankPV;
		edge[color=none];
		siteB->siteLV;
	}
	subgraph cluster_detB {
		tankLV -> larPV -> larLV;
		larLV -> apaPV1;
		larLV -> apaPV2;
		edge[color=none];
		detB->tankLV;
	}
	subgraph cluster_apaB {
		apaLV -> wiresPV -> wiresLV;
		edge[color=none];
		apaB -> apaLV;
	}

	edge[color="black"];
	worldB->siteB->detB->apaB;
	
	
	edge[color="blue",weight=0];
	sitePV->siteLV;
	tankPV->tankLV;
	apaPV1->apaLV;
	apaPV2->apaLV;
	
}
