QwGeant4
QweakSimTrackingActionMessenger.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimTrackingActionMessenger.cc
10 
11  $Revision: 1.1 $
12  $Date: 2006/01/06 04:46:45 $
13 
14  \author Klaus Hans Grimm
15  \author Peiqing Wang
16 
17 */
18 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
19 
21 
22 // user includes
25 
26 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
27 
29 :myTrackingAction(myTA)
30 {
31  // TrackingAction related
32  TrackingActionDir = new G4UIdirectory("/TrackingAction/");
33  TrackingActionDir -> SetGuidance("TrackingAction control.");
34 
35  TrackingFlag_Cmd = new G4UIcmdWithAnInteger("/TrackingAction/TrackingFlag",this);
36  TrackingFlag_Cmd->SetGuidance("Select tracking flag");
37  TrackingFlag_Cmd->SetGuidance(" 0 : Track primary electrons only");
38  TrackingFlag_Cmd->SetGuidance(" 1 : Track primary electrons and optical photons only");
39  TrackingFlag_Cmd->SetGuidance(" 2 : Track all particles except optical photons");
40  TrackingFlag_Cmd->SetGuidance(" 3 : Track all particles");
41  TrackingFlag_Cmd->SetParameterName("Store",true);
42  TrackingFlag_Cmd->SetDefaultValue(0);
43  TrackingFlag_Cmd->SetRange("Store >=0 && Store <= 3");
44  TrackingFlag_Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
45 
46 }
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
49 
51 {
52  delete TrackingFlag_Cmd;
53  delete TrackingActionDir;
54 }
55 
56 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
57 
58 void QweakSimTrackingActionMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
59 {
60  G4cout << "#### Calling QweakSimTrackingActionMessenger::SetNewValue() " << newValue << G4endl;
61 
62  if( command == TrackingFlag_Cmd )
63  {
64  G4cout << "#### Messenger: Setting Tracking Flag to " << newValue << G4endl;
65 
66  myTrackingAction->SetTrackingFlag(TrackingFlag_Cmd->GetNewIntValue(newValue));
67  }
68 
69  G4cout << "#### Leaving QweakSimTrackingActionMessenger::SetNewValue() " << newValue << G4endl;
70 }
71 
72 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
73 
Adds additional information to primary/secondary track before track starts stepping.
QweakSimTrackingActionMessenger(QweakSimTrackingAction *)
void SetTrackingFlag(G4int myflag)