Skip to content
Snippets Groups Projects

InteractionRegion information in additional algorithms

Merged Rosen Matev requested to merge cherry-pick-303217d7 into master
Files
2
@@ -83,8 +83,9 @@ private:
Gaudi::Property<double> m_beamSpotRCutHMC{this, "BeamSpotRHighMultiplicityCut", 0.4};
Gaudi::Property<unsigned int> m_beamSpotRMT{this, "BeamSpotRMultiplicityTreshold", 10};
ConditionAccessor<LHCb::Conditions::InteractionRegion> m_ir{this, "InteractionRegionCache",
"LHCb::Conditions::InteractionRegion"};
ConditionAccessor<DeVP> m_vp{this, "DeVP", LHCb::Det::VP::det_path};
ConditionAccessor<LHCb::Conditions::InteractionRegion> m_ir{
this, "InteractionRegionCache", "AlgorithmSpecific-" + this->name() + "-InteractionRegion"};
// Member functions
LHCb::RecVertex* matchVtxByTracks( const LHCb::RecVertex& invtx, std::vector<LHCb::RecVertex>& outvtxvec ) const;
@@ -234,15 +235,20 @@ namespace {
//=========================================================================
StatusCode PVOfflineTool::initialize() {
return extends::initialize().andThen( [&] {
// This is only needed to have a fallback in case the IR condition does not exist. In that case, the information
// is taken from DeVP and thus the Velo motion system which is not exactly the same.
#if defined( USE_DD4HEP )
addConditionDerivation<LHCb::Conditions::InteractionRegion( const LHCb::Detector::DeLHCb& lhcb, //
const DeVP& vp )>(
{LHCb::standard_geometry_top, LHCb::Det::VP::det_path}, m_ir.key() );
#else
// FIXME: what if conidtion is available?
addConditionDerivation<LHCb::Conditions::InteractionRegion( const DeVP& vp )>( {LHCb::Det::VP::det_path},
m_ir.key() );
if ( Gaudi::Utils::CheckData<Condition>()( this->detSvc(), LHCb::Conditions::InteractionRegion::ConditionPath ) ) {
addConditionDerivation<LHCb::Conditions::InteractionRegion( const YAML::Node& )>(
{LHCb::Conditions::InteractionRegion::ConditionPath}, m_ir.key() );
} else {
addConditionDerivation<LHCb::Conditions::InteractionRegion( const DeVP& vp )>( {LHCb::Det::VP::det_path},
m_ir.key() );
}
#endif
if ( m_doTiming ) {
@@ -347,8 +353,9 @@ StatusCode PVOfflineTool::reconstructMultiPVFromTracks( std::vector<const LHCb::
IGeometryInfo const& geometry ) const {
auto totaltime_guard = make_timeguard( timers_t::Total );
LHCb::Conditions::InteractionRegion const& region = m_ir.get();
Gaudi::XYZPoint beamSpot = region.avgPosition;
const auto& region = m_ir.get();
const auto& deVP = m_vp.get();
const auto beamSpot = region.avgPosition;
outvtxvec.clear();
if ( m_saveSeedsAsPV ) {
@@ -387,7 +394,7 @@ StatusCode PVOfflineTool::reconstructMultiPVFromTracks( std::vector<const LHCb::
outvtxvec.pop_back();
continue;
}
if ( m_useBeamSpotRCut.value() ) {
if ( m_useBeamSpotRCut.value() && deVP.veloClosed() ) {
const auto& pos = recvtx.position();
auto r2 = std::pow( pos.x() - beamSpot.x(), 2 ) + std::pow( pos.y() - beamSpot.y(), 2 );
auto r =
Loading