9#include <top/utilities/TrackSelector.h>
10#include <framework/logging/Logger.h>
11#include <top/geometry/TOPGeometryPar.h>
12#include <mdst/dataobjects/Track.h>
13#include <tracking/dataobjects/ExtHit.h>
14#include <analysis/utility/PCmsLabTransform.h>
25 if (sampleName ==
"dimuon") {
28 }
else if (sampleName ==
"bhabha") {
31 }
else if (sampleName ==
"cosmics") {
37 B2ERROR(
"TOP::TrackSelector: unknown data sample."
38 <<
LogVar(
"name", sampleName));
47 B2ERROR(
"TOP::TrackSelector:isSelected sample type is undefined, returning false");
51 if (not trk.
isValid())
return false;
54 if (not fit)
return false;
68 auto lorentzCms = T.
labToCms(lorentzLab);
78 const auto& module = geo->getModule(trk.
getModuleID());
double getMass() const
Particle mass.
static const ChargedStable muon
muon particle
static const ChargedStable electron
electron particle
ROOT::Math::XYZVector getMomentum() const
Get momentum at this extrapolation hit.
ROOT::Math::XYZVector getPosition() const
Get position of this extrapolation hit.
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
Reconstructed track at TOP.
const Track * getTrack() const
Returns mdst track.
bool isValid() const
Checks if track is successfully constructed.
const ExtHit * getExtHit() const
Returns extrapolated hit (track entrance to the bar)
int getModuleID() const
Returns slot ID.
Const::ChargedStable m_chargedStable
track hypothesis
EType m_sampleType
data sample (skim) type
ROOT::Math::XYZVector m_pocaPosition
position of POCA
double m_minMomentum
minimal track momentum if sample is "cosmics"
double m_dz
cut on POCA in z
ROOT::Math::XYZVector m_localMomentum
momentum at TOP in local (module) frame
std::string m_sampleName
data sample (skim) name
double m_maxZ
maximal local z of extrapolated hit
bool isSelected(const TOPTrack &track) const
Returns selection status.
double m_minZ
minimal local z of extrapolated hit
double m_dr
cut on POCA in r
TrackSelector()
Default constructor.
ROOT::Math::XYZPoint m_localPosition
position at TOP in local (module) frame
double m_deltaEcms
c.m.s energy window for "dimuon" or "bhabha"
ROOT::Math::XYZVector m_pocaMomentum
momentum at POCA
const TrackFitResult * getTrackFitResultWithClosestMass(const Const::ChargedStable &requestedType) const
Return the track fit for a fit hypothesis with the closest mass.
Class to store variables with their name which were sent to the logging service.
Abstract base class for different kinds of events.