12 for (
const auto & chDigi : *dtphDigisBMTF.
getContainer() ) {
13 if (
std::abs(chDigi.whNum()) != 2)
continue;
14 if (chDigi.stNum() ==4)
continue;
16 data.st_phi_ = chDigi.phi();
17 data.st_phib_ = chDigi.phiB();
18 data.st_q_ = chDigi.code();
19 int bxNumber = chDigi.bxNum();
20 data.bxNum_ = (3+bxNumber);
21 data.st_ = chDigi.stNum()-1;
23 int bxCnt = (chDigi.BxCnt() >= 0 && chDigi.BxCnt() <=3) ? chDigi.BxCnt() : 0;
24 data.bcnt_st_ = bxCnt;
25 data.bcnt_e0_ = bxCnt;
26 data.bcnt_e1_ = bxCnt;
27 data.fiber_ = chDigi.Ts2Tag();
30 unsigned int fed = (chDigi.whNum()==-2)? 1380: 1381;
31 if (chDigi.scNum()%2 !=0) {
35 amc = chDigi.scNum()+1;
37 amc2 = (chDigi.scNum()+11)%12;
39 LogTrace(
"")<<
" fed: "<< fed <<
" amc: "<<amc<<
" DT PH DATA: " << data << std::endl;
40 raws[std::make_pair(fed,amc)].push_back(data.rawData);
43 LogTrace(
"")<<
" fed: "<< fed <<
" amc: "<<amc2<<
" DT PH DATA: " << data << std::endl;
44 raws[std::make_pair(fed,amc2)].push_back(data.rawData);
51 for (
const auto & chDigi : *dtthDigisBMTF.
getContainer() ) {
52 if (
std::abs(chDigi.whNum()) != 2)
continue;
53 if (chDigi.stNum() ==4)
continue;
55 int bxNumber = chDigi.bxNum();
56 data.bxNum_ = (3+bxNumber);
57 data.st_ = chDigi.stNum()-1;
61 unsigned int fed = (chDigi.whNum()==-2)? 1380: 1381;
62 if (chDigi.scNum()%2 !=0) {
66 amc = chDigi.scNum()+1;
68 amc2 = (chDigi.scNum()+11)%12;
71 unsigned int etaQ = 0;
72 for (
unsigned int ipos=0; ipos <7; ipos++) {
73 if (chDigi.position(ipos) >1 )
edm::LogError(
"OmtfDtPacker")<<
"DT TH position to ETA, PROBLEM !!!!";
74 if (chDigi.position(ipos)==1) eta |= (1 <<ipos);
75 if (chDigi.quality(ipos)==1) etaQ |= (1 <<ipos);
77 data.eta_qbit_ = etaQ;
79 bool foundDigi =
false;
80 for (
auto & raw : raws) {
81 if (raw.first.first != fed)
continue;
82 unsigned int amcPh = raw.first.second;
83 if (amc != amcPh && amc2 != amcPh)
continue;
84 auto & words = raw.second;
85 for (
auto & word : words) {
87 DtDataWord64 dataRaw(word);
88 if (dataRaw.bxNum_ != data.bxNum_)
continue;
89 if (dataRaw.st_ != data.st_)
continue;
90 if ( ( amcPh == amc && dataRaw.sector_==data.sector_ )
91 || ( amcPh == amc2 && 2==dataRaw.sector_ ) ) {
93 dataRaw.eta_qbit_ = data.eta_qbit_;
94 dataRaw.eta_hit_ = data.eta_hit_;
95 word = dataRaw.rawData;
96 LogTrace(
"")<<
"AP fed: "<< fed <<
" amc: "<<amc<<
" DT TH DATA: " << dataRaw << std::endl;
101 LogTrace(
"")<<
"NFD fed: "<< fed <<
" amc: "<<amc<<
" DT TH DATA: " << data<< std::endl;
102 raws[std::make_pair(fed,amc)].push_back(data.rawData);
105 LogTrace(
"")<<
"NFD fed: "<< fed <<
" amc2: "<<amc2<<
" DT TH DATA: " << data<< std::endl;
106 raws[std::make_pair(fed,amc2)].push_back(data.rawData);
The_Container const * getContainer() const
Abs< T >::type abs(const T &t)
Phi_Container const * getContainer() const
char data[epos_bytes_allocation]