Warning, file /geant4/examples/advanced/dna/dsbandrepair/include/Analysis.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #ifndef ANALYSIS_h
0033 #define ANALYSIS_h 1
0034
0035 #include "G4ThreeVector.hh"
0036 #include <map>
0037 #include "G4AnalysisManager.hh"
0038 #include "G4GenericMessenger.hh"
0039
0040
0041
0042 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
0043 TypeName(const TypeName&); \
0044 void operator=(const TypeName&)
0045
0046
0047
0048 struct InfoForChemGeo
0049 {
0050 G4int fType{0};
0051 G4int fState{-99};
0052 G4int fElectronicLevel{-99};
0053 G4double fX{0.};
0054 G4double fY{0.};
0055 G4double fZ{0.};
0056 G4int fParentTrackID{-1};
0057 G4int fEventNumber{-1};
0058 G4int fVolume{-1};
0059 G4int fVolumeCopyNumber{-1};
0060 G4int fMotherVolume{-1};
0061 G4int fMotherVolumeCopyNumber{-1};
0062 G4double fRelX{-1.};
0063 G4double fRelY{-1.};
0064 G4double fRelZ{-1.};
0065 };
0066
0067
0068
0069 struct InfoInPhysStage
0070 {
0071 G4int fFlagParticle{-1};
0072 G4int fFlagParentID{-1};
0073 G4int fFlagProcess{-1};
0074 G4double fX{-1.};
0075 G4double fY{-1.};
0076 G4double fZ{-1.};
0077 G4double fEdep{-1.};
0078 G4int fEventNumber{-1};
0079 G4int fVolumeName{-1};
0080 G4int fCopyNumber{-1};
0081 G4int fLastMetVoxelCopyNum{-1};
0082 };
0083
0084
0085
0086 class Analysis
0087 {
0088 public:
0089 ~Analysis() = default;
0090 static Analysis* GetAnalysis();
0091
0092 void OpenFile(const G4String outFolder="");
0093 void Save();
0094 void Close(G4bool reset = true);
0095 void SetFileName(const G4String& name) {fFileName = name;};
0096 void Book();
0097 G4AnalysisManager* GetAnalysisManager();
0098 void ClearVector() ;
0099 void AddInfoForChemGeo(InfoForChemGeo);
0100 void AddInfoInPhysStage(InfoInPhysStage);
0101 void UpdateChemInputDataAndFillNtuple();
0102 void RecordCellDefFiliePath(const G4String &pth) {fCellDefFilePath = pth;};
0103 void RecordVoxelDefFilesList(std::set<G4String> list) {fVoxelDefFilesList = list;};
0104 void RecordChemInputFolderName(const G4String &pth) {fChemInputFolderName = pth;};
0105 void WritePhysGeo();
0106 G4String GetChemInputFolderName() {return fChemInputFolderName;}
0107 G4String GetPhysOutFolderName() {return fPhysOutFolderName;}
0108 G4String GetChemOutFolderName() {return fChemOutFolderName;}
0109 void SetTotalNbBpPlacedInGeo(unsigned long long val) {fTotalNbBpPlacedInGeo = val;}
0110 void SetTotalNbHistonePlacedInGeo(unsigned long long val) {fTotalNbHistonePlacedInGeo = val;}
0111 void SetNucleusVolume(G4double vl) {fNucleusVolume = vl;};
0112 void SetNucleusMassDensity(G4double md) {fNucleusMassDensity = md;};
0113 void CheckAndCreateNewFolderInChemStage();
0114 void CheckAndCreateNewFolderInPhysStage();
0115 private:
0116 Analysis() {DefineCommands();};
0117 G4String CreateChemInputFile(G4int eventNum,G4int volumeCopyNumber,const G4String &voxelName);
0118 void UpdatingChemInputFile(InfoForChemGeo);
0119 void UpdatingChemInputFile(InfoInPhysStage);
0120 std::vector<InfoForChemGeo> fInfoForChemGeoVector;
0121 std::vector<InfoInPhysStage> fInfoInPhysStageVector;
0122 std::map<G4double, std::map<G4double, G4String> > fOutputFiles;
0123 G4String fCellDefFilePath;
0124 std::set<G4String> fVoxelDefFilesList;
0125 G4String fChemInputFolderName{"chem_input"};
0126 G4String fPhysOutFolderName{"phys_output"};
0127 G4String fChemOutFolderName{"chem_output"};
0128 unsigned long long fTotalNbBpPlacedInGeo{0};
0129 unsigned long long fTotalNbHistonePlacedInGeo{0};
0130 G4double fNucleusVolume{0.};
0131 G4double fNucleusMassDensity{0.};
0132 G4String fFileName="Output";
0133 std::unique_ptr<G4GenericMessenger> fMessenger;
0134 void DefineCommands();
0135 DISALLOW_COPY_AND_ASSIGN(Analysis);
0136 };
0137
0138
0139
0140 #endif