54 epDepth( 0 ), theAngle( 0 ), calorimeterEDLeftAdjacent( 0 ),
55 calorimeterEDRightAdjacent( 0 ), collectEDInAdjacentCrystals(
false ),
56 targetEPInitialized(
false ), messenger( NULL )
59 const CexmcSetup * setup( static_cast< const CexmcSetup * >(
121 G4bool edInAdjacentCrystalsCollected(
false );
129 G4int nCrystalsInColumn(
137 crystalWidth + crystalWidth / 2 );
140 crystalHeight + crystalHeight / 2 );
143 crystalWidth + crystalWidth / 2 );
146 crystalHeight + crystalHeight / 2 );
156 rowLeft, columnLeft, x, y,
161 rowRight, columnRight, x, y,
167 edInAdjacentCrystalsCollected =
true;
180 G4double calorimeterEPLeftRadiusOfTheSphere(
183 G4double calorimeterEPLeftRadiusOfTheSphere2(
184 calorimeterEPLeftRadiusOfTheSphere *
185 calorimeterEPLeftRadiusOfTheSphere );
186 G4double calorimeterEPLeftPositionX2(
189 G4double calorimeterEPLeftPositionY2(
192 G4double calorimeterEPLeftPositionZOffset(
193 calorimeterEPLeftRadiusOfTheSphere - std::sqrt(
194 calorimeterEPLeftRadiusOfTheSphere2 -
195 calorimeterEPLeftPositionX2 -
196 calorimeterEPLeftPositionY2 ) );
197 G4double calorimeterEPRightRadiusOfTheSphere(
200 G4double calorimeterEPRightRadiusOfTheSphere2(
201 calorimeterEPRightRadiusOfTheSphere *
202 calorimeterEPRightRadiusOfTheSphere );
203 G4double calorimeterEPRightPositionX2(
206 G4double calorimeterEPRightPositionY2(
209 G4double calorimeterEPRightPositionZOffset(
210 calorimeterEPRightRadiusOfTheSphere - std::sqrt(
211 calorimeterEPRightRadiusOfTheSphere2 -
212 calorimeterEPRightPositionX2 -
213 calorimeterEPRightPositionY2 ) );
215 calorimeterEPLeftPositionZOffset );
217 calorimeterEPRightPositionZOffset );
239 rowRight, columnRight,
286 for ( CexmcEnergyDepositCalorimeterCollection::const_iterator
287 k( edHits.begin() );
k != edHits.end(); ++
k )
289 if ( i - row > 1 || i - row < -1 )
296 for ( CexmcEnergyDepositCrystalRowCollection::const_iterator
297 l(
k->begin() ); l !=
k->end(); ++l )
299 if ( j - column > 1 || j - column < -1 )
330 for ( CexmcEnergyDepositCalorimeterCollection::const_iterator
331 k( edHits.begin() );
k != edHits.end(); ++
k )
334 ( i - row > 1 || i - row < -1 ) )
341 for ( CexmcEnergyDepositCrystalRowCollection::const_iterator
342 l(
k->begin() ); l !=
k->end(); ++l )
345 ( j - column > 1 || j - column < -1 ) )
356 crystalWidth + crystalWidth / 2 );
360 std::sqrt( *l ) : *l );
361 xWeightsSum += energyWeight * xInCalorimeterOffset;
364 crystalHeight + crystalHeight / 2 );
365 yWeightsSum += energyWeight * yInCalorimeterOffset;
366 energyWeightsSum += energyWeight;
372 x = xWeightsSum / energyWeightsSum;
373 y = yWeightsSum / energyWeightsSum;