ATLAS Offline Software
Loading...
Searching...
No Matches
ClusterId.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DCMATH_CLUSTERID_H
6#define DCMATH_CLUSTERID_H
7
8#include <ostream>
9
10namespace TrkDriftCircleMath {
11
12 class ClusterId {
13 public:
14 static constexpr int stationOffSet = 1000000;
15 static constexpr int etaOffSet = 10000;
16 static constexpr int phiOffSet = 100;
17 ClusterId() = default;
18 ClusterId(int stName, int eta, int phi, int barrel, int measuresPhi) {
20 }
21
22 int id() const { return m_id; }
23 int stName() const { return m_id / stationOffSet; }
24 int eta() const { return (m_id % stationOffSet) / etaOffSet; }
25 int phi() const { return (m_id % etaOffSet) / phiOffSet; }
26 int isTgc() const { return (m_id % phiOffSet) / 10; }
27 int measuresPhi() const { return m_id % 10; }
28
29 private:
30 int m_id{0};
31 };
32
33 std::ostream& operator<<(std::ostream& os, const TrkDriftCircleMath::ClusterId& id);
34
35} // namespace TrkDriftCircleMath
36
37#endif
static constexpr int stationOffSet
Definition ClusterId.h:14
ClusterId(int stName, int eta, int phi, int barrel, int measuresPhi)
Definition ClusterId.h:18
static constexpr int etaOffSet
Definition ClusterId.h:15
static constexpr int phiOffSet
Definition ClusterId.h:16
Function object to check whether two Segments are sub/super sets or different.
std::ostream & operator<<(std::ostream &os, const TrkDriftCircleMath::ClusterId &id)
Definition ClusterId.cxx:9