Belle II Software development
Geant4MaterialInterface.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <memory>
12
13#include "genfit/AbsMaterialInterface.h"
14
15class G4VPhysicalVolume;
16
17namespace Belle2 {
29 class Geant4MaterialInterface : public genfit::AbsMaterialInterface {
30
31 public:
32
35
39 bool initTrack(double posX, double posY, double posZ,
40 double dirX, double dirY, double dirZ) override;
41
44 genfit::Material getMaterialParameters() override;
45
52 double findNextBoundary(const genfit::RKTrackRep* rep,
53 const genfit::M1x7& state7,
54 double sMax,
55 bool varField = true) override;
56
57 private:
58
60 std::unique_ptr<class G4SafeNavigator> nav_;
61
63 const class G4VPhysicalVolume* currentVolume_;
64
68 bool m_takingFullStep = false;
69 };
70
72}
AbsMaterialInterface implementation for use with Geant4's navigator.
bool initTrack(double posX, double posY, double posZ, double dirX, double dirY, double dirZ) override
Initialize the navigator at given position and with given direction.
bool m_takingFullStep
stores whether to call SetGeometricallyLimitedStep() because the full step length was taken.
genfit::Material getMaterialParameters() override
Get material parameters in current material.
const class G4VPhysicalVolume * currentVolume_
the volume the extraoplation is currenly located in
double findNextBoundary(const genfit::RKTrackRep *rep, const genfit::M1x7 &state7, double sMax, bool varField=true) override
Make a step (following the curvature) until step length sMax or the next boundary is reached.
std::unique_ptr< class G4SafeNavigator > nav_
holds a object of G4SafeNavigator, which is located in Geant4MaterialInterface.cc
Abstract base class for different kinds of events.