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

caf_util::VertexSelector Class Reference

This processor will choose primary verities (PV) satisfying selection criteria and write selected objects to the new branch in new Tree. More...

#include <VertexSelector.hpp>

Inheritance diagram for caf_util::VertexSelector:

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

Public Member Functions

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

bool selectObject (const TMBPrimaryVertex &vertex)
 Abstract select method to be overridden by user.

void begin ()
 Called at beginning of processing.


Private Member Functions

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

 ClassDef (VertexSelector, 0)

Private Attributes

cafe::StatPointer _stat
int _nvsmax
float _zmax
unsigned int _ntracks
float _dz_muon
std::string _muonBranch
float _dz_electron
std::string _electronBranch
bool _useEOPetrack
bool _sort
cafe::Event_event
int _nselected
cafe::Variables _muvars
cafe::Variables _emvars
TRefFinder _finder

Detailed Description

This processor will choose primary verities (PV) satisfying selection criteria and write selected objects to the new branch in new Tree.

Usage: add this processor to the controller Run processor, e.g.
cafe.Run ... VertexSelector(processor_name) ... You can change default behavior via configuration file.

Usage:

Required parameters: -.From: Name of the input vertex branch

Optional parameters:

Cuts (optional):

The following selectin is not working correctly at the moment with branches created by Muon and Electron Selctors (problem with TRef)

Author:
Viatcheslav Shary (shary@fnal.gov)

Definition at line 56 of file VertexSelector.hpp.


Constructor & Destructor Documentation

caf_util::VertexSelector::VertexSelector const char *  name  ) 
 

Definition at line 18 of file VertexSelector.cpp.

References _dz_electron, _dz_muon, _electronBranch, _emvars, _finder, _muonBranch, _ntracks, _nvsmax, _sort, _useEOPetrack, _zmax, cafe::Variables::add(), cafe::SelectUserObjects< TMBPrimaryVertex >::addVariable(), cafe::Config::get(), cafe::Processor::name(), and caf_util::TRefFinder::SetVariablesTrack().

caf_util::VertexSelector::~VertexSelector  )  [inline]
 

Definition at line 60 of file VertexSelector.hpp.


Member Function Documentation

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

Called before the actual selection starts.

E.g. the input can be sorted here.

Reimplemented from cafe::SelectUserObjects< TMBPrimaryVertex >.

Definition at line 204 of file VertexSelector.cpp.

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

void caf_util::VertexSelector::begin  )  [virtual]
 

Called at beginning of processing.

Reimplemented from cafe::Processor.

Definition at line 51 of file VertexSelector.cpp.

References _finder, cafe::Processor::debug(), and caf_util::TRefFinder::setDebug().

caf_util::VertexSelector::ClassDef VertexSelector  ,
[private]
 

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

Called for every event.

Reimplemented from cafe::SelectUserObjects< TMBPrimaryVertex >.

Definition at line 55 of file VertexSelector.cpp.

References _event, _nselected, _nvsmax, _stat, cafe::StatPointer::EventSelected(), and cafe::EventBase::get().

bool caf_util::VertexSelector::selectObject const TMBPrimaryVertex vertex  )  [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< TMBPrimaryVertex >.

Definition at line 75 of file VertexSelector.cpp.

References _dz_electron, _dz_muon, _electronBranch, _emvars, _event, _finder, _muonBranch, _muvars, _nselected, _ntracks, _stat, _useEOPetrack, _zmax, cafe::Collection< T >::begin(), cafe::Processor::debug(), cafe::Collection< T >::end(), cafe::Processor::err(), TMBVector3::Eta(), cafe::StatPointer::EventSelected(), caf_util::TRefFinder::FindTrack(), cafe::EventBase::getCollection(), cafe::Processor::name(), TMBVertex::ntrack(), cafe::Processor::out(), TMBVector3::Phi(), TMBVector3::Pt(), cafe::Collection< T >::size(), TMBVertex::vz(), and TMBTrack::z().


Member Data Documentation

float caf_util::VertexSelector::_dz_electron [private]
 

Definition at line 76 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

float caf_util::VertexSelector::_dz_muon [private]
 

Definition at line 74 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

std::string caf_util::VertexSelector::_electronBranch [private]
 

Definition at line 77 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

cafe::Variables caf_util::VertexSelector::_emvars [private]
 

Definition at line 85 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

cafe::Event* caf_util::VertexSelector::_event [private]
 

Definition at line 81 of file VertexSelector.hpp.

Referenced by processEvent(), and selectObject().

TRefFinder caf_util::VertexSelector::_finder [private]
 

Definition at line 86 of file VertexSelector.hpp.

Referenced by begin(), selectObject(), and VertexSelector().

std::string caf_util::VertexSelector::_muonBranch [private]
 

Definition at line 75 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

cafe::Variables caf_util::VertexSelector::_muvars [private]
 

Definition at line 85 of file VertexSelector.hpp.

Referenced by selectObject().

int caf_util::VertexSelector::_nselected [private]
 

Definition at line 82 of file VertexSelector.hpp.

Referenced by processEvent(), and selectObject().

unsigned int caf_util::VertexSelector::_ntracks [private]
 

Definition at line 72 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

int caf_util::VertexSelector::_nvsmax [private]
 

Definition at line 69 of file VertexSelector.hpp.

Referenced by processEvent(), and VertexSelector().

bool caf_util::VertexSelector::_sort [private]
 

Definition at line 79 of file VertexSelector.hpp.

Referenced by before(), and VertexSelector().

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

Definition at line 67 of file VertexSelector.hpp.

Referenced by processEvent(), and selectObject().

bool caf_util::VertexSelector::_useEOPetrack [private]
 

Definition at line 78 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().

float caf_util::VertexSelector::_zmax [private]
 

Definition at line 71 of file VertexSelector.hpp.

Referenced by selectObject(), and VertexSelector().


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