54 double adc = 0., adc1 = 0., tdc = 0.;
57 for (
int i = 0; i < TrigConf::TCTHETANO_B; i++ )
58 for (
int j = 0; j < TrigConf::TCPHINO_B; j++ )
61 BTCEnergy_adc[i][j] = 0;
63 for (
int i = 0; i < TrigConf::TCTHETANO_E; i++ )
64 for (
int j = 0; j < TrigConf::TCPHINO_E; j++ )
68 EETCEnergy_adc[i][j] = 0;
69 WETCEnergy_adc[i][j] = 0;
71 EmcDigiCol::iterator iter3;
73 for ( iter3 = emcDigiCol->begin(); iter3 != emcDigiCol->end(); iter3++ )
75 id = ( *iter3 )->identify();
80 module = EmcID::barrel_ec( id );
83 adc = double( ( *iter3 )->getChargeChannel() );
84 adc1 = double( ( *iter3 )->getChargeChannel() );
85 measure = ( *iter3 )->getMeasure();
86 tdc = ( *iter3 )->getTimeChannel();
88 int index = emcCalibConstSvc->getIndex( module, theta, phi );
91 double trgGain = m_RealizationSvc->getTrgGain( index );
92 std::cout <<
"partId, thetaId, phiId, trgGain: " << module <<
", " << theta <<
", " << phi
93 <<
", " << trgGain << std::endl;
99 if ( ( *iter3 )->getMeasure() == 0 ) adc = adc * 2 * 800. * 2 / 65535. * ( trgGain );
100 else if ( ( *iter3 )->getMeasure() == 1 ) adc = adc * 16 * 800. * 2 / 65535 * ( trgGain );
101 else adc = adc * 64 * 800. * 2 / 65535 * ( trgGain );
116 int TCPhiId =
getTCPhiId( module, theta, phi );
118 if ( module == 1 ) BTCEnergy[TCThetaId][TCPhiId] += adc;
119 if ( module == 0 ) EETCEnergy[TCThetaId][TCPhiId] += adc;
120 if ( module == 2 ) WETCEnergy[TCThetaId][TCPhiId] += adc;
121 if ( module == 1 ) BTCEnergy_adc[TCThetaId][TCPhiId] += adc;
122 if ( module == 0 ) EETCEnergy_adc[TCThetaId][TCPhiId] += adc;
123 if ( module == 2 ) WETCEnergy_adc[TCThetaId][TCPhiId] += adc;
145 for (
int i = 0; i < TrigConf::TCTHETANO_B; i++ )
146 for (
int j = 0; j < TrigConf::TCPHINO_B; j++ ) { BTC[i][j] = 0; }
147 for (
int i = 0; i < TrigConf::TCTHETANO_E; i++ )
148 for (
int j = 0; j < TrigConf::TCPHINO_E; j++ )
153 for ( std::vector<uint32_t>::iterator
iter = vTC.begin();
iter != vTC.end();
iter++ )
155 int par_TC = ( *
iter & 0xFF0000 ) >> 16;
156 int the_TC = ( *
iter & 0xFF00 ) >> 8;
157 int phi_TC = ( *
iter & 0xFF );
158 if ( par_TC == 0 ) EETC[the_TC][phi_TC] = 1;
159 if ( par_TC == 1 ) BTC[the_TC][phi_TC] = 1;
160 if ( par_TC == 2 ) WETC[the_TC][phi_TC] = 1;
220 if ( partId == 1 ) TCPhiNb = int( PhiNb / 4 );
239 if ( ThetaNb < 2 ) TCPhiNb = int( PhiNb / 2 );
242 int quot = int( PhiNb / 5 );
243 int rema = PhiNb % 5;
244 if ( rema <= 1 ) TCPhiNb = 2 * quot;
245 if ( rema > 1 ) TCPhiNb = 2 * quot + 1;
249 int quot = int( PhiNb / 5 );
250 int rema = PhiNb % 5;
251 if ( rema <= 2 ) TCPhiNb = 2 * quot;
252 if ( rema > 2 ) TCPhiNb = 2 * quot + 1;
254 if ( ThetaNb >= 4 ) TCPhiNb = int( PhiNb / 3 );
258 if ( ThetaNb < 2 ) TCPhiNb = int( PhiNb / 2 );
261 int quot = int( PhiNb / 5 );
262 int rema = PhiNb % 5;
263 if ( rema <= 1 ) TCPhiNb = 2 * quot;
264 if ( rema > 1 ) TCPhiNb = 2 * quot + 1;
268 int quot = int( PhiNb / 5 );
269 int rema = PhiNb % 5;
270 if ( rema <= 2 ) TCPhiNb = 2 * quot;
271 if ( rema > 2 ) TCPhiNb = 2 * quot + 1;
273 if ( ThetaNb >= 4 ) TCPhiNb = int( PhiNb / 3 );