First, fill the search paths for the parameter files; this sets a static variable within the QwParameterFile class which will be used by all instances. The "scratch" directory should be first.
Then, we set the command line arguments and the configuration filename, and we define the options that can be used in them (using QwOptions).
62 QwGeometry geometry = tracking_detectors.GetGeometry();
67 QwMessage <<
"Copy and paste the following lines in your QwGeant4 session or macro:" <<
QwLog::endl;
72 if (trigscint.size() > 0) {
74 QwMessage <<
"/TriggerScintillator/SetCenterPositionInX "
75 << trigscint.front()->GetXPosition()
77 QwMessage <<
"/TriggerScintillator/SetCenterPositionInY "
78 << trigscint.front()->GetYPosition()
80 QwMessage <<
"/TriggerScintillator/SetCenterPositionInZ "
81 << trigscint.front()->GetZPosition()
83 QwMessage <<
"/TriggerScintillator/SetTiltingAngle "
84 << trigscint.front()->GetDetectorRollInDeg()
95 QwMessage <<
"/HDC/SetFrontCenterPositionInX "
96 << (hdc.at(3)->GetXPosition() + hdc.at(2)->GetXPosition()) / 2.0
97 <<
" cm" << QwLog::endl;
98 QwMessage <<
"/HDC/SetFrontCenterPositionInY "
99 << (hdc.at(3)->GetYPosition() + hdc.at(2)->GetYPosition()) / 2.0
100 <<
" cm" << QwLog::endl;
101 QwMessage <<
"/HDC/SetFrontCenterPositionInZ "
102 << (hdc.at(3)->GetZPosition() + hdc.at(2)->GetZPosition()) / 2.0
103 <<
" cm" << QwLog::endl;
106 QwMessage <<
"/HDC/SetBackCenterPositionInX "
107 << (hdc.at(10)->GetXPosition() + hdc.at(9)->GetXPosition()) / 2.0
108 <<
" cm" << QwLog::endl;
109 QwMessage <<
"/HDC/SetBackCenterPositionInY "
110 << (hdc.at(10)->GetYPosition() + hdc.at(9)->GetYPosition()) / 2.0
111 <<
" cm" << QwLog::endl;
112 QwMessage <<
"/HDC/SetBackCenterPositionInZ "
113 << (hdc.at(10)->GetZPosition() + hdc.at(9)->GetZPosition()) / 2.0
114 <<
" cm" << QwLog::endl;
121 if (vdc.size() > 0) {
124 QwMessage <<
"/VDC/SetFrontCenterPositionInX "
125 << (vdc.at(1)->GetXPosition() + vdc.at(0)->GetXPosition()) / 2.0
126 <<
" cm" << QwLog::endl;
127 QwMessage <<
"/VDC/SetFrontCenterPositionInY "
128 << (vdc.at(1)->GetYPosition() + vdc.at(0)->GetYPosition()) / 2.0
129 <<
" cm" << QwLog::endl;
130 QwMessage <<
"/VDC/SetFrontCenterPositionInZ "
131 << (vdc.at(1)->GetZPosition() + vdc.at(0)->GetZPosition()) / 2.0
132 <<
" cm" << QwLog::endl;
133 QwMessage <<
"/VDC/DriftCell/SetWireAngleFront "
134 << vdc.at(1)->GetElementAngleInDeg()
138 QwMessage <<
"/VDC/SetBackCenterPositionInX "
139 << (vdc.at(3)->GetXPosition() + vdc.at(2)->GetXPosition()) / 2.0
140 <<
" cm" << QwLog::endl;
141 QwMessage <<
"/VDC/SetBackCenterPositionInY "
142 << (vdc.at(3)->GetYPosition() + vdc.at(2)->GetYPosition()) / 2.0
143 <<
" cm" << QwLog::endl;
144 QwMessage <<
"/VDC/SetBackCenterPositionInZ "
145 << (vdc.at(3)->GetZPosition() + vdc.at(2)->GetZPosition()) / 2.0
146 <<
" cm" << QwLog::endl;
147 QwMessage <<
"/VDC/DriftCell/SetWireAngleBack "
148 << vdc.at(3)->GetElementAngleInDeg()
#define QwMessage
Predefined log drain for regular messages.
static void AppendToSearchPath(const TString &searchdir)
Add a directory to the search path.
const QwGeometry in(const EQwRegionID &r) const
Get detectors in given region.
void ProcessOptions(QwOptions &options)
Sets internal flags based on the QwOptions.
Int_t OpenNextStream()
Opens the event stream (file or ET) based on the internal flags.
static void SetCurrentRunNumber(const UInt_t runnumber)
Set the current run number for looking up the appropriate parameter file.
void ProcessOptions(QwOptions *options)
Process class options for QwOptions.
void ListConfigFiles()
List the configuration files.
Int_t GetRunNumber() const
Return CODA file run number.
static std::ostream & endl(std::ostream &)
End of the line.
const std::string getenv_safe_string(const char *name)
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
void DefineOptionsTracking(QwOptions &options)
void SetCommandLine(int argc, char *argv[], bool default_config_file=true)
Set the command line arguments.