ATLAS Offline Software
MdtTubeFitContainer.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
5 
6 namespace MuonCalib{
9  const Identifier& moduleID):
10  MdtTubeCalibContainer(idHelperSvc, moduleID) {
11  m_info.resize(size());
12 }
13 
14 void MdtTubeFitContainer::setImplementation(const std::string& impl) {
16 }
17 
18 const std::string& MdtTubeFitContainer::name() const {
19  return m_name;
20 }
21 
22 const std::string& MdtTubeFitContainer::implementation() const {
23  return m_implementation;
24 }
25 
26 bool MdtTubeFitContainer::setFit(SingleTubeFit&& val, const Identifier& tubeId, MsgStream& log) {
27  unsigned int idx = vectorIndex(tubeId);
28  if (idx >= m_info.size()) {
29  log<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" Index "<<idx
30  <<" exceeds range "<<m_info.size()<<endmsg;
31  return false;
32  }
33  m_info[idx] = std::move(val);
34  return true;
35 }
36 
37 void MdtTubeFitContainer::setGroupBy(const std::string& group_by) {
38  for (SingleTubeFit& fit : m_info) {
39  fit.group_by = group_by;
40  }
41 }
42 std::string MdtTubeFitContainer::GroupBy() const {
43  if (!m_info.size()) return m_group_by;
44  return m_info.begin()->group_by;
45 }
46 
48  unsigned int idx = vectorIndex(tubeId);
49  if (idx >= m_info.size()) return nullptr;
50  return &m_info[idx];
51 }
52 
54  unsigned int idx = vectorIndex(tubeId);
55  if (idx >= m_info.size()) return nullptr;
56  return &m_info[idx];
57 }
58 
59 }
MuonCalib::MdtTubeFitContainer::setImplementation
void setImplementation(const std::string &impl)
set the name of the implementation used to fill this class
Definition: MdtTubeFitContainer.cxx:14
MuonCalib::MdtTubeCalibContainer::vectorIndex
unsigned int vectorIndex(const Identifier &measID) const
calculate postion of tube in vector
Definition: MdtTubeCalibContainer.h:61
MuonCalib::MdtTubeFitContainer::m_group_by
std::string m_group_by
Definition: MdtTubeFitContainer.h:63
MuonCalib::MdtTubeFitContainer::SingleTubeFit
Definition: MdtTubeFitContainer.h:18
MuonCalib::SingleTubeFit
MdtTubeFitContainer::SingleTubeFit SingleTubeFit
Definition: MdtTubeFitContainer.cxx:7
MuonCalib::MdtTubeFitContainer::setGroupBy
void setGroupBy(const std::string &group_by)
Definition: MdtTubeFitContainer.cxx:37
MuonCalib::MdtTubeFitContainer::m_implementation
std::string m_implementation
Definition: MdtTubeFitContainer.h:62
MdtTubeFitContainer.h
MuonCalib::MdtTubeFitContainer::m_info
std::vector< SingleTubeFit > m_info
Definition: MdtTubeFitContainer.h:60
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MdtTubeFitContainer::name
const std::string & name() const
return the name of this class
Definition: MdtTubeFitContainer.cxx:18
MuonCalib::MdtTubeCalibContainer
Holds single-tube calibration constants of one chamber.
Definition: MdtTubeCalibContainer.h:16
MuonCalib::MdtTubeFitContainer::MdtTubeFitContainer
MdtTubeFitContainer(const Muon::IMuonIdHelperSvc *idHelperSvc, const Identifier &moduleID)
nMl = number of multilayres, nLayers = number of layers in multilayer (3 or 4); nTubes = number of tu...
Definition: MdtTubeFitContainer.cxx:8
MuonValidation_CreateResolutionProfiles.fit
def fit(h, emin, emax)
Definition: MuonValidation_CreateResolutionProfiles.py:69
MuonCalib::MdtTubeFitContainer::implementation
const std::string & implementation() const
return the name of the implementation filling this class
Definition: MdtTubeFitContainer.cxx:22
impl
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:46
MuonCalib::MdtTubeFitContainer::getFit
const SingleTubeFit * getFit(const Identifier &tubeId) const
return calibration constants of a single tube
Definition: MdtTubeFitContainer.cxx:47
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
MuonCalib::MdtTubeFitContainer::setFit
bool setFit(SingleTubeFit &&val, const Identifier &tubeId, MsgStream &log)
set the calibration constants of a single tube
Definition: MdtTubeFitContainer.cxx:26
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
MuonCalib::MdtTubeFitContainer::GroupBy
std::string GroupBy() const
Definition: MdtTubeFitContainer.cxx:42
MuonCalib::MdtTubeFitContainer::m_name
std::string m_name
Definition: MdtTubeFitContainer.h:61
MuonCalib::MdtTubeCalibContainer::size
unsigned int size() const
Definition: MdtTubeCalibContainer.h:48
Identifier
Definition: IdentifierFieldParser.cxx:14