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

HGCAL trigger: EM cluster identification #23024

Merged
merged 9 commits into from May 19, 2018

Conversation

jbsauvan
Copy link
Contributor

Add identification of electromagnetic clusters based on BDTs.

Depends on external cms-data/L1Trigger-L1THGCal#7

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @jbsauvan (Jean-Baptiste Sauvan) for master.

It involves the following packages:

L1Trigger/L1THGCal

@nsmith-, @rekovic, @cmsbuild, @thomreis, @kpedro88 can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @amarini, @kreczko, @lgray 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


};

DEFINE_EDM_PLUGIN(HGCalTriggerClusterIdentificationFactory,
Copy link
Contributor

Choose a reason for hiding this comment

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

you could define your own macro with the first argument (factory type) fixed, to simplify the definitions
(assuming this factory will be used more in the future)

std::vector<double> categories_ptmin = conf.getParameter<std::vector<double>>("CategoriesPtMin");
std::vector<double> categories_ptmax = conf.getParameter<std::vector<double>>("CategoriesPtMax");
working_points_ = conf.getParameter<std::vector<double>>("WorkingPoints");
for(unsigned cat=0; cat<categories_etamin.size(); cat++)
Copy link
Contributor

Choose a reason for hiding this comment

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

there should be a check that these four vectors have the same size

HGCalTriggerClusterIdentificationBDT::
initialize(const edm::ParameterSet& conf)
{
categories_.clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

is the idea here that an instance of this object could be re-initialized? Would it make sense just to do the initialization once and then use another object for another set of parameters?

std::vector<double> categories_etamax = conf.getParameter<std::vector<double>>("CategoriesEtaMax");
std::vector<double> categories_ptmin = conf.getParameter<std::vector<double>>("CategoriesPtMin");
std::vector<double> categories_ptmax = conf.getParameter<std::vector<double>>("CategoriesPtMax");
working_points_ = conf.getParameter<std::vector<double>>("WorkingPoints");
Copy link
Contributor

Choose a reason for hiding this comment

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

before the loop, you can do categories_.reserve() since the number of categories is known from the input

categories_etamax[cat]);
}
std::vector<std::string> spectators = {};
for (const auto& file : bdt_files)
Copy link
Contributor

Choose a reason for hiding this comment

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

can also reserve() before this loop

HGCalTriggerClusterIdentificationBDT::
clusterVariable(const std::string& variable, const l1t::HGCalMulticluster& cluster) const
{
if(variable=="cl3d_showerlength") return cluster.showerLength();
Copy link
Contributor

Choose a reason for hiding this comment

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

think about defining enums for these known quantities to limit repeated string comparisons

float pt = cluster.pt();
float eta = cluster.eta();
int cat = category(pt, eta);
return (cat!=-1 ? bdts_.at(cat)->evaluate(inputs) : -999.);
Copy link
Contributor

Choose a reason for hiding this comment

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

we might want to consider adding/modifying interfaces for TMVAEvaluator, creating a map is probably more work than necessary. (outside the scope of this PR, but just so I remember later)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@jbsauvan
Copy link
Contributor Author

Thanks @kpedro88 I have implemented your suggestions.

@cmsbuild
Copy link
Contributor

@fabiocos
Copy link
Contributor

@nsmith-, @rekovic, @thomreis could you please look at this PR?

1 similar comment
@fabiocos
Copy link
Contributor

@nsmith-, @rekovic, @thomreis could you please look at this PR?

@rekovic
Copy link
Contributor

rekovic commented May 17, 2018

+1

@cmsbuild
Copy link
Contributor

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

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 18, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/28029/console Started: 2018/05/18 11:48

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-23024/28029/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 30
  • DQMHistoTests: Total histograms compared: 2740553
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2740369
  • DQMHistoTests: Total skipped: 183
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 29 files compared)
  • Checked 124 log files, 14 edm output root files, 30 DQM output files

@fabiocos
Copy link
Contributor

+1

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

5 participants