33 std::vector<TgcRawData *> &vChannel)
const
58 bool isFirstHit =
true;
63 const int TRIGGER_DATA_OFFSET=40;
65 if(*(bitArray+ibit)) {
76 vChannel.push_back(rCh);
81 <<
" slb type =" << slb->
getType() );
86 <<
" subDetId:" << subDetectorId
91 <<
" bit#:" << ibit );
101 std::vector<TgcRawData *> &vChannel)
const
107 bool isFirstHit =
true;
117 getLPTforDoublet(bitArray, hit, delta,
pos);
119 for(
int i=0;
i<N_LPT_D; ++
i) {
120 if(!hit[
i])
continue;
123 subDetectorId, rodId,
129 vChannel.push_back(rCh);
134 <<
" slb type =" << slb->
getType() );
138 "TgcRawData : LPT_D_W " :
"TgcRawData : LPT_D_S ")
140 <<
" subDetId:" << subDetectorId
141 <<
" rodId:" << rodId
147 <<
" delta:" << delta[
i] );
152 getLPTforDoublet(bitArray, hit, delta,
pos);
154 for(
int i=0;
i<N_LPT_D; ++
i) {
155 if(!hit[
i])
continue;
158 subDetectorId, rodId,
164 vChannel.push_back(rCh);
168 <<
" slb type =" << slb->
getType() );
172 "TgcRawData : LPT_D_W " :
"TgcRawData : LPT_D_S ")
174 <<
" subDetId:" << subDetectorId
175 <<
" rodId:" << rodId
181 <<
" delta:" << delta[
i] );
186 getLPTforTripletWire(bitArray, hit,
pos);
187 for(
int i=0;
i<N_LPT_TW; ++
i) {
188 if(!hit[
i])
continue;
192 subDetectorId, rodId,
198 vChannel.push_back(rCh);
201 <<
" slb type =" << slb->
getType() );
206 <<
" subDetId:" << subDetectorId
207 <<
" rodId:" << rodId
212 <<
" pos:" <<
pos[
i] );
217 getLPTforTripletStrip(bitArray, hit,
pos);
218 for(
int i=0;
i<N_LPT_TS; ++
i) {
219 if(!hit[
i])
continue;
229 subDetectorId, rodId,
235 vChannel.push_back(rCh);
238 <<
" slb type =" << slb->
getType() );
243 <<
" subDetId:" << subDetectorId
244 <<
" rodId:" << rodId
250 <<
" pos:" <<
pos[
i] );
259 getLPTforInner(bitArray, hit);
260 for(
int i=0;
i<N_LPT_I; ++
i) {
261 if(!hit[
i])
continue;
278 vChannel.push_back(rCh);
281 <<
" slb type =" << slb->
getType() );
286 <<
" BC:" << rCh->
bcTag()
288 <<
" rodId:" << rCh->
rodId()
289 <<
" sswId:" << rCh->
sswId()
290 <<
" sbLoc:" << rCh->
slbId()
303 sector =
getSector(forward, subDetectorId, rodId, slb);
324 for(
size_t i=0;
i<2; ++
i) {
325 if(!hitSL[
i])
continue;
327 bool veto[2] = {
false};
329 subDetectorId, rodId,
340 vChannel.push_back(rCh);
343 <<
" slb type =" << slb->
getType() );
348 <<
" subDetId:" << subDetectorId
349 <<
" rodId:" << rodId
369 numberOfHit = N_HPT_F;
376 numberOfHit = N_HPT_E;
384 for(
size_t i=0;
i<numberOfHit; ++
i) {
385 if(!hitP[
i])
continue;
388 if(!isValid_HPT(hitP[
i], strip[
i],
391 sub[
i], deltaHPT[
i])) {
392 std::string hpt_Type=
"E";
393 if(forward) hpt_Type =
"F";
394 if(strip[
i]) hpt_Type+=
"S";
399 <<
" slb type =" << slb->
getType() );
404 <<
" subDetId:" << subDetectorId
405 <<
" rodId:" << rodId
410 <<
" chip:" << chip[
i]
412 <<
" hitId:" << hitId[
i]
413 <<
" delta:" << deltaHPT[
i] );
421 subDetectorId, rodId,
434 vChannel.push_back(rCh);
437 <<
" slb type =" << slb->
getType() );
440 auto hptType = [&]() {
441 std::string hptType=
"E";
442 if(forward) hptType =
"F";
443 if(strip[
i]) hptType+=
"S";
449 <<
" subDetId:" << subDetectorId
450 <<
" rodId:" << rodId
455 <<
" chip:" << chip[
i]
457 <<
" hitId:" << hitId[
i]
458 <<
" delta:" << deltaHPT[
i] );
571 for(
int blk=0; blk<N_LPT_D; blk++) {
572 uint32_t binary = getVal(bitArray, ibit, 9);
575 delta[blk] = binary & 0x07;
578 if(binary &0x08) hit[blk] =
true;
581 if((binary & 0x08)==0) delta[blk] *= -1;
585 pos[blk] = (binary & 0x1F0) >>4;
605 binary = getVal(bitArray, ibit, 6);
607 hit[blk] = ((binary & 0x20)!=0);
609 if(hit[blk])
pos[blk] = (binary & 0x1F);
615 binary = getVal(bitArray, ibit, 3);
617 hit[blk] = ((binary & 0x04) !=0);
619 if(hit[blk])
pos[blk] = (binary & 0x03)*8;
621 binary = getVal(bitArray, ibit, 3);
622 if(hit[blk])
pos[blk] += (binary & 0x07);
628 binary = getVal(bitArray, ibit, 6);
630 hit[blk] = ((binary & 0x20) !=0);
632 if(hit[blk])
pos[blk] = (binary & 0x1F);
644 for(
int blk=0; blk<N_LPT_TS; blk++) {
645 uint32_t binary= getVal(bitArray, ibit, 5);
647 hit[blk] = ((binary & 0x10) !=0);
649 if(hit[blk])
pos[blk] = (binary & 0x0F);
662 for(
int blk=0; blk<N_LPT_I; blk++) {
663 uint32_t binary= getVal(bitArray, ibit, 1);
664 hit[blk] = (binary & 0x1);
683 for(
size_t icand=0;icand <2 ; icand ++) {
685 muplus[icand] =
false;
687 overlap[icand] =
false;
694 cand3plus = (*(bitArray+199));
699 binary = getVal(bitArray, ibit, 3);
704 hit[0] = (binary !=7) && (binary != 0);
708 muplus[0] = (*(bitArray + 169));
712 binary = getVal(bitArray, ibit, 6);
719 binary = getVal(bitArray, ibit, 3);
724 hit[1] = (binary !=7) && (binary != 0);
727 muplus[1] = (*(bitArray + 168));
731 binary = getVal(bitArray, ibit, 6);
751 for(
size_t icand=0;icand <2 ; icand ++) {
753 muplus[icand] =
false;
755 overlap[icand] =
false;
761 cand3plus = (*(bitArray+199));
766 binary = getVal(bitArray, ibit, 3);
771 hit[0] = (binary !=7) && (binary != 0);
775 muplus[0] = (*(bitArray + 169));
779 binary = getVal(bitArray, ibit, 8);
786 binary = getVal(bitArray, ibit, 3);
791 hit[1] = (binary !=7) && (binary != 0);
795 muplus[1] = (*(bitArray + 168));
799 binary = getVal(bitArray, ibit, 8);
830 strip[icand] =
false;
835 dR = getVal(bitArray, ibit,
width);
839 sign = *(bitArray+ibit);
857 hipt[icand] = *(bitArray + ibit);
862 pos[icand] = getVal(bitArray, ibit,
width);
867 hitId[icand] = getVal(bitArray, ibit,
width);
879 strip[icand] =
false;
884 dR = getVal(bitArray, ibit,
width);
888 sign = *(bitArray+ibit);
906 hipt[icand] = *(bitArray + ibit);
911 pos[icand] = getVal(bitArray, ibit,
width);
916 hitId[icand] = getVal(bitArray, ibit,
width);
917 if(hitId[icand] == 0 && hit[icand]) hitId[icand] = 2;
940 sign = *(bitArray+ibit);
951 delta[icand] = -
dPhi;
958 hipt[icand] = *(bitArray + ibit);
963 pos[icand] = getVal(bitArray, ibit,
width);
969 hitId[icand] = getVal(bitArray, ibit,
width);
970 if(hitId[icand] == 0 && hit[icand]) hitId[icand] = 2;
1004 chip[icand] = ichip;
1006 strip[icand] =
false;
1011 dR = getVal(bitArray, ibit,
width);
1015 sign = *(bitArray+ibit);
1033 hipt[icand] = *(bitArray + ibit);
1038 pos[icand] = getVal(bitArray, ibit,
width);
1042 if(hit[icand]) hitId[icand] = 1;
1053 for(
size_t ichip=1; ichip<=3; ++ichip) {
1055 chip[icand] = ichip;
1056 strip[icand] =
false;
1061 dR = getVal(bitArray, ibit,
width);
1065 sign = *(bitArray+ibit);
1083 hipt[icand] = *(bitArray + ibit);
1088 pos[icand] = getVal(bitArray, ibit,
width);
1093 hitId[icand] = getVal(bitArray, ibit,
width);
1107 for(
size_t ichip=0; ichip<=1; ++ichip) {
1108 if(ichip==1) ibit = 64;
1111 chip[icand] = ichip;
1112 strip[icand] =
true;
1122 sign = *(bitArray+ibit);
1126 delta[icand] =
dPhi;
1133 delta[icand] = -
dPhi;
1140 hipt[icand] = *(bitArray + ibit);
1145 pos[icand] = getVal(bitArray, ibit,
width);
1152 hitId[icand] = getVal(bitArray, ibit,
width);
1161 hitId[icand] = getVal(bitArray, ibit,
width);
1165 chip[icand+1] = ichip;
1166 strip[icand+1] =
true;
1168 hit[icand+1] =
true;
1169 delta[icand+1] = delta[icand];
1170 pos[icand+1] =
pos[icand];
1171 hitId[icand+1] = hitId[icand] + 4;
1175 chip[icand+1] = ichip;
1176 strip[icand+1] =
true;
1178 hit[icand+1] =
false;
1208 isOK = (hitId !=0) && (hitId !=7);
1210 if(!
hipt || strip) {
1211 isOK = isOK && (abs(delta)<8);
1230 if(bitArray[ibit]) {