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 
21  ip->DefineKfNodeTemplateXY(2000 * eic::um, 2000 * eic::um);
22  fRun->AddTask(ip);
23 
24  // Call standard digitizing routine for our FWDST detector; assume 20x20um^2
25  // discrete pixels; may add more EicTrackingDigiHitProducer routines here
26  // if want to use your own custom set of detectors described a la tracker.C and
27  // included in the simulation.C script;
30  fwdst->DefineKfNodeTemplateXY(20 * eic::um, 20 * eic::um);
31  // Commented out: gaussian smearing with sigma ~ 20um/sqrt(12) is expected
32  // to produce similar results;
33  //new EicTrackingDigiHitProducer("FWDST", EicDigiHitProducer::Smear);
34  //fwdst->DefineKfNodeTemplateXY(6 * eic::um, 6 * eic::um);
35  fRun->AddTask(fwdst);
36 
37  // Initialize and run digitization; exit at the end;
38  fRun->Run();
39 } // digitization()