CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/CalibCalorimetry/CastorCalib/src/CastorDbHardcode.cc

Go to the documentation of this file.
00001 //
00002 // F.Ratnikov (UMd), Dec 14, 2005
00003 // $Id: CastorDbHardcode.cc,v 1.6 2012/11/14 13:28:53 mundim Exp $
00004 // Adapted for Castor by L. Mundim
00005 //
00006 #include <vector>
00007 #include <string>
00008 
00009 #include "CLHEP/Random/RandGauss.h"
00010 #include "CondFormats/CastorObjects/interface/CastorElectronicsMap.h"
00011 #include "CalibCalorimetry/CastorCalib/interface/CastorDbHardcode.h"
00012 
00013 
00014 CastorPedestal CastorDbHardcode::makePedestal (HcalGenericDetId fId, bool fSmear) {
00015   CastorPedestalWidth width = makePedestalWidth (fId);
00016   float value0 = fId.genericSubdet() == HcalGenericDetId::HcalGenForward ? 11. : 4.;  // fC
00017   float value [4] = {value0, value0, value0, value0};
00018   if (fSmear) {
00019     for (int i = 0; i < 4; i++) {
00020       value [i] = CLHEP::RandGauss::shoot (value0, width.getWidth (i) / 100.); // ignore correlations, assume 10K pedestal run 
00021       while (value [i] <= 0) value [i] = CLHEP::RandGauss::shoot (value0, width.getWidth (i));
00022     }
00023   }
00024   CastorPedestal result (fId.rawId (), 
00025                        value[0], value[1], value[2], value[3]
00026                        );
00027   return result;
00028 }
00029 
00030 CastorPedestalWidth CastorDbHardcode::makePedestalWidth (HcalGenericDetId fId) {
00031   float value = 0;
00032   /*
00033   if (fId.genericSubdet() == HcalGenericDetId::HcalGenBarrel || 
00034       fId.genericSubdet() == HcalGenericDetId::HcalGenOuter) value = 0.7;
00035   else if (fId.genericSubdet() == HcalGenericDetId::HcalGenEndcap) value = 0.9;
00036   else if (fId.genericSubdet() == HcalGenericDetId::HcalGenForward) value = 2.5;
00037   */
00038   // everything in fC
00039   CastorPedestalWidth result (fId.rawId ());
00040   for (int i = 0; i < 4; i++) {
00041     double width = value;
00042     for (int j = 0; j < 4; j++) {
00043       result.setSigma (i, j, i == j ? width * width : 0);
00044     }
00045   } 
00046   return result;
00047 }
00048 
00049 CastorGain CastorDbHardcode::makeGain (HcalGenericDetId fId, bool fSmear) {
00050   CastorGainWidth width = makeGainWidth (fId);
00051   float value0 = 0;
00052   if (fId.genericSubdet() != HcalGenericDetId::HcalGenForward) value0 = 0.177;  // GeV/fC
00053   else {
00054     if (HcalDetId(fId).depth() == 1) value0 = 0.2146;
00055     else if (HcalDetId(fId).depth() == 2) value0 = 0.3375;
00056   }
00057   float value [4] = {value0, value0, value0, value0};
00058   if (fSmear) for (int i = 0; i < 4; i++) value [i] = CLHEP::RandGauss::shoot (value0, width.getValue (i)); 
00059   CastorGain result (fId.rawId (), value[0], value[1], value[2], value[3]);
00060   return result;
00061 }
00062 
00063 CastorGainWidth CastorDbHardcode::makeGainWidth (HcalGenericDetId fId) {
00064   float value = 0;
00065   CastorGainWidth result (fId.rawId (), value, value, value, value);
00066   return result;
00067 }
00068 
00069 CastorQIECoder CastorDbHardcode::makeQIECoder (HcalGenericDetId fId) {
00070   CastorQIECoder result (fId.rawId ());
00071   float offset = 0;
00072   float slope = fId.genericSubdet () == HcalGenericDetId::HcalGenForward ? 0.36 : 0.92;  // ADC/fC
00073   for (unsigned range = 0; range < 4; range++) {
00074     for (unsigned capid = 0; capid < 4; capid++) {
00075       result.setOffset (capid, range, offset);
00076       result.setSlope (capid, range, slope);
00077     }
00078   }
00079   return result;
00080 }
00081 
00082 CastorCalibrationQIECoder CastorDbHardcode::makeCalibrationQIECoder (HcalGenericDetId fId) {
00083   CastorCalibrationQIECoder result (fId.rawId ());
00084   float lowEdges [32];
00085   for (int i = 0; i < 32; i++) lowEdges[i] = -1.5 + i*0.35;
00086   result.setMinCharges (lowEdges);
00087   return result;
00088 }
00089 
00090 CastorQIEShape CastorDbHardcode::makeQIEShape () {
00091   return CastorQIEShape ();
00092 }
00093 
00094 CastorRecoParam CastorDbHardcode::makeRecoParam (HcalGenericDetId fId) {
00095         CastorRecoParam result(fId.rawId(), 4, 2);
00096         return result;
00097 }
00098 
00099 CastorSaturationCorr CastorDbHardcode::makeSaturationCorr (HcalGenericDetId fId) {
00100         CastorSaturationCorr result(fId.rawId(), 1);
00101         return result;
00102 }
00103 
00104 #define EMAP_NHBHECR 9
00105 #define EMAP_NHFCR 3
00106 #define EMAP_NHOCR 4
00107 #define EMAP_NFBR 8
00108 #define EMAP_NFCH 3
00109 #define EMAP_NHTRS 3
00110 #define EMAP_NHSETS 4
00111 #define EMAP_NTOPBOT 2
00112 #define EMAP_NHTRSHO 4
00113 #define EMAP_NHSETSHO 3
00114 
00115 void CastorDbHardcode::makeHardcodeMap(CastorElectronicsMap& emap) {
00116 
00117   /* HBHE crate numbering */
00118   int hbhecrate[EMAP_NHBHECR]={0,1,4,5,10,11,14,15,17};
00119   /* HF crate numbering */
00120   int hfcrate[EMAP_NHFCR]={2,9,12};
00121   /* HO crate numbering */
00122   int hocrate[EMAP_NHOCR]={3,7,6,13};
00123   /* HBHE FED numbering of DCCs */
00124   int fedhbhenum[EMAP_NHBHECR][2]={{702,703},{704,705},{700,701},
00125                                    {706,707},{716,717},{708,709},
00126                                    {714,715},{710,711},{712,713}};
00127   /* HF FED numbering of DCCs */
00128   int fedhfnum[EMAP_NHFCR][2]={{718,719},{720,721},{722,723}};
00129   /* HO FED numbering of DCCs */
00130   int fedhonum[EMAP_NHOCR][2]={{724,725},{726,727},{728,729},{730,731}};
00131   /* HBHE/HF htr slot offsets for set of three htrs */
00132   int ihslot[EMAP_NHSETS]={2,5,13,16};
00133   /* HO htr slot offsets for three sets of four htrs */
00134   int ihslotho[EMAP_NHSETSHO][EMAP_NHTRSHO]={{2,3,4,5},{6,7,13,14},{15,16,17,18}};
00135   /* iphi (lower) starting index for each HBHE crate */
00136   int ihbhephis[EMAP_NHBHECR]={11,19,3,27,67,35,59,43,51};
00137   /* iphi (lower) starting index for each HF crate */
00138   int ihfphis[EMAP_NHFCR]={3,27,51};
00139   /* iphi (lower) starting index for each HO crate */
00140   int ihophis[EMAP_NHOCR]={71,17,35,53};
00141   /* ihbheetadepth - unique HBHE {eta,depth} assignments per fiber and fiber channel */
00142   int ihbheetadepth[EMAP_NHTRS][EMAP_NTOPBOT][EMAP_NFBR][EMAP_NFCH][2]={
00143     {{{{11,1},{ 7,1},{ 3,1}},  /* htr 0 (HB) -bot(+top) */
00144       {{ 5,1},{ 1,1},{ 9,1}},
00145       {{11,1},{ 7,1},{ 3,1}},
00146       {{ 5,1},{ 1,1},{ 9,1}},
00147       {{10,1},{ 6,1},{ 2,1}},
00148       {{ 8,1},{ 4,1},{12,1}},
00149       {{10,1},{ 6,1},{ 2,1}},
00150       {{ 8,1},{ 4,1},{12,1}}},
00151      {{{11,1},{ 7,1},{ 3,1}},  /* htr 0 (HB) +bot(-top) */
00152       {{ 5,1},{ 1,1},{ 9,1}},
00153       {{11,1},{ 7,1},{ 3,1}},
00154       {{ 5,1},{ 1,1},{ 9,1}},
00155       {{10,1},{ 6,1},{ 2,1}},
00156       {{ 8,1},{ 4,1},{12,1}},
00157       {{10,1},{ 6,1},{ 2,1}},
00158       {{ 8,1},{ 4,1},{12,1}}}},
00159     {{{{16,2},{15,2},{14,1}},  /* htr 1 (HBHE) -bot(+top) */
00160       {{15,1},{13,1},{16,1}},
00161       {{16,2},{15,2},{14,1}},
00162       {{15,1},{13,1},{16,1}},
00163       {{17,1},{16,3},{26,1}},
00164       {{18,1},{18,2},{26,2}},
00165       {{17,1},{16,3},{25,1}},
00166       {{18,1},{18,2},{25,2}}},
00167      {{{16,2},{15,2},{14,1}},  /* htr 1 (HBHE) +bot(-top) */
00168       {{15,1},{13,1},{16,1}},
00169       {{16,2},{15,2},{14,1}},
00170       {{15,1},{13,1},{16,1}},
00171       {{17,1},{16,3},{25,1}},
00172       {{18,1},{18,2},{25,2}},
00173       {{17,1},{16,3},{26,1}},
00174       {{18,1},{18,2},{26,2}}}},
00175     {{{{28,1},{28,2},{29,1}},  /* htr 2 (HE) -bot(+top) */
00176       {{28,3},{24,2},{24,1}},
00177       {{27,1},{27,2},{29,2}},
00178       {{27,3},{23,2},{23,1}},
00179       {{19,2},{20,1},{22,2}},
00180       {{19,1},{20,2},{22,1}},
00181       {{19,2},{20,1},{21,2}},
00182       {{19,1},{20,2},{21,1}}},
00183      {{{27,1},{27,2},{29,2}},  /* htr 2 (HE) +bot(-top) */
00184       {{27,3},{23,2},{23,1}},
00185       {{28,1},{28,2},{29,1}},
00186       {{28,3},{24,2},{24,1}},
00187       {{19,2},{20,1},{21,2}},
00188       {{19,1},{20,2},{21,1}},
00189       {{19,2},{20,1},{22,2}},
00190       {{19,1},{20,2},{22,1}}}}
00191   };
00192   /* ihfetadepth - unique HF {eta,depth} assignments per fiber and fiber channel */
00193   int ihfetadepth[EMAP_NTOPBOT][EMAP_NFBR][EMAP_NFCH][2]={
00194     {{{33,1},{31,1},{29,1}},  /* top */
00195      {{32,1},{30,1},{34,1}},
00196      {{33,2},{31,2},{29,2}},
00197      {{32,2},{30,2},{34,2}},
00198      {{34,2},{32,2},{30,2}},
00199      {{31,2},{29,2},{33,2}},
00200      {{34,1},{32,1},{30,1}},
00201      {{31,1},{29,1},{33,1}}},
00202     {{{41,1},{37,1},{35,1}},  /* bot */
00203      {{38,1},{36,1},{39,1}},
00204      {{41,2},{37,2},{35,2}},
00205      {{38,2},{36,2},{39,2}},
00206      {{40,2},{38,2},{36,2}},
00207      {{37,2},{35,2},{39,2}},
00208      {{40,1},{38,1},{36,1}},
00209      {{37,1},{35,1},{39,1}}}
00210   };
00211   /* ihoetasidephi - unique HO {eta,side,phi} assignments per fiber and fiber channel */
00212   int ihoetasidephi[EMAP_NHTRSHO][EMAP_NTOPBOT][EMAP_NFBR][EMAP_NFCH][3]={
00213     {{{{ 1,-1,0},{ 2,-1,0},{ 3,-1,0}},  /* htr 0 (HO) top */
00214       {{ 1,-1,1},{ 2,-1,1},{ 3,-1,1}},
00215       {{ 1,-1,2},{ 2,-1,2},{ 3,-1,2}},
00216       {{ 1,-1,3},{ 2,-1,3},{ 3,-1,3}},
00217       {{ 1,-1,4},{ 2,-1,4},{ 3,-1,4}},
00218       {{ 1,-1,5},{ 2,-1,5},{ 3,-1,5}},
00219       {{14, 1,0},{14, 1,1},{14, 1,2}},
00220       {{14, 1,3},{14, 1,4},{14, 1,5}}},
00221      {{{ 1, 1,0},{ 2, 1,0},{ 3, 1,0}},  /* htr 0 (HO) bot */
00222       {{ 1, 1,1},{ 2, 1,1},{ 3, 1,1}},
00223       {{ 1, 1,2},{ 2, 1,2},{ 3, 1,2}},
00224       {{ 1, 1,3},{ 2, 1,3},{ 3, 1,3}},
00225       {{ 1, 1,4},{ 2, 1,4},{ 3, 1,4}},
00226       {{ 1, 1,5},{ 2, 1,5},{ 3, 1,5}},
00227       {{15, 1,0},{15, 1,1},{15, 1,2}},
00228       {{15, 1,3},{15, 1,4},{15, 1,5}}}},
00229     {{{{ 6, 1,0},{ 6, 1,1},{ 6, 1,2}},  /* htr 1 (HO) top */
00230       {{ 6, 1,3},{ 6, 1,4},{ 6, 1,5}},
00231       {{ 7, 1,0},{ 7, 1,1},{ 7, 1,2}},
00232       {{ 7, 1,3},{ 7, 1,4},{ 7, 1,5}},
00233       {{ 8, 1,0},{ 8, 1,1},{ 8, 1,2}},
00234       {{ 8, 1,3},{ 8, 1,4},{ 8, 1,5}},
00235       {{ 9, 1,0},{ 9, 1,1},{ 9, 1,2}},
00236       {{ 9, 1,3},{ 9, 1,4},{ 9, 1,5}}},
00237      {{{10, 1,0},{10, 1,1},{10, 1,2}},  /* htr 1 (HO) bot */
00238       {{10, 1,3},{10, 1,4},{10, 1,5}},
00239       {{11, 1,0},{11, 1,1},{11, 1,2}},
00240       {{11, 1,3},{11, 1,4},{11, 1,5}},
00241       {{12, 1,0},{12, 1,1},{12, 1,2}},
00242       {{12, 1,3},{12, 1,4},{12, 1,5}},
00243       {{13, 1,0},{13, 1,1},{13, 1,2}},
00244       {{13, 1,3},{13, 1,4},{13, 1,5}}}},
00245     {{{{ 4,-1,0},{ 4,-1,1},{ 0, 0,0}},  /* htr 2 (HO) top */
00246       {{ 4,-1,2},{ 4,-1,3},{ 0, 0,0}},
00247       {{ 4,-1,4},{ 4,-1,5},{ 0, 0,0}},
00248       {{ 0, 0,0},{ 0, 0,0},{ 0, 0,0}},
00249       {{ 5,-1,0},{ 5,-1,1},{ 5,-1,2}},
00250       {{ 5,-1,3},{ 5,-1,4},{ 5,-1,5}},
00251       {{14,-1,0},{14,-1,1},{14,-1,2}},
00252       {{14,-1,3},{14,-1,4},{14,-1,5}}},
00253      {{{ 4, 1,0},{ 4, 1,1},{ 0, 0,0}},  /* htr 2 (HO) bot */
00254       {{ 4, 1,2},{ 4, 1,3},{ 0, 0,0}},
00255       {{ 4, 1,4},{ 4, 1,5},{ 0, 0,0}},
00256       {{ 0, 0,0},{ 0, 0,0},{ 0, 0,0}},
00257       {{ 5, 1,0},{ 5, 1,1},{ 5, 1,2}},
00258       {{ 5, 1,3},{ 5, 1,4},{ 5, 1,5}},
00259       {{15,-1,0},{15,-1,1},{15,-1,2}},
00260       {{15,-1,3},{15,-1,4},{15,-1,5}}}},
00261     {{{{ 6,-1,0},{ 6,-1,1},{ 6,-1,2}},  /* htr 3 (HO) top */
00262       {{ 6,-1,3},{ 6,-1,4},{ 6,-1,5}},
00263       {{ 7,-1,0},{ 7,-1,1},{ 7,-1,2}},
00264       {{ 7,-1,3},{ 7,-1,4},{ 7,-1,5}},
00265       {{ 8,-1,0},{ 8,-1,1},{ 8,-1,2}},
00266       {{ 8,-1,3},{ 8,-1,4},{ 8,-1,5}},
00267       {{ 9,-1,0},{ 9,-1,1},{ 9,-1,2}},
00268       {{ 9,-1,3},{ 9,-1,4},{ 9,-1,5}}},
00269      {{{10,-1,0},{10,-1,1},{10,-1,2}},  /* htr 3 (HO) bot */
00270       {{10,-1,3},{10,-1,4},{10,-1,5}},
00271       {{11,-1,0},{11,-1,1},{11,-1,2}},
00272       {{11,-1,3},{11,-1,4},{11,-1,5}},
00273       {{12,-1,0},{12,-1,1},{12,-1,2}},
00274       {{12,-1,3},{12,-1,4},{12,-1,5}},
00275       {{13,-1,0},{13,-1,1},{13,-1,2}},
00276       {{13,-1,3},{13,-1,4},{13,-1,5}}}} 
00277   };
00278   int ic,is,ih,itb,ifb,ifc,ifwtb,iphi_loc;
00279   int iside,ieta,iphi,idepth,icrate,ihtr,ihtr_fi,ifi_ch,ispigot,idcc,/*idcc_sl,*/ifed;
00280   std::string det;
00281   std::string fpga;
00282   // printf("      side       eta       phi     depth       det     crate       htr      fpga    htr_fi     fi_ch     spigo       dcc    dcc_sl     fedid\n");
00283   /* all HBHE crates */
00284   for(ic=0; ic<EMAP_NHBHECR; ic++){
00285     /* four sets of three htrs per crate */
00286     for(is=0; is<EMAP_NHSETS; is++){
00287       /* three htrs per set */
00288       for(ih=0; ih<EMAP_NHTRS; ih++){
00289         /* top and bottom */
00290         for(itb=0; itb<EMAP_NTOPBOT; itb++){
00291           /* eight fibers per HTR FPGA */
00292           for(ifb=0; ifb<EMAP_NFBR; ifb++){
00293             /* three channels per fiber */
00294             for(ifc=0; ifc<EMAP_NFCH; ifc++){
00295               icrate=hbhecrate[ic];
00296               iside=is<EMAP_NHSETS/2?-1:1;
00297               ifwtb=(is/2+itb+1)%2;
00298               ieta=ihbheetadepth[ih][ifwtb][ifb][ifc][0];
00299               idepth=ihbheetadepth[ih][ifwtb][ifb][ifc][1];
00300               ihtr=ihslot[is]+ih;
00301               det=((ieta>16||idepth>2)?("HE"):("HB"));
00302               fpga=((itb%2)==1)?("bot"):("top");
00303               ihtr_fi=ifb+1;
00304               ifi_ch=ifc;
00305               iphi=(ieta>20)?(ihbhephis[ic]+(is%2)*4+itb*2-1)%72+1:(ihbhephis[ic]+(is%2)*4+itb*2+(ifb/2+is/2+1)%2-1)%72+1;
00306               ispigot=(is%2)*6+ih*2+itb;
00307               idcc=is<EMAP_NHSETS/2?1:2;
00308               //idcc_sl=idcc==1?9:19;
00309               ifed=fedhbhenum[ic][idcc-1];
00311               CastorElectronicsId elId(ifi_ch, ihtr_fi, ispigot, ifed-700);
00312               elId.setHTR(icrate, ihtr, (fpga=="top")?(1):(0));
00313               HcalDetId hId((det=="HB")?(HcalBarrel):(HcalEndcap),ieta*iside,iphi,idepth);
00314               emap.mapEId2chId(elId,hId);
00315               
00316               //              printf(" %9d %9d %9d %9d %9s %9d %9d %9s %9d %9d %9d %9d %9d %9d\n",iside,ieta,iphi,idepth,&det,icrate,ihtr,&fpga,ihtr_fi,ifi_ch,ispigot,idcc,idcc_sl,ifed);
00317             }}}}}}
00318   /* all HF crates */
00319   for(ic=0; ic<EMAP_NHFCR; ic++){
00320     /* four sets of three htrs per crate */
00321     for(is=0; is<EMAP_NHSETS; is++){
00322       /* three htrs per set */
00323       for(ih=0; ih<EMAP_NHTRS; ih++){
00324         /* top and bottom */
00325         for(itb=0; itb<EMAP_NTOPBOT; itb++){
00326           /* eight fibers per HTR FPGA */
00327           for(ifb=0; ifb<EMAP_NFBR; ifb++){
00328             /* three channels per fiber */
00329             for(ifc=0; ifc<EMAP_NFCH; ifc++){
00330               icrate=hfcrate[ic];
00331               iside=is<EMAP_NHSETS/2?-1:1;
00332               ieta=ihfetadepth[itb][ifb][ifc][0];
00333               idepth=ihfetadepth[itb][ifb][ifc][1];
00334               ihtr=ihslot[is]+ih;
00335               det="HF";
00336               fpga=((itb%2)==1)?("bot"):("top");
00337               ihtr_fi=ifb+1;
00338               ifi_ch=ifc;
00339               iphi=(ieta>39)?(ihfphis[ic]+(is%2)*12+ih*4-3)%72+1:(ihfphis[ic]+(is%2)*12+ih*4+(ifb/4)*2-1)%72+1;
00340               ispigot=(is%2)*6+ih*2+itb;
00341               idcc=is<EMAP_NHSETS/2?1:2;
00342               //idcc_sl=idcc==1?9:19;
00343               ifed=fedhfnum[ic][idcc-1];
00344               CastorElectronicsId elId(ifi_ch, ihtr_fi, ispigot, ifed-700);
00345               elId.setHTR(icrate, ihtr, (fpga=="top")?(1):(0));
00346               HcalDetId hId(HcalForward,ieta*iside,iphi,idepth);
00347               emap.mapEId2chId(elId,hId);
00348               // printf(" %9d %9d %9d %9d %9s %9d %9d %9s %9d %9d %9d %9d %9d %9d\n",iside,ieta,iphi,idepth,&det,icrate,ihtr,&fpga,ihtr_fi,ifi_ch,ispigot,idcc,idcc_sl,ifed);
00349             }}}}}}
00350   /* all HO crates */
00351   for(ic=0; ic<EMAP_NHOCR; ic++){
00352     /* three sets of four htrs per crate */
00353     for(is=0; is<EMAP_NHSETSHO; is++){
00354       /* four htrs per set */
00355       for(ih=0; ih<EMAP_NHTRSHO; ih++){
00356         /* top and bottom */
00357         for(itb=0; itb<EMAP_NTOPBOT; itb++){
00358           /* eight fibers per HTR FPGA */
00359           for(ifb=0; ifb<EMAP_NFBR; ifb++){
00360             /* three channels per fiber */
00361             for(ifc=0; ifc<EMAP_NFCH; ifc++){
00362               icrate=hocrate[ic];
00363               idepth=1;
00364               ieta=ihoetasidephi[ih][itb][ifb][ifc][0];
00365               iside=ihoetasidephi[ih][itb][ifb][ifc][1];
00366               iphi_loc=ihoetasidephi[ih][itb][ifb][ifc][2];
00367               ihtr=ihslotho[is][ih];
00368               det="HO";
00369               fpga=((itb%2)==1)?("bot"):("top");
00370               ihtr_fi=ifb+1;
00371               ifi_ch=ifc;
00372               iphi=(ihophis[ic]+is*6+iphi_loc-1)%72+1;
00373               ispigot=ihtr<9?(ihtr-2)*2+itb:(ihtr-13)*2+itb;
00374               idcc=ihtr<9?1:2;
00375               //idcc_sl=idcc==1?9:19;
00376               ifed=fedhonum[ic][idcc-1];
00377               CastorElectronicsId elId(ifi_ch, ihtr_fi, ispigot, ifed-700);
00378               elId.setHTR(icrate, ihtr, (fpga=="top")?(1):(0));
00379               if (ieta==0) { // unmapped 
00380                 emap.mapEId2chId(elId,DetId(HcalDetId::Undefined));
00381               } else {
00382                 HcalDetId hId(HcalOuter,ieta*iside,iphi,idepth+3); // HO is officially "depth=4"
00383                 emap.mapEId2chId(elId,hId);
00384               }
00385               // printf(" %9d %9d %9d %9d %9s %9d %9d %9s %9d %9d %9d %9d %9d %9d\n",iside,ieta,iphi,idepth,&det,icrate,ihtr,&fpga,ihtr_fi,ifi_ch,ispigot,idcc,idcc_sl,ifed);
00386             }}}}}}
00387   
00388 
00389   emap.sort();
00390 
00391 }