Project
Loading...
Searching...
No Matches
Hit.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef O2_MID_SIMULATION_HIT_H
18#define O2_MID_SIMULATION_HIT_H
19
20#include <ostream>
23
24namespace o2
25{
26namespace mid
27{
28
29class Hit : public ::o2::BasicXYZEHit<float>
30{
31
32 public:
33 Hit(int trackId = 0, short deId = 0, math_utils::Point3D<float> entrancePoint = {}, math_utils::Point3D<float> exitPoint = {},
34 float eloss = 0.0, float length = 0.0, float tof = 0.0);
35
37 math_utils::Point3D<float> exitPoint() const { return mExitPoint; }
39
40 short detElemId() const { return GetDetectorID(); }
41
42 private:
43 float mLength = {};
44 math_utils::Point3D<float> mExitPoint = {};
45 ClassDefNV(Hit, 1);
46};
47
48inline std::ostream& operator<<(std::ostream& stream, const Hit& hit)
49{
50 stream << "Track = " << hit.GetTrackID() << ", DE = " << hit.GetDetectorID() << ", entrancePoint = " << hit.entrancePoint() << ", exitPoint = " << hit.exitPoint();
51 return stream;
52}
53
54} // namespace mid
55} // namespace o2
56
57#ifdef USESHM
58namespace std
59{
60template <>
61class allocator<o2::mid::Hit> : public o2::utils::ShmAllocator<o2::mid::Hit>
62{
63};
64} // namespace std
65#endif
66
67#endif
int GetTrackID() const
Definition BaseHits.h:30
math_utils::Point3D< T > GetPos() const
Definition BaseHits.h:67
short GetDetectorID() const
Definition BaseHits.h:73
math_utils::Point3D< float > entrancePoint() const
Definition Hit.h:36
math_utils::Point3D< float > exitPoint() const
Definition Hit.h:37
math_utils::Point3D< float > middlePoint() const
Definition Hit.cxx:30
short detElemId() const
Definition Hit.h:40
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &os, const Cluster &data)
Definition Cluster.cxx:27
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.