//////////////////////////////////////////////////////////////////////// /// \class RAT::SolarMessenger /// \author Nuno Barros -- contact person /// REVISION HISTORY:\n /// 10-Jan-2012 : Nuno Barros - first version /// -# Initial implementation, along with SolarGen /// /// \brief Provide user customization for the Solar neutrino generator (ES). /// /// This class provides the interface and macro commands to customize the solar neutrino generator. /// For the moment the only command provided is the direction control of the incoming neutrino. This can be controlled /// through a macro command to generate the neutrinos in two cases: /// - Fixed direction /// -# An initial direction /// -# An initial run time without a time span /// - "Dynamic" direction /// -# Initial and final run times (Julian date) /// -# Initial run time and time span /// This information is used then together with the ephemeris data to calculate the direction detector-Sun in detector coordinates /// and this information is then passed to the vertex generator. /// //////////////////////////////////////////////////////////////////////// #ifndef RAT_SolarMessenger_hh #define RAT_SolarMessenger_hh // Geant4 includes that cannot be passed to the class implementation file. #include #include // Forward declarations outside namespace class G4UIdirectory; class G4UIcommand; class G4UIcmdWithAString; class G4UIcmdWith3Vector; class G4UIcmdWithADouble; namespace RAT { // Forward declarations in namespace class SolarGen; class SolarMessenger: public G4UImessenger { public: /** * \brief Default constructor. * @param sg Generator to be attached to the messenger. */ SolarMessenger(SolarGen *sg); /** * \brief Destructor. */ ~SolarMessenger(); /** * \brief Interface method to set new values from command line. * @param command The command coming from the command line. * @param newValue The arguments of the command as a single string. */ void SetNewValue(G4UIcommand* command, G4String newValue); /** * \brief Interface method to collect the currently set value in the generator class. * @param command The command line string * @return The presently set value in the generator. */ G4String GetCurrentValue(G4UIcommand* command); private: /** Disable the constructor without argument. */ SolarMessenger(); /** Solar Generator */ SolarGen* fSolarGen; /** Command line directory where to nest the messenger options. */ G4UIdirectory* fDir; /** Command to define the time span of the run to determine the neutrino direction.*/ G4UIcmdWith3Vector* fNuDirection; /** Series of setters to customize the position and time generators.*/ G4UIcmdWithAString* fTimeGen; G4UIcmdWithAString* fPosGen; /** Scaling factor for the neutrino flux */ G4UIcmdWithADouble* fFluxScale; /** Position to pass to the position generator. * This is passed through SetState to the underlying position generator * **/ G4UIcmdWithAString* fPosState; }; } // namespace RAT #endif // RAT_SolarMessenger_hh