-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Phase2 Trigger Primitive generation for Ecal Barrel #42633
Phase2 Trigger Primitive generation for Ecal Barrel #42633
Conversation
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42633/36688
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-42633/36690
|
A new Pull Request was created by @nancymarinelli for master. It involves the following packages:
The following packages do not have a category, yet: CalibCalorimetry/EBPhase2TPGTools @perrotta, @rappoccio, @epalencia, @consuegs, @mdhildreth, @tvami, @cmsbuild, @AdrianoDee, @srimanob, @saumyaphor4252, @aloeliger, @civanch, @antoniovilela, @francescobrivio, @fabiocos, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@nancymarinelli has this been brought up to the L1T Phase 2 DPG? |
@nancymarinelli Are there any trigger performance changes expected from this? Are there any old vs new plots we should be aware of? |
Hello,
as I explained in the notes when I submitted the PR, this is all -VERY-
preliminary.
And no, there are no new plots available
Nancy
…On 25.08.23 13:51, Andrew Loeliger wrote:
@nancymarinelli <https://github.com/nancymarinelli> Are there any
trigger performance changes expected from this? Are there any old vs
new plots we should be aware of?
—
Reply to this email directly, view it on GitHub
<#42633 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABC6G2RUIDWGX3BYFFEKKOTXXCGTRANCNFSM6AAAAAA32N3GHI>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Nancy Marinelli
Research Professor
University of Notre Dame, IN, US
CERN, Bdg 40/3-A01, 1211 Geneva
SWITZERLAND
Phone +41-22-76-70809
fax +41-22-76-78940
--------------DUehoBP5DfmXkkVREo64hZ0w
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hello,<br>
as I explained in the notes when I submitted the PR, this is all
-VERY- preliminary.<br>
And no, there are no new plots available<br>
<br>
Nancy <br>
<br>
<div class="moz-cite-prefix">On 25.08.23 13:51, Andrew Loeliger
wrote:<br>
</div>
<blockquote type="cite" ***@***.***">
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nancymarinelli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nancymarinelli" ***@***.***</a> Are there any
trigger performance changes expected from this? Are there any
old vs new plots we should be aware of?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>
Reply to this email directly, <a href="#42633 (comment)" moz-do-not-send="true">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABC6G2RUIDWGX3BYFFEKKOTXXCGTRANCNFSM6AAAAAA32N3GHI" moz-do-not-send="true">unsubscribe</a>.<br>
You are receiving this because you were mentioned.<img src="https://github.com/notifications/beacon/ABC6G2UKFYYK5GRNTMLHZRDXXCGTRA5CNFSM6AAAAAA32N3GHKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTE5S6SC.gif" alt="" moz-do-not-send="true" width="1" height="1"><span style="color: transparent; font-size: 0; display: none;
visibility: hidden; overflow: hidden; opacity: 0; width: 0;
height: 0; max-width: 0; max-height: 0; mso-hide: all">Message
ID: <span><cms-sw/cmssw/pull/42633/c1693236513</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#42633 (comment)",
"url": "#42633 (comment)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Nancy Marinelli
Research Professor
University of Notre Dame, IN, US
CERN, Bdg 40/3-A01, 1211 Geneva
SWITZERLAND
Phone +41-22-76-70809
fax +41-22-76-78940</pre>
</body>
</html>
--------------DUehoBP5DfmXkkVREo64hZ0w--
|
Hello again,
forgot to emphasize in my previous message that this PR is mainly
intended, at this point in time,
for a technical validation, meaning checking that the whole machinery
works when integrated.
I would be careful to with rushing to physics/L1 studies for the time
being since this is full new development.
Best,
Nancy
…On 25.08.23 13:51, Andrew Loeliger wrote:
@nancymarinelli <https://github.com/nancymarinelli> Are there any
trigger performance changes expected from this? Are there any old vs
new plots we should be aware of?
—
Reply to this email directly, view it on GitHub
<#42633 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABC6G2RUIDWGX3BYFFEKKOTXXCGTRANCNFSM6AAAAAA32N3GHI>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Nancy Marinelli
Research Professor
University of Notre Dame, IN, US
CERN, Bdg 40/3-A01, 1211 Geneva
SWITZERLAND
Phone +41-22-76-70809
fax +41-22-76-78940
--------------TEPc1QA9ULyvY2VXRjLc4nzg
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hello again,<br>
forgot to emphasize in my previous message that this PR is mainly
intended, at this point in time,<br>
for a technical validation, meaning checking that the whole
machinery works when integrated.<br>
I would be careful to with rushing to physics/L1 studies for the
time being since this is full new development.<br>
<br>
<br>
Best,<br>
Nancy <br>
<br>
<div class="moz-cite-prefix">On 25.08.23 13:51, Andrew Loeliger
wrote:<br>
</div>
<blockquote type="cite" ***@***.***">
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nancymarinelli/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nancymarinelli" ***@***.***</a> Are there any
trigger performance changes expected from this? Are there any
old vs new plots we should be aware of?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>
Reply to this email directly, <a href="#42633 (comment)" moz-do-not-send="true">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABC6G2RUIDWGX3BYFFEKKOTXXCGTRANCNFSM6AAAAAA32N3GHI" moz-do-not-send="true">unsubscribe</a>.<br>
You are receiving this because you were mentioned.<img src="https://github.com/notifications/beacon/ABC6G2UKFYYK5GRNTMLHZRDXXCGTRA5CNFSM6AAAAAA32N3GHKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTE5S6SC.gif" alt="" moz-do-not-send="true" width="1" height="1"><span style="color: transparent; font-size: 0; display: none;
visibility: hidden; overflow: hidden; opacity: 0; width: 0;
height: 0; max-width: 0; max-height: 0; mso-hide: all">Message
ID: <span><cms-sw/cmssw/pull/42633/c1693236513</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#42633 (comment)",
"url": "#42633 (comment)",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Nancy Marinelli
Research Professor
University of Notre Dame, IN, US
CERN, Bdg 40/3-A01, 1211 Geneva
SWITZERLAND
Phone +41-22-76-70809
fax +41-22-76-78940</pre>
</body>
</html>
--------------TEPc1QA9ULyvY2VXRjLc4nzg--
|
@nancymarinelli Then would you like this tested, but placed on hold? Or maybe this PR should be marked as a draft if it is not tested/ready for integration? |
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.
If some changes are going to made to this, then there are a few things that could be tidied up. I just looked at TrigPrimProducers.
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, and 3 other /data/
files will likely need to go into the externals and be removed from the git history (likely by squashing the commits).
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.
Hello Andrew, I have a question on this one. Ideally the content of the files should go in the DB. But that will come much later. Can these files stay here for the time being ? If absolutely not, I would need instructions to make them external and how to access them. I am not familiar with all that. Thanks
} | ||
|
||
EcalEBTrigPrimPhase2ESProducer::~EcalEBTrigPrimPhase2ESProducer() { | ||
std::cout << " EcalEBTrigPrimPhase2ESProducer DTOR " << std::endl; |
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 should be changed to logDebug
or logInfo
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.
removed
std::cout << " EcalEBTrigPrimPhase2ESProducer::producePhysicsConst Needs updating if we want to keep it " | ||
<< std::endl; |
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 should also be logDebug
or logInfo
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.
removed
finalFileName = fileInPath.fullPath(); | ||
} else { | ||
finalFileName = configFilename_; | ||
std::cout << "Couldnt find database file via fileinpath trying with pathname directly!!" << std::endl; |
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 should be logDebug
, logInfo
, or logError
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.
Done
gis >> std::dec >> id; | ||
|
||
if (flagPrint_) { | ||
std::cout << dataCard << " " << std::dec << id << std::endl; |
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 should be logDebug
or logInfo
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.
flagPrint_ is set to false by default
gis >> std::dec >> id; | ||
|
||
if (flagPrint_) { | ||
std::cout << dataCard << " " << std::dec << id << std::endl; |
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.
Same comment about log versus cout
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.
flagPrint_ is set to false by default
std::cout << st6 << std::endl; | ||
std::cout << std::endl; |
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, and all remaining cout
instances should probably be changed to log statements instead
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.
@perrotta @aloeliger These couts are included in a if(flagPrint) which is set to false by default. And in other pieces of code tehre are many couts inclosed in a if (debug) which is set to false by default. We cannot even have the liberty to switch on defug lines in our private areas ?? Where possible I have change cout with logInfo or logWarning. All the others can, as I said, switched on only for our private purposes (until V0 will become V final)
std::unique_ptr<EcalTPGSlidingWindow> EcalEBTrigPrimPhase2ESProducer::produceSlidingWindow( | ||
const EcalTPGSlidingWindowRcd &iRecord) { | ||
auto prod = std::make_unique<EcalTPGSlidingWindow>(); | ||
parseTextFile(); | ||
for (int subdet = 0; subdet < 2; subdet++) { | ||
std::map<uint32_t, std::vector<uint32_t>>::const_iterator it; | ||
for (it = mapStrip_[subdet].begin(); it != mapStrip_[subdet].end(); it++) { | ||
prod->setValue(it->first, (it->second)[0]); | ||
} | ||
} | ||
return prod; | ||
} | ||
|
||
std::unique_ptr<EcalTPGFineGrainEBIdMap> EcalEBTrigPrimPhase2ESProducer::produceFineGrainEB( | ||
const EcalTPGFineGrainEBIdMapRcd &iRecord) { | ||
auto prod = std::make_unique<EcalTPGFineGrainEBIdMap>(); | ||
parseTextFile(); | ||
EcalTPGFineGrainConstEB fg; | ||
std::map<uint32_t, std::vector<uint32_t>>::const_iterator it; | ||
for (it = mapFg_.begin(); it != mapFg_.end(); it++) { | ||
fg.setValues((it->second)[0], (it->second)[1], (it->second)[2], (it->second)[3], (it->second)[4]); | ||
prod->setValue(it->first, fg); | ||
} | ||
return prod; | ||
} | ||
|
||
std::unique_ptr<EcalTPGFineGrainStripEE> EcalEBTrigPrimPhase2ESProducer::produceFineGrainEEstrip( | ||
const EcalTPGFineGrainStripEERcd &iRecord) { | ||
auto prod = std::make_unique<EcalTPGFineGrainStripEE>(); | ||
parseTextFile(); | ||
// EE Strips | ||
std::map<uint32_t, std::vector<uint32_t>>::const_iterator it; | ||
for (it = mapStrip_[1].begin(); it != mapStrip_[1].end(); it++) { | ||
EcalTPGFineGrainStripEE::Item item; | ||
item.threshold = (it->second)[2]; | ||
item.lut = (it->second)[3]; | ||
prod->setValue(it->first, item); | ||
} | ||
// EB Strips | ||
for (it = mapStrip_[0].begin(); it != mapStrip_[0].end(); it++) { | ||
EcalTPGFineGrainStripEE::Item item; | ||
item.threshold = (it->second)[2]; | ||
item.lut = (it->second)[3]; | ||
prod->setValue(it->first, item); | ||
} | ||
return prod; | ||
} | ||
|
||
std::unique_ptr<EcalTPGFineGrainTowerEE> EcalEBTrigPrimPhase2ESProducer::produceFineGrainEEtower( | ||
const EcalTPGFineGrainTowerEERcd &iRecord) { | ||
auto prod = std::make_unique<EcalTPGFineGrainTowerEE>(); | ||
parseTextFile(); | ||
std::map<uint32_t, std::vector<uint32_t>>::const_iterator it; | ||
for (it = mapTower_[1].begin(); it != mapTower_[1].end(); it++) { | ||
prod->setValue(it->first, (it->second)[1]); | ||
} | ||
return prod; | ||
} | ||
|
||
std::unique_ptr<EcalTPGLutIdMap> EcalEBTrigPrimPhase2ESProducer::produceLUT(const EcalTPGLutIdMapRcd &iRecord) { | ||
auto prod = std::make_unique<EcalTPGLutIdMap>(); | ||
parseTextFile(); | ||
EcalTPGLut lut; | ||
std::map<uint32_t, std::vector<uint32_t>>::const_iterator it; | ||
for (it = mapLut_.begin(); it != mapLut_.end(); it++) { | ||
unsigned int lutArray[1024]; | ||
for (int i = 0; i < 1024; i++) | ||
lutArray[i] = (it->second)[i]; | ||
lut.setLut(lutArray); | ||
prod->setValue(it->first, lut); | ||
} | ||
return prod; | ||
} | ||
|
||
*/ |
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.
Large chunks of commented code like this should be removed unless they serve a purpose to illustrate something
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.
done
please test
|
+Upgrade |
@cms-sw/simulation-l2 @cms-sw/l1-l2 |
NOTE for the release managers: this has to be merged together with cms-data/SimCalorimetry-EcalEBTrigPrimProducers#1 (@nancymarinelli , if you write it in the PR description, for which I have no rights to do so, the accompanying cms-data PR can be spotted more easily) |
+l1 |
@mdhildreth, @fabiocos, @perrotta, @antoniovilela, @civanch, @saumyaphor4252, @consuegs, @srimanob, @francescobrivio, @aloeliger, @epalencia, @davidlange6, @rappoccio, @subirsarkar |
+1 |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-234212/36555/summary.html Comparison SummarySummary:
|
+1 |
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 be automatically merged. |
PR description:
This PR addresses (although probably not entirely) the emulation of the TP generation with the EB upgraded off detector electronics (BCP). We implemented the algorithms (as we know them now) which will be running on the BCP.
In doing this we decided not to reinvent the wheel and try to follow (as long as it was possible) what done for PhaseI (structure wise)
Two packages, SimCalorimetry/EcalEBTrigPrimProducers and SimCalorimetry/EcalEBTrigPrimAlgos were already existing since a long time with algorithms based on hacking the Phase I algos and using the Phase I digis. We keep those files
in the packages until the development of the new stuff is completed.
We have added new files (.cc and .h with a clear Phase2 name in them.
The packages SimCalorimetry/EcalEBTrigPrimProducers contain the producer and the ES producers while
SimCalorimetry/EcalEBTrigPrimAlgos contains all the algorithmic modules. The main input to all this are the Phase 2 digis.
At this point in time we are not yet interfaced with the brand new digis made out of the new signal shape.
In DataFormats/EcalDigis the new EBTrigPrim formats were already present since long time but we had to apply some
updates.
New files were added to CondFormats/DataRecors and CondFormats/EcalObjects to provide the necessary environment
for the new algorithms.
In SimCalorimetry/Configuration/python the ecalDigiSequence_cff.py has been update to run the Phase2 TP sequence
and a new Era modifier has been added in Configuration/Eras , called phase2_ecalTP_devel (so to keep the TP generation independent from the phase2_ecal_devel which mainly drives the digi production)
We consider this PR only a starting point: a) many details strictly related to the final electronics are missing, because they are not yet fully known, b) all what is related to databases is missing and I surely am forgetting many other items.
It's also very possible that this PR will be updated in some places in the very near future
This PR needs to be merged -together- with
cms-data/SimCalorimetry-EcalEBTrigPrimProducers#1
PR validation:
The PR has been tested with a private .cfg (also committed in SimCalorimetry/EcalEBTrigPrimProducers/test).
I also tried cmsDriver with the workflow 24234.61. For step2 I did not manage to run it in automatic. If I add to the eras options the new phase2_ecalTP_devel, cmsRiver does not recognize it. But if I run the cmsDriver with --no_exec and I add
by hand the new era in the step2.cfg all works fine. There are details which I do not know about including it automated in the cmsDriver.
Finally, the code has been committed after running the scram b code-format