#include "TG4StepManager.h"
#include "TG4GeometryServices.h"
+#include "TG4SDServices.h"
#include "TG4ParticlesManager.h"
#include "TG4PhysicsManager.h"
#include "TG4VSensitiveDetector.h"
TG4StepManager* TG4StepManager::fgInstance = 0;
+//_____________________________________________________________________________
TG4StepManager::TG4StepManager()
: fTrack(0),
fStep(0),
fgInstance = this;
}
+//_____________________________________________________________________________
TG4StepManager::TG4StepManager(const TG4StepManager& right) {
//
TG4Globals::Exception(
"Attempt to copy TG4StepManager singleton.");
}
+//_____________________________________________________________________________
TG4StepManager::~TG4StepManager() {
//
}
// operators
+//_____________________________________________________________________________
TG4StepManager& TG4StepManager::operator=(const TG4StepManager& right)
{
// check assignement to self
// private methods
+//_____________________________________________________________________________
void TG4StepManager::CheckTrack() const
{
// Gives exception in case the track is not defined.
}
+//_____________________________________________________________________________
void TG4StepManager::CheckStep(const G4String& method) const
{
// Gives exception in case the step is not defined.
}
+//_____________________________________________________________________________
void TG4StepManager::CheckSteppingManager() const
{
// Gives exception in case the step is not defined.
}
+//_____________________________________________________________________________
void TG4StepManager::SetTLorentzVector(G4ThreeVector xyz, G4double t,
TLorentzVector& lv) const
{
lv[3] = t;
}
+//_____________________________________________________________________________
G4VPhysicalVolume* TG4StepManager::GetCurrentOffPhysicalVolume(G4int off) const
{
// Returns the physical volume of the off-th mother's
// public methods
+//_____________________________________________________________________________
void TG4StepManager::StopTrack()
{
// Stops the current track and skips to the next.
// fTrack->SetTrackStatus(fKillTrackAndSecondaries);
}
+//_____________________________________________________________________________
void TG4StepManager::StopEvent()
{
// Aborts the current event processing.
G4UImanager::GetUIpointer()->ApplyCommand("/alStacking/clearStack");
}
+//_____________________________________________________________________________
void TG4StepManager::SetMaxStep(Float_t step)
{
// Maximum step allowed in the current logical volume.
}
+//_____________________________________________________________________________
void TG4StepManager::SetMaxNStep(Int_t maxNofSteps)
{
// Not yet implemented.
"TG4StepManager::SetMaxNStep(..) is not yet implemented.");
}
+//_____________________________________________________________________________
void TG4StepManager::SetUserDecay(Int_t pdg)
{
// Not yet implemented.
"TG4StepManager::SetUserDecay(..) is not yet implemented.");
}
+//_____________________________________________________________________________
G4VPhysicalVolume* TG4StepManager::GetCurrentPhysicalVolume() const
{
// Returns the current physical volume.
return physVolume;
}
+//_____________________________________________________________________________
Int_t TG4StepManager::CurrentVolID(Int_t& copyNo) const
{
// Returns the current sensitive detector ID
copyNo = physVolume->GetCopyNo() + 1;
// sensitive detector ID
- TG4GeometryServices* geometryServices = TG4GeometryServices::Instance();
- return geometryServices->GetVolumeID(physVolume->GetLogicalVolume());
+ TG4SDServices* sdServices = TG4SDServices::Instance();
+ return sdServices->GetVolumeID(physVolume->GetLogicalVolume());
}
+//_____________________________________________________________________________
Int_t TG4StepManager::CurrentVolOffID(Int_t off, Int_t& copyNo) const
{
// Returns the off-th mother's of the current volume
copyNo = mother->GetCopyNo() + 1;
// sensitive detector ID
- TG4GeometryServices* geometryServices = TG4GeometryServices::Instance();
- return geometryServices->GetVolumeID(mother->GetLogicalVolume());
+ TG4SDServices* sdServices = TG4SDServices::Instance();
+ return sdServices->GetVolumeID(mother->GetLogicalVolume());
}
else {
copyNo = 0;
}
}
+//_____________________________________________________________________________
const char* TG4StepManager::CurrentVolName() const
{
// Returns the current physical volume name.
return GetCurrentPhysicalVolume()->GetName();
}
+//_____________________________________________________________________________
const char* TG4StepManager::CurrentVolOffName(Int_t off) const
{
// Returns the off-th mother's physical volume name.
return 0;
}
+//_____________________________________________________________________________
Int_t TG4StepManager::CurrentMaterial(Float_t &a, Float_t &z, Float_t &dens,
Float_t &radl, Float_t &absl) const
{
}
}
+//_____________________________________________________________________________
void TG4StepManager::Gmtod(Float_t* xm, Float_t* xd, Int_t iflag)
{
// Transforms a position from the world reference frame
xd[2] = theLocalPoint.z();
}
+//_____________________________________________________________________________
void TG4StepManager::Gdtom(Float_t* xd, Float_t* xm, Int_t iflag)
{
// Transforms a position from the current volume reference frame
xm[2] = theGlobalPoint.z();
}
+//_____________________________________________________________________________
Float_t TG4StepManager::MaxStep() const
{
// Returns maximum step allowed in the current logical volume
}
}
+//_____________________________________________________________________________
Int_t TG4StepManager::GetMaxNStep() const
{
// Not yet implemented.
return 0;
}
+//_____________________________________________________________________________
void TG4StepManager::TrackPosition(TLorentzVector& position) const
{
// Current particle position (in the world reference frame)
SetTLorentzVector(positionVector, time, position);
}
+//_____________________________________________________________________________
Int_t TG4StepManager::GetMedium() const
{
// Returns the second index of the current material (corresponding to
return geometryServices->GetMediumId(curMaterial);
}
+//_____________________________________________________________________________
void TG4StepManager::TrackMomentum(TLorentzVector& momentum) const
{
// Current particle "momentum" (px, py, pz, Etot).
SetTLorentzVector(momentumVector, energy, momentum);
}
+//_____________________________________________________________________________
void TG4StepManager::TrackVertexPosition(TLorentzVector& position) const
{
// The vertex particle position (in the world reference frame)
SetTLorentzVector(positionVector, time, position);
}
+//_____________________________________________________________________________
void TG4StepManager::TrackVertexMomentum(TLorentzVector& momentum) const
{
// The vertex particle "momentum" (px, py, pz, Ekin)
SetTLorentzVector(momentumVector, energy, momentum);
}
+//_____________________________________________________________________________
Float_t TG4StepManager::TrackStep() const
{
// Returns the current step length.
return length;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::TrackLength() const
{
// Returns the length of the current track from its origin.
return length;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::TrackTime() const
{
// Returns the local time since the current track is created.
return time;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::Edep() const
{
// Returns total energy deposit in this step.
return energyDeposit;
}
+//_____________________________________________________________________________
Int_t TG4StepManager::TrackPid() const
{
// Returns the current particle PDG encoding.
return pdgEncoding;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::TrackCharge() const
{
// Returns the current particle charge.
return charge;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::TrackMass() const
{
// Returns current particle rest mass.
return mass;
}
+//_____________________________________________________________________________
Float_t TG4StepManager::Etot() const
{
// Returns total energy of the current particle.
return energy;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackInside() const
{
// Returns true if particle does not cross geometrical boundary
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackEntering() const
{
// Returns true if particle cross a geometrical boundary
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackExiting() const
{
// Returns true if particle cross a geometrical boundary.
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackOut() const
{
// Returns true if particle cross the world boundary
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackStop() const
{
// Returns true if particle has stopped
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackDisappeared() const
{
// Returns true if particle has disappeared
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsTrackAlive() const
{
// Returns true if particle continues tracking.
return false;
}
+//_____________________________________________________________________________
Bool_t TG4StepManager::IsNewTrack() const
{
// Returns true when track performs the first step.
return false;
}
+//_____________________________________________________________________________
Int_t TG4StepManager::NSecondaries() const
{
// Returns the number of secondary particles generated
return nofSecondaries;
}
+//_____________________________________________________________________________
void TG4StepManager::GetSecondary(Int_t index, Int_t& particleId,
TLorentzVector& position, TLorentzVector& momentum)
{
}
}
+//_____________________________________________________________________________
AliMCProcess TG4StepManager::ProdProcess(Int_t isec) const
{
// The process that has produced the secondary particles specified
}
}
-
+//_____________________________________________________________________________
Int_t TG4StepManager::StepProcesses(TArrayI &proc) const
{
// Fills the array of processes that were active in the current step