EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
digitization.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file digitization.C
1 
2 //
3 // This script converts MC points to hits in the silicon layers; both discrete
4 // and gaussian smearing possible; "ideal" model (one hit per MC point);
5 //
6 
8 {
9  // Load basic libraries;
10  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
11 
12  // Create generic analysis run manager; configure it for MC hit digitization;
13  EicRunAna *fRun = new EicRunAna();
14  // Import the file with simulated events;
15  fRun->SetInputFile ("simulation.root");
16  // Define the output file with the digitized hits;
17  fRun->SetOutputFile("digitization.root");
18 
19  // Call standard digitizing routine for our FWDST detector; assume 20x20um^2
20  // discrete pixels; may add more EicTrackingDigiHitProducer routines here
21  // if want to use your own custom set of detectors described a la tracker.C and
22  // included in the simulation.C script;
25  fwdst->DefineKfNodeTemplateXY(20 * eic::um, 20 * eic::um);
26  // Commented out: gaussian smearing with sigma ~ 20um/sqrt(12) is expected
27  // to produce similar results;
28  //new EicTrackingDigiHitProducer("FWDST", EicDigiHitProducer::Smear);
29  //fwdst->DefineKfNodeTemplateXY(6 * eic::um, 6 * eic::um);
30  fRun->AddTask(fwdst);
31 
32  // Initialize and run digitization; exit at the end;
33  fRun->Run();
34 } // digitization()