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 ALICEO2_ECAL_HIT_H
18#define ALICEO2_ECAL_HIT_H
19
22
23namespace o2
24{
25namespace ecal
26{
27class Hit : public o2::BasicXYZEHit<float>
28{
29 public:
31 Hit() = default;
32
43 Hit(int trackID, int cellID, const math_utils::Point3D<float>& pos,
44 const math_utils::Vector3D<float>& mom, float tof, float eLoss)
45 : o2::BasicXYZEHit<float>(pos.X(), pos.Y(), pos.Z(), tof, eLoss, trackID, 0),
46 mPvector(mom),
47 mCellID(cellID)
48 {
49 }
50
52 ~Hit() = default;
53
56 bool operator==(const Hit& rhs) const;
57
60 bool operator<(const Hit& rhs) const;
61
64 int GetCellID() const { return mCellID; }
65
66 private:
68 int32_t mCellID;
69 ClassDefNV(Hit, 1);
70};
71
72} // namespace ecal
73} // namespace o2
74
75#ifdef USESHM
76namespace std
77{
78template <>
79class allocator<o2::ecal::Hit> : public o2::utils::ShmAllocator<o2::ecal::Hit>
80{
81};
82} // namespace std
83#endif
84
85#endif // ALICEO2_ECAL_HIT_H
uint16_t pos
Definition RawData.h:3
int GetCellID() const
Get cell ID.
Definition Hit.h:64
bool operator==(const Hit &rhs) const
Check whether the points are from the same parent and in the same detector volume.
Definition Hit.cxx:31
Hit()=default
Default constructor.
bool operator<(const Hit &rhs) const
Sorting points according to parent particle and detector volume.
Definition Hit.cxx:23
~Hit()=default
Destructor.
Hit(int trackID, int cellID, const math_utils::Point3D< float > &pos, const math_utils::Vector3D< float > &mom, float tof, float eLoss)
Hit constructor.
Definition Hit.h:43
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.