ATLAS Offline Software
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 
12 namespace 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;
42  bool m_isMatch;
43  int m_barcode;
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;
75  bool m_isMatch;
76  int m_barcode;
77  int m_eit;
78  int m_pit;
79  };
80 
81 }
82 
83 #endif
ClusterSeg::Cluster::m_tIndex
Muon::MuonStationIndex::TechnologyIndex m_tIndex
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:40
ClusterSeg::Cluster::theta
double theta() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:25
ClusterSeg::Cluster::m_isPhi
bool m_isPhi
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:39
ClusterSeg::SpacePoint
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:48
ClusterSeg::SpacePoint::x
double x() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:52
ClusterSeg::Cluster::z
double z() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:21
ClusterSeg::Cluster::m_barcode
int m_barcode
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:43
ClusterSeg::Cluster::m_z
double m_z
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:38
ClusterSeg::Cluster::x
double x() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:19
ClusterSeg::SpacePoint::phi
double phi() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:57
ClusterSeg::Cluster::m_y
double m_y
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:37
ClusterSeg::SpacePoint::isTGC
bool isTGC(int num) const
ClusterSeg::SpacePoint::rSph
double rSph() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:55
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
ClusterSeg::SpacePoint::m_pIndex
Muon::MuonStationIndex::PhiIndex m_pIndex
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:74
ClusterSeg::SpacePoint::techIndex
Muon::MuonStationIndex::TechnologyIndex techIndex() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:60
ClusterSeg::SpacePoint::pit
int pit() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:65
ClusterSeg::SpacePoint::m_isMatch
bool m_isMatch
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:75
ClusterSeg::Cluster::m_x
double m_x
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:36
ClusterSeg::Cluster::m_pIndex
Muon::MuonStationIndex::PhiIndex m_pIndex
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:41
ClusterSeg::Cluster::isSideA
bool isSideA() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:34
ClusterSeg::SpacePoint::eta
double eta() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:59
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ClusterSeg::Cluster::techIndex
Muon::MuonStationIndex::TechnologyIndex techIndex() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:28
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
ClusterSeg::Cluster::barcode
int barcode() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:31
ClusterSeg::Cluster::m_chamberId
std::string m_chamberId
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:44
ClusterSeg::SpacePoint::SpacePoint
SpacePoint(double eta_, double phi_, double z_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_, int barcode_, int eit_, int pit_)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/src/Cluster.cxx:17
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
ClusterSeg
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:12
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
ClusterSeg::SpacePoint::phiIndex
Muon::MuonStationIndex::PhiIndex phiIndex() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:61
ClusterSeg::Cluster::rCyl
double rCyl() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:23
ClusterSeg::Cluster::y
double y() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:20
ClusterSeg::SpacePoint::y
double y() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:53
ClusterSeg::SpacePoint::m_pit
int m_pit
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:78
ClusterSeg::SpacePoint::isRPC
bool isRPC(int num) const
ClusterSeg::SpacePoint::m_barcode
int m_barcode
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:76
ClusterSeg::SpacePoint::z
double z() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:54
ClusterSeg::Cluster
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:14
ClusterSeg::Cluster::isMatch
bool isMatch() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:30
ClusterSeg::Cluster::Cluster
Cluster(double x_, double y_, double z_, bool isPhi_, Muon::MuonStationIndex::TechnologyIndex tIndex_, Muon::MuonStationIndex::PhiIndex pIndex_, bool isMatch_, int barcode_)
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/src/Cluster.cxx:14
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
ClusterSeg::SpacePoint::m_tIndex
Muon::MuonStationIndex::TechnologyIndex m_tIndex
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:73
ClusterSeg::Cluster::m_isMatch
bool m_isMatch
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:42
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
ClusterSeg::Cluster::rSph
double rSph() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:22
ClusterSeg::Cluster::phi
double phi() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:24
ClusterSeg::SpacePoint::barcode
int barcode() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:63
ClusterSeg::SpacePoint::theta
double theta() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:58
ClusterSeg::SpacePoint::rCyl
double rCyl() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:56
ClusterSeg::SpacePoint::isMatch
bool isMatch() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:62
ClusterSeg::SpacePoint::m_eit
int m_eit
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:77
ClusterSeg::SpacePoint::eit
int eit() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:64
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
ClusterSeg::Cluster::eta
double eta() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:26
ClusterSeg::SpacePoint::m_eta
double m_eta
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:70
MuonStationIndex.h
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
ClusterSeg::Cluster::phiIndex
Muon::MuonStationIndex::PhiIndex phiIndex() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:29
Muon::MuonStationIndex::TechnologyIndex
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:54
ClusterSeg::SpacePoint::m_z
double m_z
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:72
ClusterSeg::SpacePoint::m_phi
double m_phi
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:71
ClusterSeg::Cluster::isPhi
bool isPhi() const
Definition: MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonLinearSegmentMakerUtilities/MuonLinearSegmentMakerUtilities/Cluster.h:27