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 // Needed to figure out whether _USE_BEAST_TPC_INTERFACE_ is defined;
3 #include "tpc-builder.C"
4 
6 {
7  // Load basic libraries;
8  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
9 
10  // Create generic analysis run manager; configure it for digitization;
11  EicRunAna *fRun = new EicRunAna();
12  fRun->SetInputFile ("simulation.root");
13  fRun->SetOutputFile("digitization.root");
14 
15  // Vertex detector digitizer; assume 20x40um^2 pixels;
17  vtxHitProducer->DefineKfNodeTemplateXY(0.0020, 0.0040);
18  fRun->AddTask(vtxHitProducer);
19 
20 #ifdef _USE_BEAST_TPC_DIGITIZER_
21  // BeAST TPC digitizer; still naive, but certainly suffices for resolution studies;
22  EicTpcDigiHitProducer* tpcHitProducer = new EicTpcDigiHitProducer();
23  // Import default medium-resolution TPC parameters and print them out;
24  tpcHitProducer->importTpcDigiParameters("tpc-digi.root");
25  tpcHitProducer->Print();
26 
27  // May want to change any of them here; "intrinsic" resolutions are those at
28  // the GEM pad plane (D=0, see below) in [um]; dispersion coefficients are in [um/sqrt(D)]
29  // (where D is drift distance in [cm]), their contributions are added in quadrature;
30  //tpcHitProducer->setTransverseDispersion ( 50.);
31  //tpcHitProducer->setLongitudinalDispersion (200.);
32  //tpcHitProducer->setTransverseIntrinsicResolution (100.);
33  //tpcHitProducer->setLongitudinalIntrinsicResolution(500.);
34  // This one defines how many hits will be generated;
35  //tpcHitProducer->setGemVerticalPadSize ( 1.0);
36 #else
37  // Very naive TPC digitizer; assume 1 hit per MC step, 100um (transverse)
38  // and 500um (longitudinal) resolution per hit;
40  tpcHitProducer->DefineKfNodeTemplateOrth3D(0.0100, 0.0100, 0.0500);
41 #endif
42  fRun->AddTask(tpcHitProducer);
43 
44  // Initialize and run digitization; exit at the end;
45  fRun->Run();
46 } // digitization()