File indexing completed on 2024-04-06 12:21:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <iostream>
0013 #include <iomanip>
0014 #include <iterator>
0015 #include <memory>
0016 #include "L1Trigger/L1TTwinMux/interface/AlignTrackSegments.h"
0017
0018 using namespace std;
0019
0020 AlignTrackSegments::AlignTrackSegments(L1MuDTChambPhContainer inm_phiDigis)
0021 : m_phiDigis(inm_phiDigis){
0022
0023 };
0024
0025 void AlignTrackSegments::run() {
0026 std::vector<L1MuDTChambPhDigi> l1ttma_out;
0027
0028 for (int bx = -3; bx <= 3; bx++) {
0029 for (int wheel = -3; wheel <= 3; wheel++) {
0030 for (int sector = 0; sector < 12; sector++) {
0031 for (int station = 1; station <= 4; station++) {
0032
0033 L1MuDTChambPhDigi const* ts1 = m_phiDigis.chPhiSegm1(wheel, station, sector, bx);
0034
0035 L1MuDTChambPhDigi const* ts2 = m_phiDigis.chPhiSegm2(wheel, station, sector, bx);
0036
0037 if (ts1 != nullptr && ts1->code() != 7) {
0038 l1ttma_out.emplace_back(bx,
0039 ts1->whNum(),
0040 ts1->scNum(),
0041 ts1->stNum(),
0042 ts1->phi(),
0043 ts1->phiB(),
0044 ts1->code(),
0045 ts1->Ts2Tag(),
0046 ts1->BxCnt(),
0047 0);
0048 }
0049 if ((ts1 == nullptr || ts1->code() == 7) && ts2 && ts2->code() != 7) {
0050 l1ttma_out.emplace_back(ts2->bxNum(),
0051 ts2->whNum(),
0052 ts2->scNum(),
0053 ts2->stNum(),
0054 ts2->phi(),
0055 ts2->phiB(),
0056 ts2->code(),
0057 ts2->Ts2Tag(),
0058 ts2->BxCnt(),
0059 0);
0060 }
0061
0062 if (ts1 != nullptr && ts1->code() != 7 && ts2 && ts2->code() != 7) {
0063 l1ttma_out.emplace_back(ts2->bxNum() - ts2->Ts2Tag(),
0064 ts2->whNum(),
0065 ts2->scNum(),
0066 ts2->stNum(),
0067 ts2->phi(),
0068 ts2->phiB(),
0069 ts2->code(),
0070 ts2->Ts2Tag(),
0071 ts2->BxCnt(),
0072 0);
0073 }
0074 }
0075 }
0076 }
0077 }
0078
0079 m_dt_tsshifted.setContainer(l1ttma_out);
0080 }