Back to home page

EIC code displayed by LXR

 
 

    


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

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 // G4ScoreSplittingProcess
0027 //
0028 // Class description:
0029 //
0030 // This process is used to split the length and energy
0031 // of a step in a regular structure into sub-steps, and to
0032 // call the scorers for each sub-volume.
0033 // It invokes sensitive detectors assigned in the *mass* world.
0034 //
0035 // Design and first implementation: J.Apostolakis, M.Asai - 2010
0036 //---------------------------------------------------------------------
0037 #ifndef G4ScoreSplittingProcess_h
0038 #define G4ScoreSplittingProcess_h 1
0039 
0040 #include "G4FieldTrack.hh"
0041 #include "G4TouchableHandle.hh"
0042 #include "G4VProcess.hh"
0043 #include "globals.hh"
0044 
0045 class G4Step;
0046 class G4Navigator;
0047 class G4TransportationManager;
0048 class G4PathFinder;
0049 class G4VPhysicalVolume;
0050 class G4ParticleChange;
0051 class G4EnergySplitter;
0052 class G4TouchableHistory;
0053 
0054 class G4ScoreSplittingProcess : public G4VProcess
0055 {
0056   public:
0057 
0058     G4ScoreSplittingProcess(const G4String& processName = "ScoreSplittingProc",
0059                             G4ProcessType theType = fParameterisation);
0060     ~G4ScoreSplittingProcess() override;
0061 
0062     //--------------------------------------------------------------
0063     //     Process interface
0064     //--------------------------------------------------------------
0065 
0066     void StartTracking(G4Track*) override;
0067 
0068     //------------------------------------------------------------------------
0069     // GetPhysicalInteractionLength() and DoIt() methods for AtRest
0070     //------------------------------------------------------------------------
0071 
0072     G4double AtRestGetPhysicalInteractionLength(const G4Track&, G4ForceCondition*) override;
0073 
0074     G4VParticleChange* AtRestDoIt(const G4Track&, const G4Step&) override;
0075 
0076     //------------------------------------------------------------------------
0077     // GetPhysicalInteractionLength() and DoIt() methods for AlongStep
0078     //------------------------------------------------------------------------
0079 
0080     G4double AlongStepGetPhysicalInteractionLength(const G4Track&, G4double, G4double, G4double&,
0081                                                    G4GPILSelection*) override;
0082 
0083     G4VParticleChange* AlongStepDoIt(const G4Track&, const G4Step&) override;
0084 
0085     //-----------------------------------------------------------------------
0086     // GetPhysicalInteractionLength() and DoIt() methods for PostStep
0087     //-----------------------------------------------------------------------
0088 
0089     G4double PostStepGetPhysicalInteractionLength(const G4Track& track, G4double previousStepSize,
0090                                                   G4ForceCondition* condition) override;
0091 
0092     G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override;
0093 
0094     void Verbose(const G4Step&) const;
0095 
0096   private:
0097 
0098     G4TouchableHistory* CreateTouchableForSubStep(G4int newVoxelNum, G4ThreeVector newPosition);
0099 
0100   private:
0101 
0102     void CopyStepStart(const G4Step& step);
0103 
0104     G4Step* fSplitStep;
0105     G4StepPoint* fSplitPreStepPoint;
0106     G4StepPoint* fSplitPostStepPoint;
0107 
0108     G4VParticleChange dummyParticleChange;
0109     G4ParticleChange xParticleChange;
0110 
0111     // -------------------------------
0112     // Touchables for the Split Step
0113     // -------------------------------
0114     G4TouchableHandle fOldTouchableH;
0115     G4TouchableHandle fNewTouchableH;
0116 
0117     // Memory of Touchables of full step
0118     G4TouchableHandle fInitialTouchableH;
0119     G4TouchableHandle fFinalTouchableH;
0120 
0121     G4EnergySplitter* fpEnergySplitter;
0122 };
0123 
0124 #endif