26 int main (
int argc,
char* argv[])
56 std::string trajmatrix =
"";
57 if (getenv(
"QW_LOOKUP"))
58 trajmatrix = std::string(getenv(
"QW_LOOKUP")) +
"/QwTrajMatrix.root";
63 QwError <<
"Could not load trajectory lookup table!" << QwLog::endl;
77 TFile *file =
new TFile(outputfilename,
"RECREATE",
"Bridging result");
79 TTree *tree =
new TTree(
"tree",
"Bridging");
82 tree->Branch(
"events",
"QwEvent", &event);
90 event->SetEventHeader(header);
97 for (
size_t i = 0; i < tracks_r2.size(); i++) {
98 for (
size_t j = 0; j < tracks_r3.size(); j++) {
101 int status = trackfilter->
Filter(tracks_r2.at(i).get(), tracks_r3.at(j).get());
109 const QwTrack* track1 = matrixlookup->
Bridge(tracks_r2.at(i).get(), tracks_r3.at(j).get());
113 event->AddTrack(track1);
119 const QwTrack* track2 = raytracer->
Bridge(tracks_r2.at(i).get(), tracks_r3.at(j).get());
123 event->AddTrack(track2);
132 if (debug)
event->Print();
141 file->Write(0, TObject::kOverwrite);
#define QwMessage
Predefined log drain for regular messages.
int GetRunNumber() const
Get the current run number.
static void AppendToSearchPath(const TString &searchdir)
Add a directory to the search path.
QwEvent * GetCurrentEvent() const
Get the current event.
Read simulated QweakSimG4 events and generate hit lists.
Definition of the ray-tracing bridging method for R2/R3 partial tracks.
const TString getenv_safe_TString(const char *name)
Contains header information of a tracked event.
Load the options for the tracking subsystems.
unsigned int OpenNextFile()
Open the next event file.
Definition of the class that reads simulated QweakSimG4 events.
Definition of the matrix lookup bridging method.
void ProcessOptions(QwOptions &options)
Process configuration options (default behavior)
EStatus Filter(const QwPartialTrack *front, const QwPartialTrack *back) const
Filter front and back track combinations.
Track filter for the bridging methods.
Contains a tracked event, i.e. all information from hits to tracks.
void SetConfigFile(const std::string &configfile)
Set a configuration file.
Contains the complete track as a concatenation of partial tracks.
unsigned int GetNextEvent()
Read the next event.
const QwTrack * Bridge(const QwPartialTrack *front, const QwPartialTrack *back)
Bridge from the front to back partial track.
const QwGeometry GetGeometry()
Get the detector info for all detectors.
static std::ostream & endl(std::ostream &)
End of the line.
std::vector< boost::shared_ptr< QwPartialTrack > > CreatePartialTracks(EQwRegionID region) const
Get the partial tracks.
const std::string getenv_safe_string(const char *name)
Collection of QwDetectorInfo pointers that specifies an experimental geometry.
Definition of the track filter for the bridging methods.
bool LoadTrajMatrix(const std::string filename)
Load the trajectory matrix from disk.
#define QwWarning
Predefined log drain for warnings.
void ProcessOptions(QwOptions &options)
Process command line and config file options.
int main(int argc, char **argv)
int GetEventNumber() const
Get the current event number.
const QwTrack * Bridge(const QwPartialTrack *front, const QwPartialTrack *back)
Bridge from the front to back partial track.
void DefineOptionsTracking(QwOptions &options)
#define QwError
Predefined log drain for errors.
void SetCommandLine(int argc, char *argv[], bool default_config_file=true)
Set the command line arguments.