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

caf_util::JetSelector Class Reference

JetSelector selects Jets from any jet branch (JCCA, JCCB,...) using standard cuts. It is based on the SelectUserObjects class. More...

#include <JetSelector.hpp>

Inheritance diagram for caf_util::JetSelector:

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

Public Member Functions

 JetSelector (const char *name)
 ~JetSelector ()
bool processEvent (cafe::Event &event)
 Called for every event.

bool selectObject (const TMBJet &jet)
 Abstract select method to be overridden by user.

float MaxAbsEtaOfL1CalCoverage (int runnum)
const std::string & jes () const
void setJES (const std::string &jes)
 set JES type applied to the jets


Private Member Functions

void before (cafe::Collection< TMBJet > &from)
 Called before the actual selection starts.

void SetJESType (const TMBJet &jet)
 setup JES correction type

void Smear (const TMBJet &jet)
 apply smearing

 ClassDef (JetSelector, 0)

Private Attributes

bool _useStandardCuts
bool _applyStandardIDCuts
bool _applyStandardEMJetsRemoval
bool _applyStandardL1Conf
bool _requireVertexConf
bool _useSmearedJets
std::string _jes
int _njets
int _njetsmax
int _nselected
float _pTmin
bool _sort
cafe::StatPointer _stat
float _EMFmin
float _EMFmax
float _CHFmin
float _CHFmax
float _eta
float _detEta
bool _isMC
bool _doL1cut
float _L1boundaryOffset
float _f90noL1
float _chfnoL1
float _l1cutCC
float _l1cutICD
float _l1cutEC
int _runnum
float _CPFmin
std::string _vertexBranch
cafe::Variables _vertexVars
UInt_t _PV0id
cafe::Variables _vars
cafe::Variables _varsglob

Detailed Description

JetSelector selects Jets from any jet branch (JCCA, JCCB,...) using standard cuts. It is based on the SelectUserObjects class.

Usage: Here's a list of all configuration parameters used by the selector, along with their standard values.

Required parameters:

Optional parameters:

If no optional parameters are given, the jet ID group's cuts are applied. Here's an example config file that shows how to use this jet selector:

cafe.Run: JetSelector(myJets)

myJets.To: GoodJet myJets.From: JCCB myJets.Tree: Preselection myJets.EMFmin: 0.05 myJets.EMFmax: 0.95 myJets.CHFmin: 0.0 myJets.CHFmax: 0.4 myJets.eta: 2.5 myJets.L1cut: false

Jets with 0.05<EMF<0.95, 0.0<CHF<0.4 and |eta|<2.5 are stored in the branch "GoodJet" that is added to a tree called "Preselection".

Authors:
Jens Konrath, modified Viatcheslav Shary(shary@fnal.gov), Amnon Harel (aharel@fnal.gov), Yann Coadou (yann@fnal.gov)

Definition at line 96 of file JetSelector.hpp.


Constructor & Destructor Documentation

caf_util::JetSelector::JetSelector const char *  name  ) 
 

Definition at line 18 of file JetSelector.cpp.

References _applyStandardEMJetsRemoval, _applyStandardIDCuts, _applyStandardL1Conf, _CHFmax, _CHFmin, _chfnoL1, _CPFmin, _detEta, _doL1cut, _EMFmax, _EMFmin, _eta, _f90noL1, _jes, _L1boundaryOffset, _l1cutCC, _l1cutEC, _l1cutICD, _njets, _njetsmax, _pTmin, _requireVertexConf, _sort, _useSmearedJets, _useStandardCuts, _vertexBranch, cafe::Config::get(), and cafe::Processor::name().

caf_util::JetSelector::~JetSelector  )  [inline]
 

Definition at line 100 of file JetSelector.hpp.


Member Function Documentation

void caf_util::JetSelector::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 260 of file JetSelector.cpp.

References _isMC, _sort, _useSmearedJets, cafe::Collection< T >::begin(), cafe::Collection< T >::end(), SetJESType(), Smear(), and cafe::Collection< T >::sort().

caf_util::JetSelector::ClassDef JetSelector  ,
[private]
 

const std::string& caf_util::JetSelector::jes  )  const [inline]
 

Definition at line 105 of file JetSelector.hpp.

References _jes.

float caf_util::JetSelector::MaxAbsEtaOfL1CalCoverage int  runnum  ) 
 

Definition at line 253 of file JetSelector.cpp.

Referenced by selectObject().

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

Called for every event.

Reimplemented from cafe::SelectUserObjects< TMBJet >.

Definition at line 59 of file JetSelector.cpp.

References _isMC, _njets, _njetsmax, _nselected, _PV0id, _requireVertexConf, _runnum, _stat, _useStandardCuts, _vars, _varsglob, _vertexBranch, _vertexVars, cafe::Processor::debug(), cafe::StatPointer::EventSelected(), cafe::EventBase::get(), cafe::EventBase::getCollection(), cafe::Event::getGlobal(), cafe::Event::getMCEventInfo(), cafe::Processor::out(), TMBGlobal::runno(), cafe::Collection< T >::size(), and cafe::EventBase::tag().

bool caf_util::JetSelector::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 113 of file JetSelector.cpp.

References _applyStandardEMJetsRemoval, _applyStandardIDCuts, _applyStandardL1Conf, _CHFmax, _CHFmin, _chfnoL1, _CPFmin, _detEta, _doL1cut, _EMFmax, _EMFmin, _eta, _f90noL1, _isMC, _L1boundaryOffset, _l1cutCC, _l1cutEC, _l1cutICD, _njets, _nselected, _pTmin, _PV0id, _requireVertexConf, _runnum, _sort, _stat, _useSmearedJets, _useStandardCuts, TMBJet::ActAsUnCorrected(), TMBJet::chf(), TMBJet::cpf0(), TMBJet::cpfVertex(), cafe::Processor::debug(), TMBJet::detEta(), TMBLorentzVector::E(), TMBJet::emf(), cafe::Processor::err(), TMBVector3::Eta(), cafe::StatPointer::EventSelected(), TMBJet::isEM(), TMBJet::isGood(), TMBJet::isL1Conf(), TMBJet::L1_energy(), MaxAbsEtaOfL1CalCoverage(), TMBJet::n90(), cafe::Processor::name(), TMBJet::nItems(), cafe::Processor::out(), TMBVector3::Phi(), TMBVector3::Pt(), SetJESType(), Smear(), and TMBVertex::vz().

void caf_util::JetSelector::setJES const std::string &  jes  )  [inline]
 

set JES type applied to the jets

Definition at line 108 of file JetSelector.hpp.

References _jes.

void caf_util::JetSelector::SetJESType const TMBJet jet  )  [private]
 

setup JES correction type

Definition at line 286 of file JetSelector.cpp.

References _jes, TMBJet::ActAsJESCorrected(), TMBJet::ActAsJESCorrectedShiftedMinus(), TMBJet::ActAsJESCorrectedShiftedPlus(), TMBJet::ActAsJESMUCorrected(), TMBJet::ActAsJESMUCorrectedShiftedMinus(), TMBJet::ActAsJESMUCorrectedShiftedPlus(), TMBJet::ActAsUnCorrected(), TMBJet::CurrentlyActAs(), cafe::Processor::err(), TMBJet::kJESCorrected, TMBJet::kJESCorrectedShiftedMinus, TMBJet::kJESCorrectedShiftedPlus, TMBJet::kJESMUCorrected, TMBJet::kJESMUCorrectedShiftedMinus, TMBJet::kJESMUCorrectedShiftedPlus, TMBJet::kSmeared, TMBJet::kSmearedMU, and TMBJet::kUnCorrected.

Referenced by before(), and selectObject().

void caf_util::JetSelector::Smear const TMBJet jet  )  [private]
 

apply smearing

Definition at line 274 of file JetSelector.cpp.

References _jes, TMBJet::ActAsSmeared(), TMBJet::ActAsSmearedMU(), TMBJet::CurrentlyActAs(), TMBJet::kSmeared, TMBJet::kSmearedMU, and cafe::Processor::name().

Referenced by before(), and selectObject().


Member Data Documentation

bool caf_util::JetSelector::_applyStandardEMJetsRemoval [private]
 

Definition at line 117 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

bool caf_util::JetSelector::_applyStandardIDCuts [private]
 

Definition at line 116 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

bool caf_util::JetSelector::_applyStandardL1Conf [private]
 

Definition at line 118 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_CHFmax [private]
 

Definition at line 133 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_CHFmin [private]
 

Definition at line 132 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_chfnoL1 [private]
 

Definition at line 140 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_CPFmin [private]
 

Definition at line 145 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_detEta [private]
 

Definition at line 135 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

bool caf_util::JetSelector::_doL1cut [private]
 

Definition at line 137 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_EMFmax [private]
 

Definition at line 131 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_EMFmin [private]
 

Definition at line 130 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_eta [private]
 

Definition at line 134 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_f90noL1 [private]
 

Definition at line 139 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

bool caf_util::JetSelector::_isMC [private]
 

Definition at line 136 of file JetSelector.hpp.

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

std::string caf_util::JetSelector::_jes [private]
 

Definition at line 122 of file JetSelector.hpp.

Referenced by jes(), JetSelector(), setJES(), SetJESType(), and Smear().

float caf_util::JetSelector::_L1boundaryOffset [private]
 

Definition at line 138 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_l1cutCC [private]
 

Definition at line 141 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_l1cutEC [private]
 

Definition at line 143 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

float caf_util::JetSelector::_l1cutICD [private]
 

Definition at line 142 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

int caf_util::JetSelector::_njets [private]
 

Definition at line 123 of file JetSelector.hpp.

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

int caf_util::JetSelector::_njetsmax [private]
 

Definition at line 124 of file JetSelector.hpp.

Referenced by JetSelector(), and processEvent().

int caf_util::JetSelector::_nselected [private]
 

Definition at line 125 of file JetSelector.hpp.

Referenced by processEvent(), and selectObject().

float caf_util::JetSelector::_pTmin [private]
 

Definition at line 126 of file JetSelector.hpp.

Referenced by JetSelector(), and selectObject().

UInt_t caf_util::JetSelector::_PV0id [private]
 

Definition at line 149 of file JetSelector.hpp.

Referenced by processEvent(), and selectObject().

bool caf_util::JetSelector::_requireVertexConf [private]
 

Definition at line 119 of file JetSelector.hpp.

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

int caf_util::JetSelector::_runnum [private]
 

Definition at line 144 of file JetSelector.hpp.

Referenced by processEvent(), and selectObject().

bool caf_util::JetSelector::_sort [private]
 

Definition at line 127 of file JetSelector.hpp.

Referenced by before(), JetSelector(), and selectObject().

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

Definition at line 129 of file JetSelector.hpp.

Referenced by processEvent(), and selectObject().

bool caf_util::JetSelector::_useSmearedJets [private]
 

Definition at line 120 of file JetSelector.hpp.

Referenced by before(), JetSelector(), and selectObject().

bool caf_util::JetSelector::_useStandardCuts [private]
 

Definition at line 115 of file JetSelector.hpp.

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

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

Reimplemented from cafe::SelectUserObjects< TMBJet >.

Definition at line 151 of file JetSelector.hpp.

Referenced by processEvent().

cafe::Variables caf_util::JetSelector::_varsglob [private]
 

Definition at line 151 of file JetSelector.hpp.

Referenced by processEvent().

std::string caf_util::JetSelector::_vertexBranch [private]
 

Definition at line 146 of file JetSelector.hpp.

Referenced by JetSelector(), and processEvent().

cafe::Variables caf_util::JetSelector::_vertexVars [private]
 

Definition at line 147 of file JetSelector.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