Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // G4StepPoint
0027 //
0028 // Class description:
0029 //
0030 // This class represents information associated with each end
0031 // of a Step like the space/time data of the particle.
0032 
0033 // Author: Hisaya Kurashige, 16 February 2000
0034 // --------------------------------------------------------------------
0035 #ifndef G4StepPoint_hh
0036 #define G4StepPoint_hh 1
0037 
0038 #include <cmath>  // Include from 'system'
0039 #include <CLHEP/Units/PhysicalConstants.h>
0040 
0041 #include "globals.hh"            // Include from 'global'
0042 #include "G4Allocator.hh"        // Include from 'global'
0043 #include "G4ThreeVector.hh"      // Include from 'geometry'
0044 #include "G4VPhysicalVolume.hh"  // Include from 'geometry'
0045 #include "G4SteppingControl.hh"
0046 #include "G4StepStatus.hh"       // Include from 'track'
0047 #include "G4TouchableHandle.hh"  // Include from 'geometry'
0048 #include "G4Material.hh"
0049 #include "G4LogicalVolume.hh"
0050 
0051 class G4VProcess;
0052 class G4MaterialCutsCouple;
0053 class G4VSensitiveDetector;
0054 
0055 class G4StepPoint
0056 {
0057   public:
0058 
0059     G4StepPoint() = default;
0060    ~G4StepPoint()= default;
0061       // Constructor/Destructor
0062 
0063     G4StepPoint(const G4StepPoint&) = default;
0064     G4StepPoint& operator=(const G4StepPoint&);
0065       // Copy Constructor and assignment operator
0066 
0067     const G4ThreeVector& GetPosition() const;
0068     void SetPosition(const G4ThreeVector& aValue);
0069     void AddPosition(const G4ThreeVector& aValue);
0070       // Position
0071 
0072     G4double GetLocalTime() const;
0073     void SetLocalTime(const G4double aValue);
0074     void AddLocalTime(const G4double aValue);
0075       // Time since the track is created
0076 
0077     G4double GetGlobalTime() const;
0078     void SetGlobalTime(const G4double aValue);
0079     void AddGlobalTime(const G4double aValue);
0080       // Time since the event in which the track belongs is created
0081 
0082     G4double GetProperTime() const;
0083     void SetProperTime(const G4double aValue);
0084     void AddProperTime(const G4double aValue);
0085       // Proper time of the particle
0086 
0087     const G4ThreeVector& GetMomentumDirection() const;
0088     void SetMomentumDirection(const G4ThreeVector& aValue);
0089     void AddMomentumDirection(const G4ThreeVector& aValue);
0090       // Direction of momentum  (should be an unit vector)
0091 
0092     G4ThreeVector GetMomentum() const;
0093       // Total momentum of the track
0094 
0095     G4double GetTotalEnergy() const;
0096       // Total energy of the track
0097 
0098     G4double GetKineticEnergy() const;
0099     void SetKineticEnergy(const G4double aValue);
0100     void AddKineticEnergy(const G4double aValue);
0101       // Kinetic Energy of the track
0102 
0103     G4double GetVelocity() const;
0104     void SetVelocity(G4double v);
0105       // Velocity
0106 
0107     G4double GetBeta() const;
0108       // Velocity of the track in unit of c(light velocity)
0109 
0110     G4double GetGamma() const;
0111       // Gamma factor (1/sqrt[1-beta*beta]) of the track
0112 
0113     G4VPhysicalVolume* GetPhysicalVolume() const;
0114 
0115     const G4VTouchable* GetTouchable() const;
0116     const G4TouchableHandle& GetTouchableHandle() const;
0117     void SetTouchableHandle(const G4TouchableHandle& apValue);
0118 
0119     G4Material* GetMaterial() const;
0120     void SetMaterial(G4Material*);
0121 
0122     const G4MaterialCutsCouple* GetMaterialCutsCouple() const;
0123     void SetMaterialCutsCouple(const G4MaterialCutsCouple*);
0124 
0125     G4VSensitiveDetector* GetSensitiveDetector() const;
0126     void SetSensitiveDetector(G4VSensitiveDetector*);
0127 
0128     G4double GetSafety() const;
0129     void SetSafety(const G4double aValue);
0130 
0131     const G4ThreeVector& GetPolarization() const;
0132     void SetPolarization(const G4ThreeVector& aValue);
0133     void AddPolarization(const G4ThreeVector& aValue);
0134 
0135     G4StepStatus GetStepStatus() const;
0136     void SetStepStatus(const G4StepStatus aValue);
0137 
0138     const G4VProcess* GetProcessDefinedStep() const;
0139       // If the pointer is 0, this means the Step is defined
0140       // by the user defined limit in the current volume
0141     void SetProcessDefinedStep(const G4VProcess* aValue);
0142 
0143     G4double GetMass() const;
0144     void SetMass(G4double value);
0145 
0146     G4double GetCharge() const;
0147     void SetCharge(G4double value);
0148 
0149     G4double GetMagneticMoment() const;
0150     void SetMagneticMoment(G4double value);
0151 
0152     void SetWeight(G4double aValue);
0153     G4double GetWeight() const;
0154 
0155   private:
0156 
0157     G4ThreeVector fPosition;
0158     G4double fGlobalTime = 0.0;
0159       // Time since event is created
0160     G4double fLocalTime = 0.0;
0161       // Time since track is created
0162     G4double fProperTime = 0.0;
0163       // Time since track is created (in rest frame of particle)
0164     G4ThreeVector fMomentumDirection;
0165     G4double fKineticEnergy = 0.0;
0166     G4double fVelocity = 0.0;
0167       // Momentum,energy and velocity
0168     G4TouchableHandle fpTouchable;
0169       // Touchable Handle
0170     G4Material* fpMaterial = nullptr;
0171       // Material of the volmue
0172     const G4MaterialCutsCouple* fpMaterialCutsCouple = nullptr;
0173       // MaterialCutsCouple of the volmue
0174     G4VSensitiveDetector* fpSensitiveDetector = nullptr;
0175     G4double fSafety = 0.0;
0176     G4ThreeVector fPolarization;
0177     G4StepStatus fStepStatus = fUndefined;
0178       // DoIt type which defined the current Step.
0179     const G4VProcess* fpProcessDefinedStep = nullptr;
0180       // Process which defined the current Step.
0181     G4double fMass = 0.0;
0182       // Dynamical mass of the particle
0183     G4double fCharge = 0.0;
0184       // Dynamical Charge of the particle
0185     G4double fMagneticMoment = 0.0;
0186       // Dynamical MagneticMoment of the particle
0187     G4double fWeight = 0.0;
0188       // Track Weight
0189 };
0190 
0191 #include "G4StepPoint.icc"
0192 
0193 #endif