#include <BTagJetSelector.hpp>
Inheritance diagram for caf_util::BTagJetSelector:

Public Member Functions | |
| BTagJetSelector (const char *name) | |
| ~BTagJetSelector () | |
| bool | processEvent (cafe::Event &event) |
| Called for every event. | |
| bool | selectObject (const TMBJet &jet) |
| Abstract select method to be overridden by user. | |
Private Member Functions | |
| void | before (cafe::Collection< TMBJet > &from) |
| Called before the actual selection starts. | |
| ClassDef (BTagJetSelector, 0) | |
Private Attributes | |
| cafe::StatPointer | _stat |
| int | _nbjets |
| int | _nbjetsmax |
| int | _nselected |
| std::string | _btagAlgo |
| std::string | _btagPoint |
| bool | _isMC |
| cafe::Variables | _vars |
The user then selects which type (algorithm and operating point) of b-jets and how many to select. This code is based on JetSelector.
Usage: Here's a list of all configuration parameters used by the selector, along with their standard values.
Required parameters:
Optional parameters: All those available for the SelectUserObjects class.
Here's an example config file that shows how to use this b-jet selector:
cafe.Run: BTagJetSelector(bjets)
bjets.From: JCCB bjets.To: BTaggedJCCB bjets.Tree: SelectedObjects bjets.BTagAlgo: NN bjets.Cut: L4 # nBjets applies a >= cut bjets.nBJets: 1 # nBjetsMax applies a <= cut bjets.nBJetsMax: 2
This will select events that have 1 or 2 jets tagged with the NN L4 algorithm and store the selected JCCB branch events in a new branch called BTaggedJCCB inside the tree SelectedObjects.
To make asymmetric tagging, you can instantiate two BTagJetSelectors: the first one should require two jets (and only two) with say a LOOSE requirement, and the second selector should require one, and only one, say TIGHT jet. That way you select events with two tagged jets: a LOOSE and a TIGHT. (This only works for totally inclusive taggers, like the NN. SVT has different requirements for LOOSE and TIGHT thus TIGHT tags may not include LOOSE tags.)
If you want one TIGHT tagged jet in the event and explicitly require that no other jet is tagged, then you can concatenate two processors again: the first one requiring one and only one LOOSE jet and the second one requiring one and only one TIGHT jet. That way you make sure the LOOSE jet is also the TIGHT jet, hence leaving all other jets as untagged. (Of course here LOOSE means the loosest cut point available for that tagger, and again, as above, this only works for inclusive taggers).
Definition at line 88 of file BTagJetSelector.hpp.
|
|
Definition at line 20 of file BTagJetSelector.cpp. References _btagAlgo, _btagPoint, _nbjets, _nbjetsmax, cafe::Config::get(), and cafe::Processor::name(). |
|
|
Definition at line 40 of file BTagJetSelector.cpp. |
|
|
Called before the actual selection starts. E.g. the input can be sorted here. Reimplemented from cafe::SelectUserObjects< TMBJet >. Definition at line 101 of file BTagJetSelector.cpp. |
|
||||||||||||
|
|
|
|
Called for every event.
Reimplemented from cafe::SelectUserObjects< TMBJet >. Definition at line 45 of file BTagJetSelector.cpp. References _isMC, _nbjets, _nbjetsmax, _nselected, _stat, _vars, cafe::StatPointer::EventSelected(), cafe::EventBase::get(), and cafe::Event::getMCEventInfo(). |
|
|
Abstract select method to be overridden by user. Each object for which this method returns true will be put into the result branch, rejected objected will be put in the rejected object branch Implements cafe::SelectUserObjects< TMBJet >. Definition at line 77 of file BTagJetSelector.cpp. References _btagAlgo, _btagPoint, _nbjets, _nselected, _stat, cafe::StatPointer::EventSelected(), TMBJet::GetBTag(), TMBBTag::is_tagged(), and TMBJet::taggable(). |
|
|
Definition at line 107 of file BTagJetSelector.hpp. Referenced by BTagJetSelector(), and selectObject(). |
|
|
Definition at line 108 of file BTagJetSelector.hpp. Referenced by BTagJetSelector(), and selectObject(). |
|
|
Definition at line 109 of file BTagJetSelector.hpp. Referenced by processEvent(). |
|
|
Definition at line 104 of file BTagJetSelector.hpp. Referenced by BTagJetSelector(), processEvent(), and selectObject(). |
|
|
Definition at line 105 of file BTagJetSelector.hpp. Referenced by BTagJetSelector(), and processEvent(). |
|
|
Definition at line 106 of file BTagJetSelector.hpp. Referenced by processEvent(), and selectObject(). |
|
|
Definition at line 102 of file BTagJetSelector.hpp. Referenced by processEvent(), and selectObject(). |
|
|
Reimplemented from cafe::SelectUserObjects< TMBJet >. Definition at line 110 of file BTagJetSelector.hpp. Referenced by processEvent(). |
1.3.4