Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:59

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 //
0027 #include "AnalysisMessenger.hh"
0028 
0029 #include "AnalysisManager.hh"
0030 
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 
0033 AnalysisMessenger::AnalysisMessenger(AnalysisManager* analysisManager)
0034   : fpAnalysisManager(analysisManager),
0035     fpAnalysisDirectory(new G4UIdirectory("/analysisDNA/")),
0036     fpSaveStrands(new G4UIcmdWithABool("/analysisDNA/saveStrands", this)),
0037     fpStrandDirectory(new G4UIcmdWithAString("/analysisDNA/strandDir", this)),
0038     fpFragmentLength(new G4UIcmdWithAnInteger("/analysisDNA/fragmentGap", this)),
0039     fpSaveSingleChain(new G4UIcmdWithAnInteger("/analysisDNA/diagnosticChain", this)),
0040     fpDSBDistance(new G4UIcmdWithAnInteger("/analysisDNA/dsbDistance", this)),
0041     fpTestClassifier(new G4UIcmdWithoutParameter("/analysisDNA/testClassifier", this)),
0042     fpFileName(new G4UIcmdWithAString("/analysisDNA/fileName", this))
0043 {
0044   // world geometry
0045   fpAnalysisDirectory->SetGuidance("App local commands for analysis");
0046 
0047   fpSaveStrands->SetGuidance("Bool to set whether strands ought be saved");
0048   fpSaveStrands->SetGuidance("use /analysisDNA/strandDir to set location");
0049 
0050   fpStrandDirectory->SetGuidance("Directory to save DNA damage fragments");
0051   fpStrandDirectory->SetParameterName("DNA framgents", false);
0052 
0053   fpFragmentLength->SetGuidance("Gap between DNA fragments in base pairs.");
0054   fpFragmentLength->SetGuidance("Set to zero to score placement volumes independently");
0055   fpFragmentLength->SetParameterName("Base Pair gap", false);
0056 
0057   fpSaveSingleChain->SetGuidance("Save the position of hits histos only on one chain");
0058   fpSaveSingleChain->SetParameterName("Chain Index", false);
0059 
0060   fpDSBDistance->SetGuidance("Max separation of DSBs. Must be less than 31.");
0061   fpDSBDistance->SetParameterName("Max. DSB distance.", false);
0062 
0063   fpTestClassifier->SetGuidance("Run unit test for break classification");
0064 
0065   fpFileName->SetGuidance("ROOT output file name");
0066   fpFileName->SetParameterName("ROOT output file name", false);
0067 }
0068 
0069 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0070 
0071 void AnalysisMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
0072 {
0073   if (command == fpStrandDirectory.get()) {
0074     fpAnalysisManager->SetStrandDirectory(newValue);
0075   }
0076   else if (command == fpSaveStrands.get()) {
0077     fpAnalysisManager->SetSaveStrands(G4UIcmdWithABool::GetNewBoolValue(newValue));
0078   }
0079   else if (command == fpFragmentLength.get()) {
0080     fpAnalysisManager->SetFragmentGap(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0081   }
0082   else if (command == fpSaveSingleChain.get()) {
0083     fpAnalysisManager->SetChainToSave(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0084   }
0085   else if (command == fpDSBDistance.get()) {
0086     fpAnalysisManager->SetDSBDistance(G4UIcmdWithAnInteger::GetNewIntValue(newValue));
0087   }
0088   else if (command == fpTestClassifier.get()) {
0089     fpAnalysisManager->TestClassification();
0090   }
0091   else if (command == fpFileName.get()) {
0092     fpAnalysisManager->SetFileName(newValue);
0093   }
0094 }
0095 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......