ATLAS Offline Software
Loading...
Searching...
No Matches
CscSimData.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// CscSimData.h
6
7// CSC simulation data object associated with an MuonRawData object
8
9// D. Adams
10// March 2007
11//
12// Modification of a copy of MuonSimData.
13
14#ifndef MUONSIMDATA_CscSimData_H
15#define MUONSIMDATA_CscSimData_H
16
17// An object of this type will be constructed for each step
18// contributing to each hit strip.
19// energy = energy deposited in step
20// (ypos, zpos) = transverse position where step crosses wire plane
21// charge = charge on strip for the first hit for the strip;
22// otherwise zero
23class CscMcData {
24public:
25 CscMcData() : m_energy(-9999.), m_ypos(-9999.), m_zpos(-9999.), m_charge(0.0) { }
26 CscMcData(float energy, float ypos, float zpos)
28 void setCharge(float chg) { m_charge = chg; }
29 float energy() const { return m_energy; }
30 float ypos() const { return m_ypos; }
31 float zpos() const { return m_zpos; }
32 float charge() const { return m_charge; }
33private:
34 float m_energy;
35 float m_ypos;
36 float m_zpos;
37 float m_charge;
38};
39
40#include <utility>
41#include <vector>
43
45
46public:
47 typedef std::pair<HepMcParticleLink, CscMcData> Deposit;
48
49public:
50 CscSimData();
51 CscSimData (const std::vector<Deposit>& deposits, int simDataWord =0);
52 CscSimData ( std::vector<Deposit>&& deposits, int simDataWord =0);
53 int word() const; // Get the packed simdata word
54 void deposits(std::vector<Deposit>& deposits) const; // Get the Deposits
55 const std::vector< Deposit >& getdeposits() const;
56
57private:
58 int m_word;
59 std::vector<Deposit> m_deposits;
60};
61
62
63inline int CscSimData::word() const {
64 return m_word & 0x1fffffff;
65}
66
67inline const std::vector<CscSimData::Deposit>& CscSimData::getdeposits() const {
68 return m_deposits;
69}
70
71inline void CscSimData::deposits(std::vector<CscSimData::Deposit>& deposits) const {
73 return;
74}
75
76#endif // MUONSIMDATA_CscSimData_H
77
float charge() const
Definition CscSimData.h:32
CscMcData(float energy, float ypos, float zpos)
Definition CscSimData.h:26
float m_ypos
Definition CscSimData.h:35
float ypos() const
Definition CscSimData.h:30
void setCharge(float chg)
Definition CscSimData.h:28
float m_energy
Definition CscSimData.h:34
float m_charge
Definition CscSimData.h:37
float energy() const
Definition CscSimData.h:29
float zpos() const
Definition CscSimData.h:31
float m_zpos
Definition CscSimData.h:36
int word() const
Definition CscSimData.h:63
const std::vector< Deposit > & getdeposits() const
Definition CscSimData.h:67
void deposits(std::vector< Deposit > &deposits) const
Definition CscSimData.h:71
std::pair< HepMcParticleLink, CscMcData > Deposit
Definition CscSimData.h:47
std::vector< Deposit > m_deposits
Definition CscSimData.h:59