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

Ticl em vs had bdt #3

Open
wants to merge 3 commits into
base: TICL_inReco
Choose a base branch
from
Open

Conversation

gouskos
Copy link

@gouskos gouskos commented Dec 5, 2019

Initial commit of a BDT to separate EM and HAD showers in TICL
This PR adds float to the Trackster object which is the BDT score
The weights file is kind of dummy - will be updated in the next few days.

reader_->AddVariable("ts_pcasig2", &ts_pcasig2);

std::string CMSSW_BASE(std::getenv("CMSSW_BASE"));
std::string weightfilename_ = CMSSW_BASE+"/src/RecoHGCal/data/em_vs_had_xgboost.xml";
Copy link
Owner

Choose a reason for hiding this comment

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

Why not trying the usual FileInPath approach?
See, e.g., FWCore/ParameterSet/interface/FileInPath.h
There is also the corresponding python parameter cms.FileInPath.
If you git grep FileInPath in CMSSW, you will find plenty of examples.

@@ -36,6 +40,9 @@ namespace ticl {
const int eidNLayers_;
const int eidNClusters_;

TMVA::Reader* reader_;
float ts_energy, ts_x, ts_y, ts_z, ts_pcaeigval0, ts_pcasig0, ts_pcaeigval1, ts_pcasig1, ts_pcaeigval2, ts_pcasig2;
Copy link
Owner

Choose a reason for hiding this comment

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

Private variables should always be terminated by an underscore character: _, so that people reading code can understand where they are coming from.


float mva_ = 1.;
for (unsigned int itrkster = 0; itrkster<tracksters.size(); ++itrkster) {
ts_energy = tracksters.at(itrkster).raw_energy;
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure I like the approach of having private variables dedicated to run BDT inference.
I'll think a bit more about that.

rovere pushed a commit that referenced this pull request Mar 25, 2020
rovere pushed a commit that referenced this pull request Nov 25, 2020
rovere pushed a commit that referenced this pull request Nov 27, 2020
Fixing I/O rules for ScoutingMuon backward accessibility
rovere pushed a commit that referenced this pull request Feb 27, 2021
rovere pushed a commit that referenced this pull request Apr 14, 2021
rovere pushed a commit that referenced this pull request Mar 4, 2022
rovere pushed a commit that referenced this pull request Jun 15, 2023
Recover fillDescriptions as requested
rovere pushed a commit that referenced this pull request Jun 15, 2023
rovere pushed a commit that referenced this pull request Jun 26, 2023
rovere pushed a commit that referenced this pull request May 6, 2024
* remove comments, set constants constant

* remove CASTOR cleaner and merger

* Remove single generator customize function. It is not used anymore since the generator step is splitted in 3 steps.

* remove unneeded filters

* optimize embedding correction calculation

* optimize selector loops

* format cpp code with scram build code-format

---------

Co-authored-by: cwinter <[email protected]>
rovere pushed a commit that referenced this pull request Aug 19, 2024
Update prompt and displaced muon names to reflect GMT changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants