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;
G4AffineTransform calorimeterLeftTransform
G4ThreeVector calorimeterEPLeftPosition
G4ThreeVector calorimeterEPLeftWorldPosition
G4int calorimeterEDLeftMaxY
CexmcReconstructorMessenger * messenger
G4int calorimeterEDRightMaxY
virtual void Reconstruct(const CexmcEnergyDepositStore *edStore)
G4AffineTransform calorimeterRightTransform
CLHEP::Hep3Vector G4ThreeVector
G4double calorimeterEDLeftAdjacent
G4int calorimeterEDRightMaxX
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
const CexmcEnergyDepositCalorimeterCollection & calorimeterEDLeftCollection
G4ThreeVector targetEPWorldDirection
G4int calorimeterEDLeftMaxX
virtual ~CexmcReconstructor()
G4bool useInnerRefCrystal
const G4AffineTransform & GetCalorimeterLeftTransform(void) const
void ReconstructAngle(void)
void CollectEDInAdjacentCrystals(const CexmcEnergyDepositCalorimeterCollection &edHits, G4int row, G4int column, G4double &ed)
G4bool targetEPInitialized
G4ThreeVector calorimeterEPLeftWorldDirection
G4ThreeVector targetEPWorldPosition
std::vector< CexmcEnergyDepositCrystalRowCollection > CexmcEnergyDepositCalorimeterCollection
CexmcCrystalSelectionAlgorithm csAlgorithm
void ReconstructEntryPoints(const CexmcEnergyDepositStore *edStore)
CexmcSetup::CalorimeterGeometryData calorimeterGeometry
CexmcCalorimeterEntryPointDefinitionAlgorithm epDefinitionAlgorithm
G4bool collectEDInAdjacentCrystals
void TransformToAdjacentInnerCrystal(G4int &column, G4int &row) const
void CalculateWeightedEPPosition(const CexmcEnergyDepositCalorimeterCollection &edHits, G4int row, G4int column, G4double &x, G4double &y, G4double &ed)
G4ThreeVector calorimeterEPLeftDirection
void ReconstructTargetPoint(void)
G4ThreeVector calorimeterEPRightWorldPosition
static G4RunManager * GetRunManager()
G4ThreeVector calorimeterEPRightPosition
const G4AffineTransform & GetCalorimeterRightTransform(void) const
CexmcCalorimeterEntryPointDepthDefinitionAlgorithm epDepthDefinitionAlgorithm
const CalorimeterGeometryData & GetCalorimeterGeometry(void) const
G4ThreeVector calorimeterEPRightDirection
G4ThreeVector targetEPDirection
const G4AffineTransform & GetTargetTransform(void) const
const CexmcEnergyDepositCalorimeterCollection & calorimeterEDRightCollection
G4ThreeVector targetEPPosition
G4ThreeVector calorimeterEPRightWorldDirection
virtual G4bool HasFullTrigger(void) const
G4AffineTransform targetTransform
G4double calorimeterEDRightAdjacent