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

Boosted objects and 94X version #5

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

dmajumder
Copy link

@imarches
I added a few stuff to run DeepCSV on subjets in 94X (needed for some upgrade studies I was doing with Lata).
Feel free to merge if you find this useful.

@@ -94,7 +96,12 @@ BTaggingExerciseII::BTaggingExerciseII(const edm::ParameterSet& iConfig) :
bDiscr_flav = bDiscr + "_" + flav;
if( bDiscr.find("Counting") != std::string::npos ) // track counting discriminator can be both positive and negative and covers a wider range then other discriminators
bDiscriminatorsMap[bDiscr_flav] = fs->make<TH2F>(bDiscr_flav.c_str(), (bDiscr_flav + ";Jet p_{T} [GeV];b-tag discriminator").c_str(), 20, 0, 200, 11000, -15, 40);
else
else if ( bDiscr.find("probbb") != std::string::npos || bDiscr.find("probb") != std::string::npos ) {

Choose a reason for hiding this comment

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

Don't you create the same histogram twice with the OR, I think that a single part e.g.

bDiscr.find("probbb") != std::string::npos

Should suffice and avoid potential memory leaks

@ghost
Copy link

ghost commented Feb 26, 2018

Thanks @dmajumder

Just a note that we do not use this repository anymore, the DAS school has switched to the POS repository

https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideCMSDataAnalysisSchoolBTaggingExercise

We should probably indicate that this repository is outdated. So, be careful, in case relevant for you. Things like era specification etc were not implemented here

@dmajumder
Copy link
Author

@imarches no problem. Indeed, this PR is mostly because Lata started off from here since she was familiar, and I made the additions to get the results we wanted. Thought it'd be better to merge with the main repo rather than lying around in my fork.

else
else if ( bDiscr.find("probbb") != std::string::npos || bDiscr.find("probb") != std::string::npos ) {
bDiscr_flav = std::string("pfDeepCSVJetTagsProbB") + "_" + flav;
if ( bDiscriminatorsMap.find(bDiscr_flav) == bDiscriminatorsMap.end() )
Copy link
Author

Choose a reason for hiding this comment

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

Well, doesn't this line check for the existence of the TH1 object before creating anew one?

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.

3 participants