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("IP");
25  idealTracker->AddDetectorGroup("FWDST");
26  // Add a bit of fairness to the reconstruction procedure; smear "ideal"
27  // momenta by 10% (relative) before passing the hit collection over to the KF fitter;
28  idealTracker->SetRelativeMomentumSmearing(0.1);
29  // Also smear a bit the "ideal" vertex;
30  idealTracker->SetVertexSmearing(100 * eic::um, 100 * eic::um, 100 * eic::um);
31  // Assume 100% hit association efficiency;
32  idealTracker->SetTrackingEfficiency(1.0);
33  fRun->AddTask(idealTracker);
34 
35  // Invoke and configure PandaRoot Kalman filter code wrapper; use hit-to-track
36  // association of the detectors included via idealTracker->AddDetectorGroup() calls
37  // during the "ideal track finder" call above;
38  EicRecoKalmanTask *kftask = new EicRecoKalmanTask(idealTracker);
39  // Store Monte-Carlo (truth) and reconstructed track parameterizations at
40  // every detector plane, where a particular track produced hits; if other
41  // locations along the track are of interest, thin additional "profiling" planes
42  // need to be adde to the setup; one can consider to provide interpolation and
43  // extrapolation tools right in the analysis.C script, but as of now (02/04/2020)
44  // this feature is not implemented;
46  fRun->AddTask(kftask);
47 
48  // Perform track backward propagation to the beam line;
49  fRun->AddTask(new PndPidCorrelator());
50 
51  // Initialize and run the reconstruction; exit at the end;
52  fRun->Run();
53 } // reconstruction()