19 if (igap<1||igap>3)
return false;
21 if (sectoreta>0)
side=1;
23 m_strip_phi[
side][sectorphi-1][igap-1].push_back(
strip);
25 m_strip_eta[
side][sectorphi-1][igap-1].push_back(
strip);
33 for (
int i=0;
i<2;
i++){
34 for (
int j=0; j<8; j++){
35 for (
int k=0;
k<3;
k++){
36 m_strip_eta[
i][j][
k].clear();
37 m_strip_phi[
i][j][
k].clear();
42 return StatusCode::SUCCESS;
50 uint8_t delta_strip_phi=dstrip_phi;
51 uint8_t delta_strip_eta=dstrip_eta;
53 for (
int i=0;
i<2;
i++){
54 for (
int j=0; j<8; j++){
58 auto trgRawData=std::make_unique< Muon::RpcBis78_TrigRawData>(sector,
side,
bcid);
62 unsigned int majority_eta=0;
uint8_t position_eta=0;
63 unsigned int majority_phi=0;
uint8_t position_phi=0;
67 for (
unsigned int istrip1=0; istrip1<m_strip_phi[
i][j][1].size(); istrip1++){
68 unsigned int majority=0;
69 for (
unsigned int istrip0=0; istrip0<m_strip_phi[
i][j][0].size(); istrip0++){
70 if (std::abs(m_strip_phi[
i][j][1].at(istrip1)-m_strip_phi[
i][j][0].at(istrip0))<=delta_strip_phi) {
74 for (
unsigned int istrip2=0; istrip2<m_strip_phi[
i][j][2].size(); istrip2++){
75 if (std::abs(m_strip_phi[
i][j][1].at(istrip1)-m_strip_phi[
i][j][2].at(istrip2))<=delta_strip_phi) {
83 if (majority > majority_phi) {
84 majority_phi=majority;
85 position_phi=m_strip_phi[
i][j][1].at(istrip1);
88 if (majority_phi==0) {
89 for (
unsigned int istrip0=0; istrip0<m_strip_phi[
i][j][0].size(); istrip0++){
90 for (
unsigned int istrip2=0; istrip2<m_strip_phi[
i][j][2].size(); istrip2++){
91 if (std::abs(m_strip_phi[
i][j][2].at(istrip2)-m_strip_phi[
i][j][0].at(istrip0))<=delta_strip_phi) {
92 position_phi=m_strip_phi[
i][j][0].at(istrip0);
99 for (
unsigned int istrip1=0; istrip1<m_strip_eta[
i][j][1].size(); istrip1++){
100 unsigned int majority=0;
101 for (
unsigned int istrip0=0; istrip0<m_strip_eta[
i][j][0].size(); istrip0++){
102 if (std::abs(m_strip_eta[
i][j][1].at(istrip1)-m_strip_eta[
i][j][0].at(istrip0))<=delta_strip_eta) {
106 for (
unsigned int istrip2=0; istrip2<m_strip_eta[
i][j][2].size(); istrip2++){
107 if (std::abs(m_strip_eta[
i][j][1].at(istrip1)-m_strip_eta[
i][j][2].at(istrip2))<=delta_strip_eta) {
115 if (majority > majority_eta) {
116 majority_eta=majority;
117 position_eta=m_strip_eta[
i][j][1].at(istrip1);
120 if (majority_eta==0) {
121 for (
unsigned int istrip0=0; istrip0<m_strip_eta[
i][j][0].size(); istrip0++){
122 for (
unsigned int istrip2=0; istrip2<m_strip_eta[
i][j][2].size(); istrip2++){
123 if (std::abs(m_strip_eta[
i][j][2].at(istrip2)-m_strip_eta[
i][j][0].at(istrip0))<=delta_strip_eta) {
124 position_eta=m_strip_eta[
i][j][0].at(istrip0);
144 if (majority_eta>0&&majority_phi>0){
145 if (majority_eta>1) flag3o3_eta=1;
146 if (majority_phi>1) flag3o3_phi=1;
149 trigword = ((position_eta & 0x3f) << 18)
150 + ((position_phi & 0x3f) << 12 )
151 + ((flag3o3_eta & 0x1) << 5 )
152 + ((flag3o3_phi & 0x1) << 4 );
154 auto bis_segment= std::make_unique<Muon::RpcBis78_TrigRawDataSegment>(position_eta,position_phi,
155 delta_strip_eta,delta_strip_phi,
156 flag3o3_eta,flag3o3_phi,trigword );
158 trgRawData->push_back(std::move(bis_segment));
159 trgContainer->
push_back(std::move(trgRawData));