Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:11:58

0001 //////////////////////////////////////////////////////////////////
0002 /*!
0003   \file G4_DSTReader.C
0004   \brief Convert DST to human command readable TTree for quick poke around the outputs
0005   \author  Jin Huang
0006   \version $Revision:  $
0007   \date    $Date: $
0008 */
0009 //////////////////////////////////////////////////////////////////
0010 
0011 #include <string>
0012 
0013 void
0014 G4DSTreader_EICIR( const char * outputFile = "G4sPHENIXCells.root",//
0015            int absorberactive = 1 )
0016 {
0017 
0018   //! debug output on screen?
0019   const bool debug = false;
0020 
0021   //! save raw g4 hits
0022   const bool save_g4_raw = true;
0023 
0024   // save a comprehensive  evaluation file
0025   PHG4DSTReader* ana = new PHG4DSTReader(
0026                                          string(outputFile) + string("_DSTReader.root"));
0027   ana->set_save_particle(true);
0028   ana->set_load_all_particle(false);
0029   ana->set_load_active_particle(true);
0030   ana->set_save_vertex(true);
0031 
0032   if (debug)
0033     {
0034       ana->Verbosity(2);
0035     }
0036 
0037   if (save_g4_raw)
0038     {
0039       ana->AddNode("BH_FORWARD_PLUS");
0040       ana->AddNode("FWDDISC");
0041     }
0042 
0043   Fun4AllServer *se = Fun4AllServer::instance();
0044   se->registerSubsystem(ana);
0045 }