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