62 double adc = 0., adc1 = 0., tdc = 0.;
65 for(
int i=0;i<TrigConf::TCTHETANO_B;i++)
66 for(
int j=0;j<TrigConf::TCPHINO_B;j++) {
68 BTCEnergy_adc[i][j] = 0;
70 for(
int i=0;i<TrigConf::TCTHETANO_E;i++)
71 for(
int j=0;j<TrigConf::TCPHINO_E;j++)
75 EETCEnergy_adc[i][j] = 0;
76 WETCEnergy_adc[i][j] = 0;
78 EmcDigiCol::iterator iter3;
80 for (iter3=emcDigiCol->begin();iter3!= emcDigiCol->end();iter3++) {
81 id=(*iter3)->identify();
86 module = EmcID::barrel_ec(id);
89 adc = double ((*iter3)->getChargeChannel());
90 adc1 = double ((*iter3)->getChargeChannel());
91 measure = (*iter3)->getMeasure();
92 tdc = (*iter3)->getTimeChannel();
94 int index = emcCalibConstSvc->
getIndex(module,theta,phi);
97 double trgGain = m_RealizationSvc->
getTrgGain(index);
98 std::cout <<
"partId, thetaId, phiId, trgGain: " << module <<
", " << theta <<
", " << phi <<
", " << trgGain << std::endl;
102 if((*iter3)->getMeasure()==0) adc = adc*2*800.*2/65535.*(trgGain);
103 else if((*iter3)->getMeasure()==1) adc = adc*16*800.*2/65535*(trgGain);
104 else adc = adc*64*800.*2/65535*(trgGain);
119 if(module==1) BTCEnergy[TCThetaId][TCPhiId] += adc;
120 if(module==0) EETCEnergy[TCThetaId][TCPhiId] += adc;
121 if(module==2) WETCEnergy[TCThetaId][TCPhiId] += adc;
122 if(module==1) BTCEnergy_adc[TCThetaId][TCPhiId] += adc;
123 if(module==0) EETCEnergy_adc[TCThetaId][TCPhiId] += adc;
124 if(module==2) WETCEnergy_adc[TCThetaId][TCPhiId] += adc;
146 for(
int i=0;i<TrigConf::TCTHETANO_B;i++)
147 for(
int j=0;j<TrigConf::TCPHINO_B;j++) {
150 for(
int i=0;i<TrigConf::TCTHETANO_E;i++)
151 for(
int j=0;j<TrigConf::TCPHINO_E;j++)
156 for(std::vector<uint32_t>::iterator
iter = vTC.begin();
iter != vTC.end();
iter++) {
157 int par_TC = (*
iter & 0xFF0000) >> 16;
158 int the_TC = (*
iter & 0xFF00) >> 8;
159 int phi_TC = (*
iter & 0xFF);
160 if(par_TC == 0) EETC[the_TC][phi_TC] = 1;
161 if(par_TC == 1) BTC[the_TC][phi_TC] = 1;
162 if(par_TC == 2) WETC[the_TC][phi_TC] = 1;
225 TCPhiNb = int(PhiNb/4);
244 if(ThetaNb<2) TCPhiNb = int(PhiNb/2);
247 int quot = int(PhiNb/5);
249 if(rema <= 1) TCPhiNb = 2*quot;
250 if(rema > 1) TCPhiNb = 2*quot + 1;
254 int quot = int(PhiNb/5);
256 if(rema <= 2) TCPhiNb = 2*quot;
257 if(rema > 2) TCPhiNb = 2*quot + 1;
259 if(ThetaNb>=4) TCPhiNb = int(PhiNb/3);
263 if(ThetaNb<2) TCPhiNb = int(PhiNb/2);
266 int quot = int(PhiNb/5);
268 if(rema <= 1) TCPhiNb = 2*quot;
269 if(rema > 1) TCPhiNb = 2*quot + 1;
273 int quot = int(PhiNb/5);
275 if(rema <= 2) TCPhiNb = 2*quot;
276 if(rema > 2) TCPhiNb = 2*quot + 1;
278 if(ThetaNb>=4) TCPhiNb = int(PhiNb/3);