Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:07

0001 // $Id: $
0002 
0003 /*!
0004  * \file Fun4All_ReadDST_TPCML.C
0005  * \brief 
0006  * \author Jin Huang <jhuang@bnl.gov>
0007  * \version $Revision:   $
0008  * \date $Date: $
0009  */
0010 
0011 #ifndef MACRO_FUN4ALL_READDST_C
0012 #define MACRO_FUN4ALL_READDST_C
0013 
0014 #include <G4_Input.C>
0015 #include <G4_Tracking.C>
0016 
0017 #include <tpcmldatainterface/TPCMLDataInterface.h>
0018 
0019 #include <TROOT.h>
0020 #include <fun4all/Fun4AllDstOutputManager.h>
0021 #include <fun4all/Fun4AllOutputManager.h>
0022 #include <fun4all/Fun4AllServer.h>
0023 
0024 #include <phool/recoConsts.h>
0025 
0026 R__LOAD_LIBRARY(libfun4all.so)
0027 // Use libg4eicdst for campaign 2 DSTs
0028 R__LOAD_LIBRARY(libg4dst.so)
0029 // Use libg4dst for campaign 1 DSTs
0030 //R__LOAD_LIBRARY(libg4dst.so)
0031 R__LOAD_LIBRARY(libtpcmldatainterface.so)
0032 
0033 int Fun4All_ReadDST_TPCML(const int nEvents = 5,
0034                           //                          const string &inputFile = "singleElectron.lst"  //
0035                           //        const string& inputFile = "singlePion.lst"//
0036                           const string &inputFile = "singlePionNeg.lst"  //
0037 )
0038 
0039 {
0040   //---------------
0041   // Fun4All server
0042   //---------------
0043   Fun4AllServer *se = Fun4AllServer::instance();
0044   se->Verbosity(1);
0045 
0046   // just if we set some flags somewhere in this macro
0047   recoConsts *rc = recoConsts::instance();
0048 
0049   Input::READHITS = true;
0050   INPUTREADHITS::filename[0] = "DST_TRUTH_pythia8_CharmD0_3MHz-0000000002-00000.root";
0051   INPUTREADHITS::filename[1] = "DST_TRKR_G4HIT_pythia8_CharmD0_3MHz-0000000002-00000.root";
0052   INPUTREADHITS::filename[2] = "DST_TRKR_HIT_pythia8_CharmD0_3MHz-0000000002-00000.root";
0053 //  INPUTREADHITS::filename[3] = "DST_TRUTH_pythia8_CharmD0_3MHz-0000000002-00000.root";
0054 
0055   TPCMLDataInterface *tpcDaqEmu = new TPCMLDataInterface(
0056       G4MVTX::n_maps_layer + G4INTT::n_intt_layer, G4MVTX::n_maps_layer + G4INTT::n_intt_layer + G4TPC::n_gas_layer - 1);
0057   tpcDaqEmu->Verbosity(1);
0058   tpcDaqEmu->setVertexZAcceptanceCut(200);
0059   se->registerSubsystem(tpcDaqEmu);
0060 
0061   InputManagers();
0062 
0063   se->run(nEvents);
0064 
0065   se->End();
0066 
0067   delete se;
0068   std::cout << "All done processing" << std::endl;
0069   gSystem->Exit(0);
0070   return 0;
0071 }
0072 #endif