151 const G4ThreeVector& mom,
153 float t,
float X0,
bool isSensitive)
156 const EventContext &ctx = Gaudi::Hive::currentContext();
167 ATH_MSG_INFO(
"Initial step ... preparing event cache.");
182 std::shared_ptr<Acts::PerigeeSurface> surface =
183 Acts::Surface::makeShared<Acts::PerigeeSurface>(
189 Acts::Vector4 actsStart(pos.x(),pos.y(),pos.z(),0);
190 Acts::Vector3 dir = nmom.normalized();
191 Acts::ParticleHypothesis hypothesis{Acts::makeAbsolutePdgParticle(
static_cast<Acts::PdgParticle
>(pdg)),
192 mass,
static_cast<float>(
charge)};
194 gctx.
context(), surface, actsStart, dir,
charge/(mom.mag()/1000), std::nullopt, hypothesis)
199 float tX0 = X0 > 10e-5f ? t/X0 : 0.f;
233 if(eCodeSteps.code != 2 ){
234 ATH_MSG_ERROR(
"Error in the Extrapolator Engine, skip the current step");
239 auto destinationSurfaceActs = Acts::CurvilinearSurface(destinationSurface.
center(), destinationSurface.
normal()).planeSurface();
240 Acts::Result<Acts::BoundTrackParameters> actsParameters =
m_actsExtrapolator->propagate(ctx,
242 *destinationSurfaceActs,
243 Acts::Direction::Forward(),
244 std::numeric_limits<double>::max());
245 if(not actsParameters.ok()){
246 ATH_MSG_ERROR(
"Error in the Acts extrapolation, skip the current step");
252 *destinationSurfaceActs,
253 Acts::Direction::Forward(),
254 std::numeric_limits<double>::max());
255 if(not actsSteps.ok()){
256 ATH_MSG_ERROR(
"Error in the Acts extrapolation, skip the current step");
259 float X0Acts = actsSteps->second.materialInX0;
261 int volID = trackingGeometry->lowestTrackingVolume(gctx.
context(), actsParameters->position(gctx.
context()))->geometryId().volume();
302 float tATLAS = (trkParameters->
position() - previousPos).norm();
311 m_treeData->m_acts_pt[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->transverseMomentum()*1000 : 0.;
312 m_treeData->m_acts_eta[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().eta() : 0.;
313 m_treeData->m_acts_theta[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().theta() : 0.;
314 m_treeData->m_acts_phi[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().phi() : 0.;
332 float tActs = (actsParameters->position(gctx.
context()) - previousPos).norm();
348 destinationSurfaceActs.reset();
Acts::GeometryContext context() const
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses