Skip to content
Snippets Groups Projects
Commit 2fc40450 authored by Christopher Rob Jones's avatar Christopher Rob Jones
Browse files

ichTrackSegment: Add missing utility include

parent 0c55d3ed
No related branches found
No related tags found
1 merge request!4251Add support for RICH 4D reconstruction
Pipeline #6064287 passed
......@@ -23,13 +23,6 @@
#pragma once
// std include
#include <array>
#include <cmath>
#include <iostream>
#include <memory>
#include <type_traits>
// local
#include "RichUtils/RichException.h"
#include "RichUtils/RichSIMDTypes.h"
......@@ -52,6 +45,14 @@
// VDT
#include "vdt/sqrt.h"
// std include
#include <array>
#include <cmath>
#include <iostream>
#include <memory>
#include <type_traits>
#include <utility>
// General LHCb namespace
namespace LHCb {
......
......@@ -38,11 +38,13 @@
namespace {
// access the mass^2 for a given hypothesis, using the Particle Property Svc
auto pidMass2( const Rich::ParticleIDType pid ) {
static Rich::ParticleArray<double> masses2;
static std::once_flag run_once;
std::call_once( run_once, [&]() {
const auto ppSvc = Gaudi::svcLocator()->service<LHCb::IParticlePropertySvc>( "LHCb::ParticlePropertySvc", true );
assert( ppSvc );
masses2[Rich::Electron] = std::pow( ppSvc->find( "e+" )->mass() / Gaudi::Units::MeV, 2 );
masses2[Rich::Muon] = std::pow( ppSvc->find( "mu+" )->mass() / Gaudi::Units::MeV, 2 );
masses2[Rich::Pion] = std::pow( ppSvc->find( "pi+" )->mass() / Gaudi::Units::MeV, 2 );
......@@ -83,7 +85,7 @@ void LHCb::RichTrackSegment::setOriginVertex( const Gaudi::XYZTPoint& origin4vtx
// Loop over all mass hypos
for ( const auto pid : Rich::particles() ) {
// velocity
// velocity for this hypo
const auto v = velocity( pid );
// finally set transit time
m_timeToRadEntry[pid] = ( v > 0 ? originTime() + ( pathLenToEntry / v ) : std::numeric_limits<double>::max() );
......
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