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)),
193 Acts::AnyCharge{
static_cast<float>(
charge)}};
195 gctx.
context(), surface, actsStart, dir,
charge/(mom.mag()/1000), std::nullopt, hypothesis)
200 float tX0 = X0 > 10e-5f ? t/X0 : 0.f;
234 if(eCodeSteps.code != 2 ){
235 ATH_MSG_ERROR(
"Error in the Extrapolator Engine, skip the current step");
240 auto destinationSurfaceActs = Acts::CurvilinearSurface(destinationSurface.
center(), destinationSurface.
normal()).planeSurface();
241 Acts::Result<Acts::BoundTrackParameters> actsParameters =
m_actsExtrapolator->propagate(ctx,
243 *destinationSurfaceActs,
244 Acts::Direction::Forward(),
245 std::numeric_limits<double>::max());
246 if(not actsParameters.ok()){
247 ATH_MSG_ERROR(
"Error in the Acts extrapolation, skip the current step");
253 *destinationSurfaceActs,
254 Acts::Direction::Forward(),
255 std::numeric_limits<double>::max());
256 if(not actsSteps.ok()){
257 ATH_MSG_ERROR(
"Error in the Acts extrapolation, skip the current step");
260 float X0Acts = actsSteps->second.materialInX0;
262 int volID = trackingGeometry->lowestTrackingVolume(gctx.
context(), actsParameters->position(gctx.
context()))->geometryId().volume();
303 float tATLAS = (trkParameters->
position() - previousPos).norm();
312 m_treeData->m_acts_pt[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->transverseMomentum()*1000 : 0.;
313 m_treeData->m_acts_eta[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().eta() : 0.;
314 m_treeData->m_acts_theta[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().theta() : 0.;
315 m_treeData->m_acts_phi[
m_treeData->m_g4_steps] = actsParameters.ok() ? actsParameters->momentum().phi() : 0.;
333 float tActs = (actsParameters->position(gctx.
context()) - previousPos).norm();
349 destinationSurfaceActs.reset();
Acts::GeometryContext context() const
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses