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

Cross Correlation algorithm for ECAL timing, first implementation #30

Closed
wants to merge 47 commits into from

Conversation

nminafra
Copy link

This is the first attempt of integrating the Cross Correlation method in the ECAL reconstruction code.
The code was rebased on 11_3_X.

NOTE: For this version of the code the default algorithm is still the RatioMethod.
To enable the Cross Correlation method, you need to change:
timealgo = cms.string("RatioMethod") -> timealgo = cms.string("KansasCC")
in
RecoLocalCalo/EcalRecProducers/python/ecalMultiFitUncalibRecHit_cfi.py

Copy link
Owner

@thomreis thomreis left a comment

Choose a reason for hiding this comment

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

First pass.
Please run also
scram build code-checks
scram build code-format
already now.

Copy link
Owner

@thomreis thomreis left a comment

Choose a reason for hiding this comment

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

Second iteration.

} else if (timealgo_ == kansasMethodCC) {

float startTime = -25;
float stopTime = 25;
Copy link
Owner

Choose a reason for hiding this comment

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

ecalPh1::Samp_Period?

if (counter < MIN_NUM_OF_ITERATIONS || counter > MAX_NUM_OF_ITERATIONS - 1) {
if (counter > MAX_NUM_OF_ITERATIONS / 2)
//Produce a log if minimization took too long
edm::LogWarning("EcalUncalibRecHitTimingCCAlgo::computeTimeCC")
Copy link
Owner

Choose a reason for hiding this comment

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

How often do you expect this warning to happen?

Copy link
Author

Choose a reason for hiding this comment

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

not to often, actually, it never happened to me. But if it happens it is useful to know.
In general, this code was tested for functionality (time precision vs previous algorithms) but not for performance.
The average number of cycles here is ~5 but it could be reduced further and maybe something can be done to improve rare cases where it takes too long (MAX_NUM_OF_ITERATIONS)

Copy link
Owner

Choose a reason for hiding this comment

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

Is it worth a warning or would logInfo do as well? Your call.

Copy link
Author

Choose a reason for hiding this comment

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

I'll leave just a logInfo, since in any case if this happens, the jitterError will be negative (to tell users not to trust the jitter for that rechit)

@nminafra
Copy link
Author

I've created a test python that should work (after voms-proxy-init):
RecoLocalCalo/EcalRecProducers/test/testEcalUncalibRechitProducerWithCC_cfg.py

@thomreis
Copy link
Owner

I think after the the test config is fixed, the standard matrix tests are passing, and when you have validated your test results this is ready for a PR to the official repo.

@thomreis
Copy link
Owner

Nice work. Thanks.

@nminafra
Copy link
Author

nminafra commented Feb 19, 2021

Runing
$> runTheMatrix.py -l limited -i all --ibeos
gave no errors. Log file here:
https://nminafra.web.cern.ch/ECAL/runall-report-step123-.log

nminafra and others added 28 commits March 10, 2021 08:04
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
Co-authored-by: Slava Krutelyov <[email protected]>
@thomreis
Copy link
Owner

Closing this since PR cms-sw#33119 is now merged in master. Thanks for the nice work.

@thomreis thomreis closed this Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants