forked from lbl-neutrino/GeoMergeFor2x2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkOverlaps.C
30 lines (24 loc) · 1.13 KB
/
checkOverlaps.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
void checkOverlaps(TString filename)
{
TGeoManager *geo = new TGeoManager();
geo->Import(filename);
cout<<"======================== Checking Geometry ============================="<<endl;
geo->CheckGeometry();
cout<<"======================== Done! ============================="<<endl;
cout<<"======================== Checking Overlaps ============================="<<endl;
geo->CheckOverlaps(1e-5);
geo->PrintOverlaps();
cout<<"======================== Done! =============================\n\n\n"<<endl;
TObjArray* overlaps=geo->GetListOfOverlaps();
for(int i=0; i<overlaps->GetEntries(); i++){
TObject* overlap=overlaps->At(i);
cout<<"======================== Drawing Overlaps ============================="<<endl;
cout<<"================= Overlap messages will duplicate below ================"<<endl;
cout<<"================= Overlaps are in units of cm ================"<<endl;
TCanvas* c = new TCanvas();
overlap->Draw("");
TCanvas* cogl = new TCanvas();
overlap->Draw("ogl");
cout<<"======================== Done! =============================\n\n\n"<<endl;
}
}