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

Geant4 sensitive detectors clean-up 6 #23480

Merged
merged 6 commits into from Jun 8, 2018
Merged

Conversation

civanch
Copy link
Contributor

@civanch civanch commented Jun 5, 2018

This PR includes clean-ups for muon Geant4 sensitive detectors and additional modifications in the base class, tracker and calo sensitive detectors:

  1. TrackInformation object access is implemented in the base class and it is used in Calo, Tracker, Muon derived classes (removed multiple implementations of the same code)
  2. Fixed dependences between these packages - removed circular dependence between SimG4CMS/SimMuon and SimG4Core/Application, added few really needed dependencies
  3. Unified transformation from Geant4 space coordinates to CMS coordinates in muon and and tracker
  4. Use "#include cstdint" instead of boost
  5. In MuonSensitiveDetector there were computations needed only for debug printout, these computations are protected by #ifdef
  6. Use LogVerbatim and LogDebug where possible, removed abort() and cerr, use cms exceptions instead
  7. Use const pointers to Geant4 objects
  8. clean up Observer interface - make update() methods protected
  9. removed unnecessary methods, header, unreasonable comments, old commented lines and add new comments

Correctness of this PR means no change of the results.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

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

It involves the following packages:

SimG4CMS/Calo
SimG4CMS/Muon
SimG4CMS/Tracker
SimG4Core/SensitiveDetector

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

cms-bot commands are listed here

@civanch
Copy link
Contributor Author

civanch commented Jun 5, 2018

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/28472/console Started: 2018/06/05 13:03

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

-1

Tested at: 559a846

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-23480/28472/summary.html

I found follow errors while testing this PR

Failed tests: Build

  • Build:

I found an error when building:

tmp/slc6_amd64_gcc630/src/SimG4CMS/Muon/src/SimG4CMSMuon/MuonGEMFrameRotation.cc.o:(.data.rel.ro._ZTI20MuonGEMFrameRotation[_ZTI20MuonGEMFrameRotation]+0x10): undefined reference to `typeinfo for MuonFrameRotation'
tmp/slc6_amd64_gcc630/src/SimG4CMS/Muon/src/SimG4CMSMuon/MuonSensitiveDetector.cc.o: In function `MuonSensitiveDetector::MuonSensitiveDetector(std::__cxx11::basic_string, std::allocator > const&, DDCompactView const&, SensitiveDetectorCatalog const&, edm::ParameterSet const&, SimTrackManager const*)':
MuonSensitiveDetector.cc:(.text+0x29cd): undefined reference to `vtable for MuonFrameRotation'
tmp/slc6_amd64_gcc630/src/SimG4CMS/Muon/src/SimG4CMSMuon/MuonEndcapFrameRotation.cc.o:(.data.rel.ro._ZTI23MuonEndcapFrameRotation[_ZTI23MuonEndcapFrameRotation]+0x10): undefined reference to `typeinfo for MuonFrameRotation'
tmp/slc6_amd64_gcc630/src/SimG4CMS/Muon/src/SimG4CMSMuon/MuonME0FrameRotation.cc.o:(.data.rel.ro._ZTI20MuonME0FrameRotation[_ZTI20MuonME0FrameRotation]+0x10): undefined reference to `typeinfo for MuonFrameRotation'
collect2: error: ld returned 1 exit status
>> Compiling edm plugin /build/cmsbld/jenkins/workspace/ib-any-integration/CMSSW_10_2_X_2018-06-04-2300/src/SimG4CMS/ShowerLibraryProducer/plugins/module.cc 
gmake: *** [tmp/slc6_amd64_gcc630/src/SimG4CMS/Muon/src/SimG4CMSMuon/libSimG4CMSMuon.so] Error 1
Leaving library rule at SimG4CMS/Muon
>> Compiling edm plugin /build/cmsbld/jenkins/workspace/ib-any-integration/CMSSW_10_2_X_2018-06-04-2300/src/SimG4CMS/ShowerLibraryProducer/plugins/HcalForwardLibWriter.cc 
>> Building big object file tmp/slc6_amd64_gcc630/src/SimG4CMS/Forward/plugins/SimG4CMSForwardPlugins/bigobj/SimG4CMSForwardPlugins.obj


@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 5, 2018

Comparison not run due to Build errors (RelVals and Igprof tests were also skipped)

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

Pull request #23480 was updated. @cmsbuild, @civanch, @mdhildreth can you please check and sign again.

@civanch
Copy link
Contributor Author

civanch commented Jun 7, 2018

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/28534/console Started: 2018/06/07 11:20

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-23480/28534/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 31
  • DQMHistoTests: Total histograms compared: 2902639
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2902447
  • DQMHistoTests: Total skipped: 190
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 30 files compared)
  • Checked 128 log files, 14 edm output root files, 31 DQM output files

@civanch
Copy link
Contributor Author

civanch commented Jun 7, 2018

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2018

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@civanch
Copy link
Contributor Author

civanch commented Jun 7, 2018

@fabiocos , this PR now provides identical results versus baseline. Can you , please, check and merge it. It includes bug-fix of circular dependence of SIM packages, the effect of which are unclear to me.

}
}
return false;
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch for my understanding, what is implied by this change of logic? What was the triggered action, if any, by a "false" value returned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no difference to me - the returned bool does not used anywhere. I put "true" in order not make impression to newcomer, that a choice should be done between "true" and "false".

class SimTrackManager;

class MuonSensitiveDetector :
public SensitiveTkDetector,
public Observer<const BeginOfEvent*>,
public Observer<const EndOfEvent*>
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch there is no action in the EndOfEvent, this is the reason to remove this line, am I correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if methods will not be empty, they may be returned back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fabiocos , one of the goals of this clean-up is to take out methods/code which doing nothing but is copy/paste from one SD class to another.


#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include <iostream>

//#define DebugLog
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch I understand that you keep the revision of the verbosity that we discussed for a further PR, am I correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this code it turned out that a significant part of computation is done only for debugging. It much less work is to include #ifdef, LogDebug itself cannot serving for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@fabiocos , in this PR I tried improving verbosity using Verbatim stream and LogDebug where possible but in two places seems the best solution is to add #ifdef

Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch I was referring to the standardisation to EDM_ML_DEBUG...

@fabiocos
Copy link
Contributor

fabiocos commented Jun 8, 2018

+1

@cmsbuild cmsbuild merged commit 16237f9 into cms-sw:master Jun 8, 2018
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