ATLAS Offline Software
MuonCalibTruthCollection.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <algorithm>
8 
9 namespace MuonCalib {
10 
13  m_truthVec.clear();
14  m_mdtTruthVec.clear();
15  m_rpcTruthVec.clear();
16  m_cscTruthVec.clear();
17  m_tgcTruthVec.clear();
18 
19  for (const TruthPtr& it : other.m_truthVec) { m_truthVec.emplace_back(new MuonCalibTruth(*it)); }
20  for (const TruthMdtPtr& mdt_it : other.m_mdtTruthVec) { m_mdtTruthVec.emplace_back(new MuonCalibMdtTruthHit(*mdt_it)); }
21  for (const TruthRpcPtr& rpc_it : other.m_rpcTruthVec) { m_rpcTruthVec.emplace_back(new MuonCalibRpcTruthHit(*rpc_it)); }
22  for (const TruthCscPtr& csc_it : other.m_cscTruthVec) { m_cscTruthVec.emplace_back(new MuonCalibCscTruthHit(*csc_it)); }
23  for (const TruthTgcPtr& tgc_it : other.m_tgcTruthVec) { m_tgcTruthVec.emplace_back(new MuonCalibTgcTruthHit(*tgc_it)); }
24  }
25 
28 
32 
36 
40 
44 
46  if (this != &rhs) { copy(rhs); }
47  return (*this);
48  }
49  int MuonCalibTruthCollection::numberOfTruth() const { return m_truthVec.size(); }
50 
52  if (truth) m_truthVec.emplace_back(truth);
53  }
55  if (truth) m_mdtTruthVec.emplace_back(truth);
56  }
57 
59  if (truth) m_rpcTruthVec.emplace_back(truth);
60  }
61 
63  if (truth) m_tgcTruthVec.emplace_back(truth);
64  }
65 
67  if (truth) m_cscTruthVec.emplace_back(truth);
68  }
70  if (truth) m_truthVec.emplace_back(truth);
71  }
73  if (truth) m_mdtTruthVec.emplace_back(truth);
74  }
75 
77  if (truth) m_rpcTruthVec.emplace_back(truth);
78  }
79 
81  if (truth) m_tgcTruthVec.emplace_back(truth);
82  }
83 
85  if (truth) m_cscTruthVec.emplace_back(truth);
86  }
87 
88 } // namespace MuonCalib
MuonCalib::MuonCalibTruthCollection::m_truthVec
TruthVec m_truthVec
set of MuonCalibTruth s
Definition: MuonCalibTruthCollection.h:116
MuonCalib::MuonCalibTruthCollection::TruthContainer
TruthVec & TruthContainer()
Retrieve a reference to the full truth container.
Definition: MuonCalibTruthCollection.cxx:26
MuonCalib::MuonCalibTruthCollection
Definition: MuonCalibTruthCollection.h:38
MuonCalib::MuonCalibTruthCollection::numberOfTruth
int numberOfTruth() const
retrieve the number of MuonCalibTruth s in the collection
Definition: MuonCalibTruthCollection.cxx:49
MuonCalib::MuonCalibTruthCollection::TgcContainer
TgcTruthVec & TgcContainer()
Retrieve a referece to the full Tgc container.
Definition: MuonCalibTruthCollection.cxx:42
MuonCalib::MuonCalibTruthCollection::TruthRpcPtr
std::shared_ptr< const MuonCalibRpcTruthHit > TruthRpcPtr
typedef of set of MuonCalibRpcTruthHit* s
Definition: MuonCalibTruthCollection.h:51
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MuonCalib::MuonCalibTruthCollection::MdtContainer
MdtTruthVec & MdtContainer()
Retrieve a reference to the full Mdt container.
Definition: MuonCalibTruthCollection.cxx:30
MuonCalib::MuonCalibTruthCollection::m_cscTruthVec
CscTruthVec m_cscTruthVec
set of MuonCalibCscTruthHit s
Definition: MuonCalibTruthCollection.h:120
MuonCalib::MuonCalibTruthCollection::TgcTruthVec
std::vector< TruthTgcPtr > TgcTruthVec
Definition: MuonCalibTruthCollection.h:56
MuonCalib::MuonCalibTruthCollection::TruthVec
std::vector< TruthPtr > TruthVec
typedef of the iterator to the set of MuonCalibTruth s
Definition: MuonCalibTruthCollection.h:43
MuonCalib::MuonCalibTruthCollection::copy
void copy(const MuonCalibTruthCollection &other)
Definition: MuonCalibTruthCollection.cxx:12
MuonCalib::MuonCalibRpcTruthHit
Definition: MuonCalibRpcTruthHit.h:24
MuonCalib::MuonCalibTruthCollection::TruthTgcPtr
std::shared_ptr< const MuonCalibTgcTruthHit > TruthTgcPtr
typedef of set of MuonCalibTgcTruthHit* s
Definition: MuonCalibTruthCollection.h:55
MuonCalib::MuonCalibTruthCollection::RpcTruthVec
std::vector< TruthRpcPtr > RpcTruthVec
typedef of the iterator to the set of MuonCalibRpcTruthHit* s
Definition: MuonCalibTruthCollection.h:53
MuonCalib::MuonCalibTgcTruthHit
Definition: MuonCalibTgcTruthHit.h:24
MuonCalib::MuonCalibTruthCollection::operator=
MuonCalibTruthCollection & operator=(const MuonCalibTruthCollection &rhs)
assignment operator
Definition: MuonCalibTruthCollection.cxx:45
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibTruthCollection::TruthCscPtr
std::shared_ptr< const MuonCalibCscTruthHit > TruthCscPtr
typedef of set of MuonCalibCscTruthHit* s
Definition: MuonCalibTruthCollection.h:59
MuonCalib::MuonCalibTruthCollection::RpcContainer
RpcTruthVec & RpcContainer()
Retrieve a refernece to the full Rpc container.
Definition: MuonCalibTruthCollection.cxx:34
MuonCalib::MuonCalibTruthCollection::CscTruthVec
std::vector< TruthCscPtr > CscTruthVec
Definition: MuonCalibTruthCollection.h:60
MuonCalib::MuonCalibTruthCollection::m_rpcTruthVec
RpcTruthVec m_rpcTruthVec
set of MuonCalibRpcTruthHit s
Definition: MuonCalibTruthCollection.h:118
MuonCalib::MuonCalibMdtTruthHit
Definition: MuonCalibMdtTruthHit.h:21
MuonCalib::MuonCalibTruthCollection::addTruth
void addTruth(MuonCalibTruth *truth)
add a MuonCalibMdtTruthHit to the collection
Definition: MuonCalibTruthCollection.cxx:51
MuonCalib::MuonCalibTruthCollection::CscContainer
CscTruthVec & CscContainer()
Retrieve a reference to the full Csc container.
Definition: MuonCalibTruthCollection.cxx:38
MuonCalibTruthCollection.h
MuonCalib::MuonCalibTruthCollection::TruthMdtPtr
std::shared_ptr< const MuonCalibMdtTruthHit > TruthMdtPtr
typedef of set of MuonCalibMdtTruthHit* s
Definition: MuonCalibTruthCollection.h:46
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonCalib::MuonCalibTruthCollection::TruthPtr
std::shared_ptr< const MuonCalibTruth > TruthPtr
typedef of a set of MuonCalibTruth* s
Definition: MuonCalibTruthCollection.h:41
MuonCalib::MuonCalibTruth
Definition: MuonCalibTruth.h:24
MuonCalib::MuonCalibTruthCollection::MdtTruthVec
std::vector< TruthMdtPtr > MdtTruthVec
typedef of the iterator to the set of MuonCalibMdtTruthHit* s
Definition: MuonCalibTruthCollection.h:48
MuonCalib::MuonCalibTruthCollection::MuonCalibTruthCollection
MuonCalibTruthCollection()=default
Default constructor.
MuonCalib::MuonCalibTruthCollection::m_mdtTruthVec
MdtTruthVec m_mdtTruthVec
set of MuonCalibMdtTruthHit s
Definition: MuonCalibTruthCollection.h:117
MuonCalib::MuonCalibCscTruthHit
Definition: MuonCalibCscTruthHit.h:24
MuonCalib::MuonCalibTruthCollection::m_tgcTruthVec
TgcTruthVec m_tgcTruthVec
set of MuonCalibTgcTruthHit s
Definition: MuonCalibTruthCollection.h:119