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 
16 
17 namespace MuonCalib {
19  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec) : m_patternVec{std::move(patvec)} {}
20 
21  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec, std::shared_ptr<const MuonCalibRawHitCollection> Coll) :
22  m_patternVec{std::move(patvec)}, m_rawColl{std::move(Coll)} {}
23 
24  MuonCalibEvent::MuonCalibEvent(MuonCalibEvent::MCPVec patvec, std::shared_ptr<MuonCalibEventInfo> eventInfo,
25  std::shared_ptr<const MuonCalibRawHitCollection> Coll) :
26  m_patternVec{std::move(patvec)}, m_eventInfo(std::move(eventInfo)), m_rawColl(std::move(Coll)) {}
27 
30 
37 
38  void MuonCalibEvent::setMuonCalibEventInfo(std::shared_ptr<MuonCalibEventInfo> eventInfo) { m_eventInfo = std::move(eventInfo); }
39  void MuonCalibEvent::setRpcSectorLogicContainer(std::shared_ptr<const RpcSectorLogicContainer> rpcSlContainer) {
40  m_rpcSlLogicContainer = std::move(rpcSlContainer);
41  }
42 
43  int MuonCalibEvent::numberOfPatterns() const { return m_patternVec.size(); }
44 
46  int segs = 0;
47  for (const PatternPtr &pat : pattern()) segs += pat->muonSegments();
48 
49  return segs;
50  }
51 
53  int hits = 0;
54  for (const PatternPtr &pat : pattern()) {
55  hits += pat->nmdtHits() % 1000;
56  hits += (pat->nmdtHits() - (pat->nmdtHits() % 1000)) / 1000;
57  hits += pat->nrpcHits() % 1000;
58  hits += (pat->nrpcHits() - (pat->nrpcHits() % 1000)) / 1000;
59  hits += pat->ntgcHits() % 1000;
60  hits += (pat->ntgcHits() - (pat->ntgcHits() % 1000)) / 1000;
61  hits += pat->ncscHits() % 1000;
62  hits += (pat->ncscHits() - (pat->ncscHits() % 1000)) / 1000;
63  }
64  return hits;
65  }
66  void MuonCalibEvent::setMuonCalibTriggerTimeInfo(std::shared_ptr<const MuonCalibTriggerTimeInfo> triggerTimeInfo) {
68  }
69  void MuonCalibEvent::setMuonCalibTruthCollection(std::shared_ptr<const MuonCalibTruthCollection> MCTColl) {
70  m_truthColl = std::move(MCTColl);
71  }
72  void MuonCalibEvent::setMuonCalibRawHitCollection(std::shared_ptr<const MuonCalibRawHitCollection> RHColl) {
73  m_rawColl = std::move(RHColl);
74  }
75  void MuonCalibEvent::setMuonCalibRawTriggerHitCollection(std::shared_ptr<const MuonCalibRawTriggerHitCollection> THColl) {
76  m_rawTriggerColl = std::move(THColl);
77  }
79 
80 } // 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:32
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonCalib::MuonCalibEvent::eventInfo
const MuonCalibEventInfo & eventInfo() const
Definition: MuonCalibEvent.cxx:34
MuonCalib::MuonCalibEvent::setRpcSectorLogicContainer
void setRpcSectorLogicContainer(std::shared_ptr< const RpcSectorLogicContainer > rpcSlContainer)
set the RpcSectorLogicContainer
Definition: MuonCalibEvent.cxx:39
MuonCalib::MuonCalibTruthCollection
Definition: MuonCalibTruthCollection.h:38
MuonCalib::MuonCalibEvent::setMuonCalibRawHitCollection
void setMuonCalibRawHitCollection(std::shared_ptr< const MuonCalibRawHitCollection > RHColl)
set the MuonCalibRawHitCollection.
Definition: MuonCalibEvent.cxx:72
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:69
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:36
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:52
MuonCalib::MuonCalibEvent::calibTruthCollection
const MuonCalibTruthCollection * calibTruthCollection() const
retrieve the MuonCalibEventInfo.
Definition: MuonCalibEvent.cxx:33
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:66
MuonCalib::MuonCalibEvent::m_rawTriggerColl
std::shared_ptr< const MuonCalibRawTriggerHitCollection > m_rawTriggerColl
raw hits of the MuonCalibEvent
Definition: MuonCalibEvent.h:102
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:31
MuonCalib::MuonCalibEvent::rpcSectorLogicContainer
const RpcSectorLogicContainer * rpcSectorLogicContainer() const
Definition: MuonCalibEvent.cxx:35
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:45
MuonCalibTruthCollection.h
MuonCalib::MuonCalibEvent::~MuonCalibEvent
virtual ~MuonCalibEvent()
Destructor.
MuonCalib::MuonCalibEvent::setMuonCalibPatternVec
void setMuonCalibPatternVec(MuonCalibEvent::MCPVec mcpvec)
set the MuonCalibPatternVec
Definition: MuonCalibEvent.cxx:78
MuonCalib::MuonCalibEventInfo
Definition: MuonCalibEventInfo.h:32
MuonCalib::MuonCalibEvent::setMuonCalibEventInfo
void setMuonCalibEventInfo(std::shared_ptr< MuonCalibEventInfo > eventInfo)
set the MuonCalibEventInfo
Definition: MuonCalibEvent.cxx:38
MuonCalib::MuonCalibEvent::setMuonCalibRawTriggerHitCollection
void setMuonCalibRawTriggerHitCollection(std::shared_ptr< const MuonCalibRawTriggerHitCollection > THColl)
set the MuonCalibRawTriggerHitCollection.
Definition: MuonCalibEvent.cxx:75
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:43
MuonCalib::MuonCalibEvent::pattern
MCPVec & pattern()
Retrieving the MuonCalibPattern container.
Definition: MuonCalibEvent.cxx:28
MuonCalib::MuonCalibEvent::PatternPtr
std::shared_ptr< MuonCalibPattern > PatternPtr
Definition: MuonCalibEvent.h:50
MuonCalibEvent.h
MuonCalib::MuonCalibTriggerTimeInfo
Definition: MuonCalibTriggerTimeInfo.h:14
MuonCalibRawTriggerHitCollection.h