Skip to content
Snippets Groups Projects
Commit c32be1b3 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Merge branch 'mstahl_velomatch_to_master' into 'master'

Changes to Event/Track models needed for Velo matching of downstream composites

See merge request !4757
parents 38c48194 917a7e9a
No related branches found
No related tags found
1 merge request!4757Changes to Event/Track models needed for Velo matching of downstream composites
Pipeline #9893953 passed
......@@ -164,7 +164,9 @@ namespace LHCb {
JetActiveAreaE, // E-component of Jet active area four-momentum
JetPtPerUnitArea, // Underlying event activity per unit of Active Area
LastJetIndex = FirstJetIndex + 199, // The last index allocated for jet-related studies
LastGlobal = 10000 // The last 'global' index, other values are specific for user analysis
VeloMatchIP = 9800, // Impact parameter of VELO track to downstream composite particle
VeloMatchChi2, // Match chi2 as defined in https://inspirehep.net/literature/2768765
LastGlobal = 10000 // The last 'global' index, other values are specific for user analysis
};
/// Copy constructor
......
......@@ -136,6 +136,8 @@ namespace {
{ "JetActiveAreaE", LHCb::Particle::additionalInfo::JetActiveAreaE },
{ "JetPtPerUnitArea", LHCb::Particle::additionalInfo::JetPtPerUnitArea },
{ "LastJetIndex", LHCb::Particle::additionalInfo::LastJetIndex },
{ "VeloMatchIP", LHCb::Particle::additionalInfo::VeloMatchIP },
{ "VeloMatchChi2", LHCb::Particle::additionalInfo::VeloMatchChi2 },
{ "LastGlobal", LHCb::Particle::additionalInfo::LastGlobal } };
}
......
......@@ -20,8 +20,9 @@
namespace LHCb {
namespace Tr {
class PID {
enum class validated_pid_t { Electron = 0, Muon, Pion, Kaon, Proton };
static constexpr std::array<double, 5> s_mass = { 0.51099891, 105.65837, 139.57018, 493.677, 938.27203 };
enum class validated_pid_t { Electron = 0, Muon, Pion, Kaon, Proton, Xi, Omega, hypertriton };
static constexpr std::array<double, 8> s_mass = { 0.51099891, 105.65837, 139.57018, 493.677,
938.27203, 1321.71, 1672.45, 2991.17 };
validated_pid_t m_value;
......@@ -37,6 +38,12 @@ namespace LHCb {
return validated_pid_t::Kaon;
case 2212:
return validated_pid_t::Proton;
case 3312:
return validated_pid_t::Xi;
case 3334:
return validated_pid_t::Omega;
case 1010010030:
return validated_pid_t::hypertriton;
default:
throw std::runtime_error( "invalid PID" );
}
......@@ -60,6 +67,12 @@ namespace LHCb {
static constexpr PID Proton() { return PID{ validated_pid_t::Proton }; }
static constexpr PID Xi() { return PID{ validated_pid_t::Xi }; }
static constexpr PID Omega() { return PID{ validated_pid_t::Omega }; }
static constexpr PID hypertriton() { return PID{ validated_pid_t::hypertriton }; }
// Framwork functions allowing the use of PID inside a property
friend const char* toString( PID pid ) {
switch ( pid.m_value ) {
......@@ -73,6 +86,12 @@ namespace LHCb {
return "Kaon";
case validated_pid_t::Proton:
return "Proton";
case validated_pid_t::Xi:
return "Xi";
case validated_pid_t::Omega:
return "Omega";
case validated_pid_t::hypertriton:
return "hypertriton";
default:
throw std::runtime_error( "Calling toString on invalid PID" );
}
......@@ -84,7 +103,7 @@ namespace LHCb {
friend std::ostream& operator<<( std::ostream& os, const PID& pid ) { return toStream( pid, os ); }
friend StatusCode parse( PID& pid, const std::string& in ) {
for ( PID ref : { Electron(), Muon(), Pion(), Kaon(), Proton() } ) {
for ( PID ref : { Electron(), Muon(), Pion(), Kaon(), Proton(), Xi(), Omega(), hypertriton() } ) {
if ( in != toString( ref ) ) continue;
pid = ref;
return StatusCode::SUCCESS;
......@@ -104,6 +123,12 @@ namespace LHCb {
constexpr bool isKaon() const { return validated_pid_t::Kaon == m_value; }
constexpr bool isProton() const { return validated_pid_t::Proton == m_value; }
constexpr bool isXi() const { return validated_pid_t::Xi == m_value; }
constexpr bool isOmega() const { return validated_pid_t::Omega == m_value; }
constexpr bool ishypertriton() const { return validated_pid_t::hypertriton == m_value; }
};
} // namespace Tr
} // namespace LHCb
......
......@@ -10,4 +10,4 @@
\*****************************************************************************/
#include "Kernel/TrackDefaultParticles.h"
constexpr std::array<double, 5> LHCb::Tr::PID::s_mass;
constexpr std::array<double, 8> LHCb::Tr::PID::s_mass;
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