345 {
346
347
348 const Trk::Surface &hitSurface =
pars.associatedSurface();
349
350
352 IdentifierHash hitIdHash = hitSiDetElement.
identifyHash();
353
355 const EventContext& ctx = Gaudi::Hive::currentContext();
357 bool isGood = isActive ?
m_condSummaryTool->isGood(hitIdHash, hitId, ctx) :
false;
358 if (!isActive)
359 ATH_MSG_VERBOSE(
"[ sihit ] ID " << hitId <<
", hash " << hitIdHash <<
" is not active. ");
360 else if (!isGood)
361 ATH_MSG_VERBOSE(
"[ sihit ] ID " << hitId <<
", hash " << hitIdHash <<
" is active but not good. ");
362 else
363 ATH_MSG_VERBOSE(
"[ sihit ] ID " << hitId <<
", hash " << hitIdHash <<
" is active and good.");
364 if (!isActive || !isGood) return;
365 }
366
367
371
372 const double thickness = hitSiDetElement.
thickness();
373
376 Amg::Vector3D localDirection = sTransform.inverse().linear() * particleDir;
377 localDirection *= thickness/
cos(localDirection.theta());
378
379 int movingDirection = localDirection.z() > 0. ? 1 : -1;
380
381 double distX = localDirection.x();
382 double distY = localDirection.y();
383
384 double localEntryX = interX-0.5*distX;
385 double localEntryY = interY-0.5*distY;
386 double localExitX = interX+0.5*distX;
387 double localExitY = interY+0.5*distY;
390
393
395 bool isSCT = hitSiDetElement.
isSCT();
396
397
401
402 const double energyDeposit = dEdX * (localExit - localEntry).mag();
403
404
405 const HepGeom::Point3D<double> localEntryHep( localEntry.x(), localEntry.y(), localEntry.z() );
406 const HepGeom::Point3D<double> localExitHep( localExit.x(), localExit.y(), localExit.z() );
407
408 if ( isSiDetElement )
409 ATH_MSG_VERBOSE(
"[ sihit ] Adding an SiHit SiDetElement to the SiHitCollection.");
410 else
411 ATH_MSG_VERBOSE(
"[ sihit ] SiHit SiDetElement not found to add to the SiHitCollection.");
412
417 localExitHep,
418 energyDeposit,
419 time,
420 partLink,
427
428}
#define ATH_MSG_VERBOSE(x)
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
const GeoTrf::Transform3D & transformHit() const
Local (simulation/hit frame) to global transform.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
double energyDeposit_exact(const ISF::ISFParticle &isp, bool &isPix, bool &isSCT) const
Calculate Energyloss with exact Landau*Gauss.
BooleanProperty m_useConditionsTool
const PixelID * m_pixIdHelper
the Pixel ID helper
double energyDeposit_fast(const ISF::ISFParticle &isp, bool &isPix, bool &isSCT) const
Calculate Energyloss with simple Landau approximation.
ToolHandle< IInDetConditionsTool > m_condSummaryTool
ToolHandle to ClusterMaker.
SiHitCollection * m_hitColl
the SiHit collection
const SCT_ID * m_sctIdHelper
the SCT ID helper
BooleanProperty m_fastEnergyDepositionModel
use fast energy deposition model (landau approximation )
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D