ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonSimData
MuonSimData
MuonSimData.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/***************************************************************************
6
Simulation data object associated with an MuonRawData object
7
Adapated from the InnerDetector by Ketevi A. Assamagan
8
------------------------------------------------------
9
ATLAS Collaboration
10
***************************************************************************
11
An object of this class stores the simulation information associated with
12
a RawData object, in two data members.
13
14
One is an integer, the "simulation data word", in which is packed
15
information summarizing the digitization. Its interpretation may depend on
16
which of the three subdetectors is concerned, but will typically contain
17
bit-flags for "noise", "lost in readout", etc.
18
19
The other consists of a number (normally only one) of pair<int, float>
20
specifying the barcode and one additional piece of information depending
21
on the Muon technology: it could deposited energy (charge), hit time, to
22
be associated to a particular Muon Digit. - Ketevi A. Assamagan
23
Encoding and decoding methods will be supplied outside this class.
24
25
The implementation emphasizes compactness in memory, at the expense of speed,
26
because objects of this class will be persistent, but will not be accessed
27
in real production running.
28
29
// $Id: MuonSimData.h,v 1.4 2004-07-03 09:04:40 ketevi Exp $
30
31
------
32
Changed by Niels van Eldik <nveldik@nikhef.nl> 2004/06/03
33
34
- Added MuonMCData, which allows the storage of two values per Deposit
35
(needed by the MDT's: radius + local z position)
36
37
***************************************************************************/
38
39
#ifndef MUONSIMDATA_MuonSimData_H
40
# define MUONSIMDATA_MuonSimData_H
41
42
class
MuonMCData
{
43
public
:
44
MuonMCData
() :
m_first
(0.),
m_second
(0.) {};
45
MuonMCData
(
double
f,
float
s) :
m_first
(f),
m_second
(s) {};
46
47
void
SetData
(
double
f,
float
s) {
m_first
= f;
m_second
= s ;}
48
double
firstEntry
()
const
{
return
m_first
; }
49
float
secondEntry
()
const
{
return
m_second
; }
50
void
addToFirstEntry
(
const
double
fEntry) {
m_first
+= fEntry; }
51
void
addToSecondEntry
(
const
float
sEntry) {
m_second
+= sEntry; }
52
private
:
53
double
m_first
;
54
float
m_second
;
55
};
56
57
#include <utility>
58
#include <vector>
59
#include "
GeneratorObjects/HepMcParticleLink.h
"
60
#include "
GeoPrimitives/GeoPrimitives.h
"
61
62
class
MuonSimData
{
63
64
public
:
65
66
typedef
std::pair<HepMcParticleLink, MuonMCData>
Deposit
;
// A particle link, and two
67
// other values relevent for the subsystem
68
MuonSimData
();
69
MuonSimData
(
const
std::vector< Deposit >&
deposits
,
int
simDataWord = 0);
70
MuonSimData
(std::vector< Deposit >&&
deposits
,
int
simDataWord = 0);
71
int
word
()
const
;
// Get the packed simdata word
72
void
deposits
(std::vector<Deposit>&
deposits
)
const
;
// Get the Deposits
73
const
std::vector< Deposit >&
getdeposits
()
const
;
74
void
setPosition
(
const
Amg::Vector3D
& pos);
75
const
Amg::Vector3D
globalPosition
()
const
;
76
void
setTime
(
const
float
& time);
77
float
getTime
()
const
;
78
79
private
:
80
int
m_word
;
81
std::vector<Deposit>
m_deposits
;
82
float
m_x
;
83
float
m_y
;
84
float
m_z
;
85
float
m_t
;
86
};
87
88
89
inline
int
MuonSimData::word
()
const
90
{
91
return
m_word
& 0x1fffffff;
92
}
93
94
inline
const
std::vector< MuonSimData::Deposit >&
MuonSimData::getdeposits
()
const
95
{
96
return
m_deposits
;
97
}
98
99
inline
void
MuonSimData::deposits
(std::vector< MuonSimData::Deposit>&
deposits
)
const
100
{
101
deposits
=
m_deposits
;
102
return
;
103
}
104
105
106
inline
void
MuonSimData::setPosition
(
const
Amg::Vector3D
& pos)
107
{
108
m_x
= pos.x();
109
m_y
= pos.y();
110
m_z
= pos.z();
111
}
112
113
inline
const
Amg::Vector3D
MuonSimData::globalPosition
()
const
114
{
115
Amg::Vector3D
globPos(
m_x
,
m_y
,
m_z
);
116
return
globPos;
117
}
118
119
inline
void
MuonSimData::setTime
(
const
float
& time)
120
{
121
m_t
=time;
122
}
123
124
inline
float
MuonSimData::getTime
()
const
125
{
126
float
time=
m_t
;
127
return
time;
128
}
129
130
#endif
// MUONSIMDATA_MuonSimData_H
131
GeoPrimitives.h
HepMcParticleLink.h
MuonMCData::SetData
void SetData(double f, float s)
Definition
MuonSimData.h:47
MuonMCData::secondEntry
float secondEntry() const
Definition
MuonSimData.h:49
MuonMCData::MuonMCData
MuonMCData(double f, float s)
Definition
MuonSimData.h:45
MuonMCData::m_second
float m_second
Definition
MuonSimData.h:54
MuonMCData::addToSecondEntry
void addToSecondEntry(const float sEntry)
Definition
MuonSimData.h:51
MuonMCData::m_first
double m_first
Definition
MuonSimData.h:53
MuonMCData::addToFirstEntry
void addToFirstEntry(const double fEntry)
Definition
MuonSimData.h:50
MuonMCData::MuonMCData
MuonMCData()
Definition
MuonSimData.h:44
MuonMCData::firstEntry
double firstEntry() const
Definition
MuonSimData.h:48
MuonSimData::word
int word() const
Definition
MuonSimData.h:89
MuonSimData::m_x
float m_x
Definition
MuonSimData.h:82
MuonSimData::m_y
float m_y
Definition
MuonSimData.h:83
MuonSimData::m_word
int m_word
Definition
MuonSimData.h:80
MuonSimData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition
MuonSimData.h:94
MuonSimData::m_deposits
std::vector< Deposit > m_deposits
Definition
MuonSimData.h:81
MuonSimData::MuonSimData
MuonSimData()
Definition
MuonSimData.cxx:17
MuonSimData::deposits
void deposits(std::vector< Deposit > &deposits) const
Definition
MuonSimData.h:99
MuonSimData::setTime
void setTime(const float &time)
Definition
MuonSimData.h:119
MuonSimData::globalPosition
const Amg::Vector3D globalPosition() const
Definition
MuonSimData.h:113
MuonSimData::Deposit
std::pair< HepMcParticleLink, MuonMCData > Deposit
Definition
MuonSimData.h:66
MuonSimData::m_z
float m_z
Definition
MuonSimData.h:84
MuonSimData::m_t
float m_t
Definition
MuonSimData.h:85
MuonSimData::setPosition
void setPosition(const Amg::Vector3D &pos)
Definition
MuonSimData.h:106
MuonSimData::getTime
float getTime() const
Definition
MuonSimData.h:124
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
Generated on
for ATLAS Offline Software by
1.17.0