ATLAS Offline Software
MuonCalibEvent.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <algorithm>
8 #include <iostream>
9 #include <utility>
10 
17 
18 namespace MuonCalib {
20  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec) : m_patternVec{std::move(patvec)} {}
21 
22  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec, std::shared_ptr<const MuonCalibRawHitCollection> Coll) :
23  m_patternVec{std::move(patvec)}, m_rawColl{std::move(Coll)} {}
24 
25  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec, std::shared_ptr<MuonCalibEventInfo> eventInfo,
26  std::shared_ptr<const MuonCalibRawHitCollection> Coll) :
27  m_patternVec{std::move(patvec)}, m_eventInfo(std::move(eventInfo)), m_rawColl(std::move(Coll)) {}
28 
31 
38 
39  void MuonCalibEvent::setMuonCalibEventInfo(std::shared_ptr<MuonCalibEventInfo> eventInfo) { m_eventInfo = std::move(eventInfo); }
40  void MuonCalibEvent::setRpcSectorLogicContainer(std::shared_ptr<const RpcSectorLogicContainer> rpcSlContainer) {
41  m_rpcSlLogicContainer = std::move(rpcSlContainer);
42  }
43 
44  int MuonCalibEvent::numberOfPatterns() const { return m_patternVec.size(); }
45 
47  int segs = 0;
48  for (const PatternPtr &pat : pattern()) segs += pat->muonSegments();
49 
50  return segs;
51  }
52 
54  int hits = 0;
55  for (const PatternPtr &pat : pattern()) {
56  hits += pat->nmdtHits() % 1000;
57  hits += (pat->nmdtHits() - (pat->nmdtHits() % 1000)) / 1000;
58  hits += pat->nrpcHits() % 1000;
59  hits += (pat->nrpcHits() - (pat->nrpcHits() % 1000)) / 1000;
60  hits += pat->ntgcHits() % 1000;
61  hits += (pat->ntgcHits() - (pat->ntgcHits() % 1000)) / 1000;
62  hits += pat->ncscHits() % 1000;
63  hits += (pat->ncscHits() - (pat->ncscHits() % 1000)) / 1000;
64  }
65  return hits;
66  }
67  void MuonCalibEvent::setMuonCalibTriggerTimeInfo(std::shared_ptr<const MuonCalibTriggerTimeInfo> triggerTimeInfo) {
69  }
70  void MuonCalibEvent::setMuonCalibTruthCollection(std::shared_ptr<const MuonCalibTruthCollection> MCTColl) {
71  m_truthColl = std::move(MCTColl);
72  }
73  void MuonCalibEvent::setMuonCalibRawHitCollection(std::shared_ptr<const MuonCalibRawHitCollection> RHColl) {
74  m_rawColl = std::move(RHColl);
75  }
76  void MuonCalibEvent::setMuonCalibRawTriggerHitCollection(std::shared_ptr<const MuonCalibRawTriggerHitCollection> THColl) {
77  m_rawTriggerColl = std::move(THColl);
78  }
80 
81 } // namespace MuonCalib
MuonCalibPattern.h
MuonCalib::MuonCalibEvent::m_patternVec
MCPVec m_patternVec
A set of MuonCalibPattern s owned by the MuonCalibEvent.
Definition: MuonCalibEvent.h:98
MuonCalib::MuonCalibEvent::rawTriggerHitCollection
const MuonCalibRawTriggerHitCollection * rawTriggerHitCollection() const
retrieve the pointer to the MuonCalibTruthCollection.
Definition: MuonCalibEvent.cxx:33
MuonCalib::MuonCalibEvent::eventInfo
const MuonCalibEventInfo & eventInfo() const
Definition: MuonCalibEvent.cxx:35
MuonCalib::MuonCalibEvent::setRpcSectorLogicContainer
void setRpcSectorLogicContainer(std::shared_ptr< const RpcSectorLogicContainer > rpcSlContainer)
set the RpcSectorLogicContainer
Definition: MuonCalibEvent.cxx:40
MuonCalib::MuonCalibTruthCollection
Definition: MuonCalibTruthCollection.h:38
MuonCalib::MuonCalibEvent::setMuonCalibRawHitCollection
void setMuonCalibRawHitCollection(std::shared_ptr< const MuonCalibRawHitCollection > RHColl)
set the MuonCalibRawHitCollection.
Definition: MuonCalibEvent.cxx:73
MuonCalib::MuonCalibEvent::m_rawColl
std::shared_ptr< const MuonCalibRawHitCollection > m_rawColl
raw hits of the MuonCalibEvent
Definition: MuonCalibEvent.h:101
MuonCalib::MuonCalibEvent::m_eventInfo
std::shared_ptr< MuonCalibEventInfo > m_eventInfo
MuonCalibEventInfo of the MuonCalibEvent.
Definition: MuonCalibEvent.h:99
MuonCalib::MuonCalibEvent::setMuonCalibTruthCollection
void setMuonCalibTruthCollection(std::shared_ptr< const MuonCalibTruthCollection > MCTColl)
set the MuonCalibTruthCollection
Definition: MuonCalibEvent.cxx:70
MuonCalib::MuonCalibEvent::m_truthColl
std::shared_ptr< const MuonCalibTruthCollection > m_truthColl
truth collection of the MuonCalibEvent
Definition: MuonCalibEvent.h:103
MuonCalib::MuonCalibEvent::triggerTimeInfo
const MuonCalibTriggerTimeInfo * triggerTimeInfo() const
Definition: MuonCalibEvent.cxx:37
MuonCalib::MuonCalibEvent::MCPVec
std::vector< PatternPtr > MCPVec
typedef to std::vector<MuonCalibPattern*>
Definition: MuonCalibEvent.h:51
MuonCalib::MuonCalibRawTriggerHitCollection
Definition: MuonCalibRawTriggerHitCollection.h:27
MuonCalibTriggerTimeInfo.h
MuonCalib::MuonCalibEvent::numberOfHits
int numberOfHits() const
retrieve the number of CalibHits in the event (sum of all technologies).
Definition: MuonCalibEvent.cxx:53
MuonCalib::MuonCalibEvent::calibTruthCollection
const MuonCalibTruthCollection * calibTruthCollection() const
retrieve the MuonCalibEventInfo.
Definition: MuonCalibEvent.cxx:34
MuonCalib::MuonCalibEvent::MuonCalibEvent
MuonCalibEvent()=default
Default constructor.
MuonCalib::MuonCalibEvent::m_triggerTimeInfo
std::shared_ptr< const MuonCalibTriggerTimeInfo > m_triggerTimeInfo
Definition: MuonCalibEvent.h:100
MuonCalib::MuonCalibEvent::setMuonCalibTriggerTimeInfo
void setMuonCalibTriggerTimeInfo(std::shared_ptr< const MuonCalibTriggerTimeInfo > triggerTimeInfo)
set the MuonCalibTriggerTimeInfo
Definition: MuonCalibEvent.cxx:67
MuonCalib::MuonCalibEvent::m_rawTriggerColl
std::shared_ptr< const MuonCalibRawTriggerHitCollection > m_rawTriggerColl
raw hits of the MuonCalibEvent
Definition: MuonCalibEvent.h:102
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
RpcSectorLogicContainer
Definition: RpcSectorLogicContainer.h:20
MuonCalib::MuonCalibEvent::rawHitCollection
const MuonCalibRawHitCollection * rawHitCollection() const
retrieve pointer to MuonCalibRawHitCollection
Definition: MuonCalibEvent.cxx:32
MuonCalib::MuonCalibEvent::rpcSectorLogicContainer
const RpcSectorLogicContainer * rpcSectorLogicContainer() const
Definition: MuonCalibEvent.cxx:36
dso-stats.pat
pat
Definition: dso-stats.py:39
MuonCalib::MuonCalibRawHitCollection
Definition: MuonCalibRawHitCollection.h:42
MuonCalib::MuonCalibEvent::numberOfSegments
int numberOfSegments() const
retrieve the number of MuonCalibSegments in the event
Definition: MuonCalibEvent.cxx:46
MuonCalibTruthCollection.h
MuonCalib::MuonCalibEvent::~MuonCalibEvent
virtual ~MuonCalibEvent()
Destructor.
MuonCalib::MuonCalibEvent::setMuonCalibPatternVec
void setMuonCalibPatternVec(MuonCalibEvent::MCPVec mcpvec)
set the MuonCalibPatternVec
Definition: MuonCalibEvent.cxx:79
MuonCalib::MuonCalibEventInfo
Definition: MuonCalibEventInfo.h:32
DeleteObject.h
MuonCalib::MuonCalibEvent::setMuonCalibEventInfo
void setMuonCalibEventInfo(std::shared_ptr< MuonCalibEventInfo > eventInfo)
set the MuonCalibEventInfo
Definition: MuonCalibEvent.cxx:39
MuonCalib::MuonCalibEvent::setMuonCalibRawTriggerHitCollection
void setMuonCalibRawTriggerHitCollection(std::shared_ptr< const MuonCalibRawTriggerHitCollection > THColl)
set the MuonCalibRawTriggerHitCollection.
Definition: MuonCalibEvent.cxx:76
MuonCalibRawHitCollection.h
MuonCalib::MuonCalibEvent::m_rpcSlLogicContainer
std::shared_ptr< const RpcSectorLogicContainer > m_rpcSlLogicContainer
RpcSectorLogicContainer.
Definition: MuonCalibEvent.h:104
MuonCalib::MuonCalibEvent::numberOfPatterns
int numberOfPatterns() const
retrieve the number of MuonCalibPatterns in the event
Definition: MuonCalibEvent.cxx:44
MuonCalib::MuonCalibEvent::pattern
MCPVec & pattern()
Retrieving the MuonCalibPattern container.
Definition: MuonCalibEvent.cxx:29
MuonCalib::MuonCalibEvent::PatternPtr
std::shared_ptr< MuonCalibPattern > PatternPtr
Definition: MuonCalibEvent.h:50
MuonCalibEvent.h
MuonCalib::MuonCalibTriggerTimeInfo
Definition: MuonCalibTriggerTimeInfo.h:14
MuonCalibRawTriggerHitCollection.h