ATLAS Offline Software
Loading...
Searching...
No Matches
InDetSimData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 Simulation data object associated with an InDetRawData object
7 ------------------------------------------------------
8 ATLAS Collaboration
9 ***************************************************************************
10 An object of this class stores the simulation information associated with
11 a RawData object, in two data members.
12
13 One is an integer, the "simulation data word", in which is packed
14 information summarizing the digitization. Its interpretation may depend on
15 which of the three subdetectors is concerned, but will typically contain
16 bit-flags for "noise", "lost in readout", etc.
17
18 The other consists of a number (normally only one) of pair<int, float>
19 specifying the barcode and energy (charge) deposited by a charged particle,
20 or rather that part of the charge attributed to the corresponding RDO.
21 Encoding and decoding methods will be supplied outside this class.
22
23 The implementation emphasizes compactness in memory, at the expense of speed,
24 because objects of this class will be persistent, but will not be accessed
25 in real production running.
26
27 ***************************************************************************/
28
29// $Id: InDetSimData.h,v 1.15 2004-07-08 20:57:03 costanzo Exp $
30
31#ifndef INDETSIMDATA_InDetSimData_H
32# define INDETSIMDATA_InDetSimData_H
33
34//#include "InDetSimData/PixelSimHelper.h"
35#include <utility>
36#include <vector>
38
39class PixelSimHelper;
40
41class InDetSimData final
42{
43 friend class PixelSimHelper;
44 friend class SCT_SimHelper;
45 friend class TRT_SimHelper;
46
47public:
48 typedef std::pair<HepMcParticleLink, float> Deposit; // A particle link, and the
49 // energy (charge) which its hits contribute to the current RDO.
51 InDetSimData(InDetSimData&& other) noexcept = default;
52 InDetSimData (const std::vector< Deposit >& deposits, int simDataWord = 0);
53 InDetSimData (std::vector< Deposit >&& deposits, int simDataWord = 0);
54 InDetSimData (const InDetSimData& other);
55 InDetSimData &operator=(const InDetSimData& other);
56 InDetSimData &operator=(InDetSimData&& other) noexcept;
57 ~InDetSimData() = default;
58 int word() const; // Get the packed simdata word
59 void deposits(std::vector<Deposit>& deposits) const; // Get the Deposits
60 //std::vector< Deposit > getdeposits() const; // for some reason I can't get this to return by reference! It won't compile. EJWM
61 const std::vector< Deposit >& getdeposits() const;
62
63private:
64 int m_word;
65 // Deposit* m_p_deposits; but use vector meantime, needs more work
66 std::vector<Deposit> m_deposits;
67};
68
69inline int InDetSimData::word() const
70{
71 return m_word & 0x1fffffff;
72}
73
74inline const std::vector< InDetSimData::Deposit >& InDetSimData::getdeposits() const
75{
76 return m_deposits;
77}
78
79inline void InDetSimData::deposits(std::vector< InDetSimData::Deposit>& deposits) const
80{
81 // I really don't understand what the point of this is ... it does EXACTLY the same as the getdeposits() method, just in a different way. EJWM
83 return;
84}
85
86#endif // INDETSIMDATA_InDetSimData_H
InDetSimData & operator=(const InDetSimData &other)
~InDetSimData()=default
friend class PixelSimHelper
int word() const
std::pair< HepMcParticleLink, float > Deposit
void deposits(std::vector< Deposit > &deposits) const
friend class TRT_SimHelper
const std::vector< Deposit > & getdeposits() const
std::vector< Deposit > m_deposits
InDetSimData(InDetSimData &&other) noexcept=default
InDetSimData(const InDetSimData &other)
friend class SCT_SimHelper