102 auto genintstr = [] (
int col, std::string
str )
103 {
return std::make_pair(
col ,
str );};
104 auto genintint = [] (
int col,
int intstr)
106 using searchpairs = std::vector<std::pair<int,std::string>>;
111 auto tab4search = searchpairs();
112 tab4search.push_back(genintstr(0,efexcords));
113 tab4search.push_back(genintint(1,fpga));
114 tab4search.push_back(genintint(2,
quad));
115 tab4search.push_back(genintint(3,mgtchannel));
117 if ( tab4line->size() == 0 )
124 std::string mpod = tab4line->at(4);
125 auto tab3search = searchpairs();
126 tab3search.push_back(genintstr(0,efexcords));
127 tab3search.push_back(genintstr(1,mpod));
129 if ( tab3line->size() == 0 )
141 auto tab2search = searchpairs();
142 tab2search.push_back(genintstr(0,efexcords));
145 tab2search.push_back(genintint(3,dataword ));
147 if ( tab2line->size() == 0 )
150 int globaleta = std::stoi( tab2line->at(4) );
151 int globalphi = std::stoi( tab2line->at(5) );
153 int layer = std::stoi( tab2line->at(6),
nullptr ,16 );
161 double supercelletawidth(0);
162 double supercellphiwidth(0.09817477);
163 int supercelletaoffset(0);
165 supercelletawidth = 0.1;
168 supercelletawidth = 0.025;
169 supercelletaoffset = (
layer - 1 )%4;
172 supercelletawidth = 0.025;
173 supercelletaoffset = (
layer - 1 )%4;
176 supercelletawidth = 0.1;
178 double toweretalowside = (
double)globaleta/10;
179 double towerphilowside = (
double)globalphi*0.09817477;
180 double supercelletacoord = toweretalowside + 0.025*(
double)supercelletaoffset +
181 0.5*supercelletawidth ;
182 double supercellphicoord = towerphilowside + 0.5*supercellphiwidth;
186 supercelletawidth, supercellphiwidth , supercelletacoord, supercellphicoord);
191 supercelletawidth, supercellphiwidth , supercelletacoord, supercellphicoord);
196 supercelletawidth, supercellphiwidth , supercelletacoord, supercellphicoord);
201 supercelletawidth, supercellphiwidth , supercelletacoord, supercellphicoord);
203 else if(
layer == 10){
206 supercelletawidth, supercellphiwidth , supercelletacoord, supercellphicoord);
211 int moduleCBA = 2 - ( efexcords.at(0) -
'A' );
212 int octantNum = ( efexcords.at(1) -
'0' ) - 1;
213 int moduleBaseEta = -24 + (moduleCBA * 16);
214 int fpgaBaseEta = moduleBaseEta + (fpga * 4);
215 int fpgaLowerEta = fpgaBaseEta;
216 int fpgaUpperEta = fpgaBaseEta + 4;
217 if (moduleCBA == 0 && fpga == 0) { fpgaLowerEta--; }
218 else if (moduleCBA == 2 && fpga == 3) { fpgaUpperEta++; }
220 int lowerShiftedPhi = octantNum * 8;
221 int upperShiftedPhi = lowerShiftedPhi + 8;
223 if (shiftedPhi >= upperShiftedPhi || shiftedPhi < lowerShiftedPhi) {
226 if (octantNum == 0 || octantNum == 7) {
227 fpgaOverlap |= (shiftedPhi > 32) ? 1 : 2;
230 fpgaOverlap |= (shiftedPhi < lowerShiftedPhi) ? 1 : 2;
233 if (globalEta >= fpgaUpperEta || globalEta < fpgaLowerEta) {
234 fpgaOverlap |= (globalEta < fpgaLowerEta) ? 4 : 8;