CMS 3D CMS Logo

MuonPath.h
Go to the documentation of this file.
1 #ifndef L1Trigger_DTTriggerPhase2_MuonPath_h
2 #define L1Trigger_DTTriggerPhase2_MuonPath_h
3 #include <iostream>
4 #include <memory>
5 
7 
8 class MuonPath {
9 public:
10  MuonPath();
11  MuonPath(DTPrimitivePtrs &ptrPrimitive, int prup = 0, int prdw = 0);
12  MuonPath(DTPrimitives &ptrPrimitive, int prup = 0, int prdw = 0);
13  MuonPath(std::shared_ptr<MuonPath> &ptr);
14  virtual ~MuonPath() {}
15 
16  // setter methods
17  void setPrimitive(DTPrimitivePtr &ptr, int layer);
18  void setNPrimitives(short nprim) { nprimitives_ = nprim; }
19  void setNPrimitivesUp(short nprim) { nprimitivesUp_ = nprim; }
20  void setNPrimitivesDown(short nprim) { nprimitivesDown_ = nprim; }
21  void setCellHorizontalLayout(int layout[4]);
22  void setCellHorizontalLayout(const int *layout);
23  void setBaseChannelId(int bch) { baseChannelId_ = bch; }
24  void setQuality(cmsdt::MP_QUALITY qty) { quality_ = qty; }
25  void setBxTimeValue(int time);
26  void setLateralComb(cmsdt::LATERAL_CASES latComb[4]);
27  void setLateralComb(const cmsdt::LATERAL_CASES *latComb);
29 
30  void setHorizPos(float pos) { horizPos_ = pos; }
31  void setTanPhi(float tanPhi) { tanPhi_ = tanPhi; }
32  void setChiSquare(float chi) { chiSquare_ = chi; }
33  void setPhi(float phi) { phi_ = phi; }
34  void setPhiB(float phib) { phiB_ = phib; }
36  void setPhiBCMSSW(float phib_cmssw) { phiBcmssw_ = phib_cmssw; }
37  void setXCoorCell(float x, int cell) { xCoorCell_[cell] = x; }
38  void setDriftDistance(float dx, int cell) { xDriftDistance_[cell] = dx; }
39  void setXWirePos(float x, int cell) { xWirePos_[cell] = x; }
40  void setZWirePos(float z, int cell) { zWirePos_[cell] = z; }
41  void setTWireTDC(float t, int cell) { tWireTDC_[cell] = t; }
42  void setRawId(uint32_t id) { rawId_ = id; }
43 
44  // getter methods
45  DTPrimitivePtr primitive(int layer) const { return prim_[layer]; }
46  short nprimitives() const { return nprimitives_; }
47  short nprimitivesDown() const { return nprimitivesDown_; }
48  short nprimitivesUp() const { return nprimitivesUp_; }
49  const int *cellLayout() const { return cellLayout_; }
50  int baseChannelId() const { return baseChannelId_; }
51  cmsdt::MP_QUALITY quality() const { return quality_; }
52  int bxTimeValue() const { return bxTimeValue_; }
53  int bxNumId() const { return bxNumId_; }
54  float tanPhi() const { return tanPhi_; }
55  const cmsdt::LATERAL_CASES *lateralComb() const { return (lateralComb_); }
56  float horizPos() const { return horizPos_; }
57  float chiSquare() const { return chiSquare_; }
58  float phi() const { return phi_; }
59  float phiB() const { return phiB_; }
60  float phi_cmssw() const { return phicmssw_; }
61  float phiB_cmssw() const { return phiBcmssw_; }
62  float xCoorCell(int cell) const { return xCoorCell_[cell]; }
63  float xDriftDistance(int cell) const { return xDriftDistance_[cell]; }
64  float xWirePos(int cell) const { return xWirePos_[cell]; }
65  float zWirePos(int cell) const { return zWirePos_[cell]; }
66  float tWireTDC(int cell) const { return tWireTDC_[cell]; }
67  uint32_t rawId() const { return rawId_; }
68 
69  // Other methods
70  bool isEqualTo(MuonPath *ptr);
71  bool isAnalyzable();
72  bool completeMP();
73 
74 private:
75  //------------------------------------------------------------------
76  //--- MuonPath's data
77  //------------------------------------------------------------------
78  /*
79  Primitives that make up the path. The 0th position holds the channel ID of
80  the lower layer. The order is critical.
81  */
82  DTPrimitivePtrs prim_; //ENSURE that there are no more than 4-8 prims
83  short nprimitives_;
86 
87  /* Horizontal position of each cell (one per layer), in half-cell units,
88  with respect of the lower layer (layer 0).
89  */
92 
93  //------------------------------------------------------------------
94  //--- Fit results:
95  //------------------------------------------------------------------
96  /* path quality */
98 
99  /* Lateral combination */
101 
102  /* BX time value with respect to BX0 of the orbit */
104 
105  /* BX number in the orbit */
106  int bxNumId_;
107 
108  /* Cell parameters */
109  float xCoorCell_[cmsdt::NUM_LAYERS_2SL]; // Horizontal position of the hit in each cell
110  float xDriftDistance_[cmsdt::NUM_LAYERS_2SL]; // Drift distance on the cell (absolute value)
114 
115  float tanPhi_;
116  float horizPos_;
117  float chiSquare_;
118  float phi_;
119  float phiB_;
120  float phicmssw_;
121  float phiBcmssw_;
122 
123  uint32_t rawId_;
124 };
125 
126 typedef std::vector<MuonPath> MuonPaths;
127 typedef std::shared_ptr<MuonPath> MuonPathPtr;
128 typedef std::vector<MuonPathPtr> MuonPathPtrs;
129 
130 #endif
MuonPath::xWirePos
float xWirePos(int cell) const
Definition: MuonPath.h:64
MuonPath::setLateralCombFromPrimitives
void setLateralCombFromPrimitives(void)
Definition: MuonPath.cc:194
MuonPath::setPhi
void setPhi(float phi)
Definition: MuonPath.h:33
MuonPath::bxTimeValue
int bxTimeValue() const
Definition: MuonPath.h:52
MuonPath::xDriftDistance
float xDriftDistance(int cell) const
Definition: MuonPath.h:63
MuonPath::zWirePos_
float zWirePos_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:112
MuonPath::phiBcmssw_
float phiBcmssw_
Definition: MuonPath.h:121
MuonPath::xCoorCell
float xCoorCell(int cell) const
Definition: MuonPath.h:62
MuonPath::rawId_
uint32_t rawId_
Definition: MuonPath.h:123
MuonPath::xCoorCell_
float xCoorCell_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:109
MuonPath::setTanPhi
void setTanPhi(float tanPhi)
Definition: MuonPath.h:31
MuonPath::setNPrimitives
void setNPrimitives(short nprim)
Definition: MuonPath.h:18
MuonPath::phi
float phi() const
Definition: MuonPath.h:58
pos
Definition: PixelAliasList.h:18
MuonPath::nprimitivesDown_
short nprimitivesDown_
Definition: MuonPath.h:85
MuonPath::phi_
float phi_
Definition: MuonPath.h:118
MuonPath::isEqualTo
bool isEqualTo(MuonPath *ptr)
Definition: MuonPath.cc:143
protons_cff.time
time
Definition: protons_cff.py:35
MuonPath::tanPhi
float tanPhi() const
Definition: MuonPath.h:54
makeLayoutFileForGui.layout
layout
Definition: makeLayoutFileForGui.py:67
DDAxes::x
MuonPath::setNPrimitivesUp
void setNPrimitivesUp(short nprim)
Definition: MuonPath.h:19
MuonPath::zWirePos
float zWirePos(int cell) const
Definition: MuonPath.h:65
MuonPathPtrs
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:128
MuonPath::setXCoorCell
void setXCoorCell(float x, int cell)
Definition: MuonPath.h:37
MuonPath::tanPhi_
float tanPhi_
Definition: MuonPath.h:115
MuonPath::phi_cmssw
float phi_cmssw() const
Definition: MuonPath.h:60
DTprimitive.h
MuonPath::setLateralComb
void setLateralComb(cmsdt::LATERAL_CASES latComb[4])
Definition: MuonPath.cc:202
MuonPath::phiB_
float phiB_
Definition: MuonPath.h:119
MuonPath::horizPos_
float horizPos_
Definition: MuonPath.h:116
cmsdt::LATERAL_CASES
LATERAL_CASES
Definition: constants.h:45
MuonPath::tWireTDC
float tWireTDC(int cell) const
Definition: MuonPath.h:66
MuonPath::~MuonPath
virtual ~MuonPath()
Definition: MuonPath.h:14
MuonPath::nprimitivesUp
short nprimitivesUp() const
Definition: MuonPath.h:48
MuonPath::primitive
DTPrimitivePtr primitive(int layer) const
Definition: MuonPath.h:45
MuonPath::setPhiCMSSW
void setPhiCMSSW(float phi_cmssw)
Definition: MuonPath.h:35
MuonPath::baseChannelId_
int baseChannelId_
Definition: MuonPath.h:91
MuonPath::prim_
DTPrimitivePtrs prim_
Definition: MuonPath.h:82
DDAxes::z
MuonPath::setQuality
void setQuality(cmsdt::MP_QUALITY qty)
Definition: MuonPath.h:24
MuonPath::setCellHorizontalLayout
void setCellHorizontalLayout(int layout[4])
Definition: MuonPath.cc:133
cmsdt::NUM_LAYERS
constexpr int NUM_LAYERS
Definition: constants.h:219
cmsdt::MP_QUALITY
MP_QUALITY
Definition: constants.h:42
MuonPath::bxNumId_
int bxNumId_
Definition: MuonPath.h:106
MuonPath
Definition: MuonPath.h:8
MuonPath::rawId
uint32_t rawId() const
Definition: MuonPath.h:67
MuonPath::nprimitives_
short nprimitives_
Definition: MuonPath.h:83
MuonPath::cellLayout
const int * cellLayout() const
Definition: MuonPath.h:49
MuonPath::setTWireTDC
void setTWireTDC(float t, int cell)
Definition: MuonPath.h:41
MuonPath::nprimitives
short nprimitives() const
Definition: MuonPath.h:46
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
MuonPath::setHorizPos
void setHorizPos(float pos)
Definition: MuonPath.h:30
MuonPath::quality
cmsdt::MP_QUALITY quality() const
Definition: MuonPath.h:51
MuonPath::setChiSquare
void setChiSquare(float chi)
Definition: MuonPath.h:32
MuonPath::isAnalyzable
bool isAnalyzable()
Definition: MuonPath.cc:167
MuonPath::bxTimeValue_
int bxTimeValue_
Definition: MuonPath.h:103
MuonPath::quality_
cmsdt::MP_QUALITY quality_
Definition: MuonPath.h:97
MuonPath::phicmssw_
float phicmssw_
Definition: MuonPath.h:120
MuonPath::nprimitivesDown
short nprimitivesDown() const
Definition: MuonPath.h:47
MuonPath::nprimitivesUp_
short nprimitivesUp_
Definition: MuonPath.h:84
MuonPath::setDriftDistance
void setDriftDistance(float dx, int cell)
Definition: MuonPath.h:38
MuonPath::bxNumId
int bxNumId() const
Definition: MuonPath.h:53
MuonPath::cellLayout_
int cellLayout_[cmsdt::NUM_LAYERS]
Definition: MuonPath.h:90
MuonPath::setRawId
void setRawId(uint32_t id)
Definition: MuonPath.h:42
MuonPath::completeMP
bool completeMP()
Definition: MuonPath.cc:181
MuonPath::setPhiBCMSSW
void setPhiBCMSSW(float phib_cmssw)
Definition: MuonPath.h:36
MuonPath::phiB
float phiB() const
Definition: MuonPath.h:59
MuonPathPtr
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:127
MuonPath::setNPrimitivesDown
void setNPrimitivesDown(short nprim)
Definition: MuonPath.h:20
MuonPath::setXWirePos
void setXWirePos(float x, int cell)
Definition: MuonPath.h:39
MuonPath::setBaseChannelId
void setBaseChannelId(int bch)
Definition: MuonPath.h:23
MuonPath::setPhiB
void setPhiB(float phib)
Definition: MuonPath.h:34
cmsdt::NUM_LAYERS_2SL
constexpr int NUM_LAYERS_2SL
Definition: constants.h:254
DTPrimitivePtr
std::shared_ptr< DTPrimitive > DTPrimitivePtr
Definition: DTprimitive.h:54
MuonPath::chiSquare
float chiSquare() const
Definition: MuonPath.h:57
MuonPath::setPrimitive
void setPrimitive(DTPrimitivePtr &ptr, int layer)
Definition: MuonPath.cc:127
DTPrimitives
std::vector< DTPrimitive > DTPrimitives
Definition: DTprimitive.h:53
MuonPaths
std::vector< MuonPath > MuonPaths
Definition: MuonPath.h:126
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
MuonPath::baseChannelId
int baseChannelId() const
Definition: MuonPath.h:50
MuonPath::horizPos
float horizPos() const
Definition: MuonPath.h:56
MuonPath::lateralComb_
cmsdt::LATERAL_CASES lateralComb_[cmsdt::NUM_LAYERS]
Definition: MuonPath.h:100
MuonPath::xWirePos_
float xWirePos_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:111
MuonPath::phiB_cmssw
float phiB_cmssw() const
Definition: MuonPath.h:61
MuonPath::setZWirePos
void setZWirePos(float z, int cell)
Definition: MuonPath.h:40
MuonPath::MuonPath
MuonPath()
Definition: MuonPath.cc:9
MuonPath::lateralComb
const cmsdt::LATERAL_CASES * lateralComb() const
Definition: MuonPath.h:55
MuonPath::setBxTimeValue
void setBxTimeValue(int time)
Definition: MuonPath.cc:185
DTPrimitivePtrs
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
MuonPath::chiSquare_
float chiSquare_
Definition: MuonPath.h:117
MuonPath::xDriftDistance_
float xDriftDistance_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:110
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
MuonPath::tWireTDC_
float tWireTDC_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:113
PVValHelper::dx
Definition: PVValidationHelpers.h:49