Project
Loading...
Searching...
No Matches
Hit.cxx
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#include <ECalBase/Hit.h>
18
20
21using namespace o2::ecal;
22
23bool Hit::operator<(const Hit& rhs) const
24{
25 if (GetTrackID() != rhs.GetTrackID()) {
26 return GetTrackID() < rhs.GetTrackID();
27 }
28 return GetCellID() < rhs.GetCellID();
29}
30
31bool Hit::operator==(const Hit& rhs) const
32{
33 return (GetCellID() == rhs.GetCellID()) && (GetTrackID() == rhs.GetTrackID());
34}
MC hit class to store energy loss per cell and per superparent.
ClassImp(o2::ecal::Hit)
int GetTrackID() const
Definition BaseHits.h:30
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
bool operator<(const Hit &rhs) const
Sorting points according to parent particle and detector volume.
Definition Hit.cxx:23