29 ATH_MSG_ERROR(
"execute: Could not retrieve ZdcID object from the detector store");
30 return StatusCode::FAILURE;
76 return StatusCode::SUCCESS;
86 if (!calibHitContainer.
isValid()) {
87 ATH_MSG_ERROR(
"Could not get Calibration hit container " << calibHitContainer.
name() <<
" from store " << calibHitContainer.
store());
88 return StatusCode::FAILURE;
106 float totalMod[2][7]={{0.0},{0.0}}, invisMod[2][7]={{0.0},{0.0}}, emMod[2][7]={{0.0},{0.0}}, nonEMMod[2][7]={{0.0},{0.0}}, escMod[2][7]={{0.0},{0.0}};
107 float totalSide[2]={0.0}, invisSide[2]={0.0}, emSide[2]={0.0}, nonEMSide[2]={0.0}, escSide[2]={0.0};
108 bool foundMod[2][7] = {{
false},{
false}};
113 for (
const auto hit : *calibHitContainer){
118 emMod[
side][
mod] += hit->energyEM();
119 nonEMMod[
side][
mod] += hit->energyNonEM();
120 invisMod[
side][
mod] += hit->energyInvisible();
121 totalMod[
side][
mod] += hit->energyTotal();
122 escMod[
side][
mod] += hit->energyEscaped();
139 for (
const auto zdcModule : *moduleContainer){
140 if(zdcModule->zdcSide() == 0)
continue;
141 int side = (zdcModule->zdcSide() > 0) ? 1 : 0;
142 int mod = zdcModule->zdcModule();
147 int lucrodId = (
side == 0) ? 4 : 2;
148 int rpdChannel = zdcModule->zdcChannel();
149 int lucrodChannel = rpdChannel%8;
154 ", lucrodChannel=" << lucrodChannel <<
155 " for RPD side " << zdcModule->zdcSide() <<
156 ", channel " << rpdChannel);
162 rpdTileXpositionRelative(*zdcModule) = xpos;
163 rpdTileYpositionRelative(*zdcModule) = ypos;
164 rpdTileRowNumber (*zdcModule) =
row;
165 rpdTileColumnNumber (*zdcModule) =
col;
169 if(
mod == 4 && zdcModule->zdcChannel() != 0)
continue;
171 zdcModuleTruthTotalEnergy(*zdcModule) = totalMod[
side][
mod];
172 zdcModuleTruthInvisEnergy(*zdcModule) = invisMod[
side][
mod];
173 zdcModuleTruthEMEnergy (*zdcModule) = emMod [
side][
mod];
174 zdcModuleTruthNonEMEnergy(*zdcModule) = nonEMMod[
side][
mod];
175 zdcModuleTruthEscEnergy (*zdcModule) = escMod [
side][
mod];
184 for(
int iside : {0,1}){
186 ATH_MSG_DEBUG(
"ZDC " << iside <<
":" <<
mod <<
" total energy = " << totalMod[iside][
mod]);
187 if(!foundMod[iside][
mod]){
194 ", invisible energy = " << invisSide[1] <<
195 ", EM energy = " << emSide[1] <<
196 ", non EM energy = " << nonEMSide[1] <<
197 ", escaped energy = " << escSide[1]);
200 ", invisible energy = " << invisSide[0] <<
201 ", EM energy = " << emSide[0] <<
202 ", non EM energy = " << nonEMSide[0] <<
203 ", escaped energy = " << escSide[0]);
215 for (
const auto zdcSum : *moduleSumContainer){
216 if (zdcSum->zdcSide() == 0)
continue;
217 int side = (zdcSum->zdcSide()==-1) ? 0 : 1;
220 zdcSumTruthTotalEnergy(*zdcSum) = totalSide[
side];
221 zdcSumTruthInvisEnergy(*zdcSum) = invisSide[
side];
222 zdcSumTruthEMEnergy (*zdcSum) = emSide [
side];
223 zdcSumTruthNonEMEnergy(*zdcSum) = nonEMSide[
side];
224 zdcSumTruthEscEnergy (*zdcSum) = escSide [
side];
227 return StatusCode::SUCCESS;
235 return StatusCode::SUCCESS;