ATLAS Offline Software
MMT_Diamond.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 #ifndef MMT_DIAMOND_H
6 #define MMT_DIAMOND_H
7 
9 #include "MMT_Road.h"
10 #include <cmath>
11 #include <vector>
12 
13 struct slope_t {
14  slope_t(int ev=-1, int bc=-1, unsigned int tC=999, unsigned int rC=999, int iX=-1, int iU=-1, int iV=-1, unsigned int uvb=999, unsigned int xb=999,
15  unsigned int uvm=999, unsigned int xm=999, int age=-1, double mxl=999., double my=999., double uavg=999., double vavg=999., double mx=999.,
16  double th=999., double eta=999., double dth=999., char side='-', double phi=999., double phiS=999., bool lowRes=false);
17  unsigned int event;
18  int BC;
19  unsigned int totalCount;
20  unsigned int realCount;
21  int iRoad;
22  int iRoadu;
23  int iRoadv;
24  unsigned int uvbkg;
25  unsigned int xbkg;
26  unsigned int uvmuon;
27  unsigned int xmuon;
28  int age;
29  double mxl;
30  double my;
31  double uavg;
32  double vavg;
33  double mx;
34  double theta;
35  double eta;
36  double dtheta;
37  char side;
38  double phi;
39  double phiShf;
40  bool lowRes;
41 };
42 
43 struct diamond_t {
44  unsigned int wedgeCounter;
45  char sector;
46  char side;
48  std::vector<std::shared_ptr<MMT_Road> > ev_roads;
49  std::vector<slope_t> slopes;
50  std::vector<std::shared_ptr<MMT_Hit> > ev_hits;
51 };
52 
53 class MMT_Diamond : public AthMessaging {
54  public:
55  MMT_Diamond(const MuonGM::MuonDetectorManager* detManager);
56 
57  void clearEvent();
58  void createRoads_fillHits(const unsigned int iterator, std::vector<hitData_entry> &hitDatas, const MuonGM::MuonDetectorManager* detManager, std::shared_ptr<MMT_Parameters> par, const int phi);
59  void findDiamonds(const unsigned int iterator, const int event);
60  double phiShift(const int n, const double phi, const char side) const;
61  const std::vector<diamond_t>& getDiamondVector() const { return m_diamonds; }
62  diamond_t getDiamond(const unsigned int iterator) const { return m_diamonds.at(iterator); }
63  const std::vector<double>& getHitSlopes() const { return m_hitslopes; }
64  std::vector<std::shared_ptr<MMT_Hit> > getHitVector(const unsigned int iterator) const { return m_diamonds.at(iterator).ev_hits; }
65  std::vector<slope_t> getSlopeVector(const unsigned int iterator) const { return m_diamonds.at(iterator).slopes; }
66  unsigned int getDiamondSize() const { return m_diamonds.size(); }
67  int getUVfactor() const { return m_uvfactor; }
68  void resetSlopes();
70  void setUVfactor(int factor) { m_uvfactor = factor; }
71  bool isTrapezoidalShape() const { return m_trapflag; }
72 
73  int getStationPhi() const { return m_phi; }
74  int getRoadSize() const { return m_roadSize; }
75  void setRoadSize(int size) { m_roadSize = size; }
76  int getRoadSizeUpX() const { return m_roadSizeUpX; }
77  void setRoadSizeUpX(int sizeUp) { m_roadSizeUpX = sizeUp; }
78  int getRoadSizeDownX() const { return m_roadSizeDownX; }
79  void setRoadSizeDownX(int sizeDown) { m_roadSizeDownX = sizeDown; }
80  int getRoadSizeUpUV() const { return m_roadSizeUpUV; }
81  void setRoadSizeUpUV(int sizeUpUV) { m_roadSizeUpUV = sizeUpUV; }
82  int getRoadSizeDownUV() const { return m_roadSizeDownUV; }
83  void setRoadSizeDownUV(int sizeDownUV) { m_roadSizeDownUV = sizeDownUV; }
84  char getSector() const { return m_sector; }
85  unsigned int getXthreshold() const { return m_xthr; }
87  bool getUV() const { return m_uvflag; }
88  void setUV(bool flag) { m_uvflag = flag; }
89  unsigned int getUVthreshold() const { return m_uvthr; }
91 
92  private:
94  bool m_trapflag{};
95  int m_uvfactor{};
96  bool m_uvflag{};
98  int m_xthr{}, m_uvthr{};
99  int m_phi{};
100  char m_sector{};
101 
102  std::vector<diamond_t> m_diamonds;
103  std::vector<double> m_hitslopes;
104 };
105 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MMT_Diamond::getSlopeVector
std::vector< slope_t > getSlopeVector(const unsigned int iterator) const
Definition: MMT_Diamond.h:65
slope_t::eta
double eta
Definition: MMT_Diamond.h:35
MMT_Diamond::MMT_Diamond
MMT_Diamond(const MuonGM::MuonDetectorManager *detManager)
Definition: MMT_Diamond.cxx:7
diamond_t::wedgeCounter
unsigned int wedgeCounter
Definition: MMT_Diamond.h:44
MMT_Diamond::setUV
void setUV(bool flag)
Definition: MMT_Diamond.h:88
MMT_Diamond::resetSlopes
void resetSlopes()
Definition: MMT_Diamond.cxx:278
slope_t::BC
int BC
Definition: MMT_Diamond.h:18
MMT_Diamond::getRoadSize
int getRoadSize() const
Definition: MMT_Diamond.h:74
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
slope_t::uavg
double uavg
Definition: MMT_Diamond.h:31
MMT_Diamond::isTrapezoidalShape
bool isTrapezoidalShape() const
Definition: MMT_Diamond.h:71
diamond_t::ev_roads
std::vector< std::shared_ptr< MMT_Road > > ev_roads
Definition: MMT_Diamond.h:48
slope_t::my
double my
Definition: MMT_Diamond.h:30
slope_t::xmuon
unsigned int xmuon
Definition: MMT_Diamond.h:27
MMT_Diamond::getRoadSizeUpUV
int getRoadSizeUpUV() const
Definition: MMT_Diamond.h:80
MMT_Diamond::m_uvfactor
int m_uvfactor
Definition: MMT_Diamond.h:95
MMT_Diamond::setRoadSizeUpX
void setRoadSizeUpX(int sizeUp)
Definition: MMT_Diamond.h:77
slope_t::iRoadu
int iRoadu
Definition: MMT_Diamond.h:22
MMT_Diamond::m_uvthr
int m_uvthr
Definition: MMT_Diamond.h:98
MMT_Diamond::getHitVector
std::vector< std::shared_ptr< MMT_Hit > > getHitVector(const unsigned int iterator) const
Definition: MMT_Diamond.h:64
slope_t::totalCount
unsigned int totalCount
Definition: MMT_Diamond.h:19
MMT_Diamond::getDiamond
diamond_t getDiamond(const unsigned int iterator) const
Definition: MMT_Diamond.h:62
MMT_Diamond
Definition: MMT_Diamond.h:53
slope_t::vavg
double vavg
Definition: MMT_Diamond.h:32
MMT_Diamond::m_sector
char m_sector
Definition: MMT_Diamond.h:100
MMT_Diamond::getUV
bool getUV() const
Definition: MMT_Diamond.h:87
MMT_Diamond::phiShift
double phiShift(const int n, const double phi, const char side) const
Definition: MMT_Diamond.cxx:270
MMT_Diamond::getSector
char getSector() const
Definition: MMT_Diamond.h:84
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MMT_Diamond::getRoadSizeDownUV
int getRoadSizeDownUV() const
Definition: MMT_Diamond.h:82
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MMT_Diamond::createRoads_fillHits
void createRoads_fillHits(const unsigned int iterator, std::vector< hitData_entry > &hitDatas, const MuonGM::MuonDetectorManager *detManager, std::shared_ptr< MMT_Parameters > par, const int phi)
Definition: MMT_Diamond.cxx:22
MMT_Diamond::getDiamondVector
const std::vector< diamond_t > & getDiamondVector() const
Definition: MMT_Diamond.h:61
slope_t::side
char side
Definition: MMT_Diamond.h:37
MMT_Diamond::getDiamondSize
unsigned int getDiamondSize() const
Definition: MMT_Diamond.h:66
MMT_Diamond::m_roadSizeDownX
int m_roadSizeDownX
Definition: MMT_Diamond.h:97
python.TriggerHandler.th
th
Definition: TriggerHandler.py:296
ev
int ev
Definition: globals.cxx:25
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
diamond_t::stationPhi
int stationPhi
Definition: MMT_Diamond.h:47
slope_t::dtheta
double dtheta
Definition: MMT_Diamond.h:36
MMT_Diamond::m_roadSizeUpUV
int m_roadSizeUpUV
Definition: MMT_Diamond.h:97
beamspotman.n
n
Definition: beamspotman.py:731
slope_t::phiShf
double phiShf
Definition: MMT_Diamond.h:39
slope_t::theta
double theta
Definition: MMT_Diamond.h:34
master.flag
bool flag
Definition: master.py:29
MMT_Road.h
slope_t::mx
double mx
Definition: MMT_Diamond.h:33
MMT_Diamond::setTrapezoidalShape
void setTrapezoidalShape(bool flag)
Definition: MMT_Diamond.h:69
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
MMT_Diamond::getXthreshold
unsigned int getXthreshold() const
Definition: MMT_Diamond.h:85
MMT_Diamond::m_roadSize
int m_roadSize
Definition: MMT_Diamond.h:97
MMT_Diamond::setRoadSizeDownUV
void setRoadSizeDownUV(int sizeDownUV)
Definition: MMT_Diamond.h:83
MMT_Diamond::setRoadSizeUpUV
void setRoadSizeUpUV(int sizeUpUV)
Definition: MMT_Diamond.h:81
MMT_Diamond::m_trapflag
bool m_trapflag
Definition: MMT_Diamond.h:94
slope_t::iRoad
int iRoad
Definition: MMT_Diamond.h:21
MMT_Diamond::setXthreshold
void setXthreshold(int threshold)
Definition: MMT_Diamond.h:86
MMT_Diamond::findDiamonds
void findDiamonds(const unsigned int iterator, const int event)
Definition: MMT_Diamond.cxx:110
slope_t::iRoadv
int iRoadv
Definition: MMT_Diamond.h:23
MMT_Diamond::clearEvent
void clearEvent()
Definition: MMT_Diamond.cxx:11
MMT_Diamond::m_roadSizeUpX
int m_roadSizeUpX
Definition: MMT_Diamond.h:97
MMT_Diamond::m_uvflag
bool m_uvflag
Definition: MMT_Diamond.h:96
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
diamond_t
Definition: MMT_Diamond.h:43
diamond_t::sector
char sector
Definition: MMT_Diamond.h:45
threshold
Definition: chainparser.cxx:74
MMT_Diamond::m_xthr
int m_xthr
Definition: MMT_Diamond.h:98
MMT_Diamond::m_hitslopes
std::vector< double > m_hitslopes
Definition: MMT_Diamond.h:103
slope_t::age
int age
Definition: MMT_Diamond.h:28
slope_t::realCount
unsigned int realCount
Definition: MMT_Diamond.h:20
MMT_Diamond::getRoadSizeDownX
int getRoadSizeDownX() const
Definition: MMT_Diamond.h:78
MMT_Diamond::getUVthreshold
unsigned int getUVthreshold() const
Definition: MMT_Diamond.h:89
DataModelTestDataCommonDict::xb
DMTest::CView::Pers_t xb
Definition: DataModelTestDataCommonDict.h:55
checkCorrelInHIST.iX
int iX
Definition: checkCorrelInHIST.py:491
diamond_t::side
char side
Definition: MMT_Diamond.h:46
MMT_Diamond::m_diamonds
std::vector< diamond_t > m_diamonds
Definition: MMT_Diamond.h:102
MMT_Diamond::getStationPhi
int getStationPhi() const
Definition: MMT_Diamond.h:73
MMT_Diamond::setUVthreshold
void setUVthreshold(int threshold)
Definition: MMT_Diamond.h:90
MMT_Diamond::m_roadSizeDownUV
int m_roadSizeDownUV
Definition: MMT_Diamond.h:97
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
MMT_Diamond::getUVfactor
int getUVfactor() const
Definition: MMT_Diamond.h:67
slope_t::slope_t
slope_t(int ev=-1, int bc=-1, unsigned int tC=999, unsigned int rC=999, int iX=-1, int iU=-1, int iV=-1, unsigned int uvb=999, unsigned int xb=999, unsigned int uvm=999, unsigned int xm=999, int age=-1, double mxl=999., double my=999., double uavg=999., double vavg=999., double mx=999., double th=999., double eta=999., double dth=999., char side='-', double phi=999., double phiS=999., bool lowRes=false)
Definition: MMT_Diamond.cxx:282
slope_t::lowRes
bool lowRes
Definition: MMT_Diamond.h:40
AthMessaging.h
slope_t::phi
double phi
Definition: MMT_Diamond.h:38
slope_t::mxl
double mxl
Definition: MMT_Diamond.h:29
MMT_Diamond::m_phi
int m_phi
Definition: MMT_Diamond.h:99
MMT_Diamond::getHitSlopes
const std::vector< double > & getHitSlopes() const
Definition: MMT_Diamond.h:63
MMT_Diamond::setRoadSize
void setRoadSize(int size)
Definition: MMT_Diamond.h:75
slope_t::xbkg
unsigned int xbkg
Definition: MMT_Diamond.h:25
diamond_t::ev_hits
std::vector< std::shared_ptr< MMT_Hit > > ev_hits
Definition: MMT_Diamond.h:50
diamond_t::slopes
std::vector< slope_t > slopes
Definition: MMT_Diamond.h:49
slope_t
Definition: MMT_Diamond.h:13
MMT_Diamond::setRoadSizeDownX
void setRoadSizeDownX(int sizeDown)
Definition: MMT_Diamond.h:79
dumpTgcDigiThreshold.threshold
list threshold
Definition: dumpTgcDigiThreshold.py:34
slope_t::event
unsigned int event
Definition: MMT_Diamond.h:17
MMT_Diamond::setUVfactor
void setUVfactor(int factor)
Definition: MMT_Diamond.h:70
MMT_Diamond::m_detManager
const MuonGM::MuonDetectorManager * m_detManager
MuonDetectorManager.
Definition: MMT_Diamond.h:93
slope_t::uvbkg
unsigned int uvbkg
Definition: MMT_Diamond.h:24
slope_t::uvmuon
unsigned int uvmuon
Definition: MMT_Diamond.h:26
MMT_Diamond::getRoadSizeUpX
int getRoadSizeUpX() const
Definition: MMT_Diamond.h:76