From ccd4399bf8456d1f904e7053f82f9c265ea0de94 Mon Sep 17 00:00:00 2001 From: Adam Davis <adam.davis@cern.ch> Date: Wed, 3 May 2023 15:08:06 +0200 Subject: [PATCH] update packed rich for missing rich info --- .../src/lib/Run2_PackedRichPID.cpp | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Event/Run2_EventPacker/src/lib/Run2_PackedRichPID.cpp b/Event/Run2_EventPacker/src/lib/Run2_PackedRichPID.cpp index 07829190..347ea05e 100644 --- a/Event/Run2_EventPacker/src/lib/Run2_PackedRichPID.cpp +++ b/Event/Run2_EventPacker/src/lib/Run2_PackedRichPID.cpp @@ -17,13 +17,13 @@ void Run2RichPIDPacker::pack( const Data& pid, PackedData& ppid, PackedDataVecto const auto ver = ppids.packingVersion(); if ( !isSupportedVer( ver ) ) return; ppid.pidResultCode = (int)pid.pidResultCode(); - ppid.dllEl = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Electron ) ); - ppid.dllMu = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Muon ) ); - ppid.dllPi = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Pion ) ); - ppid.dllKa = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Kaon ) ); - ppid.dllPr = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Proton ) ); - if ( ver > 0 ) ppid.dllBt = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::BelowThreshold ) ); - if ( ver > 3 ) ppid.dllDe = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Deuteron ) ); + ppid.dllEl = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Electron ) ); + ppid.dllMu = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Muon ) ); + ppid.dllPi = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Pion ) ); + ppid.dllKa = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Kaon ) ); + ppid.dllPr = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Proton ) ); + if ( ver > 0 ) ppid.dllBt = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::BelowThreshold ) ); + if ( ver > 3 ) ppid.dllDe = StandardPacker::deltaLL( pid.particleDeltaLL( Rich::Run2::Deuteron ) ); if ( pid.track() ) { ppid.track = ( ver < 3 ? StandardPacker::reference32( &parent(), &ppids, pid.track()->parent(), pid.track()->key() ) : StandardPacker::reference64( &ppids, pid.track()->parent(), pid.track()->key() ) ); @@ -49,15 +49,15 @@ void Run2RichPIDPacker::unpack( const PackedData& ppid, Data& pid, const PackedD const auto ver = ppids.packingVersion(); if ( !isSupportedVer( ver ) ) return; pid.setPidResultCode( ppid.pidResultCode ); - pid.setParticleDeltaLL( Rich::Electron, (float)StandardPacker::deltaLL( ppid.dllEl ) ); - pid.setParticleDeltaLL( Rich::Muon, (float)StandardPacker::deltaLL( ppid.dllMu ) ); - pid.setParticleDeltaLL( Rich::Pion, (float)StandardPacker::deltaLL( ppid.dllPi ) ); - pid.setParticleDeltaLL( Rich::Kaon, (float)StandardPacker::deltaLL( ppid.dllKa ) ); - pid.setParticleDeltaLL( Rich::Proton, (float)StandardPacker::deltaLL( ppid.dllPr ) ); + pid.setParticleDeltaLL( Rich::Run2::Electron, (float)StandardPacker::deltaLL( ppid.dllEl ) ); + pid.setParticleDeltaLL( Rich::Run2::Muon, (float)StandardPacker::deltaLL( ppid.dllMu ) ); + pid.setParticleDeltaLL( Rich::Run2::Pion, (float)StandardPacker::deltaLL( ppid.dllPi ) ); + pid.setParticleDeltaLL( Rich::Run2::Kaon, (float)StandardPacker::deltaLL( ppid.dllKa ) ); + pid.setParticleDeltaLL( Rich::Run2::Proton, (float)StandardPacker::deltaLL( ppid.dllPr ) ); // Below threshold information only available in packed version 1 onwards - if ( ver > 0 ) pid.setParticleDeltaLL( Rich::BelowThreshold, (float)StandardPacker::deltaLL( ppid.dllBt ) ); + if ( ver > 0 ) pid.setParticleDeltaLL( Rich::Run2::BelowThreshold, (float)StandardPacker::deltaLL( ppid.dllBt ) ); // Deuteron information only available in packed version 4 onwards - if ( ver > 3 ) pid.setParticleDeltaLL( Rich::Deuteron, (float)StandardPacker::deltaLL( ppid.dllDe ) ); + if ( ver > 3 ) pid.setParticleDeltaLL( Rich::Run2::Deuteron, (float)StandardPacker::deltaLL( ppid.dllDe ) ); if ( -1 != ppid.track ) { int hintID( 0 ), key( 0 ); parent().debug() << "ver " << (int)ver << " track " << ppid.track << " ppids " << ppids << " pids " << pids @@ -74,7 +74,7 @@ void Run2RichPIDPacker::unpack( const PackedData& ppid, Data& pid, const PackedD // If the packing version is pre-Deuteron, check the BestPID field and correct for // the fact the numerical value of the Below Threshold enum changed when Deuteron // was added. - if ( ver < 4 && Rich::Deuteron == pid.bestParticleID() ) { pid.setBestParticleID( Rich::BelowThreshold ); } + if ( ver < 4 && Rich::Run2::Deuteron == pid.bestParticleID() ) { pid.setBestParticleID( Rich::Run2::BelowThreshold ); } } void Run2RichPIDPacker::unpack( const PackedDataVector& ppids, DataVector& pids ) const { -- GitLab