-
Notifications
You must be signed in to change notification settings - Fork 2
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
The effect of module sum split over multiple towers on physics objects #472
The effect of module sum split over multiple towers on physics objects #472
Conversation
Hi @mhassans |
Hi @jbsauvan |
I would be good to fix it as I will ask you at the very end, before merging, to squash all the commits. |
Thanks, it should be fixed now. |
for (int i=1; i<=std::stoi(result.at(4)); i++){ | ||
towerEta = 2 + std::stoi(result.at(3*i+2)); // shift by two to avoid negative eta | ||
towerPhi = (std::stoi(result.at(3*i+3)) + sector*int(nBinsPhi_)/3 + int(nBinsPhi_)/2) % int(nBinsPhi_);//move to the correct sector | ||
if(zside==1){ | ||
towerPhi = (3*int(nBinsPhi_)/2 - towerPhi - 1) % int(nBinsPhi_); //correct x -> -x in z>0 | ||
} | ||
binIDandShares.insert( {l1t::HGCalTowerID(doNose_, zside, towerEta, towerPhi).rawId(), std::stod(result.at(3*i+4))/splitDivisor } ); | ||
} |
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.
All the hardcoded numbers should be implemented as named constants, otherwise it is difficult to understand what they mean exactly
Hello @mhassans |
Hi Jean-Baptiste, Sorry for delay on this. I will start working on this soon. I will also send you an email explaining the reasons for this delay. Thanks! |
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.
Thanks @mhassans
Here are some additional comments.
Hi @jbsauvan Thanks for your comments. I implemented all in the code. Please let me know if the code needs any further changes. |
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.
Thanks a lot @mhassans
I just have one remaining minor naming comment below. Once implemented, could you:
- rebase your work on top of the latest devel branch (currently
CMSSW_12_0_0_pre3
). Given that you have a large number of commits, it might be simpler to squash them first and rebase. - run
scram b code-format
and commit the proposed changes
std::string substr; | ||
std::getline(ss, substr, ' '); | ||
lineSplitted.push_back(substr); | ||
int NumOfWordsInThisRow = 0; |
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.
Variable names should not start with a capital letter (usually reserved for class names).
So should rather be numOfWordsInThisRow
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.
Thanks a lot @mhassans I just have one remaining minor naming comment below. Once implemented, could you:
- rebase your work on top of the latest devel branch (currently
CMSSW_12_0_0_pre3
). Given that you have a large number of commits, it might be simpler to squash them first and rebase.- run
scram b code-format
and commit the proposed changes
Thanks @jbsauvan
I implemented the comment and then squashed the commits. Could you please confirm if the rebasing can be done in the following way?
Create a branch from the latest CMSSW version:
git checkout -b my_CMSSW_12_0_0_pre3 pfcaldev/hgc-tpg-devel-CMSSW_12_0_0_pre3
Then update it with origin (pfcaldev):
git pull pfcaldev hgc-tpg-devel-CMSSW_12_0_0_pre3
Back to my branch:
git checkout moh-modSplit
Finally rebase:
git rebase my_CMSSW_12_0_0_pre3
Then force push it to my branch:
git push myRemote +moh-modSplit
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.
Hi @mhassans
That looks correct. In case you want to check that the rebase will pick the commit you want, you can do an interactive rebase (with -i
)
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.
@jbsauvan
There are some merging conflicts after I did the rebase (please see the attached screenshot). Should I resolve it by choosing lines from the newest release (12_0_0_pre3), or the conflicts are not expected?
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.
There should be conflict only in the files that you modified, which doesn't seem to be the case here. So these conflicts are not expected. I'll have a look.
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.
It seems that the rebase wants to apply a bunch of commits unrelated to this PR. The simplest then is probably to cherry-pick
your single commit. Or you can still do the rebase but do it interactively (with -i
) and remove all the commits except your commit.
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.
By the way, I just modified the base branch of the PR to the latest devel branch (this is why there are now conflicts). When you push the rebased branch, it should be able to merge again.
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.
@jbsauvan Thanks! The rebasing went well this time and I also did code-format check. So please let me know about the next step if everything looks fine.
4a91fc1
to
89b2537
Compare
89b2537
to
2b66b16
Compare
Thanks @mhassans
This |
@jbsauvan Ah I see. So it just needs renaming the path and the class names wherever used. This means changing the old name (HGCalModuleDetId) to the new name (HGCalTriggerModuleDetId). One more question: How can I un-hide DataFormats/ForwardDetId in my local machine? |
In principle yes.
You can |
Thanks @jbsauvan . I pushed the changes. It should work now. |
Thanks @mhassans
|
Thanks @jbsauvan . I made the changes and re-ran the code-format. |
PR description:
In trigger primitive generator (TPG) of the HGCal, the total energy of a module (module sum) is split over multiple towers overlapping with it. We are investigating the effect of this splitting on the variables associated to physical objects, such as the position/energy resolution of e/gamma/jets.
PR validation:
if this PR is a backport please specify the original PR and why you need to backport that PR: