ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DigitizationCell.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DigitizationCell.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
11 
12 #include <iostream>
13 
14 namespace Acts {
15 
18  virtual ~DigitizationCell() = default;
19 
20  // identification and data
21  size_t channel0 = 0;
22  size_t channel1 = 1;
23  float data = 0.;
24  // connstruct them
25  DigitizationCell(size_t ch0, size_t ch1, float d = 0.)
26  : channel0(ch0), channel1(ch1), data(d) {}
27  // copy them
28  DigitizationCell(const DigitizationCell& dc) = default;
29 
37  virtual void addCell(const DigitizationCell& dc, bool analogueReadout) {
38  if (analogueReadout) {
39  data += dc.data;
40  }
41  }
48  virtual double depositedEnergy() const { return data; }
49 };
50 
53  double stepLength{0.};
54  double driftLength{0.};
55 
60 
62 
65  : stepCell(0, 0),
66  stepEntry(0., 0., 0.),
67  stepExit(0., 0., 0.),
68  stepReadoutProjected(0., 0.),
69  stepCellCenter(0., 0.) {}
70 
80  DigitizationStep(double sl, double dl, const DigitizationCell& dc,
81  const Vector3D& entryP, const Vector3D& exitP,
82  const Vector2D& projectedPosition,
83  const Vector2D& cellPosition)
84  : stepLength(sl),
85  driftLength(dl),
86  stepCell(dc),
87  stepEntry(entryP),
88  stepExit(exitP),
89  stepReadoutProjected(projectedPosition),
90  stepCellCenter(cellPosition) {}
91 };
92 } // namespace Acts