Kamil Sedlak 2009-05-18
This is the first version of the muSR simulation code (musrSim) based on the merged codes of Kamil Sedlak and Toni Shiroka. It should be a running version of the simulation code, however it has not been very well tested, therefore it will probably need some further development.
This commit is contained in:
73
include/musrSteppingAction.hh
Normal file
73
include/musrSteppingAction.hh
Normal file
@ -0,0 +1,73 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#ifndef musrSteppingAction_h
|
||||
#define musrSteppingAction_h 1
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "G4ProcessManager.hh"
|
||||
#include "globals.hh"
|
||||
#include "musrRootOutput.hh"
|
||||
#include <fstream>
|
||||
|
||||
class G4Timer;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class musrSteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
|
||||
static musrSteppingAction* GetInstance();
|
||||
musrSteppingAction();
|
||||
~musrSteppingAction();
|
||||
|
||||
void UserSteppingAction(const G4Step *theStep);
|
||||
void DoAtTheBeginningOfEvent();
|
||||
void SetLogicalVolumeAsSpecialSaveVolume(G4String logicName, G4int volumeID);
|
||||
void SetVolumeForMuonEventReweighting(G4String logicName, G4int weight);
|
||||
G4bool GetInfoAboutOldTrack(G4int trackID, G4int& parentTrackID, G4int& particleID, G4double& vertexKine,
|
||||
G4ThreeVector& vertexPosition, G4String& vertexLogVol, G4String& vertexProcess);
|
||||
G4bool AreTracksCommingFromSameParent(G4int trackID1, G4int trackID2, G4String volumeName);
|
||||
static const G4int maxNumberOfOldTracks=200;
|
||||
G4bool IsVvvInfoRequested() {return boolIsVvvInfoRequested;}
|
||||
void SetVvvInfoRequested(G4bool boolvar) {boolIsVvvInfoRequested = boolvar;}
|
||||
void SetCalculationOfFieldIntegralRequested(G4bool decision) {boolCalculateFieldIntegral = decision;}
|
||||
|
||||
private:
|
||||
musrRootOutput* myRootOutput;
|
||||
G4Timer* timer;
|
||||
time_t realTimeWhenThisEventStarted;
|
||||
static musrSteppingAction* pointer;
|
||||
|
||||
G4bool muAlreadyWasInTargetInThisEvent;
|
||||
G4bool muAlreadyWasInM0InThisEvent;
|
||||
G4bool muAlreadyWasInM1InThisEvent;
|
||||
G4bool muAlreadyWasInM2InThisEvent;
|
||||
G4bool radioactiveElectronAlreadySavedInThisEvent;
|
||||
G4bool boolIsAnySpecialSaveVolumeDefined;
|
||||
G4bool boolIsVvvInfoRequested;
|
||||
std::map<G4String,G4int> saveVolumeMapping;
|
||||
G4String lastActualVolume;
|
||||
G4bool boolMuonEventReweighting;
|
||||
G4bool boolCalculateFieldIntegral;
|
||||
std::map<G4String,G4int> volumeMuonWeightMapping;
|
||||
|
||||
G4int indexOfOldTrack;
|
||||
std::map<G4int,G4int> myOldTracksMap;
|
||||
G4int particleID_oldTrack[maxNumberOfOldTracks];
|
||||
G4int parentTrackID_oldTrack[maxNumberOfOldTracks];
|
||||
G4double vertexKine_oldTrack[maxNumberOfOldTracks];
|
||||
G4ThreeVector vertexPosition_oldTrack[maxNumberOfOldTracks];
|
||||
G4String vertexLogVol_oldTrack[maxNumberOfOldTracks];
|
||||
G4String vertexProcess_oldTrack[maxNumberOfOldTracks];
|
||||
|
||||
// for field integral along the muon path (if its calculation is requested by the user)
|
||||
G4double BxIntegral, ByIntegral, BzIntegral;
|
||||
G4double BzIntegral1, BzIntegral2, BzIntegral3;
|
||||
G4double CoordinateForFieldIntegral[4];
|
||||
G4double FieldForFieldIntegral[6];
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user