QwAnalysis
|
Example of the QwTreeEventBuffer class to read QweakSimG4 events. More...
#include <iostream>
#include <cstdlib>
#include <TFile.h>
#include <TTree.h>
#include "QwOptionsTracking.h"
#include "QwLog.h"
#include "QwRootFile.h"
#include "QwParameterFile.h"
#include "QwTreeEventBuffer.h"
#include "QwHitRootContainer.h"
#include "QwTrackingWorker.h"
#include "QwPartialTrack.h"
#include "QwEvent.h"
#include "QwSubsystemArrayTracking.h"
#include "QwDriftChamberHDC.h"
#include "QwDriftChamberVDC.h"
#include "QwTriggerScintillator.h"
#include "QwMainDetector.h"
#include <TStopwatch.h>
Go to the source code of this file.
Functions | |
void | PrintInfo (TStopwatch &timer) |
int | main (int argc, char *argv[]) |
Example of the QwTreeEventBuffer class to read QweakSimG4 events.
This example illustrates the use of the QwTreeEventBuffer class. It loads the file Tracking/prminput/QweakSim.root, which was produced with a 3-fold trigger in QweakSimG4 (hits in all of HDC, VDC-front, and VDC-back). For every event a QwHitContainer is filled, which is then printed to QwMessage.
Definition in file QwSimTracking.cc.
int main | ( | int | argc, |
char * | argv[] | ||
) |
First, we fill the search paths for the parameter files.
We set the command line arguments and the configuration filename, and we define the options that can be used in them (using QwOptions).
Setup screen and file logging
Load the tracking detectors from file
Create a timer
Start timer
Next, we create the tracking worker that will pull coordinate the tracking.
Stop timer
Create the event buffer
Start loop over all runs
Start timer
We loop over all requested events.
Create the original event
Create the to-be-reconstructed event
We process the hit list through the tracking worker
Stop timer
Definition at line 55 of file QwSimTracking.cc.
References QwParameterFile::AppendToSearchPath(), QwRootFile::Close(), QwTreeEventBuffer::CloseFile(), DefineOptionsTracking(), QwLog::endl(), QwRootFile::FillTree(), QwTreeEventBuffer::GetCurrentEvent(), getenv_safe_string(), QwTreeEventBuffer::GetEventNumber(), QwSubsystemArrayTracking::GetGeometry(), QwTreeEventBuffer::GetNextEvent(), QwTreeEventBuffer::GetOriginalEvent(), QwTreeEventBuffer::GetRunLabel(), QwRootFile::GetTree(), gQwLog, gQwOptions, QwTrackingWorker::nbridged, QwRootFile::NewTree(), QwTreeEventBuffer::OpenNextFile(), PrintInfo(), QwTreeEventBuffer::PrintStatInfo(), QwTrackingWorker::ProcessEvent(), QwTreeEventBuffer::ProcessOptions(), QwLog::ProcessOptions(), QwSubsystemArray::ProcessOptions(), QwError, QwMessage, QwTrackingWorker::R2Good, QwTrackingWorker::R3Good, QwEvent::Reset(), QwOptions::SetCommandLine(), QwRootFile::SetDefaultRootFileStem(), QwTreeEventBuffer::SetEntriesPerEvent(), QwRootFile::Write(), and QwRootFile::WriteParamFileList().
void PrintInfo | ( | TStopwatch & | timer | ) |
Definition at line 45 of file QwSimTracking.cc.
References QwLog::endl(), and QwMessage.
Referenced by main(), and QwBPMStripline< T >::PrintInfo().