3#include "GaudiKernel/SystemOfUnits.h"
19 ATH_MSG_ERROR(
"The drift velocity calibration constants for gas gap "<<
m_idHelperSvc->toStringGasGap(gasGapIdentifier) <<
" already exist. Overwriting is not allowed");
20 return StatusCode::FAILURE;
24 if (newConstants.pars().size() < 2) {
26 " stEta: " <<
m_idHelperSvc->mmIdHelper().stationEta(gasGapIdentifier) <<
27 " stPhi: " <<
m_idHelperSvc->mmIdHelper().stationPhi(gasGapIdentifier) <<
28 " ml: " <<
m_idHelperSvc->mmIdHelper().multilayer(gasGapIdentifier) <<
29 " gg: " <<
m_idHelperSvc->mmIdHelper().gasGap(gasGapIdentifier) <<
30 " are incomplete. 2 parameters are required!");
32 return StatusCode::FAILURE;
36 m_database[gasGapIdentifier] = std::move(newConstants);
38 return StatusCode::SUCCESS;
48 ATH_MSG_ERROR(
"There's no drift velocity calibration available for gasGap " <<
m_idHelperSvc->toStringGasGap(gasGapIdentifier)<<
" size of the calib map is: " <<
m_database.size() );
55 double trf_theta_in_radians = trf_theta_in_degrees * Gaudi::Units::deg;
56 double tan_theta = std::tan(trf_theta_in_radians);
63 double vDrift =
m_database.at(gasGapIdentifier).pars()[0] + ((
m_database.at(gasGapIdentifier).pars()[1])*trf_theta_in_degrees);
67 vDrift = (tan_theta != 0 ) ? std::fabs(vDrift/tan_theta) : std::fabs(vDrift);
70 ATH_MSG_VERBOSE(
"New drift velocity: " << vDrift <<
" for theta: " << trf_theta_in_degrees <<
" degrees" );
Scalar theta() const
theta method
#define ATH_MSG_VERBOSE(x)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const std::array< double, 2 > & pars() const
std::array< double, 2 > m_pars
double getCTPCorrectedDriftVelocity(const Identifier &identifier, const double theta) const
StatusCode storeConstants(const Identifier &gasGapId, CTPParameters &&newConstants)
const Muon::IMuonIdHelperSvc * m_idHelperSvc
mmCTPClusterCalibData(const Muon::IMuonIdHelperSvc *idHelperSvc)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.