Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

caf_util::BTagJetSelector Class Reference

BTagJetSelector selects jets from any jet branch based on their b-tagging information. The BTagProcessor must have been run over the input branch and made the appropiate TMBBTag structure for the jets. Check the b-ID group wiki for instructions: https://plone4.fnal.gov/P1/D0Wiki/bid/Documentation/BTagProcessor. More...

#include <BTagJetSelector.hpp>

Inheritance diagram for caf_util::BTagJetSelector:

cafe::SelectUserObjects< TMBJet > cafe::Processor List of all members.

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

Detailed Description

BTagJetSelector selects jets from any jet branch based on their b-tagging information. The BTagProcessor must have been run over the input branch and made the appropiate TMBBTag structure for the jets. Check the b-ID group wiki for instructions: https://plone4.fnal.gov/P1/D0Wiki/bid/Documentation/BTagProcessor.

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).

Authors:
Aran Garcia-Bellido

Definition at line 88 of file BTagJetSelector.hpp.


Constructor & Destructor Documentation

caf_util::BTagJetSelector::BTagJetSelector const char *  name  ) 
 

Definition at line 20 of file BTagJetSelector.cpp.

References _btagAlgo, _btagPoint, _nbjets, _nbjetsmax, cafe::Config::get(), and cafe::Processor::name().

caf_util::BTagJetSelector::~BTagJetSelector  ) 
 

Definition at line 40 of file BTagJetSelector.cpp.


Member Function Documentation

void caf_util::BTagJetSelector::before cafe::Collection< TMBJet > &  from  )  [private, virtual]
 

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.

caf_util::BTagJetSelector::ClassDef BTagJetSelector  ,
[private]
 

bool caf_util::BTagJetSelector::processEvent cafe::Event event  )  [virtual]
 

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().

bool caf_util::BTagJetSelector::selectObject const TMBJet jet  )  [virtual]
 

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().


Member Data Documentation

std::string caf_util::BTagJetSelector::_btagAlgo [private]
 

Definition at line 107 of file BTagJetSelector.hpp.

Referenced by BTagJetSelector(), and selectObject().

std::string caf_util::BTagJetSelector::_btagPoint [private]
 

Definition at line 108 of file BTagJetSelector.hpp.

Referenced by BTagJetSelector(), and selectObject().

bool caf_util::BTagJetSelector::_isMC [private]
 

Definition at line 109 of file BTagJetSelector.hpp.

Referenced by processEvent().

int caf_util::BTagJetSelector::_nbjets [private]
 

Definition at line 104 of file BTagJetSelector.hpp.

Referenced by BTagJetSelector(), processEvent(), and selectObject().

int caf_util::BTagJetSelector::_nbjetsmax [private]
 

Definition at line 105 of file BTagJetSelector.hpp.

Referenced by BTagJetSelector(), and processEvent().

int caf_util::BTagJetSelector::_nselected [private]
 

Definition at line 106 of file BTagJetSelector.hpp.

Referenced by processEvent(), and selectObject().

cafe::StatPointer caf_util::BTagJetSelector::_stat [private]
 

Definition at line 102 of file BTagJetSelector.hpp.

Referenced by processEvent(), and selectObject().

cafe::Variables caf_util::BTagJetSelector::_vars [private]
 

Reimplemented from cafe::SelectUserObjects< TMBJet >.

Definition at line 110 of file BTagJetSelector.hpp.

Referenced by processEvent().


The documentation for this class was generated from the following files:
Generated on Tue Mar 28 10:13:09 2006 for CAF by doxygen 1.3.4