Belle II Software  release-05-01-25
TrackSelector Class Reference

Utility for the track selection - used in various calibration modules. More...

#include <TrackSelector.h>

Collaboration diagram for TrackSelector:

Public Types

enum  EType {
  c_undefined = 0,
  c_dimuon = 1,
  c_bhabha = 2,
  c_cosmics = 3
}
 enumerators for possible data sample types (skims)
 

Public Member Functions

 TrackSelector ()
 Default constructor.
 
 TrackSelector (const std::string &sampleName)
 Useful constructor. More...
 
void setMinMomentum (double minMomentum)
 Sets momentum cut (used for "cosmics" only) More...
 
void setDeltaEcms (double deltaEcms)
 Sets cut on c.m.s. More...
 
void setCutOnPOCA (double dr, double dz)
 Sets cut on point of closest approach to (0, 0, 0) More...
 
void setCutOnLocalZ (double minZ, double maxZ)
 Sets cut on local z coordinate (module frame) of the track extrapolated to TOP. More...
 
const std::string & getSampleName () const
 Returns sample name. More...
 
double getMinMomentum () const
 Returns momentum cut. More...
 
double getDeltaEcms () const
 Returns c.m.s. More...
 
double getDr () const
 Returns POCA cut in r. More...
 
double getDz () const
 Returns POCA cut in z. More...
 
double getMinZ () const
 Returns cut on local z. More...
 
double getMaxZ () const
 Returns cut on local z. More...
 
const Const::ChargedStablegetChargedStable () const
 Returns track hypothesis.
 
const TVector3 & getPOCAPosition () const
 Returns position of POCA of the track in last isSelected call. More...
 
const TVector3 & getPOCAMomentum () const
 Returns momentum vector at POCA of the track in last isSelected call. More...
 
double getCMSEnergy () const
 Returns c.m.s energy of the track in last isSelected call. More...
 
const TVector3 & getLocalPosition () const
 Returns position at TOP in local frame of the track in last isSelected call. More...
 
const TVector3 & getLocalMomentum () const
 Returns momentum at TOP in local frame of the track in last isSelected call. More...
 
bool isSelected (const TOPtrack &track) const
 Returns selection status. More...
 

Private Attributes

EType m_sampleType = c_undefined
 data sample (skim) type
 
std::string m_sampleName
 data sample (skim) name
 
double m_minMomentum = 0
 minimal track momentum if sample is "cosmics"
 
double m_deltaEcms = 0
 c.m.s energy window for "dimuon" or "bhabha"
 
double m_dr = 0
 cut on POCA in r
 
double m_dz = 0
 cut on POCA in z
 
double m_minZ = 0
 minimal local z of extrapolated hit
 
double m_maxZ = 0
 maximal local z of extrapolated hit
 
Const::ChargedStable m_chargedStable = Const::muon
 track hypothesis
 
TVector3 m_pocaPosition
 position of POCA
 
TVector3 m_pocaMomentum
 momentum at POCA
 
double m_cmsEnergy = 0
 c.m.s. More...
 
TVector3 m_localPosition
 position at TOP in local (module) frame
 
TVector3 m_localMomentum
 momentum at TOP in local (module) frame
 

Detailed Description

Utility for the track selection - used in various calibration modules.

Definition at line 37 of file TrackSelector.h.

Constructor & Destructor Documentation

◆ TrackSelector()

TrackSelector ( const std::string &  sampleName)
explicit

Useful constructor.

Parameters
sampleNamedata sample name, one of dimuon, bhabha or cosmics

Definition at line 34 of file TrackSelector.cc.

34  {
35  m_sampleType = c_cosmics;
37  } else {
38  m_sampleType = c_undefined;
39  m_sampleName = "undefined";
40  B2ERROR("TOP::TrackSelector: unknown data sample."
41  << LogVar("name", sampleName));
42  }
43  }
44 
45  bool TrackSelector::isSelected(const TOPtrack& trk) const
46  {
47 
48  if (m_sampleType == c_undefined) {
49  B2ERROR("TOP::TrackSelector: sample type is undefined, default constructor used");
50  return false;
51  }

Member Function Documentation

◆ getCMSEnergy()

double getCMSEnergy ( ) const
inline

Returns c.m.s energy of the track in last isSelected call.

Returns
c.m.s. energy if track is selected, otherwise undefined

Definition at line 160 of file TrackSelector.h.

164 {return m_localMomentum;}

◆ getDeltaEcms()

double getDeltaEcms ( ) const
inline

Returns c.m.s.

energy cut

Returns
size of the energy window

Definition at line 113 of file TrackSelector.h.

◆ getDr()

double getDr ( ) const
inline

Returns POCA cut in r.

Returns
maximal radius in x-y plane

Definition at line 119 of file TrackSelector.h.

◆ getDz()

double getDz ( ) const
inline

Returns POCA cut in z.

Returns
cut in z coordinate (|z| < dz/2)

Definition at line 125 of file TrackSelector.h.

◆ getLocalMomentum()

const TVector3& getLocalMomentum ( ) const
inline

Returns momentum at TOP in local frame of the track in last isSelected call.

Returns
momentum vector in local frame if track is selected, otherwise undefined

Definition at line 172 of file TrackSelector.h.

◆ getLocalPosition()

const TVector3& getLocalPosition ( ) const
inline

Returns position at TOP in local frame of the track in last isSelected call.

Returns
position in local frame if track is selected, otherwise undefined

Definition at line 166 of file TrackSelector.h.

◆ getMaxZ()

double getMaxZ ( ) const
inline

Returns cut on local z.

Returns
maximal local z of extrapolated hit

Definition at line 137 of file TrackSelector.h.

◆ getMinMomentum()

double getMinMomentum ( ) const
inline

Returns momentum cut.

Returns
minimal momentum

Definition at line 107 of file TrackSelector.h.

◆ getMinZ()

double getMinZ ( ) const
inline

Returns cut on local z.

Returns
minimal local z of extrapolated hit

Definition at line 131 of file TrackSelector.h.

◆ getPOCAMomentum()

const TVector3& getPOCAMomentum ( ) const
inline

Returns momentum vector at POCA of the track in last isSelected call.

Returns
momentum vector if track is selected, otherwise undefined

Definition at line 154 of file TrackSelector.h.

◆ getPOCAPosition()

const TVector3& getPOCAPosition ( ) const
inline

Returns position of POCA of the track in last isSelected call.

Returns
POCA if track is selected, otherwise undefined

Definition at line 148 of file TrackSelector.h.

◆ getSampleName()

const std::string& getSampleName ( ) const
inline

Returns sample name.

Returns
sample name

Definition at line 101 of file TrackSelector.h.

◆ isSelected()

bool isSelected ( const TOPtrack track) const

Returns selection status.

Parameters
tracktrack extrapolated to TOP
Returns
true if track passes selection criteria

Definition at line 53 of file TrackSelector.cc.

◆ setCutOnLocalZ()

void setCutOnLocalZ ( double  minZ,
double  maxZ 
)
inline

Sets cut on local z coordinate (module frame) of the track extrapolated to TOP.

Parameters
minZminimal z
maxZmaximal z

Definition at line 91 of file TrackSelector.h.

◆ setCutOnPOCA()

void setCutOnPOCA ( double  dr,
double  dz 
)
inline

Sets cut on point of closest approach to (0, 0, 0)

Parameters
drmaximal radius in x-y plane
dzcut in z coordinate (|z| < dz/2)

Definition at line 80 of file TrackSelector.h.

◆ setDeltaEcms()

void setDeltaEcms ( double  deltaEcms)
inline

Sets cut on c.m.s.

energy (used for "dimuon" and "bhabha")

Parameters
deltaEcmssize of energy window

Definition at line 73 of file TrackSelector.h.

◆ setMinMomentum()

void setMinMomentum ( double  minMomentum)
inline

Sets momentum cut (used for "cosmics" only)

Parameters
minMomentumminimal track momentum

Definition at line 67 of file TrackSelector.h.

Member Data Documentation

◆ m_cmsEnergy

double m_cmsEnergy = 0
mutableprivate

c.m.s.

energy of track

Definition at line 196 of file TrackSelector.h.


The documentation for this class was generated from the following files:
Belle2::TOP::TrackSelector::m_sampleName
std::string m_sampleName
data sample (skim) name
Definition: TrackSelector.h:184
Belle2::TOP::TrackSelector::m_localMomentum
TVector3 m_localMomentum
momentum at TOP in local (module) frame
Definition: TrackSelector.h:198
Belle2::TOP::TrackSelector::m_sampleType
EType m_sampleType
data sample (skim) type
Definition: TrackSelector.h:183
Belle2::TOP::TrackSelector::m_chargedStable
Const::ChargedStable m_chargedStable
track hypothesis
Definition: TrackSelector.h:191
LogVar
Class to store variables with their name which were sent to the logging service.
Definition: LogVariableStream.h:24
Belle2::TOP::TrackSelector::isSelected
bool isSelected(const TOPtrack &track) const
Returns selection status.
Definition: TrackSelector.cc:53
Belle2::Const::muon
static const ChargedStable muon
muon particle
Definition: Const.h:534