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

Fixes to LFHCal simulation digi/reco #388

Merged
merged 3 commits into from
Dec 9, 2022
Merged

Conversation

steinber
Copy link
Contributor

@steinber steinber commented Dec 2, 2022

Briefly, what does this PR introduce?

This includes some changes (hard won) which fixes inconsistencies in the digi and reco steps in the LFHCal (previously they were far out of sync, and so many of the energy deposits were not being reconstructed)

What kind of change does this PR introduce?

  • [X ] Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • [] Tests for the changes have been added - I have tested it locally. Added to where?
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

Nothing broke before, but most of the energy deposits were truncated and so no clusters were dfound

Does this PR change default behavior?

The LFHCal reconstructs now reconstructs energies (although the scale has changed since 2 weeks ago - under investigation).

Copy link
Contributor

@DraTeots DraTeots left a comment

Choose a reason for hiding this comment

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

Please, use DD4Hep units explicitly units for config parameter values. We now experience hard time to solve problems as values fly around without proper units set.

m_dyRangeADC=100. * dd4hep::MeV;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
m_pedMeanADC=400;//{this, "pedestalMean", 400};
m_capADC=4096;//{this, "capacityADC", 8096};
m_dyRangeADC=200.;//{this, "dynamicRangeADC", 100. * dd4hep::MeV};
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use units here

m_pedMeanADC = 20;
m_pedSigmaADC = 0.8;
m_capADC = 4096;
m_dyRangeADC = 200. ;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please ensure units are used here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi - I had to remove the units since dyRangeADC secretly adds them in CalorimeterHitReco.cc in L27 like this:

dyRangeADC = m_dyRangeADC * dd4hep::MeV;

So If I presented it with MeV, then it would be scaled twice (which completely threw me off). I would prefer dyRangeADC to be assumed to have energy units, and remove this hidden rescaling (unless I missed something).

Copy link
Contributor

Choose a reason for hiding this comment

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

Hidden conversions are bad. Let me look into that. The problem is that we have issue with units. @wdconinc started to fix those and filter out what happens in calorimetry algorithms with units here: #365. But it has not yet been finished. And I started to put the correct default values from python to C++. With all that we decided that the correct implicit units shold be DD4Hep ones. @wdconinc is it known and fixed in your PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

@steinber
Copy link
Contributor Author

steinber commented Dec 8, 2022

Hi - just to clarify: i'm waiting for #365, so I can test it properly?

@DraTeots
Copy link
Contributor

DraTeots commented Dec 9, 2022

@steinber Lets commit it as is (as it works in main now) and then probably it would be a critical place to watch for error to reappear. I hope on your help here and validation of what is being done.

@DraTeots DraTeots merged commit 868eb52 into eic:main Dec 9, 2022
@steinber
Copy link
Contributor Author

steinber commented Dec 9, 2022

Thanks - i'm not remotely done with this, so I'm happy to keep up with it.

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.

3 participants