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;
66 TLorentzVector lorentzLab;
70 auto lorentzCms = T.
labToCms(lorentzLab);
80 const auto& module = geo->getModule(trk.
getModuleID());
double getMass() const
Particle mass.
static const ChargedStable muon
muon particle
static const ChargedStable electron
electron particle
TVector3 getMomentum() const
Get momentum at this extrapolation hit.
TVector3 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.
bool isValid() const
Checks if track is successfully constructed.
const ExtHit * getExtHit() const
Returns extrapolated hit (track entrance to the bar)
const Track * getTrack() const
Returns mdst track.
int getModuleID() const
Returns slot ID.
Const::ChargedStable m_chargedStable
track hypothesis
EType m_sampleType
data sample (skim) type
TVector3 m_pocaMomentum
momentum at POCA
double m_minMomentum
minimal track momentum if sample is "cosmics"
double m_dz
cut on POCA in z
TVector3 m_pocaPosition
position of POCA
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.
double m_deltaEcms
c.m.s energy window for "dimuon" or "bhabha"
TVector3 m_localMomentum
momentum at TOP in local (module) frame
TVector3 m_localPosition
position at TOP in local (module) frame
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.