55 return StatusCode::SUCCESS;
63 string TileMuIdFile =
"TileMuId_thresholds.dat";
64 fstream *fl =
new fstream(TileMuIdFile.c_str(), fstream::app|
fstream::out);
68 ATH_MSG_INFO (
" TileMuId file didn't open succesfully" );
71 int DSP[4][64][40]; memset(DSP,0,
sizeof(DSP));
72 int Thr[4][64][40]; memset(Thr,0,
sizeof(Thr));
75 int Thr_barrel[23] = {
76 1350, 2550, 1590, 960, 1980, 870, 1770, 1110, 750, 1890, 840, 1860, 1050, 840, 1800, 930, 1890, 1050, 840, 1860, 960, 1110, 900
80 int Thr_extbarrel[12] = {
81 1050, 2100, 210, 1380, 1140, 1440, 2370, 1230, 1500, 1380, 1680, 1680
84 IdentifierHash caloCellMin=0;
85 IdentifierHash caloCellMax=0;
86 m_calo_id->calo_cell_hash_range(3, caloCellMin, caloCellMax);
90 ATH_MSG_INFO (
"Start loop over TileCal cells " << caloCellMax-caloCellMin );
94 for (
unsigned int i=caloCellMin;
i<caloCellMax;
i++) {
96 IdentifierHash idHash =
i;
99 IdentifierHash idSubHash =
m_calo_id->subcalo_cell_hash (idHash, subCalo);
104 return StatusCode::FAILURE;
124 for(
int j=0;j<64;j++) {
125 for(
int k=0;
k<20;
k++) {
133 for(
int j=0;j<64;j++) {
134 for(
int k=0;
k<2;
k++) {
139 for(
int k=2;
k<19;
k++) {
145 for(
int i=2;
i<4;
i++) {
146 for(
int j=0;j<64;j++) {
147 for(
int k=0;
k<11;
k++) {
153 for(
int i=0;
i<2;
i++) {
155 for(
int j=0;j<64;j++) {
161 Thr[
i][j][
k]=DSP[
i][j][2];
k++; Thr[
i][j][
k]=DSP[
i][j][7];
k++; Thr[
i][j][
k]=DSP[
i][j][12];
k++; Thr[
i][j][
k]=DSP[
i][j][17];
k++;
162 Thr[
i][j][
k]=2*Thr_barrel[2];
k++; Thr[
i][j][
k]=2*Thr_barrel[7];
k++; Thr[
i][j][
k]=2*Thr_barrel[12];
k++; Thr[
i][j][
k]=2*Thr_barrel[17];
k++;
166 Thr[
i][j][
k]=DSP[
i][j][1];
k++; Thr[
i][j][
k]=DSP[
i][j][4];
k++; Thr[
i][j][
k]=DSP[
i][j][6];
k++; Thr[
i][j][
k]=DSP[
i][j][9];
k++;
167 Thr[
i][j][
k]=DSP[
i][j][11];
k++; Thr[
i][j][
k]=DSP[
i][j][14];
k++; Thr[
i][j][
k]=DSP[
i][j][16];
k++; Thr[
i][j][
k]=DSP[
i][j][19];
k++;
168 Thr[
i][j][
k]=2*Thr_barrel[1];
k++; Thr[
i][j][
k]=2*Thr_barrel[4];
k++; Thr[
i][j][
k]=2*Thr_barrel[6];
k++; Thr[
i][j][
k]=2*Thr_barrel[9];
k++;
169 Thr[
i][j][
k]=2*Thr_barrel[11];
k++; Thr[
i][j][
k]=2*Thr_barrel[14];
k++; Thr[
i][j][
k]=2*Thr_barrel[16];
k++; Thr[
i][j][
k]=2*Thr_barrel[19];
k++;
173 Thr[
i][j][
k]=DSP[
i][j][0];
k++; Thr[
i][j][
k]=DSP[
i][j][3];
k++; Thr[
i][j][
k]=DSP[
i][j][5];
k++; Thr[
i][j][
k]=DSP[
i][j][8];
k++;
174 Thr[
i][j][
k]=DSP[
i][j][10];
k++; Thr[
i][j][
k]=DSP[
i][j][13];
k++; Thr[
i][j][
k]=DSP[
i][j][15];
k++; Thr[
i][j][
k]=DSP[
i][j][18];
k++;
175 Thr[
i][j][
k]=2*Thr_barrel[0];
k++; Thr[
i][j][
k]=2*Thr_barrel[3];
k++; Thr[
i][j][
k]=2*Thr_barrel[5];
k++; Thr[
i][j][
k]=2*Thr_barrel[8];
k++;
176 Thr[
i][j][
k]=2*Thr_barrel[10];
k++; Thr[
i][j][
k]=2*Thr_barrel[13];
k++; Thr[
i][j][
k]=2*Thr_barrel[15];
k++; Thr[
i][j][
k]=2*Thr_barrel[18];
k++;
182 for(
int i=2;
i<4;
i++) {
184 for(
int j=0;j<64;j++) {
190 Thr[
i][j][
k]=DSP[
i][j][1];
k++; Thr[
i][j][
k]=DSP[
i][j][6];
k++;
191 Thr[
i][j][
k]=2*Thr_extbarrel[1];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[6];
k++;
195 Thr[
i][j][
k]=DSP[
i][j][0];
k++; Thr[
i][j][
k]=DSP[
i][j][3];
k++; Thr[
i][j][
k]=DSP[
i][j][5];
k++; Thr[
i][j][
k]=DSP[
i][j][8];
k++; Thr[
i][j][
k]=DSP[
i][j][10];
k++;
196 Thr[
i][j][
k]=2*Thr_extbarrel[0];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[3];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[5];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[8];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[10];
k++;
200 Thr[
i][j][
k]=DSP[
i][j][2];
k++; Thr[
i][j][
k]=DSP[
i][j][4];
k++; Thr[
i][j][
k]=DSP[
i][j][7];
k++; Thr[
i][j][
k]=DSP[
i][j][9];
k++;
201 Thr[
i][j][
k]=2*Thr_extbarrel[2];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[4];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[7];
k++; Thr[
i][j][
k]=2*Thr_extbarrel[9];
k++;
207 for(
int i=0;
i<4;
i++) {
209 for(
int j=0;j<64;j++) {
212 <<
"TileMuId 0x" << std::hex << (
i+1)*0x100+j << std::dec <<
" 0";
213 *fl <<
"TileMuId 0x" << std::hex << (
i+1)*0x100+j << std::dec <<
" 0";
215 for(
int k=0;
k<40;
k++) {
218 <<
" " << Thr[
i][j][
k];
219 *fl <<
" " << Thr[
i][j][
k];
233 return StatusCode::SUCCESS;
241 return StatusCode::SUCCESS;