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

Fixed Sim exceptions and printouts #14550

Merged
merged 1 commit into from May 23, 2016

Conversation

civanch
Copy link
Contributor

@civanch civanch commented May 18, 2016

Substitute G4cout by edm::LogInfo in Generator.
Substitute SimG4Exceptions by cms::Exception at initialisation.
Minor code clean-up.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @civanch (Vladimir Ivantchenko) for CMSSW_8_1_X.

It involves the following packages:

SimG4Core/Generators
SimG4Core/Geometry
SimG4Core/GeometryProducer
SimG4Core/MagneticField
SimG4Core/Notification
SimG4Core/Physics
SimG4Core/PrintGeomInfo
SimG4Core/SensitiveDetector

@cmsbuild, @civanch, @mdhildreth, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel, @namapane this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@civanch
Copy link
Contributor Author

civanch commented May 18, 2016

please test

@civanch
Copy link
Contributor Author

civanch commented May 18, 2016

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 18, 2016

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/13050/console

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

@@ -119,13 +118,9 @@ void SensitiveDetector::NaNTrap( G4Step* aStep )
edm::isNotFinite(xyz[0]) != 0 || edm::isNotFinite(xyz[1]) != 0 ||
edm::isNotFinite(xyz[2]) != 0 )
{
std::cout << " NaN detected in volume " << NameOfVol << std::endl ;
throw SimG4Exception( "SimG4CoreSensitiveDetector: Corrupted Event - NaN detected (3-momentum)" ) ;
throw SimG4Exception( "SimG4CoreSensitiveDetector: Corrupted Event - NaN detected (3-momentum) in volume " + NameOfVol);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@civanch - why leave a SimG4Exception in places while you remove it (using a cms::Exception) elsewhere?

Copy link
Contributor Author

@civanch civanch May 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidlange6 , because it is within Geant4 event loop it is useful to apply SimG4Exception, I change this file only in order to remove cout.

@civanch
Copy link
Contributor Author

civanch commented May 22, 2016

@davidlange6 , here the same approach is implemented as in the base classes of SimG4Core: SimG4Exception is used only within event loop in classes called by Geant4. SimG4Exception is removed from beginRun, endRun and calls outside Geant4 event loop.

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit c5bb115 into cms-sw:CMSSW_8_1_X May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants