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;
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] );
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] );
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] );
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] );
261 if(!hit[i])
continue;
274 static_cast<uint16_t
>(i>=(
N_LPT_I/2)),
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
384 for(
size_t i=0; i<numberOfHit; ++i) {
385 if(!hitP[i])
continue;
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]
411 <<
" index:" <<
index[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]
456 <<
" index:" <<
index[i]
457 <<
" hitId:" << hitId[i]
458 <<
" delta:" << deltaHPT[i] );
537 value = value || ((ibit<200) && (ibit>193));
538 value = value || ((ibit<162) && (ibit>149));
539 value = value || ((ibit<118) && (ibit>109));
540 value = value || ((ibit<78) && (ibit>73));
541 value = value || ((ibit<42) && (ibit>39));
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);
675 uint16_t roi[])
const
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);
743 uint16_t roi[])
const
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);
813 int16_t delta[])
const
828 for(
size_t idx = 0; idx <2; ++idx) {
830 strip[icand] =
false;
831 index[icand] = 1 - idx;
839 sign = *(bitArray+ibit);
857 hipt[icand] = *(bitArray + ibit);
877 for(
size_t idx = 0; idx <2; ++idx) {
879 strip[icand] =
false;
880 index[icand] = 1 - idx;
888 sign = *(bitArray+ibit);
906 hipt[icand] = *(bitArray + ibit);
917 if(hitId[icand] == 0 && hit[icand]) hitId[icand] = 2;
928 for(
size_t idx = 0; idx <2; ++idx) {
931 index[icand] = 1 - idx;
940 sign = *(bitArray+ibit);
951 delta[icand] = -dPhi;
958 hipt[icand] = *(bitArray + ibit);
970 if(hitId[icand] == 0 && hit[icand]) hitId[icand] = 2;
988 int16_t delta[])
const
1004 chip[icand] = ichip;
1006 strip[icand] =
false;
1015 sign = *(bitArray+ibit);
1033 hipt[icand] = *(bitArray + ibit);
1042 if(hit[icand]) hitId[icand] = 1;
1053 for(
size_t ichip=1; ichip<=3; ++ichip) {
1054 for(
size_t idx = 0; idx <2; ++idx) {
1055 chip[icand] = ichip;
1056 strip[icand] =
false;
1057 index[icand] = 1 - idx;
1065 sign = *(bitArray+ibit);
1083 hipt[icand] = *(bitArray + ibit);
1107 for(
size_t ichip=0; ichip<=1; ++ichip) {
1108 if(ichip==1) ibit = 64;
1110 for(
size_t idx = 0; idx < 2; ++idx) {
1111 chip[icand] = ichip;
1112 strip[icand] =
true;
1113 index[icand] = 1 - idx;
1122 sign = *(bitArray+ibit);
1126 delta[icand] = dPhi;
1133 delta[icand] = -dPhi;
1140 hipt[icand] = *(bitArray + ibit);
1165 chip[icand+1] = ichip;
1166 strip[icand+1] =
true;
1167 index[icand+1] = 1 - idx;
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;
1177 index[icand+1] = 1 - idx;
1178 hit[icand+1] =
false;
1208 isOK = (hitId !=0) && (hitId !=7);
1211 isOK = isOK && (abs(delta)<8);
1228 size_t ibit = start+
width-1;
1229 for(
size_t i= 0; i<
width; ++i) {
1230 if(bitArray[ibit]) {
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current TgcRawData
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
static bool isValid_HPT(bool hit, bool strip, uint16_t chip, uint16_t index, bool hipt, uint16_t hitId, uint16_t pos, int16_t delta)
Check if it is valid high-pT coincidence or not.
TgcSlbDataHelper(void)
Constructor.
void getLPTforInner(const bool *bitArray, bool hit[]) const
Decode low-pT coincidence (tracklet) information for inner from bit array.
void convertToHits(uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb, std::vector< TgcRawData * > &vChannel) const
Convert to Hits.
void getHPT_E(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for endcap region from bit array.
static bool isAdjacent(int ibit)
Adjacent or not.
void getLPTforTripletStrip(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet strip from bit array.
void getSL_F(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for forward region from bit array.
static bool setType(uint16_t subDetectorId, uint16_t rodId, TgcSlbData *slb, int moduleType)
Set SLB Type based on sswId and moduleType.
virtual ~TgcSlbDataHelper(void)
Destructor.
static uint16_t getVal(const bool *bitArray, std::size_t start, std::size_t width)
Get a value in a range of a bitArray.
void getSL_E(const bool *bitArray, bool &cand3plus, bool hit[], bool muplus[], uint16_t pt[], bool overlap[], uint16_t roi[]) const
Decode Sector Logic coincidence information for endcap region from bit array.
void convertToCoincidences(uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb, std::vector< TgcRawData * > &vChannel) const
Convert to coincidences.
void getLPTforTripletWire(const bool *bitArray, bool hit[], int pos[]) const
Decode low-pT coincidence (tracklet) information for triplet wire from bit array.
void getHPT_F(const bool *bitArray, bool hit[], bool strip[], uint16_t chip[], uint16_t index[], bool hipt[], uint16_t hitId[], uint16_t sub[], int16_t delta[]) const
Decode high-pT coincidence information for forward region from bit array.
static uint16_t getSector(bool forward, uint16_t subDetectorId, uint16_t rodId, const TgcSlbData *slb)
Set sector for HpT/SL based on slbId.
void getLPTforDoublet(const bool *bitArray, bool hit[], int delta[], int pos[]) const
Decode low-pT coincidence (tracklet) information for doublet from bit array.
This is the SLB data class which represents an SLB block.
uint32_t getL1Id() const
Get l1Id.
uint16_t getBcId() const
Get bcId.
uint16_t getSswId() const
Get sswId.
void setType(int vType)
Set SLB type.
int getType() const
Get SLB type.
uint16_t getSbLoc() const
Get sbLoc.
const bool * getBitArray(const uint16_t bcTag) const
Get bitArray for a BC tag.
uint16_t getSlbId() const
Get slbId.
An unit object of TGC ROD output.
uint16_t position() const
uint16_t subMatrix() const
uint16_t subDetectorId() const
std::vector< std::string > veto
these patterns are anded