Declaration :
TPhTrackFinder *tf = new TPhTrackFinder(); // if you put an integer argument, you'll have some welcome message.
Event by event setting:
There are two important inputs: Primary vertex position and Front-end tracking information. Once you set the vertex position, Track Finder will pick-up the Hough Table relevant to the position automatically in the directory $HOUGH. Frond-end tracking information is necessary for this version of Hough PR, but I think I can also provide a Hough-PR version without the information.
tf->SetVertex(float x,float y,float z) ; // this function should be called for each event in order to read correct Hough Table
tf->SetSeedList(TObjArray *seedlist); // set the track seed list (output of TPhTrackSeedFinder )
Setting parameters:
There are two important parameters which have to be chosen by user: Sigma of QP variance when chaining two match-sticks and Sigma of theta. I recommend you to set these two variables carefully and meaningful, like 3 sigma, in order not to loose real tracks in the generation of the track candidates. More candidates means more CPU time to select real tracks but it guarantee a better efficiency.
tf->SetErrorQP(int pair,float sgm_qp); // allowed qp variation when chaining Hough Match-Sticks for the i'th pair
tf->SetErrorTH(int pair,float sgm_th); // allowed th variation when chaining Hough Match-Stick for the i'th pair
There are two paramters which are introduced because of the error on the direction of a track seed. I believe that these parameters should be determined in the TrackSeedFinder and be set there. So I hope that these parameters become obsolete sonner or later.
tf->SetErrorTheta(float sgm_theta); // error on theta of a seed (will be determined in TrackSeedFinder soon)
tf->SetErrorPhi(float sgm_phi); // error on phi of a seed
(will be determined in TrackSeedFinder soon)
Remarks:
1) At this moment, Hough-PR works only for the nominal vertex, 0,0,0.
2) TrackSeedFinder should be run before TrackFinder.
Example macros
{
//
// data file
//
TPhDST data("$PHATHOME/macros/tracking/sample_event.root");
gSystem->Setenv("HOUGH","/home/icpark/hough_tables/"); // put
your own hough table directory
//
// detector
//
TPhDetector *det = TPhDetector::GetInstance();
if (!det) det=data.GetDetector();
//
// Installation of PHOBOS reconstruction package & tools
//
TPhTrackSeedFinder *tsf = new TPhTrackSeedFinder(1);
TPhTrackFinder *tf
= new TPhTrackFinder(1);
//
// Event loop
//
TPhEvent *event;
while (event=data->GetNextEvent() )
{
// event initialization
event->Print();
det->SetEvent(event);
det->FillWithEventHits("PMCHits");
// Do Front-end Tracking
tsf->RunMulguisin(1); //no argument means no message
TObjArray *seeds = tsf->GetTrackSeedList();
// Set event-by-event parameter
tf->SetVertex(0,0,0); // works only for 0,0,0, at
the moment
tf->SetSeedList(seeds);
// Run the actual Hough-PR
tf->RunHough(1); // no argument means no message
// Access the output
TObjArray *candidates=tf->GetTrackList();
int n_candidates=candidates->GetEntries();
// terminate an event
det->DeleteHits();
delete event;
}
}