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

caf_util::MuonSelector Class Reference

This processor make a muon selection and write selected objects to the new branch in new Tree. More...

#include <MuonSelector.hpp>

Inheritance diagram for caf_util::MuonSelector:

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

Public Member Functions

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

bool selectObject (const TMBMuon &muon)
 Abstract select method to be overridden by user.


Private Types

enum  Quality {
  Loose,
  Medium,
  Tight
}

Private Member Functions

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

void after (cafe::Collection< TMBMuon > &accepted, cafe::Collection< TMBMuon > &rejected)
 Called after the selection is done.

bool GetBeamSpot (FILE *fp, int run, float &bx, float &by, float &bsx, float &bsy)
double DCAfromBeamSpot (const TMBTrack *muon_trk)
double GetCorrectedPt (const TMBMuon &muon, double dca)
bool SetStdCuts (std::string path, std::string mu_file_name, std::string mu_name, int mu_ver, std::string trk_file_name, std::string trk_name, int trk_ver, std::string iso_file_name, std::string iso_name, int iso_ver)
void DisplayMuonQualityCuts ()
void DisplayMuonTrackQualityCuts ()
void DisplayMuonIsolationQualityCuts ()
 ClassDef (MuonSelector, 0)

Private Attributes

cafe::StatPointer _stat
int _nmuons
int _nmuonsmax
int _nselected
Quality _qual
int _nseg
float _pTcut
float _eta
float _chisq
float _dcaSignif
float _dcaSMT
float _dcaNoSMT
int _nSMT
float _etHalo
float _etHaloMin
float _etHaloScaled
float _etHaloScaledMin
float _etTrkCone
float _etTrkConeMin
float _etTrkConeScaled
float _etTrkConeScaledMin
bool _useCentralMatched
bool _cosmicVeto
bool _sort
bool _use_beam_spot
bool _reject_no_beam_spot
bool _corr_pT_SMT
bool _corr_pT_noSMT
bool _mc
bool _excludeHole
cafe::Collection< TMBJet_jets
float _MinDeltaR
float _MaxDeltaR
std::string _JetBranch
cafe::Event_event
cafe::Variables _jetvars
TRefFinder _finder
bool _use_muid
bool _cuts_set
std::string _muqual_file
std::string _muqual_name
int _muqual_version
std::string _trkqual_file
std::string _trkqual_name
int _trkqual_version
std::string _isoqual_file
std::string _isoqual_name
int _isoqual_version
std::string _path
FILE * _beamspot_file
std::string _beam
bool _open_beam
float _bx
float _by
float _bsx
float _bsy
int _lastrun
cafe::Variables _runvar
cafe::Variables _chunkvar
int _debuglevel

Detailed Description

This processor make a muon selection and write selected objects to the new branch in new Tree.

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

Required parameters:

Optional parameters:

Muon ID cut standard cut setup:

Cuts not determined by Muon ID standard cuts:

Beam spot info:

If Muon ID is turned off you can vary all the cuts, using the following config parameters. If you do not use Muon ID cuts, you will change the muon definition provided by the muon group. So be ready to remeasure the muon efficiency.

Authors:
Viatcheslav Shary (shary@fnal.gov) Mark Owen (markowen@fnal.gov)

Definition at line 107 of file MuonSelector.hpp.


Member Enumeration Documentation

enum caf_util::MuonSelector::Quality [private]
 

Enumeration values:
Loose 
Medium 
Tight 

Definition at line 118 of file MuonSelector.hpp.

Referenced by SetStdCuts().


Constructor & Destructor Documentation

caf_util::MuonSelector::MuonSelector const char *  name  ) 
 

Definition at line 20 of file MuonSelector.cpp.

References _chisq, _cosmicVeto, _cuts_set, _dcaNoSMT, _dcaSignif, _dcaSMT, _eta, _etHalo, _etHaloMin, _etHaloScaled, _etHaloScaledMin, _etTrkCone, _etTrkConeMin, _etTrkConeScaled, _etTrkConeScaledMin, _excludeHole, _isoqual_file, _isoqual_name, _isoqual_version, _MaxDeltaR, _MinDeltaR, _muqual_file, _muqual_name, _muqual_version, _nmuons, _nmuonsmax, _nseg, _nSMT, _path, _pTcut, _qual, _trkqual_file, _trkqual_name, _trkqual_version, _use_beam_spot, _use_muid, _useCentralMatched, DisplayMuonIsolationQualityCuts(), DisplayMuonQualityCuts(), DisplayMuonTrackQualityCuts(), cafe::Processor::err(), cafe::Config::get(), Loose, Medium, cafe::Processor::name(), cafe::Processor::out(), SetStdCuts(), and Tight.

caf_util::MuonSelector::~MuonSelector  )  [inline]
 

Definition at line 111 of file MuonSelector.hpp.


Member Function Documentation

void caf_util::MuonSelector::after cafe::Collection< TMBMuon > &  acc,
cafe::Collection< TMBMuon > &  rej
[private, virtual]
 

Called after the selection is done.

Reimplemented from cafe::SelectUserObjects< TMBMuon >.

Definition at line 966 of file MuonSelector.cpp.

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

Called before the actual selection starts.

E.g. the input can be sorted here.

Reimplemented from cafe::SelectUserObjects< TMBMuon >.

Definition at line 519 of file MuonSelector.cpp.

References _corr_pT_noSMT, _corr_pT_SMT, _debuglevel, _sort, cafe::Collection< T >::begin(), DCAfromBeamSpot(), cafe::Collection< T >::end(), TMBTrack::nsmt(), cafe::Processor::out(), and cafe::Collection< T >::sort().

caf_util::MuonSelector::ClassDef MuonSelector  ,
[private]
 

double caf_util::MuonSelector::DCAfromBeamSpot const TMBTrack muon_trk  )  [private]
 

Definition at line 930 of file MuonSelector.cpp.

References _bsx, _bsy, _bx, _by, _debuglevel, cafe::Processor::out(), TMBTrack::phid(), TMBTrack::rdca(), and TMBTrack::z().

Referenced by before().

void caf_util::MuonSelector::DisplayMuonIsolationQualityCuts  )  [private]
 

Definition at line 887 of file MuonSelector.cpp.

References _etHaloScaled, _etHaloScaledMin, _etTrkConeScaled, _etTrkConeScaledMin, _MaxDeltaR, _MinDeltaR, and cafe::Processor::out().

Referenced by MuonSelector().

void caf_util::MuonSelector::DisplayMuonQualityCuts  )  [private]
 

Definition at line 861 of file MuonSelector.cpp.

References _cosmicVeto, _nseg, _qual, _useCentralMatched, Loose, Medium, cafe::Processor::out(), and Tight.

Referenced by MuonSelector().

void caf_util::MuonSelector::DisplayMuonTrackQualityCuts  )  [private]
 

Definition at line 874 of file MuonSelector.cpp.

References _chisq, _dcaNoSMT, _dcaSMT, _nSMT, and cafe::Processor::out().

Referenced by MuonSelector().

bool caf_util::MuonSelector::GetBeamSpot FILE *  fp,
int  run,
float &  bx,
float &  by,
float &  bsx,
float &  bsy
[private]
 

Definition at line 904 of file MuonSelector.cpp.

double caf_util::MuonSelector::GetCorrectedPt const TMBMuon muon,
double  dca
[private]
 

Definition at line 940 of file MuonSelector.cpp.

References _debuglevel, TMBMuon::GetChargedTrack(), TMBMuon::hasCentral(), TMBVector3::Pt(), TMBTrack::qpt(), and TMBTrack::trerrs().

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

Called for every event.

Reimplemented from cafe::SelectUserObjects< TMBMuon >.

Definition at line 204 of file MuonSelector.cpp.

bool caf_util::MuonSelector::selectObject const TMBMuon muon  )  [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< TMBMuon >.

Definition at line 268 of file MuonSelector.cpp.

References cafe::Processor::out().

bool caf_util::MuonSelector::SetStdCuts std::string  path,
std::string  mu_file_name,
std::string  mu_name,
int  mu_ver,
std::string  trk_file_name,
std::string  trk_name,
int  trk_ver,
std::string  iso_file_name,
std::string  iso_name,
int  iso_ver
[private]
 

Definition at line 557 of file MuonSelector.cpp.

References _qual, Loose, Medium, cafe::Processor::name(), cafe::Processor::out(), Quality, and Tight.

Referenced by MuonSelector().


Member Data Documentation

std::string caf_util::MuonSelector::_beam [private]
 

Definition at line 182 of file MuonSelector.hpp.

FILE* caf_util::MuonSelector::_beamspot_file [private]
 

Definition at line 181 of file MuonSelector.hpp.

float caf_util::MuonSelector::_bsx [private]
 

Definition at line 184 of file MuonSelector.hpp.

Referenced by DCAfromBeamSpot().

float caf_util::MuonSelector::_bsy [private]
 

Definition at line 184 of file MuonSelector.hpp.

Referenced by DCAfromBeamSpot().

float caf_util::MuonSelector::_bx [private]
 

Definition at line 184 of file MuonSelector.hpp.

Referenced by DCAfromBeamSpot().

float caf_util::MuonSelector::_by [private]
 

Definition at line 184 of file MuonSelector.hpp.

Referenced by DCAfromBeamSpot().

float caf_util::MuonSelector::_chisq [private]
 

Definition at line 130 of file MuonSelector.hpp.

Referenced by DisplayMuonTrackQualityCuts(), and MuonSelector().

cafe::Variables caf_util::MuonSelector::_chunkvar [private]
 

Definition at line 188 of file MuonSelector.hpp.

bool caf_util::MuonSelector::_corr_pT_noSMT [private]
 

Definition at line 149 of file MuonSelector.hpp.

Referenced by before().

bool caf_util::MuonSelector::_corr_pT_SMT [private]
 

Definition at line 148 of file MuonSelector.hpp.

Referenced by before().

bool caf_util::MuonSelector::_cosmicVeto [private]
 

Definition at line 144 of file MuonSelector.hpp.

Referenced by DisplayMuonQualityCuts(), and MuonSelector().

bool caf_util::MuonSelector::_cuts_set [private]
 

Definition at line 168 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_dcaNoSMT [private]
 

Definition at line 133 of file MuonSelector.hpp.

Referenced by DisplayMuonTrackQualityCuts(), and MuonSelector().

float caf_util::MuonSelector::_dcaSignif [private]
 

Definition at line 131 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_dcaSMT [private]
 

Definition at line 132 of file MuonSelector.hpp.

Referenced by DisplayMuonTrackQualityCuts(), and MuonSelector().

int caf_util::MuonSelector::_debuglevel [private]
 

Definition at line 203 of file MuonSelector.hpp.

Referenced by before(), DCAfromBeamSpot(), and GetCorrectedPt().

float caf_util::MuonSelector::_eta [private]
 

Definition at line 129 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_etHalo [private]
 

Definition at line 135 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_etHaloMin [private]
 

Definition at line 136 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_etHaloScaled [private]
 

Definition at line 137 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

float caf_util::MuonSelector::_etHaloScaledMin [private]
 

Definition at line 138 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

float caf_util::MuonSelector::_etTrkCone [private]
 

Definition at line 139 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_etTrkConeMin [private]
 

Definition at line 140 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_etTrkConeScaled [private]
 

Definition at line 141 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

float caf_util::MuonSelector::_etTrkConeScaledMin [private]
 

Definition at line 142 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

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

Definition at line 159 of file MuonSelector.hpp.

bool caf_util::MuonSelector::_excludeHole [private]
 

Definition at line 151 of file MuonSelector.hpp.

Referenced by MuonSelector().

TRefFinder caf_util::MuonSelector::_finder [private]
 

Definition at line 161 of file MuonSelector.hpp.

std::string caf_util::MuonSelector::_isoqual_file [private]
 

Definition at line 175 of file MuonSelector.hpp.

Referenced by MuonSelector().

std::string caf_util::MuonSelector::_isoqual_name [private]
 

Definition at line 176 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_isoqual_version [private]
 

Definition at line 177 of file MuonSelector.hpp.

Referenced by MuonSelector().

std::string caf_util::MuonSelector::_JetBranch [private]
 

Definition at line 157 of file MuonSelector.hpp.

cafe::Collection<TMBJet> caf_util::MuonSelector::_jets [private]
 

Definition at line 154 of file MuonSelector.hpp.

cafe::Variables caf_util::MuonSelector::_jetvars [private]
 

Definition at line 160 of file MuonSelector.hpp.

int caf_util::MuonSelector::_lastrun [private]
 

Definition at line 185 of file MuonSelector.hpp.

float caf_util::MuonSelector::_MaxDeltaR [private]
 

Definition at line 156 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

bool caf_util::MuonSelector::_mc [private]
 

Definition at line 150 of file MuonSelector.hpp.

float caf_util::MuonSelector::_MinDeltaR [private]
 

Definition at line 155 of file MuonSelector.hpp.

Referenced by DisplayMuonIsolationQualityCuts(), and MuonSelector().

std::string caf_util::MuonSelector::_muqual_file [private]
 

Definition at line 169 of file MuonSelector.hpp.

Referenced by MuonSelector().

std::string caf_util::MuonSelector::_muqual_name [private]
 

Definition at line 170 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_muqual_version [private]
 

Definition at line 171 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_nmuons [private]
 

Definition at line 122 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_nmuonsmax [private]
 

Definition at line 123 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_nseg [private]
 

Definition at line 127 of file MuonSelector.hpp.

Referenced by DisplayMuonQualityCuts(), and MuonSelector().

int caf_util::MuonSelector::_nselected [private]
 

Definition at line 124 of file MuonSelector.hpp.

int caf_util::MuonSelector::_nSMT [private]
 

Definition at line 134 of file MuonSelector.hpp.

Referenced by DisplayMuonTrackQualityCuts(), and MuonSelector().

bool caf_util::MuonSelector::_open_beam [private]
 

Definition at line 183 of file MuonSelector.hpp.

std::string caf_util::MuonSelector::_path [private]
 

Definition at line 178 of file MuonSelector.hpp.

Referenced by MuonSelector().

float caf_util::MuonSelector::_pTcut [private]
 

Definition at line 128 of file MuonSelector.hpp.

Referenced by MuonSelector().

Quality caf_util::MuonSelector::_qual [private]
 

Definition at line 126 of file MuonSelector.hpp.

Referenced by DisplayMuonQualityCuts(), MuonSelector(), and SetStdCuts().

bool caf_util::MuonSelector::_reject_no_beam_spot [private]
 

Definition at line 147 of file MuonSelector.hpp.

cafe::Variables caf_util::MuonSelector::_runvar [private]
 

Definition at line 186 of file MuonSelector.hpp.

bool caf_util::MuonSelector::_sort [private]
 

Definition at line 145 of file MuonSelector.hpp.

Referenced by before().

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

Definition at line 120 of file MuonSelector.hpp.

std::string caf_util::MuonSelector::_trkqual_file [private]
 

Definition at line 172 of file MuonSelector.hpp.

Referenced by MuonSelector().

std::string caf_util::MuonSelector::_trkqual_name [private]
 

Definition at line 173 of file MuonSelector.hpp.

Referenced by MuonSelector().

int caf_util::MuonSelector::_trkqual_version [private]
 

Definition at line 174 of file MuonSelector.hpp.

Referenced by MuonSelector().

bool caf_util::MuonSelector::_use_beam_spot [private]
 

Definition at line 146 of file MuonSelector.hpp.

Referenced by MuonSelector().

bool caf_util::MuonSelector::_use_muid [private]
 

Definition at line 167 of file MuonSelector.hpp.

Referenced by MuonSelector().

bool caf_util::MuonSelector::_useCentralMatched [private]
 

Definition at line 143 of file MuonSelector.hpp.

Referenced by DisplayMuonQualityCuts(), and MuonSelector().


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