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
Time for layerClusters in HGCAL #24838
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24838/6789 |
A new Pull Request was created by @amartelli for master. It involves the following packages: RecoLocalCalo/HGCalRecProducers @perrotta, @cmsbuild, @kpedro88, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
The tests are being triggered in jenkins. |
switch(algoId){ | ||
case reco::CaloCluster::hgcal_em: | ||
evt.getByToken(hits_ee_token,ee_hits); | ||
algo->populate(*ee_hits); | ||
for(auto it: *ee_hits) hitmap[it.detid()] = it.time(); |
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.
auto const&
break; | ||
case reco::CaloCluster::hgcal_had: | ||
evt.getByToken(hits_fh_token,fh_hits); | ||
evt.getByToken(hits_bh_token,bh_hits); | ||
if( fh_hits.isValid() ) { | ||
algo->populate(*fh_hits); | ||
for(auto it: *fh_hits) hitmap[it.detid()] = it.time(); |
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.
auto const&
} else if ( bh_hits.isValid() ) { | ||
algo->populate(*bh_hits); | ||
} | ||
break; | ||
case reco::CaloCluster::hgcal_mixed: | ||
evt.getByToken(hits_ee_token,ee_hits); | ||
algo->populate(*ee_hits); | ||
for(auto it: *ee_hits){ |
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.
auto const&
evt.getByToken(hits_fh_token,fh_hits); | ||
algo->populate(*fh_hits); | ||
for(auto it: *fh_hits){ |
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.
auto const&
if(sCl.size() >= 3){ | ||
std::vector<float> timeClhits; | ||
|
||
for(auto hit : sCl.hitsAndFractions()){ |
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.
auto const&
std::vector<float> timeClhits; | ||
|
||
for(auto hit : sCl.hitsAndFractions()){ | ||
std::map<const HGCalDetId, float>::iterator finder = hitmap.find(hit.first); |
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.
const_iterator
or auto
//make a map detid-rechit | ||
// NB for the moment just host EE and FH hits | ||
// timing in digi for BH not implemented for now | ||
std::map<const HGCalDetId, float> hitmap; |
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.
probably worthwhile to use an unordered_map
here
} | ||
|
||
std::unique_ptr<edm::ValueMap<float>> timeCl(new edm::ValueMap<float>()); |
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.
auto timeCl = std::make_unique<edm::ValueMap<float>>();
Comparison job queued. |
Comparison is ready Comparison Summary:
|
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24838/6797 |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@amartelli I looked at one of the output ROOT files from the matrix tests. The ValueMap is in the event content as expected. 95% of entries have the -99 default value, while the remaining 5% have values mostly between -1 and 1 with a small tail beyond 1. Is this the expected behavior? |
+upgrade |
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) |
+1 |
@kpedro88 yes what is observed is correct. The non default values are indeed filled for 3+ measurements with time in a cluster. sorry for the delay and thanks |
produce a ValueMap with the computed time for 2d clusters, so the BasicCluster dataformat is not modified