Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: RE05StackingActionMessenger.cc 66526 2012-12-19 13:41:33Z ihrivnac $
|
||||
// $Id: RE05StackingActionMessenger.cc 98775 2016-08-09 14:30:39Z gcosmo $
|
||||
//
|
||||
/// \file RE05/src/RE05StackingActionMessenger.cc
|
||||
/// \brief Implementation of the RE05StackingActionMessenger class
|
||||
@@ -35,67 +35,78 @@
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RE05StackingActionMessenger::RE05StackingActionMessenger(RE05StackingAction * msa)
|
||||
:myAction(msa)
|
||||
: G4UImessenger(),
|
||||
fMyAction(msa),
|
||||
fMuonCmd(0), fIsoMuonCmd(0), fIsoCmd(0), fRoiCmd(0)
|
||||
{
|
||||
muonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
|
||||
muonCmd->SetGuidance("Number of muon for the trigger.");
|
||||
muonCmd->SetParameterName("N",true);
|
||||
muonCmd->SetDefaultValue(2);
|
||||
muonCmd->SetRange("N>=0");
|
||||
fMuonCmd = new G4UIcmdWithAnInteger("/mydet/reqmuon",this);
|
||||
fMuonCmd->SetGuidance("Number of muon for the trigger.");
|
||||
fMuonCmd->SetParameterName("N",true);
|
||||
fMuonCmd->SetDefaultValue(2);
|
||||
fMuonCmd->SetRange("N>=0");
|
||||
|
||||
isomuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
|
||||
isomuonCmd->SetGuidance("Number of isolated muon for the trigger.");
|
||||
isomuonCmd->SetParameterName("N",true);
|
||||
isomuonCmd->SetDefaultValue(2);
|
||||
isomuonCmd->SetRange("N>=0");
|
||||
fIsoMuonCmd = new G4UIcmdWithAnInteger("/mydet/isomuon",this);
|
||||
fIsoMuonCmd->SetGuidance("Number of isolated muon for the trigger.");
|
||||
fIsoMuonCmd->SetParameterName("N",true);
|
||||
fIsoMuonCmd->SetDefaultValue(2);
|
||||
fIsoMuonCmd->SetRange("N>=0");
|
||||
|
||||
isoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
|
||||
isoCmd->SetGuidance("Maximum allowed number of hits in tracker");
|
||||
isoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
|
||||
isoCmd->SetParameterName("N",true);
|
||||
isoCmd->SetDefaultValue(10);
|
||||
isoCmd->SetRange("N>=0");
|
||||
fIsoCmd = new G4UIcmdWithAnInteger("/mydet/isolation",this);
|
||||
fIsoCmd->SetGuidance("Maximum allowed number of hits in tracker");
|
||||
fIsoCmd->SetGuidance(" for an isolated muon track (includes hits by muon)");
|
||||
fIsoCmd->SetParameterName("N",true);
|
||||
fIsoCmd->SetDefaultValue(10);
|
||||
fIsoCmd->SetRange("N>=0");
|
||||
|
||||
roiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
|
||||
roiCmd->SetGuidance("Define RoI angle");
|
||||
roiCmd->SetParameterName("theta",true,true);
|
||||
roiCmd->SetDefaultUnit("deg");
|
||||
fRoiCmd = new G4UIcmdWithADoubleAndUnit("/mydet/RoIangle",this);
|
||||
fRoiCmd->SetGuidance("Define RoI angle");
|
||||
fRoiCmd->SetParameterName("theta",true,true);
|
||||
fRoiCmd->SetDefaultUnit("deg");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
RE05StackingActionMessenger::~RE05StackingActionMessenger()
|
||||
{
|
||||
delete muonCmd;
|
||||
delete isomuonCmd;
|
||||
delete isoCmd;
|
||||
delete roiCmd;
|
||||
delete fMuonCmd;
|
||||
delete fIsoMuonCmd;
|
||||
delete fIsoCmd;
|
||||
delete fRoiCmd;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void RE05StackingActionMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{
|
||||
if( command==muonCmd )
|
||||
{ myAction->SetNRequestMuon(muonCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==isomuonCmd )
|
||||
{ myAction->SetNRequestIsoMuon(isomuonCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==isoCmd )
|
||||
{ myAction->SetNIsolation(isoCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==roiCmd )
|
||||
{ myAction->SetRoIAngle(roiCmd->GetNewDoubleValue(newValue)); }
|
||||
if( command==fMuonCmd )
|
||||
{ fMyAction->SetNRequestMuon(fMuonCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==fIsoMuonCmd )
|
||||
{ fMyAction->SetNRequestIsoMuon(fIsoMuonCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==fIsoCmd )
|
||||
{ fMyAction->SetNIsolation(fIsoCmd->GetNewIntValue(newValue)); }
|
||||
else if( command==fRoiCmd )
|
||||
{ fMyAction->SetRoIAngle(fRoiCmd->GetNewDoubleValue(newValue)); }
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4String RE05StackingActionMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
{
|
||||
G4String cv;
|
||||
|
||||
if( command==muonCmd )
|
||||
{ cv = muonCmd->ConvertToString(myAction->GetNRequestMuon()); }
|
||||
else if( command==isomuonCmd )
|
||||
{ cv = isomuonCmd->ConvertToString(myAction->GetNRequestIsoMuon()); }
|
||||
else if( command==isoCmd )
|
||||
{ cv = isoCmd->ConvertToString(myAction->GetNIsolation()); }
|
||||
else if( command==roiCmd )
|
||||
{ cv = roiCmd->ConvertToString(myAction->GetRoIAngle(),"deg"); }
|
||||
if( command==fMuonCmd )
|
||||
{ cv = fMuonCmd->ConvertToString(fMyAction->GetNRequestMuon()); }
|
||||
else if( command==fIsoMuonCmd )
|
||||
{ cv = fIsoMuonCmd->ConvertToString(fMyAction->GetNRequestIsoMuon()); }
|
||||
else if( command==fIsoCmd )
|
||||
{ cv = fIsoCmd->ConvertToString(fMyAction->GetNIsolation()); }
|
||||
else if( command==fRoiCmd )
|
||||
{ cv = fRoiCmd->ConvertToString(fMyAction->GetRoIAngle(),"deg"); }
|
||||
|
||||
return cv;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
Reference in New Issue
Block a user