File indexing completed on 2024-04-06 12:19:45
0001 #ifndef L1Trigger_DTTriggerPhase2_MuonPath_h
0002 #define L1Trigger_DTTriggerPhase2_MuonPath_h
0003 #include <iostream>
0004 #include <memory>
0005
0006 #include "L1Trigger/DTTriggerPhase2/interface/DTprimitive.h"
0007
0008 class MuonPath {
0009 public:
0010 MuonPath();
0011 MuonPath(DTPrimitivePtrs &ptrPrimitive, int prup = 0, int prdw = 0);
0012 MuonPath(DTPrimitives &ptrPrimitive, int prup = 0, int prdw = 0);
0013 MuonPath(std::shared_ptr<MuonPath> &ptr);
0014 virtual ~MuonPath() {}
0015
0016
0017 void setPrimitive(DTPrimitivePtr &ptr, int layer);
0018 void setNPrimitives(short nprim) { nprimitives_ = nprim; }
0019 void setNPrimitivesUp(short nprim) { nprimitivesUp_ = nprim; }
0020 void setNPrimitivesDown(short nprim) { nprimitivesDown_ = nprim; }
0021 void setCellHorizontalLayout(int layout[4]);
0022 void setCellHorizontalLayout(const int *layout);
0023 void setBaseChannelId(int bch) { baseChannelId_ = bch; }
0024 void setMissingLayer(int layer) { missingLayer_ = layer; }
0025 void setQuality(cmsdt::MP_QUALITY qty) { quality_ = qty; }
0026 void setBxTimeValue(int time);
0027 void setLateralComb(cmsdt::LATERAL_CASES latComb[4]);
0028 void setLateralComb(const cmsdt::LATERAL_CASES *latComb);
0029 void setLateralCombFromPrimitives(void);
0030
0031 void setHorizPos(float pos) { horizPos_ = pos; }
0032 void setTanPhi(float tanPhi) { tanPhi_ = tanPhi; }
0033 void setChiSquare(float chi) { chiSquare_ = chi; }
0034 void setPhi(float phi) { phi_ = phi; }
0035 void setPhiB(float phib) { phiB_ = phib; }
0036 void setPhiCMSSW(float phi_cmssw) { phicmssw_ = phi_cmssw; }
0037 void setPhiBCMSSW(float phib_cmssw) { phiBcmssw_ = phib_cmssw; }
0038 void setXCoorCell(float x, int cell) { xCoorCell_[cell] = x; }
0039 void setDriftDistance(float dx, int cell) { xDriftDistance_[cell] = dx; }
0040 void setXWirePos(float x, int cell) { xWirePos_[cell] = x; }
0041 void setZWirePos(float z, int cell) { zWirePos_[cell] = z; }
0042 void setTWireTDC(float t, int cell) { tWireTDC_[cell] = t; }
0043 void setRawId(uint32_t id) { rawId_ = id; }
0044
0045
0046 DTPrimitivePtr primitive(int layer) const { return prim_[layer]; }
0047 short nprimitives() const { return nprimitives_; }
0048 short nprimitivesDown() const { return nprimitivesDown_; }
0049 short nprimitivesUp() const { return nprimitivesUp_; }
0050 const int *cellLayout() const { return cellLayout_; }
0051 int baseChannelId() const { return baseChannelId_; }
0052 int missingLayer() const { return missingLayer_; }
0053 cmsdt::MP_QUALITY quality() const { return quality_; }
0054 int bxTimeValue() const { return bxTimeValue_; }
0055 int bxNumId() const { return bxNumId_; }
0056 float tanPhi() const { return tanPhi_; }
0057 const cmsdt::LATERAL_CASES *lateralComb() const { return (lateralComb_); }
0058 float horizPos() const { return horizPos_; }
0059 float chiSquare() const { return chiSquare_; }
0060 float phi() const { return phi_; }
0061 float phiB() const { return phiB_; }
0062 float phi_cmssw() const { return phicmssw_; }
0063 float phiB_cmssw() const { return phiBcmssw_; }
0064 float xCoorCell(int cell) const { return xCoorCell_[cell]; }
0065 float xDriftDistance(int cell) const { return xDriftDistance_[cell]; }
0066 float xWirePos(int cell) const { return xWirePos_[cell]; }
0067 float zWirePos(int cell) const { return zWirePos_[cell]; }
0068 float tWireTDC(int cell) const { return tWireTDC_[cell]; }
0069 uint32_t rawId() const { return rawId_; }
0070
0071
0072 bool isEqualTo(MuonPath *ptr);
0073 bool isAnalyzable();
0074 bool completeMP();
0075
0076 private:
0077
0078
0079
0080
0081
0082
0083
0084 DTPrimitivePtrs prim_;
0085 short nprimitives_;
0086 short nprimitivesUp_;
0087 short nprimitivesDown_;
0088
0089
0090
0091
0092 int cellLayout_[cmsdt::NUM_LAYERS];
0093 int baseChannelId_;
0094
0095 int missingLayer_;
0096
0097
0098
0099
0100
0101 cmsdt::MP_QUALITY quality_;
0102
0103
0104 cmsdt::LATERAL_CASES lateralComb_[cmsdt::NUM_LAYERS];
0105
0106
0107 int bxTimeValue_;
0108
0109
0110 int bxNumId_;
0111
0112
0113 float xCoorCell_[cmsdt::NUM_LAYERS_2SL];
0114 float xDriftDistance_[cmsdt::NUM_LAYERS_2SL];
0115 float xWirePos_[cmsdt::NUM_LAYERS_2SL];
0116 float zWirePos_[cmsdt::NUM_LAYERS_2SL];
0117 float tWireTDC_[cmsdt::NUM_LAYERS_2SL];
0118
0119 float tanPhi_;
0120 float horizPos_;
0121 float chiSquare_;
0122 float phi_;
0123 float phiB_;
0124 float phicmssw_;
0125 float phiBcmssw_;
0126
0127 uint32_t rawId_;
0128 };
0129
0130 typedef std::vector<MuonPath> MuonPaths;
0131 typedef std::shared_ptr<MuonPath> MuonPathPtr;
0132 typedef std::vector<MuonPathPtr> MuonPathPtrs;
0133
0134 #endif