ATLAS Offline Software
MuonTrackSummaryCnv_p2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 
9  Trk::MuonTrackSummary *transObj, MsgStream &/*log*/ )
10 {
11  transObj->m_nscatterers = persObj->m_nscatterers;
12  transObj->m_npseudoMeasurements = persObj->m_npseudoMeasurements;
13 
14  unsigned int size = persObj->m_isMdt.size();
15  transObj->m_chamberHitSummary.clear();
16  transObj->m_chamberHitSummary.reserve(size);
17  unsigned int i=0;
18  unsigned int j=0;
19  for ( ; i<size ; ++i, j+=11 ){
20  transObj->m_chamberHitSummary.emplace_back(Identifier(persObj->m_data[j]),persObj->m_isMdt[i]);
21  Trk::MuonTrackSummary::ChamberHitSummary& chamb_summary = transObj->m_chamberHitSummary.back();
22 
23  chamb_summary.m_first.nhits = persObj->m_data[j+1];
24  chamb_summary.m_first.nholes = persObj->m_data[j+2];
25  chamb_summary.m_first.noutliers = persObj->m_data[j+3];
26  chamb_summary.m_first.ndeltas = persObj->m_data[j+4];
27  chamb_summary.m_first.ncloseHits = persObj->m_data[j+5];
28 
29  chamb_summary.m_second.nhits = persObj->m_data[j+6];
30  chamb_summary.m_second.nholes = persObj->m_data[j+7];
31  chamb_summary.m_second.noutliers = persObj->m_data[j+8];
32  chamb_summary.m_second.ndeltas = persObj->m_data[j+9];
33  chamb_summary.m_second.ncloseHits = persObj->m_data[j+10];
34  }
35 }
36 
38  Trk::MuonTrackSummary_p2 *persObj, MsgStream &/*log*/ )
39 {
40  persObj->m_nscatterers = transObj->m_nscatterers;
41  persObj->m_npseudoMeasurements = transObj->m_npseudoMeasurements;
42 
43  unsigned int size = transObj->m_chamberHitSummary.size();
44 
45  //resize vectors
46  persObj->m_data.resize(size*11);
47  persObj->m_isMdt.resize(size,0);
48 
49  unsigned int i=0;
50  unsigned int j=0;
52  transObj->chamberHitSummary())
53  {
54  persObj->m_isMdt[i] = s.isMdt() ;
55 
56  persObj->m_data[j] = s.chamberId().get_identifier32().get_compact();
57 
58  persObj->m_data[j+1] = s.mdtMl1().nhits ;
59  persObj->m_data[j+2] = s.mdtMl1().nholes ;
60  persObj->m_data[j+3] = s.mdtMl1().noutliers ;
61  persObj->m_data[j+4] = s.mdtMl1().ndeltas ;
62  persObj->m_data[j+5] = s.mdtMl1().ncloseHits ;
63 
64  persObj->m_data[j+6] = s.mdtMl2().nhits ;
65  persObj->m_data[j+7] = s.mdtMl2().nholes ;
66  persObj->m_data[j+8] = s.mdtMl2().noutliers ;
67  persObj->m_data[j+9] = s.mdtMl2().ndeltas ;
68  persObj->m_data[j+10]= s.mdtMl2().ncloseHits ;
69 
70  ++i;
71  j += 11;
72  }
73 }
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
MuonTrackSummaryCnv_p2::transToPers
virtual void transToPers(const Trk ::MuonTrackSummary *transObj, Trk ::MuonTrackSummary_p2 *persObj, MsgStream &log)
Definition: MuonTrackSummaryCnv_p2.cxx:37
MuonTrackSummary.h
Trk::MuonTrackSummary::m_npseudoMeasurements
unsigned int m_npseudoMeasurements
Definition: MuonTrackSummary.h:156
Trk::MuonTrackSummary_p2::m_npseudoMeasurements
unsigned int m_npseudoMeasurements
Definition: MuonTrackSummary_p2.h:17
Trk::MuonTrackSummary::ChamberHitSummary::m_second
Projection m_second
Definition: MuonTrackSummary.h:117
Trk::MuonTrackSummary::ChamberHitSummary::Projection::nhits
int nhits
Definition: MuonTrackSummary.h:40
Trk::MuonTrackSummary::ChamberHitSummary::Projection::nholes
int nholes
Definition: MuonTrackSummary.h:41
Trk::MuonTrackSummary::ChamberHitSummary::Projection::ncloseHits
int ncloseHits
Definition: MuonTrackSummary.h:44
Trk::MuonTrackSummary::ChamberHitSummary
structure to hold information per chamber in the muon system
Definition: MuonTrackSummary.h:32
Trk::MuonTrackSummary::m_chamberHitSummary
std::vector< ChamberHitSummary > m_chamberHitSummary
Definition: MuonTrackSummary.h:157
Trk::MuonTrackSummary::m_nscatterers
unsigned int m_nscatterers
Definition: MuonTrackSummary.h:155
Trk::MuonTrackSummary::chamberHitSummary
const std::vector< ChamberHitSummary > & chamberHitSummary() const
access to the vector of chamber hit summaries on the track
Definition: MuonTrackSummary.h:148
Trk::MuonTrackSummary::ChamberHitSummary::m_first
Projection m_first
Definition: MuonTrackSummary.h:116
Trk::MuonTrackSummary_p2::m_data
std::vector< int > m_data
For each chamber we have 11 numbers, comprising of:
Definition: MuonTrackSummary_p2.h:38
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::MuonTrackSummary::ChamberHitSummary::Projection::ndeltas
int ndeltas
Definition: MuonTrackSummary.h:43
Trk::MuonTrackSummary::ChamberHitSummary::Projection::noutliers
int noutliers
Definition: MuonTrackSummary.h:42
MuonTrackSummaryCnv_p2::persToTrans
virtual void persToTrans(const Trk ::MuonTrackSummary_p2 *persObj, Trk ::MuonTrackSummary *transObj, MsgStream &log)
Definition: MuonTrackSummaryCnv_p2.cxx:8
Trk::MuonTrackSummary_p2::m_isMdt
std::vector< bool > m_isMdt
Definition: MuonTrackSummary_p2.h:20
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
MuonTrackSummaryCnv_p2.h
Trk::MuonTrackSummary_p2
Definition: MuonTrackSummary_p2.h:12
Trk::MuonTrackSummary_p2::m_nscatterers
unsigned int m_nscatterers
Definition: MuonTrackSummary_p2.h:16
Identifier
Definition: IdentifierFieldParser.cxx:14