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
12#ifndef O2_MCH_SIMULATION_HIT_H
13#define O2_MCH_SIMULATION_HIT_H
14
17
18namespace o2
19{
20namespace mch
21{
22
23class Hit : public ::o2::BasicXYZEHit<float>
24{
25
26 public:
28 float eloss = 0.0, float length = 0.0, float entranceTof = 0.0, float eTot = 0.0)
29 : ::o2::BasicXYZEHit<float>(entrancePoint.x(), entrancePoint.y(), entrancePoint.z(), entranceTof, eloss, trackId, detElemId), mLength{length}, mExitPoint(exitPoint), mEtot{eTot}
30 {
31 }
32
34 math_utils::Point3D<float> exitPoint() const { return mExitPoint; }
35
36 // time in s
37 float entranceTof() const { return GetTime(); }
38 // particle energy in GeV
39 float eTot() const { return mEtot; }
40
41 short detElemId() const { return GetDetectorID(); }
42
43 private:
44 float mLength = {};
45 math_utils::Point3D<float> mExitPoint = {};
46 float mEtot = {};
47 ClassDefNV(Hit, 1);
48};
49
50} // namespace mch
51} // namespace o2
52
53#ifdef USESHM
54namespace std
55{
56template <>
57class allocator<o2::mch::Hit> : public o2::utils::ShmAllocator<o2::mch::Hit>
58{
59};
60} // namespace std
61#endif
62
63#endif
math_utils::Point3D< T > GetPos() const
Definition BaseHits.h:67
E GetTime() const
Definition BaseHits.h:71
short GetDetectorID() const
Definition BaseHits.h:73
float eTot() const
Definition Hit.h:39
float entranceTof() const
Definition Hit.h:37
Hit(int trackId=0, short detElemId=0, math_utils::Point3D< float > entrancePoint={}, const math_utils::Point3D< float > exitPoint={}, float eloss=0.0, float length=0.0, float entranceTof=0.0, float eTot=0.0)
Definition Hit.h:27
short detElemId() const
Definition Hit.h:41
math_utils::Point3D< float > exitPoint() const
Definition Hit.h:34
math_utils::Point3D< float > entrancePoint() const
Definition Hit.h:33
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint GLsizei GLsizei * length
Definition glcorearb.h:790
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.