I want ot visualize my geometry (to show triggered counters) reading the data from the file containing information about several events.
Sow how can I do this in a cycle?
If I write something like this
TGeoBBox *tankbox = new TGeoBBox("tankbox",50,75,50);
TGeoVolume *tank1=new TGeoVolume("Tank",tankbox);
TGeoVolume *tank2=new TGeoVolume("Tank",tankbox);
TGeoVolume *tank3=new TGeoVolume("Tank",tankbox);
TGeoVolume *tank4=new TGeoVolume("Tank",tankbox);
to separate colors of each tank and then, depending on their energy release
if(ener>50) top->AddNode(tank1,num[i],
new TGeoTranslation(x[i]*100,y[i]*100,z[i]*100));
else if(ener>30) top->AddNode(tank2,num[i],
new TGeoTranslation(x[i]*100,y[i]*100,z[i]*100));
else if(ener>20) top->AddNode(tank3,num[i],
new TGeoTranslation(x[i]*100,y[i]*100,z[i]*100));
else if(ener>10) top->AddNode(tank4,num[i],
new TGeoTranslation(x[i]*100,y[i]*100,z[i]*100));
where i is a number of counter and
x[i],y[i],z[i] - its coordinates.
then I should do
gGeoManager->CloseGeometry();
and then visualize
gGeoManager->GetMasterVolume()->Draw();
but this won’t work if I do this in cycle: I obtain an empty pad
During executing i have the following:
while usually I have 840 nodes