EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reconstruction.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file reconstruction.C
1 
2 //
3 // Track reconstruction: 1) no track finder, namely use "ideal" hit-to-track
4 // association, 2) run "real" Kalman filter (KF) fit on digitized hits;
5 //
6 
8 {
9  // Load basic libraries;
10  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
11 
12  // Create generic analysis run manager; configure it for track reconstruction;
13  EicRunAna *fRun = new EicRunAna();
14  // Import the files with simulated events and digitized hits;
15  fRun->SetInputFile ("simulation.root");
16  fRun->AddFriend ("digitization.root");
17  // Define the output file with the reconstructed tracks;
18  fRun->SetOutputFile("reconstruction.root");
19 
20  // Call "ideal" hit-to-track associator ("track finder") routine;
21  EicIdealTrackingCode* idealTracker = new EicIdealTrackingCode();
22  // Default in this example is to use "FWDST" detector hits; more than
23  // one custom detector may be added here via AddDetectorGroup() call(s);
24  idealTracker->AddDetectorGroup("FWDST");
25  // Add a bit of fairness to the reconstruction procedure; smear "ideal"
26  // momenta by 10% (relative) before passing the hit collection over to the KF fitter;
27  idealTracker->SetRelativeMomentumSmearing(0.1);
28  // Also smear a bit the "ideal" vertex;
29  idealTracker->SetVertexSmearing(100 * eic::um, 100 * eic::um, 100 * eic::um);
30  // Assume 100% hit association efficiency;
31  idealTracker->SetTrackingEfficiency(1.0);
32  fRun->AddTask(idealTracker);
33 
34  // Invoke and configure PandaRoot Kalman filter code wrapper; use hit-to-track
35  // association of the detectors included via idealTracker->AddDetectorGroup() calls
36  // during the "ideal track finder" call above;
37  EicRecoKalmanTask *kftask = new EicRecoKalmanTask(idealTracker);
38  // Store Monte-Carlo (truth) and reconstructed track parameterizations at
39  // every detector plane, where a particular track produced hits; if other
40  // locations along the track are of interest, thin additional "profiling" planes
41  // need to be adde to the setup; one can consider to provide interpolation and
42  // extrapolation tools right in the analysis.C script, but as of now (02/04/2020)
43  // this feature is not implemented;
45  fRun->AddTask(kftask);
46 
47  // Perform track backward propagation to the beam line;
48  fRun->AddTask(new PndPidCorrelator());
49 
50  // Initialize and run the reconstruction; exit at the end;
51  fRun->Run();
52 } // reconstruction()