File indexing completed on 2023-10-25 09:54:20
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 setQuality(cmsdt::MP_QUALITY qty) { quality_ = qty; }
0025 void setBxTimeValue(int time);
0026 void setLateralComb(cmsdt::LATERAL_CASES latComb[4]);
0027 void setLateralComb(const cmsdt::LATERAL_CASES *latComb);
0028 void setLateralCombFromPrimitives(void);
0029
0030 void setHorizPos(float pos) { horizPos_ = pos; }
0031 void setTanPhi(float tanPhi) { tanPhi_ = tanPhi; }
0032 void setChiSquare(float chi) { chiSquare_ = chi; }
0033 void setPhi(float phi) { phi_ = phi; }
0034 void setPhiB(float phib) { phiB_ = phib; }
0035 void setPhiCMSSW(float phi_cmssw) { phicmssw_ = phi_cmssw; }
0036 void setPhiBCMSSW(float phib_cmssw) { phiBcmssw_ = phib_cmssw; }
0037 void setXCoorCell(float x, int cell) { xCoorCell_[cell] = x; }
0038 void setDriftDistance(float dx, int cell) { xDriftDistance_[cell] = dx; }
0039 void setXWirePos(float x, int cell) { xWirePos_[cell] = x; }
0040 void setZWirePos(float z, int cell) { zWirePos_[cell] = z; }
0041 void setTWireTDC(float t, int cell) { tWireTDC_[cell] = t; }
0042 void setRawId(uint32_t id) { rawId_ = id; }
0043
0044
0045 DTPrimitivePtr primitive(int layer) const { return prim_[layer]; }
0046 short nprimitives() const { return nprimitives_; }
0047 short nprimitivesDown() const { return nprimitivesDown_; }
0048 short nprimitivesUp() const { return nprimitivesUp_; }
0049 const int *cellLayout() const { return cellLayout_; }
0050 int baseChannelId() const { return baseChannelId_; }
0051 cmsdt::MP_QUALITY quality() const { return quality_; }
0052 int bxTimeValue() const { return bxTimeValue_; }
0053 int bxNumId() const { return bxNumId_; }
0054 float tanPhi() const { return tanPhi_; }
0055 const cmsdt::LATERAL_CASES *lateralComb() const { return (lateralComb_); }
0056 float horizPos() const { return horizPos_; }
0057 float chiSquare() const { return chiSquare_; }
0058 float phi() const { return phi_; }
0059 float phiB() const { return phiB_; }
0060 float phi_cmssw() const { return phicmssw_; }
0061 float phiB_cmssw() const { return phiBcmssw_; }
0062 float xCoorCell(int cell) const { return xCoorCell_[cell]; }
0063 float xDriftDistance(int cell) const { return xDriftDistance_[cell]; }
0064 float xWirePos(int cell) const { return xWirePos_[cell]; }
0065 float zWirePos(int cell) const { return zWirePos_[cell]; }
0066 float tWireTDC(int cell) const { return tWireTDC_[cell]; }
0067 uint32_t rawId() const { return rawId_; }
0068
0069
0070 bool isEqualTo(MuonPath *ptr);
0071 bool isAnalyzable();
0072 bool completeMP();
0073
0074 private:
0075
0076
0077
0078
0079
0080
0081
0082 DTPrimitivePtrs prim_;
0083 short nprimitives_;
0084 short nprimitivesUp_;
0085 short nprimitivesDown_;
0086
0087
0088
0089
0090 int cellLayout_[cmsdt::NUM_LAYERS];
0091 int baseChannelId_;
0092
0093
0094
0095
0096
0097 cmsdt::MP_QUALITY quality_;
0098
0099
0100 cmsdt::LATERAL_CASES lateralComb_[cmsdt::NUM_LAYERS];
0101
0102
0103 int bxTimeValue_;
0104
0105
0106 int bxNumId_;
0107
0108
0109 float xCoorCell_[cmsdt::NUM_LAYERS_2SL];
0110 float xDriftDistance_[cmsdt::NUM_LAYERS_2SL];
0111 float xWirePos_[cmsdt::NUM_LAYERS_2SL];
0112 float zWirePos_[cmsdt::NUM_LAYERS_2SL];
0113 float tWireTDC_[cmsdt::NUM_LAYERS_2SL];
0114
0115 float tanPhi_;
0116 float horizPos_;
0117 float chiSquare_;
0118 float phi_;
0119 float phiB_;
0120 float phicmssw_;
0121 float phiBcmssw_;
0122
0123 uint32_t rawId_;
0124 };
0125
0126 typedef std::vector<MuonPath> MuonPaths;
0127 typedef std::shared_ptr<MuonPath> MuonPathPtr;
0128 typedef std::vector<MuonPathPtr> MuonPathPtrs;
0129
0130 #endif