Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast Geant4 method for overlap check #36299

Merged
merged 1 commit into from Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion SimG4Core/Geometry/interface/CMSG4CheckOverlap.h
Expand Up @@ -11,7 +11,7 @@ class G4VPhysicalVolume;
class CMSG4CheckOverlap {
public:
CMSG4CheckOverlap(edm::ParameterSet const& p, std::string& regFile, CustomUIsession*, G4VPhysicalVolume* world);
~CMSG4CheckOverlap();
~CMSG4CheckOverlap() = default;

private:
void makeReportForMaterials(std::ofstream& fout);
Expand Down
10 changes: 3 additions & 7 deletions SimG4Core/Geometry/src/CMSG4CheckOverlap.cc
Expand Up @@ -179,8 +179,6 @@ void CMSG4CheckOverlap::makeReportForOverlaps(std::ofstream& fout, const edm::Pa
bool regionFlag = p.getParameter<bool>("RegionFlag");
bool gdmlFlag = p.getParameter<bool>("gdmlFlag");
int nPrints = p.getParameter<int>("ErrorThreshold");
int level = p.getParameter<int>("Level");
int depth = p.getParameter<int>("Depth");

const G4RegionStore* regStore = G4RegionStore::GetInstance();

Expand Down Expand Up @@ -211,7 +209,7 @@ void CMSG4CheckOverlap::makeReportForOverlaps(std::ofstream& fout, const edm::Pa
G4VPhysicalVolume* pv = pvs->GetVolume("DDDWorld");
G4GeomTestVolume test(pv, tolerance, nPoints, verbose);
test.SetErrorsThreshold(nPrints);
test.TestRecursiveOverlap(level, depth);
test.TestOverlapInTree();
} else if (regionFlag) {
fout << "---------------------------------------------------------------"
<< "\n";
Expand Down Expand Up @@ -255,7 +253,7 @@ void CMSG4CheckOverlap::makeReportForOverlaps(std::ofstream& fout, const edm::Pa
}
G4GeomTestVolume test(((*pvs)[i]), tolerance, nPoints, verbose);
test.SetErrorsThreshold(nPrints);
test.TestRecursiveOverlap(level, depth);
test.TestOverlapInTree();
}
}
}
Expand All @@ -264,7 +262,7 @@ void CMSG4CheckOverlap::makeReportForOverlaps(std::ofstream& fout, const edm::Pa
G4VPhysicalVolume* pv = pvs->GetVolume((G4String)nodeNames[ii]);
G4GeomTestVolume test(pv, tolerance, nPoints, verbose);
test.SetErrorsThreshold(nPrints);
test.TestRecursiveOverlap(level, depth);
test.TestOverlapInTree();
}
}
}
Expand Down Expand Up @@ -312,5 +310,3 @@ void CMSG4CheckOverlap::makeReportForOverlaps(std::ofstream& fout, const edm::Pa
fout << "---------------- End of overlap checks ---------------------"
<< "\n";
}

CMSG4CheckOverlap::~CMSG4CheckOverlap() {}