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

caf_util::ElectronSelector Class Reference

This selector will choose electrons satisfying selection criteria and write selected objects to the new branch in new Tree. More...

#include <ElectronSelector.hpp>

Inheritance diagram for caf_util::ElectronSelector:

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

Public Member Functions

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

bool selectObject (const TMBEMCluster &electron)
 Abstract select method to be overridden by user.

void finish ()
 Called at end of processing.


Private Member Functions

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

std::string FindFile (std::string path)
 ClassDef (ElectronSelector, 0)

Private Attributes

std::string _quality
std::string _emidfilepath
int _nelectrons
int _nelectronsmax
int _nselected
int _ver
int _lorun
int _hirun
emID * _id
bool _sort
cafe::StatPointer _stat
cafe::Event_event
TRefFinder_finder

Detailed Description

This selector will choose electrons satisfying selection criteria and write selected objects to the new branch in new Tree.

Usage:
add this processor to the controller "Run" instruction, e.g.
cafe.Run ... ElectronSelector(processor_name) ...
This Processor use emid_cuts package for electron selection. Add emid_cuts package to the "cafe.Package ..." instruction
cafe.Packages: emid_cuts caf_util
The electron ID criteria are specified in the file
"emid_cuts/support/emid_cuts.txt"
You can copy this file and modify the selection criteria. To use the modified file, use "SelectionFile" configuration option. You can change default behavior via configuration file.

Required parameters:

Optional parameters:

Authors:
Jens Konrath, modified by Viatcheslav Shary (shary@fnal.gov)

Definition at line 55 of file ElectronSelector.hpp.


Constructor & Destructor Documentation

caf_util::ElectronSelector::ElectronSelector const char *  name  ) 
 

Definition at line 17 of file ElectronSelector.cpp.

References _emidfilepath, _finder, _hirun, _id, _lorun, _nelectrons, _nelectronsmax, _quality, _sort, _ver, cafe::SelectUserObjects< TMBEMCluster >::addVariable(), cafe::Processor::err(), FindFile(), cafe::Config::get(), cafe::Processor::name(), cafe::Processor::out(), and caf_util::TRefFinder::SetVariablesTrack().

caf_util::ElectronSelector::~ElectronSelector  )  [inline]
 

Definition at line 59 of file ElectronSelector.hpp.


Member Function Documentation

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

Called before the actual selection starts.

E.g. the input can be sorted here.

Reimplemented from cafe::SelectUserObjects< TMBEMCluster >.

Definition at line 221 of file ElectronSelector.cpp.

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

caf_util::ElectronSelector::ClassDef ElectronSelector  ,
[private]
 

std::string caf_util::ElectronSelector::FindFile std::string  path  )  [private]
 

Definition at line 116 of file ElectronSelector.cpp.

References cafe::Processor::name(), and cafe::Processor::out().

Referenced by ElectronSelector().

void caf_util::ElectronSelector::finish  )  [virtual]
 

Called at end of processing.

Reimplemented from cafe::Processor.

Definition at line 187 of file ElectronSelector.cpp.

References _id, and cafe::Processor::debug().

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

Called for every event.

Reimplemented from cafe::SelectUserObjects< TMBEMCluster >.

Definition at line 191 of file ElectronSelector.cpp.

References _event, _nelectrons, _nelectronsmax, _nselected, _stat, cafe::Processor::debug(), cafe::StatPointer::EventSelected(), cafe::EventBase::get(), and cafe::Processor::out().

bool caf_util::ElectronSelector::selectObject const TMBEMCluster electron  )  [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< TMBEMCluster >.

Definition at line 129 of file ElectronSelector.cpp.

References _event, _finder, _id, _nelectrons, _nselected, _stat, TMBEMCluster::CalDetectorEta(), TMBEMCluster::charge(), cafe::Processor::debug(), TMBEMCluster::emfrac(), TMBVector3::Eta(), cafe::StatPointer::EventSelected(), caf_util::TRefFinder::FindTrack(), TMBEMCluster::GetChargedTrackRef(), TMBEMCluster::getPtrChpRef(), TMBEMCluster::HMx7(), TMBEMCluster::HMx8(), TMBEMCluster::id(), TMBEMCluster::iso(), TMBEMCluster::Lhood8(), cafe::Processor::name(), TMBVector3::Phi(), TMBVector3::Pt(), TMBEMCluster::track_match_chi2prob(), and TMBEMCluster::track_match_spatialchi2prob().


Member Data Documentation

std::string caf_util::ElectronSelector::_emidfilepath [private]
 

Definition at line 68 of file ElectronSelector.hpp.

Referenced by ElectronSelector().

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

Definition at line 79 of file ElectronSelector.hpp.

Referenced by processEvent(), and selectObject().

TRefFinder* caf_util::ElectronSelector::_finder [private]
 

Definition at line 80 of file ElectronSelector.hpp.

Referenced by ElectronSelector(), and selectObject().

int caf_util::ElectronSelector::_hirun [private]
 

Definition at line 74 of file ElectronSelector.hpp.

Referenced by ElectronSelector().

emID* caf_util::ElectronSelector::_id [private]
 

Definition at line 75 of file ElectronSelector.hpp.

Referenced by ElectronSelector(), finish(), and selectObject().

int caf_util::ElectronSelector::_lorun [private]
 

Definition at line 73 of file ElectronSelector.hpp.

Referenced by ElectronSelector().

int caf_util::ElectronSelector::_nelectrons [private]
 

Definition at line 69 of file ElectronSelector.hpp.

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

int caf_util::ElectronSelector::_nelectronsmax [private]
 

Definition at line 70 of file ElectronSelector.hpp.

Referenced by ElectronSelector(), and processEvent().

int caf_util::ElectronSelector::_nselected [private]
 

Definition at line 71 of file ElectronSelector.hpp.

Referenced by processEvent(), and selectObject().

std::string caf_util::ElectronSelector::_quality [private]
 

Definition at line 67 of file ElectronSelector.hpp.

Referenced by ElectronSelector().

bool caf_util::ElectronSelector::_sort [private]
 

Definition at line 76 of file ElectronSelector.hpp.

Referenced by before(), and ElectronSelector().

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

Definition at line 77 of file ElectronSelector.hpp.

Referenced by processEvent(), and selectObject().

int caf_util::ElectronSelector::_ver [private]
 

Definition at line 72 of file ElectronSelector.hpp.

Referenced by ElectronSelector().


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