Skip to content

Commit 26adbda

Browse files
committed
Code format
1 parent bf9f155 commit 26adbda

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

L1Trigger/DTTriggerPhase2/src/MPCoincidenceFilter.cc

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ std::vector<metaPrimitive> MPCoincidenceFilter::filter(std::vector<metaPrimitive
6060

6161
bool PhiMP = 0;
6262
if (slId.superLayer() != 2)
63-
PhiMP = 1;
63+
PhiMP = 1;
6464

6565
int sector = chId.sector();
6666
int wheel = chId.wheel();
@@ -70,8 +70,8 @@ std::vector<metaPrimitive> MPCoincidenceFilter::filter(std::vector<metaPrimitive
7070
if (sector == 14)
7171
sector = 10;
7272

73-
if (co_option == -1 || mp.quality>5)
74-
outMPs.push_back(mp);
73+
if (co_option == -1 || mp.quality > 5)
74+
outMPs.push_back(mp);
7575
else {
7676
int sector_p1 = sector + 1;
7777
int sector_m1 = sector - 1;
@@ -101,14 +101,16 @@ std::vector<metaPrimitive> MPCoincidenceFilter::filter(std::vector<metaPrimitive
101101

102102
bool PhiMP2 = 0;
103103
if (slId2.superLayer() != 2)
104-
PhiMP2 = 1;
104+
PhiMP2 = 1;
105+
106+
int qcut = co_quality; // Tested for 0,1,5
107+
if (mp.quality > qcut)
108+
qcut = 0; // Filter High Quality WRT any Quality
109+
if (PhiMP2 == 0 && qcut > 2)
110+
qcut = 2; // For Th TP max quality is 3 (4-hit)
105111

106-
int qcut = co_quality; // Tested for 0,1,5
107-
if(mp.quality > qcut) qcut = 0; // Filter High Quality WRT any Quality
108-
if(PhiMP2==0 && qcut > 2) qcut = 2; // For Th TP max quality is 3 (4-hit)
109-
110112
if (!(mp2.quality > qcut))
111-
continue;
113+
continue;
112114

113115
int sector2 = chId2.sector();
114116
int wheel2 = chId2.wheel();
@@ -143,39 +145,40 @@ std::vector<metaPrimitive> MPCoincidenceFilter::filter(std::vector<metaPrimitive
143145
float t02 = (mp2.t0 - shift_back * LHC_CLK_FREQ) * ((float)TIME_TO_TDC_COUNTS / (float)LHC_CLK_FREQ);
144146
t02 = t02 - t0_mean2;
145147

146-
float thres = t0_width + t0_width2;
147-
148-
bool SameCh = 0;
149-
if(station2 == station && sector2 == sector && wheel2 == wheel)
150-
SameCh = 1;
151-
152-
bool Wh2Exc = 0;
153-
if(abs(wheel)==2 && station<3 && SameCh==1)
154-
Wh2Exc = 1; // exception for WH2 MB1/2
155-
156-
if(Wh2Exc==1 && PhiMP!=PhiMP2){// pass if Phi-Th(large k) pair in same chamber
157-
float k = 0;
158-
if(PhiMP==0)
159-
k = mp.phiB;
160-
else
161-
k = mp2.phiB;
162-
163-
if(wheel==2 && k>0.9){
164-
co_found = 1;
165-
break;
166-
}else if(wheel==-2 && k<-0.9){
167-
co_found = 1;
168-
break;
169-
}
148+
float thres = t0_width + t0_width2;
149+
150+
bool SameCh = 0;
151+
if (station2 == station && sector2 == sector && wheel2 == wheel)
152+
SameCh = 1;
153+
154+
bool Wh2Exc = 0;
155+
if (abs(wheel) == 2 && station < 3 && SameCh == 1)
156+
Wh2Exc = 1; // exception for WH2 MB1/2
157+
158+
if (Wh2Exc == 1 && PhiMP != PhiMP2) { // pass if Phi-Th(large k) pair in same chamber
159+
float k = 0;
160+
if (PhiMP == 0)
161+
k = mp.phiB;
162+
else
163+
k = mp2.phiB;
164+
165+
if (wheel == 2 && k > 0.9) {
166+
co_found = 1;
167+
break;
168+
} else if (wheel == -2 && k < -0.9) {
169+
co_found = 1;
170+
break;
171+
}
170172
}
171173

172174
if (co_option == 1 && PhiMP2 == 0)
173175
continue; // Phi Only
174176
else if (co_option == 2 && PhiMP2 == 1)
175-
continue; // Theta Only
177+
continue; // Theta Only
178+
179+
if (station2 == station)
180+
continue; // Different chambers + not adjacent chambers (standard)
176181

177-
if(station2 == station)continue; // Different chambers + not adjacent chambers (standard)
178-
179182
if (abs(t02 - t0) < thres) {
180183
co_found = 1;
181184
break;

0 commit comments

Comments
 (0)