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
ngrenz: code cleonup and optimization of reco track #10975
Conversation
@boudoul FYI |
A new Pull Request was created by @ngrenz for CMSSW_7_6_X. ngrenz: code cleonup and optimization of reco track It involves the following packages: Validation/RecoTrack @cmsbuild, @danduggan, @deguio can you please review it and eventually sign? Thanks. |
@@ -815,6 +729,7 @@ void SiStripTrackingRecHitsValid::analyze(const edm::Event & e, const edm::Event | |||
if( (min(rechitpro.clusiz, 4) - 1) == 3 ){fillME(iLayerME->second.meResolxMFRphiwclus3,sqrt(rechitpro.resolxxMF));} | |||
if( (min(rechitpro.clusiz, 4) - 1) == 4 ){fillME(iLayerME->second.meResolxMFRphiwclus4,sqrt(rechitpro.resolxxMF));} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the preexisting code.
Here is a logic error and I will correct it in the next pull request for this class.
The problem is that the max from min(rechitpro.clusiz, 4)
is 4, therefore the max of the query is
if ( (4 - 1) == 4 )
so this fillME
will never be executed
Page 13 from this slides list possible solutions:
https://indico.cern.ch/event/394132/session/1/contribution/5/attachments/1140008/1632665/code_cleanup.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition for the next pull request:
if I am not wrong, the chronological order of the fillME
is not
important as long as the first entry is different.
Therefore the result does not change if I write
fillME(simplehitsMEs.meResolxMFAngleProfile,rechitpro.trackangle, sqrt(rechitpro.resolxxMF));
fillME(simplehitsMEs.meResolxMFTrackwidthProfile,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF));
or
fillME(simplehitsMEs.meResolxMFTrackwidthProfile,rechitpro.trackwidth, sqrt(rechitpro.resolxxMF));
fillME(simplehitsMEs.meResolxMFAngleProfile,rechitpro.trackangle, sqrt(rechitpro.resolxxMF));
if I am right, so I can combine some if
in the next pull request
@@ -1316,19 +1249,25 @@ void SiStripTrackingRecHitsValid::createMEs(DQMStore::IBooker & ibooker,const ed | |||
// get detids for the layer | |||
// Keep in mind that when we are on the TID or TEC we deal with rings not wheel | |||
int32_t lnumber = det_layer_pair.second; | |||
std::string lname = det_layer_pair.first; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const std::string&
please test |
The tests are being triggered in jenkins. |
Pull request #10975 was updated. @cmsbuild, @danduggan, @deguio can you please check and sign again. |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar |
+1 |
ngrenz: code cleonup and optimization of reco track
Work intended to optimize the performance of tracker validation code and code cleanup.
Outputs are supposed to be unchanged.
Any comments and suggestions are welcome.
More optimizations will follow.
The changes inside the analyse function are currently not realy big:
instead of
here is used
and instead of
here is used
these changes cover a large area.
The changes in the remaining functions are equivalent to #10973
Thanks for the help