Skip to content
Snippets Groups Projects
Commit dcff9e91 authored by Andrii Usachov's avatar Andrii Usachov Committed by Sebastien Ponce
Browse files

Introduce Track::hasMuon()

parent 5f00a87b
No related branches found
No related tags found
1 merge request!3926Introduce Track::hasMuon()
......@@ -370,6 +370,9 @@ namespace LHCb::Event {
/// Check if track is of a type that goes thro UT
bool hasUT() const;
/// Check if track is of a type that goes thro Muon
bool hasMuon() const;
/// Number of hits on the track
int nHits() const;
......@@ -841,8 +844,7 @@ namespace LHCb::Event {
const auto t = type();
/// add velo state for SeedMuon and MuonUT tracks specifically for Track efficiency study
return t == Track::Types::Velo || t == Track::Types::VeloBackward || t == Track::Types::Upstream ||
t == Track::Types::Long || t == Track::Types::VeloMuon || t == Track::Types::SeedMuon ||
t == Track::Types::MuonUT || t == Track::Types::LongMuon;
t == Track::Types::Long || t == Track::Types::VeloMuon || t == Track::Types::LongMuon;
}
inline bool Track::hasUT() const {
......@@ -851,6 +853,12 @@ namespace LHCb::Event {
t == Track::Types::MuonUT || t == Track::Types::LongMuon;
}
inline bool Track::hasMuon() const {
const auto t = type();
return t == Track::Types::MuonUT || t == Track::Types::LongMuon || t == Track::Types::VeloMuon ||
t == Track::Types::SeedMuon;
}
/* [[deprecated( "please use hasUT instead" )]] */ inline bool Track::hasTT() const { return hasUT(); }
inline int Track::nHits() const { return lhcbIDs().size(); }
......
......@@ -293,6 +293,9 @@ namespace LHCb::Event::v2 {
/// Check if track is of a type that goes thro UT
[[nodiscard]] bool hasUT() const;
/// Check if track is of a type that goes thro Muon
[[nodiscard]] bool hasMuon() const;
/// Check whether the given LHCbID is on the track
[[nodiscard]] bool isOnTrack( LHCbID const value ) const;
......
......@@ -279,17 +279,23 @@ namespace LHCb::Event::v2 {
bool Track::hasT() const {
auto const t = type();
return t == Type::Ttrack || t == Type::Downstream || t == Type::Long;
return t == Type::Ttrack || t == Type::Downstream || t == Type::Long || t == Type::LongMuon || t == Type::SeedMuon;
}
bool Track::hasVelo() const {
auto const t = type();
return t == Type::Velo || t == Type::VeloBackward || t == Type::Upstream || t == Type::Long;
return t == Type::Velo || t == Type::VeloBackward || t == Type::Upstream || t == Type::Long ||
t == Type::VeloMuon || t == Type::LongMuon;
}
bool Track::hasUT() const {
auto const t = type();
return t == Type::Downstream || t == Type::Upstream || t == Type::Long;
return t == Type::Downstream || t == Type::Upstream || t == Type::Long || t == Type::LongMuon || t == Type::MuonUT;
}
bool Track::hasMuon() const {
auto const t = type();
return t == Type::MuonUT || t == Type::LongMuon || t == Type::VeloMuon || t == Type::SeedMuon;
}
//=============================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment