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

HCAL: implementation of TDC simulation functionality for Phase1 HB/HE #28330

Merged
merged 8 commits into from Nov 6, 2019

Conversation

lwang046
Copy link
Contributor

@lwang046 lwang046 commented Nov 1, 2019

PR description:

1,Update of the HB/HE TDC simulation
The current version of HcalTDC.cc was developed but obsolete and never used in simulation production. The algorithm in it is rewritten to provide TDC timing according to the specifications of QIE11 running at p5, and the timing method is now used when simulating hcal electronics to get the TDC time
2, Modification of MC Digis packing (PackerHelp.h and HCalDigiToRawuHTR.cc)
Convert the data format according to uHTR specifications for HB
3, Making TDC current cut a configurable (HcalElectronicsSim.cc and some other files)
Passed a new variable to the constructor to allow for tuning of TDC current threshold from python configuration files.

PR validation:

(1) pion-gun results are identical w/wo the TDC branch in 11_0_0_pre11: results here

(2) TDC has been tested privately and yields expected results; eg. page 5 here

(3) runTheMatrix.py -s test is OK.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

The code-checks are being triggered in jenkins.

@abdoulline
Copy link

Long, you might want to edit the title to smth. more self-explanatory, e.g.:

"HCAL: implementation of TDC functionality for Phase1 HB/HE"

@lwang046 lwang046 changed the title Hcal tdc cmssw 11 0 x HCAL: implementation of TDC functionality for Phase1 HB/HE Nov 1, 2019
@abdoulline
Copy link

ups.. TDC -> TDC simulaton...

@lwang046 lwang046 changed the title HCAL: implementation of TDC functionality for Phase1 HB/HE HCAL: implementation of TDC simulation functionality for Phase1 HB/HE Nov 1, 2019
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28330/12586

  • This PR adds an extra 52KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28330/12587

  • This PR adds an extra 56KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

A new Pull Request was created by @lwang046 for master.

It involves the following packages:

DataFormats/HcalDigi
EventFilter/HcalRawToDigi
SimCalorimetry/HcalSimAlgos
SimCalorimetry/HcalSimProducers
SimCalorimetry/HcalTestBeam

@perrotta, @cmsbuild, @civanch, @mdhildreth, @slava77 can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @makortel, @mariadalfonso, @rovere 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

@slava77
Copy link
Contributor

slava77 commented Nov 1, 2019

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 1, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/3296/console Started: 2019/11/01 14:06

@perrotta
Copy link
Contributor

perrotta commented Nov 6, 2019

DQM comparisons in the jenkins automatic tests show differences, which are quite likely explained by the increased TDC threshold set. E.g. for wf 10824.0 HEM entries lower from 14952 to 772, with a completely different time distribution:

image

image

@lwang046 can you confirm that plots as above (as well al all the other different ones visible in the test outputs) are in fact expected? And, just for my own education, could you please explain what do they describe, and what exactly determines those differences?

@abdoulline
Copy link

abdoulline commented Nov 6, 2019

@perrotta
Andrea,
(1) TDC simulation shouldn't affect anything in RECO at this stage, as my Run3 particle gun results showed with the original branch ((1) in the header of PR).
(2) While HCAL DQM (primarily data-oriented, which we're not using for regular RelVals MC campaigns) looks at TDC, which was not simulated previously (wo this PR) at all, so previously in TDC-dedicated bits there was (undeleted) MIX information, while only now we start putting meaningful TDC information in there.
So, please, ignore what was TDC MC timing before...

@perrotta
Copy link
Contributor

perrotta commented Nov 6, 2019

@perrotta
Andrea,
(1) TDC simulation shouldn't affect anything in RECO at this stage, as my Run3 particle gun results showed with the original branch ((1) in the header of PR).
(2) While HCAL DQM (primarily data-oriented, which we're not using for regular RelVals MC campaigns) looks at TDC, which was not simulated previously (wo this PR) at all, so previously in TDC-dedicated bits there was (undeleted) MIX information, while only now we start putting meaningful TDC information in there.
So, please, ignore what was TDC MC timing before...

In fact, tests do not show any difference in reco outputs. I was only puzzled by the ones showing up in DQM. Thank you Salavat for explaining their origin

@abdoulline
Copy link

...Clarification: Mixing continues to use TDC bits, but now (with this PR) at the end of Digitization (after Mixing) comes TDC simulation, which fills these bits with regular TDC info before packing (Digi2Raw)...

@perrotta
Copy link
Contributor

perrotta commented Nov 6, 2019

+1

  • "Meaningful" TDC bits added to HCAL simulation, and their content correspond to what expected by the authors
  • Reco outputs are not affected at this stage: jenkins tests pass and show no differences in reco

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 6, 2019

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)

@fabiocos
Copy link
Contributor

fabiocos commented Nov 6, 2019

+1

@perrotta
Copy link
Contributor

perrotta commented Nov 8, 2019

@lwang046 @abdoulline

Since the merging yesterday of this PR, tests in other pull requests show differences in the DQM outputs for HCal TDC's. See for example the test results of #28363, where workflows with and without pileup have this issue.

As you already pointed out earlier in this thread, this does not affect reco outputs. However, it seems to point to some non-reproducibility of the TDC results provided by this PR, which should be better understood.

Could you please have a look and provide an explanation (and possibly also a fix) for such a non-reproducibility?

@fabiocos
Copy link
Contributor

fabiocos commented Nov 8, 2019

@perrotta it seems we arrive at the same conclusion

@abdoulline
Copy link

@perrotta
Could you, please, elaborate a bit on "non-reproducibility" of HCAL TDC ?...

@abdoulline
Copy link

So, this is 10024.0 2017...
Well, as I've mentioned previously, premixing is using TDC bits in QIE11DataFrame up until TDC simulation is done specifically for HB/HE after premixing
HCAL ElectronicsSimulation (DIGI) is using CLHEP::HepRandomEngine, but I don't see right away the reasons of any TDC-plots irresproducibility...

@abdoulline
Copy link

abdoulline commented Nov 8, 2019

Just for laying down the observations:
the issue affects only one HE (HEP17) pilot module of 2017 MC workflows, which was Phase1 QIE11 (TDC is simulated specifically for QIE11), unlike the rest of HE, which was legacy Phase0 QIE8...

I must admit I don't understand the origin of issue, it might be related to DQM deliberate back-incompatibility (unlike DQMOffline) and it's primary data "orientation" (we're not using it for MC RelVals).
And it looks harmless, albeit obviously annoying in PR's DQM tests...

A fairly quick workaround could be that we can switch off TDC simulation for all eras,
but >= Run3 by setting TDC current cut=-999 by default and then not run TDC simulation in this case, while set it to actual value only/specifically for Run3 (Phase2 inherits it) in the config.file.

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

7 participants