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; }
35  void setXCoorCell(float x, int cell) { xCoorCell_[cell] = x; }
36  void setDriftDistance(float dx, int cell) { xDriftDistance_[cell] = dx; }
37  void setXWirePos(float x, int cell) { xWirePos_[cell] = x; }
38  void setZWirePos(float z, int cell) { zWirePos_[cell] = z; }
39  void setTWireTDC(float t, int cell) { tWireTDC_[cell] = t; }
40  void setRawId(uint32_t id) { rawId_ = id; }
41 
42  // getter methods
43  DTPrimitivePtr primitive(int layer) const { return prim_[layer]; }
44  short nprimitives() const { return nprimitives_; }
45  short nprimitivesDown() const { return nprimitivesDown_; }
46  short nprimitivesUp() const { return nprimitivesUp_; }
47  const int *cellLayout() const { return cellLayout_; }
48  int baseChannelId() const { return baseChannelId_; }
49  cmsdt::MP_QUALITY quality() const { return quality_; }
50  int bxTimeValue() const { return bxTimeValue_; }
51  int bxNumId() const { return bxNumId_; }
52  float tanPhi() const { return tanPhi_; }
53  const cmsdt::LATERAL_CASES *lateralComb() const { return (lateralComb_); }
54  float horizPos() const { return horizPos_; }
55  float chiSquare() const { return chiSquare_; }
56  float phi() const { return phi_; }
57  float phiB() const { return phiB_; }
58  float xCoorCell(int cell) const { return xCoorCell_[cell]; }
59  float xDriftDistance(int cell) const { return xDriftDistance_[cell]; }
60  float xWirePos(int cell) const { return xWirePos_[cell]; }
61  float zWirePos(int cell) const { return zWirePos_[cell]; }
62  float tWireTDC(int cell) const { return tWireTDC_[cell]; }
63  uint32_t rawId() const { return rawId_; }
64 
65  // Other methods
66  bool isEqualTo(MuonPath *ptr);
67  bool isAnalyzable();
68  bool completeMP();
69 
70 private:
71  //------------------------------------------------------------------
72  //--- MuonPath's data
73  //------------------------------------------------------------------
74  /*
75  Primitives that make up the path. The 0th position holds the channel ID of
76  the lower layer. The order is critical.
77  */
78  DTPrimitivePtrs prim_; //ENSURE that there are no more than 4-8 prims
79  short nprimitives_;
82 
83  /* Horizontal position of each cell (one per layer), in half-cell units,
84  with respect of the lower layer (layer 0).
85  */
88 
89  //------------------------------------------------------------------
90  //--- Fit results:
91  //------------------------------------------------------------------
92  /* path quality */
94 
95  /* Lateral combination */
97 
98  /* BX time value with respect to BX0 of the orbit */
100 
101  /* BX number in the orbit */
102  int bxNumId_;
103 
104  /* Cell parameters */
105  float xCoorCell_[cmsdt::NUM_LAYERS_2SL]; // Horizontal position of the hit in each cell
106  float xDriftDistance_[cmsdt::NUM_LAYERS_2SL]; // Drift distance on the cell (absolute value)
110 
111  float tanPhi_;
112  float horizPos_;
113  float chiSquare_;
114  float phi_;
115  float phiB_;
116 
117  uint32_t rawId_;
118 };
119 
120 typedef std::vector<MuonPath> MuonPaths;
121 typedef std::shared_ptr<MuonPath> MuonPathPtr;
122 typedef std::vector<MuonPathPtr> MuonPathPtrs;
123 
124 #endif
MuonPath::xWirePos
float xWirePos(int cell) const
Definition: MuonPath.h:60
MuonPath::setLateralCombFromPrimitives
void setLateralCombFromPrimitives(void)
Definition: MuonPath.cc:188
MuonPath::setPhi
void setPhi(float phi)
Definition: MuonPath.h:33
MuonPath::bxTimeValue
int bxTimeValue() const
Definition: MuonPath.h:50
MuonPath::xDriftDistance
float xDriftDistance(int cell) const
Definition: MuonPath.h:59
MuonPath::zWirePos_
float zWirePos_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:108
MuonPath::xCoorCell
float xCoorCell(int cell) const
Definition: MuonPath.h:58
MuonPath::rawId_
uint32_t rawId_
Definition: MuonPath.h:117
MuonPath::xCoorCell_
float xCoorCell_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:105
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:56
pos
Definition: PixelAliasList.h:18
MuonPath::nprimitivesDown_
short nprimitivesDown_
Definition: MuonPath.h:81
MuonPath::phi_
float phi_
Definition: MuonPath.h:114
MuonPath::isEqualTo
bool isEqualTo(MuonPath *ptr)
Definition: MuonPath.cc:137
MuonPath::tanPhi
float tanPhi() const
Definition: MuonPath.h:52
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:61
MuonPathPtrs
std::vector< MuonPathPtr > MuonPathPtrs
Definition: MuonPath.h:122
MuonPath::setXCoorCell
void setXCoorCell(float x, int cell)
Definition: MuonPath.h:35
MuonPath::tanPhi_
float tanPhi_
Definition: MuonPath.h:111
DTprimitive.h
MuonPath::setLateralComb
void setLateralComb(cmsdt::LATERAL_CASES latComb[4])
Definition: MuonPath.cc:196
MuonPath::phiB_
float phiB_
Definition: MuonPath.h:115
MuonPath::horizPos_
float horizPos_
Definition: MuonPath.h:112
cmsdt::LATERAL_CASES
LATERAL_CASES
Definition: constants.h:44
MuonPath::tWireTDC
float tWireTDC(int cell) const
Definition: MuonPath.h:62
MuonPath::~MuonPath
virtual ~MuonPath()
Definition: MuonPath.h:14
MuonPath::nprimitivesUp
short nprimitivesUp() const
Definition: MuonPath.h:46
MuonPath::primitive
DTPrimitivePtr primitive(int layer) const
Definition: MuonPath.h:43
MuonPath::baseChannelId_
int baseChannelId_
Definition: MuonPath.h:87
MuonPath::prim_
DTPrimitivePtrs prim_
Definition: MuonPath.h:78
DDAxes::z
MuonPath::setQuality
void setQuality(cmsdt::MP_QUALITY qty)
Definition: MuonPath.h:24
MuonPath::setCellHorizontalLayout
void setCellHorizontalLayout(int layout[4])
Definition: MuonPath.cc:127
cmsdt::NUM_LAYERS
constexpr int NUM_LAYERS
Definition: constants.h:200
cmsdt::MP_QUALITY
MP_QUALITY
Definition: constants.h:41
MuonPath::bxNumId_
int bxNumId_
Definition: MuonPath.h:102
MuonPath
Definition: MuonPath.h:8
MuonPath::rawId
uint32_t rawId() const
Definition: MuonPath.h:63
OrderedSet.t
t
Definition: OrderedSet.py:90
MuonPath::nprimitives_
short nprimitives_
Definition: MuonPath.h:79
MuonPath::cellLayout
const int * cellLayout() const
Definition: MuonPath.h:47
MuonPath::setTWireTDC
void setTWireTDC(float t, int cell)
Definition: MuonPath.h:39
MuonPath::nprimitives
short nprimitives() const
Definition: MuonPath.h:44
MuonPath::setHorizPos
void setHorizPos(float pos)
Definition: MuonPath.h:30
MuonPath::quality
cmsdt::MP_QUALITY quality() const
Definition: MuonPath.h:49
MuonPath::setChiSquare
void setChiSquare(float chi)
Definition: MuonPath.h:32
MuonPath::isAnalyzable
bool isAnalyzable()
Definition: MuonPath.cc:161
MuonPath::bxTimeValue_
int bxTimeValue_
Definition: MuonPath.h:99
MuonPath::quality_
cmsdt::MP_QUALITY quality_
Definition: MuonPath.h:93
MuonPath::nprimitivesDown
short nprimitivesDown() const
Definition: MuonPath.h:45
MuonPath::nprimitivesUp_
short nprimitivesUp_
Definition: MuonPath.h:80
MuonPath::setDriftDistance
void setDriftDistance(float dx, int cell)
Definition: MuonPath.h:36
MuonPath::bxNumId
int bxNumId() const
Definition: MuonPath.h:51
MuonPath::cellLayout_
int cellLayout_[cmsdt::NUM_LAYERS]
Definition: MuonPath.h:86
MuonPath::setRawId
void setRawId(uint32_t id)
Definition: MuonPath.h:40
MuonPath::completeMP
bool completeMP()
Definition: MuonPath.cc:175
MuonPath::phiB
float phiB() const
Definition: MuonPath.h:57
MuonPathPtr
std::shared_ptr< MuonPath > MuonPathPtr
Definition: MuonPath.h:121
MuonPath::setNPrimitivesDown
void setNPrimitivesDown(short nprim)
Definition: MuonPath.h:20
MuonPath::setXWirePos
void setXWirePos(float x, int cell)
Definition: MuonPath.h:37
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:239
DTPrimitivePtr
std::shared_ptr< DTPrimitive > DTPrimitivePtr
Definition: DTprimitive.h:54
MuonPath::chiSquare
float chiSquare() const
Definition: MuonPath.h:55
MuonPath::setPrimitive
void setPrimitive(DTPrimitivePtr &ptr, int layer)
Definition: MuonPath.cc:121
DTPrimitives
std::vector< DTPrimitive > DTPrimitives
Definition: DTprimitive.h:53
MuonPaths
std::vector< MuonPath > MuonPaths
Definition: MuonPath.h:120
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
MuonPath::baseChannelId
int baseChannelId() const
Definition: MuonPath.h:48
MuonPath::horizPos
float horizPos() const
Definition: MuonPath.h:54
MuonPath::lateralComb_
cmsdt::LATERAL_CASES lateralComb_[cmsdt::NUM_LAYERS]
Definition: MuonPath.h:96
MuonPath::xWirePos_
float xWirePos_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:107
MuonPath::setZWirePos
void setZWirePos(float z, int cell)
Definition: MuonPath.h:38
MuonPath::MuonPath
MuonPath()
Definition: MuonPath.cc:9
MuonPath::lateralComb
const cmsdt::LATERAL_CASES * lateralComb() const
Definition: MuonPath.h:53
MuonPath::setBxTimeValue
void setBxTimeValue(int time)
Definition: MuonPath.cc:179
DTPrimitivePtrs
std::vector< DTPrimitivePtr > DTPrimitivePtrs
Definition: DTprimitive.h:55
ntuplemaker.time
time
Definition: ntuplemaker.py:310
MuonPath::chiSquare_
float chiSquare_
Definition: MuonPath.h:113
MuonPath::xDriftDistance_
float xDriftDistance_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:106
MuonPath::tWireTDC_
float tWireTDC_[cmsdt::NUM_LAYERS_2SL]
Definition: MuonPath.h:109
PVValHelper::dx
Definition: PVValidationHelpers.h:48