-
Notifications
You must be signed in to change notification settings - Fork 8
Boosted objects and 94X version #5
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
Open
dmajumder
wants to merge
16
commits into
cms-btv-pog:master
Choose a base branch
from
dmajumder:9_4_X
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5c9b2c3
change in old exerceise to add DeepCSV tagger
panwarlsweet 5f982be
adding probb+probb for deepCSV discriminator
panwarlsweet 5828b5c
correction in first exercise to add DeepCSV
panwarlsweet 4bdb696
change in plotting macro
panwarlsweet 2d9f51b
adding DeepCSV and AK8 jets and subjets
dmajumder c72472e
Filling DeepCSV and AK8 jets and subjets
dmajumder c5761e8
adding boost library
dmajumder c42379d
running btagger on run2_2017_9_4_X
panwarlsweet 7c1460e
Adding cuts for Ak8 jets
panwarlsweet aef942a
Adding 2nd method of Subjet b-tagging
panwarlsweet 70b3676
removing the no.of subjet condition
panwarlsweet 3f37b26
correcting eta cut
panwarlsweet 1a6552f
lata's updates
dmajumder 095a7d8
lata's updates
dmajumder 5533a0f
lata's updates
dmajumder 6225137
lata's updates
dmajumder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ | |
|
|
||
| #include "TH2F.h" | ||
|
|
||
| #include <boost/algorithm/string.hpp> | ||
|
|
||
| // | ||
| // class declaration | ||
| // | ||
|
|
@@ -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 ) { | ||
| bDiscr_flav = std::string("pfDeepCSVJetTagsProbB") + "_" + flav; | ||
| if ( bDiscriminatorsMap.find(bDiscr_flav) == bDiscriminatorsMap.end() ) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||
| bDiscriminatorsMap[bDiscr_flav] = fs->make<TH2F>(bDiscr_flav.c_str(), (bDiscr_flav + ";Jet p_{T} [GeV];b-tag discriminator").c_str(), 20, 0, 200, 4400, -11, 11); | ||
| } | ||
| else | ||
| bDiscriminatorsMap[bDiscr_flav] = fs->make<TH2F>(bDiscr_flav.c_str(), (bDiscr_flav + ";Jet p_{T} [GeV];b-tag discriminator").c_str(), 20, 0, 200, 4400, -11, 11); | ||
| } | ||
| } | ||
|
|
@@ -103,9 +110,9 @@ BTaggingExerciseII::BTaggingExerciseII(const edm::ParameterSet& iConfig) : | |
|
|
||
| BTaggingExerciseII::~BTaggingExerciseII() | ||
| { | ||
| // do anything here that needs to be done at desctruction time | ||
| // (e.g. close files, deallocate resources etc.) | ||
|
|
||
| // do anything here that needs to be done at desctruction time | ||
| // (e.g. close files, deallocate resources etc.) | ||
|
|
||
| } | ||
|
|
||
|
|
@@ -115,7 +122,7 @@ BTaggingExerciseII::~BTaggingExerciseII() | |
| // | ||
|
|
||
| // ------------ method called for each event ------------ | ||
| void | ||
| void | ||
| BTaggingExerciseII::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) | ||
| { | ||
| // define a jet handle | ||
|
|
@@ -131,7 +138,7 @@ BTaggingExerciseII::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe | |
| // fill discriminator histograms | ||
| for( const std::string &bDiscr : bDiscriminators_ ) | ||
| { | ||
| if( jet->pt()<30. || std::abs(jet->eta())>2.4 ) continue; // skip jets with low pT or outside the tracker acceptance | ||
| if( jet->pt()<20. || std::abs(jet->eta())>2.5 ) continue; // skip jets with low pT or outside the tracker acceptance | ||
|
|
||
| if( flavor==5 ) // b jet | ||
| bDiscr_flav = bDiscr + "_b"; | ||
|
|
@@ -140,55 +147,61 @@ BTaggingExerciseII::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe | |
| else // light-flavor jet | ||
| bDiscr_flav = bDiscr + "_udsg"; | ||
|
|
||
| bDiscriminatorsMap[bDiscr_flav]->Fill( jet->pt(), jet->bDiscriminator(bDiscr) ); | ||
| if ( bDiscr.find("probbb") != std::string::npos ) continue; //// We will sum the DeepCSV::probbb and DeepCSV::probb together | ||
| if ( bDiscr.find("probb") != std::string::npos ) { | ||
| boost::replace_all(bDiscr_flav, bDiscr, "pfDeepCSVJetTagsProbB") ; | ||
| bDiscriminatorsMap[bDiscr_flav]->Fill( jet->pt(), jet->bDiscriminator("pfDeepCSVJetTags:probb") + jet->bDiscriminator("pfDeepCSVJetTags:probbb") ); | ||
| } | ||
| else bDiscriminatorsMap[bDiscr_flav]->Fill( jet->pt(), jet->bDiscriminator(bDiscr) ); | ||
|
|
||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| // ------------ method called once each job just before starting event loop ------------ | ||
| void | ||
| void | ||
| BTaggingExerciseII::beginJob() | ||
| { | ||
| } | ||
|
|
||
| // ------------ method called once each job just after ending the event loop ------------ | ||
| void | ||
| void | ||
| BTaggingExerciseII::endJob() | ||
| { | ||
| } | ||
|
|
||
| // ------------ method called when starting to processes a run ------------ | ||
| /* | ||
| void | ||
| BTaggingExerciseII::beginRun(edm::Run const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
| void | ||
| BTaggingExerciseII::beginRun(edm::Run const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
|
|
||
| // ------------ method called when ending the processing of a run ------------ | ||
| /* | ||
| void | ||
| BTaggingExerciseII::endRun(edm::Run const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
| void | ||
| BTaggingExerciseII::endRun(edm::Run const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
|
|
||
| // ------------ method called when starting to processes a luminosity block ------------ | ||
| /* | ||
| void | ||
| BTaggingExerciseII::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
| void | ||
| BTaggingExerciseII::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
|
|
||
| // ------------ method called when ending the processing of a luminosity block ------------ | ||
| /* | ||
| void | ||
| BTaggingExerciseII::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
| void | ||
| BTaggingExerciseII::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) | ||
| { | ||
| } | ||
| */ | ||
|
|
||
| // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ | ||
| void | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Don't you create the same histogram twice with the OR, I think that a single part e.g.
Should suffice and avoid potential memory leaks