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

caf_util::ResSelector Class Reference

This processor is calculating the invariant mass for the 2 specified objects. More...

#include <ResSelector.hpp>

Inheritance diagram for caf_util::ResSelector:

cafe::Processor List of all members.

Public Member Functions

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

bool mass (double pt1, double eta1, double phi1, int charge1, double pt2, double eta2, double phi2, int charge2, double &mass)
void begin ()
 Called at beginning of processing.

 ~ResSelector ()
 ClassDef (ResSelector, 0)

Private Types

enum  Type {
  MUON,
  ELECTRON,
  JET,
  LORENTZVECTOR
}
enum  ChargeSignSelection {
  NOSELECTION,
  OPPOSITESIGN,
  SAMESIGN
}

Private Member Functions

bool GetMuon (const TMBMuon &muon, const std::string &pt_method, double &pt, double &eta, double &phi, int &charge)
bool GetElectron (const TMBEMCluster &electron, const std::string &pt_method, double &pt, double &eta, double &phi, int &charge)

Private Attributes

Type _obj1
Type _obj2
ChargeSignSelection _charge_req
std::string branch1
std::string branch2
std::string _pt1_method
std::string _pt2_method
double _low_window
double _high_window
double _target_mass
double _hist_lower
double _hist_upper
unsigned int _hist_bins
bool _useEOPetrack
cafe::Variables _vars1
cafe::Variables _vars2
TH1D * _masshist

Detailed Description

This processor is calculating the invariant mass for the 2 specified objects.

Objects could be electrons (TMBEMCluster), muon (TMBMuon), jet (TMBJet) or TMBLorentzVector. For electron and muon you also can specify what kind of pt, eta and phi you want to use. There is a choice between the "best" quality (default) or the "track" one.

The calculated mass saved as name()+"ResMass" variable (double) to the Event. The pointer to the first objects also saved to the Events as name()+":EM1" or name()+":Muon1" or name()+":Jet1" or name()+":LorentzVector1" and with number 2 instead of 1 for the second object. You can test the existance of each object using cafe::Event::get() methode:
if(event.get("name",electron)) do something

You can choose reconstruction method specifying the option .target_mass

You also can apply selection on the reconstructed mass.

Selector also can build the invariant mass histogram if "hist_bins" value greater than 0.

Optional parameters:

.Charge: accept only objects pair with the specified charges. Available options "opposite", "samesign", "noselection" [default: "noselection"]

Author:
Ken Herner (kherner@fnal.gov), modified by Viatcheslav Shary (shary@fnal.gov)

Definition at line 78 of file ResSelector.hpp.


Member Enumeration Documentation

enum caf_util::ResSelector::ChargeSignSelection [private]
 

Enumeration values:
NOSELECTION 
OPPOSITESIGN 
SAMESIGN 

Definition at line 101 of file ResSelector.hpp.

enum caf_util::ResSelector::Type [private]
 

Enumeration values:
MUON 
ELECTRON 
JET 
LORENTZVECTOR 

Definition at line 98 of file ResSelector.hpp.


Constructor & Destructor Documentation

caf_util::ResSelector::ResSelector const char *  name  ) 
 

Definition at line 15 of file ResSelector.cpp.

References _charge_req, _high_window, _hist_bins, _hist_lower, _hist_upper, _low_window, _obj1, _obj2, _pt1_method, _pt2_method, _target_mass, _useEOPetrack, _vars1, _vars2, cafe::Variables::add(), branch1, branch2, ELECTRON, cafe::Processor::err(), cafe::Config::get(), JET, LORENTZVECTOR, MUON, cafe::Processor::name(), NOSELECTION, OPPOSITESIGN, and SAMESIGN.

caf_util::ResSelector::~ResSelector  )  [inline]
 

Definition at line 89 of file ResSelector.hpp.


Member Function Documentation

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

Called at beginning of processing.

Reimplemented from cafe::Processor.

Definition at line 295 of file ResSelector.cpp.

References _hist_bins, _hist_lower, _hist_upper, _masshist, cafe::Processor::getDirectory(), and cafe::Processor::name().

caf_util::ResSelector::ClassDef ResSelector  ,
 

bool caf_util::ResSelector::GetElectron const TMBEMCluster electron,
const std::string &  pt_method,
double &  pt,
double &  eta,
double &  phi,
int &  charge
[private]
 

Definition at line 407 of file ResSelector.cpp.

References _useEOPetrack, TMBEMCluster::charge(), TMBTrack::charge(), cafe::Processor::err(), TMBVector3::Eta(), TMBEMCluster::GetChargedTrack(), TMBEMCluster::getPtrChp(), TMBEMCluster::has_spatial_track_match(), TMBEMCluster::has_track_match(), TMBVector3::Phi(), TMBVector3::Pt(), and cafe::Processor::warn().

Referenced by processEvent().

bool caf_util::ResSelector::GetMuon const TMBMuon muon,
const std::string &  pt_method,
double &  pt,
double &  eta,
double &  phi,
int &  charge
[private]
 

Definition at line 368 of file ResSelector.cpp.

References TMBMuon::charge(), TMBTrack::charge(), cafe::Processor::err(), TMBVector3::Eta(), TMBMuon::GetChargedTrack(), TMBMuon::hasCentral(), TMBVector3::Phi(), TMBVector3::Pt(), and cafe::Processor::warn().

Referenced by processEvent().

bool caf_util::ResSelector::mass double  pt1,
double  eta1,
double  phi1,
int  charge1,
double  pt2,
double  eta2,
double  phi2,
int  charge2,
double &  mass
 

Definition at line 303 of file ResSelector.cpp.

References _charge_req, _high_window, _low_window, _target_mass, cafe::Processor::err(), cafe::Processor::name(), NOSELECTION, OPPOSITESIGN, SAMESIGN, and cafe::Processor::warn().

Referenced by processEvent().

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

Called for every event.

Reimplemented from cafe::Processor.

Definition at line 158 of file ResSelector.cpp.

References _masshist, _obj1, _obj2, _pt1_method, _pt2_method, _vars1, _vars2, branch1, branch2, cafe::Processor::debug(), ELECTRON, cafe::Processor::err(), TMBVector3::Eta(), cafe::StatPointer::EventSelected(), cafe::EventBase::get(), cafe::EventBase::getClonesArray(), GetElectron(), GetMuon(), mass(), MUON, cafe::Processor::name(), cafe::Processor::out(), TMBVector3::Phi(), TMBVector3::Pt(), and cafe::EventBase::put().


Member Data Documentation

ChargeSignSelection caf_util::ResSelector::_charge_req [private]
 

Definition at line 102 of file ResSelector.hpp.

Referenced by mass(), and ResSelector().

double caf_util::ResSelector::_high_window [private]
 

Definition at line 108 of file ResSelector.hpp.

Referenced by mass(), and ResSelector().

unsigned int caf_util::ResSelector::_hist_bins [private]
 

Definition at line 112 of file ResSelector.hpp.

Referenced by begin(), and ResSelector().

double caf_util::ResSelector::_hist_lower [private]
 

Definition at line 110 of file ResSelector.hpp.

Referenced by begin(), and ResSelector().

double caf_util::ResSelector::_hist_upper [private]
 

Definition at line 111 of file ResSelector.hpp.

Referenced by begin(), and ResSelector().

double caf_util::ResSelector::_low_window [private]
 

Definition at line 108 of file ResSelector.hpp.

Referenced by mass(), and ResSelector().

TH1D* caf_util::ResSelector::_masshist [private]
 

Definition at line 117 of file ResSelector.hpp.

Referenced by begin(), and processEvent().

Type caf_util::ResSelector::_obj1 [private]
 

Definition at line 99 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

Type caf_util::ResSelector::_obj2 [private]
 

Definition at line 99 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

std::string caf_util::ResSelector::_pt1_method [private]
 

Definition at line 106 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

std::string caf_util::ResSelector::_pt2_method [private]
 

Definition at line 107 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

double caf_util::ResSelector::_target_mass [private]
 

Definition at line 109 of file ResSelector.hpp.

Referenced by mass(), and ResSelector().

bool caf_util::ResSelector::_useEOPetrack [private]
 

Definition at line 113 of file ResSelector.hpp.

Referenced by GetElectron(), and ResSelector().

cafe::Variables caf_util::ResSelector::_vars1 [private]
 

Definition at line 115 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

cafe::Variables caf_util::ResSelector::_vars2 [private]
 

Definition at line 115 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

std::string caf_util::ResSelector::branch1 [private]
 

Definition at line 104 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().

std::string caf_util::ResSelector::branch2 [private]
 

Definition at line 105 of file ResSelector.hpp.

Referenced by processEvent(), and ResSelector().


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