ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CLUSTER_H
6#define CLUSTER_H
7
8#include <math.h>
9#include <string>
11
12namespace ClusterSeg {
13
14 struct Cluster {
15
16 Cluster( double x_, double y_, double z_, bool isPhi_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_ ,int barcode_);
17 Cluster( double x_, double y_, double z_, bool isPhi_, int tIndex_, int pIndex_, bool isMatch_ ,int barcode_);
18
19 double x() const {return m_x;}
20 double y() const {return m_y;}
21 double z() const {return m_z;}
22 double rSph() const {return sqrt(m_x*m_x+m_y*m_y+m_z*m_z);}
23 double rCyl() const {return sqrt(m_x*m_x+m_y*m_y);}
24 double phi() const {return atan2(m_y,m_x);}
25 double theta() const {return acos(m_z/(this->rSph()));}
26 double eta() const {return -log(tan(this->theta()/2.));}
27 bool isPhi() const {return m_isPhi;}
30 bool isMatch() const {return m_isMatch;}
31 int barcode() const {return m_barcode;}
32
33
34 bool isSideA() const {if (m_z > 0.) return true; else return false;}
35
36 double m_x;
37 double m_y;
38 double m_z;
39 bool m_isPhi;
44 std::string m_chamberId;
45
46 };
47
48 struct SpacePoint {
49
50 SpacePoint( double eta_, double phi_, double z_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_ ,int barcode_,int eit_, int pit_);
51
52 double x() const {return this->rSph()*sin(this->theta())*cos(this->phi());}
53 double y() const {return this->rSph()*sin(this->theta())*sin(this->phi());}
54 double z() const {return m_z;}
55 double rSph() const {return m_z/cos(this->theta());}
56 double rCyl() const {return sqrt(pow(this->x(),2)+pow(this->y(),2));}
57 double phi() const {return m_phi;}
58 double theta() const {return 2*atan(exp(-1*this->eta()));}
59 double eta() const {return m_eta;}
62 bool isMatch() const {return m_isMatch;}
63 int barcode() const {return m_barcode;}
64 int eit() const {return m_eit;}
65 int pit() const {return m_pit;}
66
67 bool isTGC(int num) const;
68 bool isRPC(int num) const;
69
70 double m_eta;
71 double m_phi;
72 double m_z;
77 int m_eit;
78 int m_pit;
79 };
80
81}
82
83#endif
constexpr int pow(int base, int exp) noexcept
TechnologyIndex
enum to classify the different layers in the muon spectrometer
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Cluster(double x_, double y_, double z_, bool isPhi_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_, int barcode_)
SpacePoint(double eta_, double phi_, double z_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_, int barcode_, int eit_, int pit_)
bool isRPC(int num) const
bool isTGC(int num) const