Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #pragma once
0002 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
0003 #include <fun4all/SubsysReco.h>
0004 #include <fun4all/Fun4AllServer.h>
0005 #include <fun4all/Fun4AllInputManager.h>
0006 #include <fun4all/Fun4AllDstInputManager.h>
0007 
0008 #include <calowaveformsim/CaloWaveFormSim.h>
0009 
0010 R__LOAD_LIBRARY(libfun4all.so)
0011 R__LOAD_LIBRARY(libcalowaveformsim.so)
0012 #endif
0013 
0014 void Fun4All_CaloWaveFormSim(const char *fname = "G4Hits_sHijing_0_20fm-0000000041-00000.root", const char *fname2 = "DST_CALO_CLUSTER_sHijing_0_20fm-0000000041-00000.root", const char *outfile = "trees/0.root")
0015 {
0016   gSystem->Load("libg4dst");
0017   gSystem->Load("libcalowaveformsim");
0018   Fun4AllServer *se = Fun4AllServer::instance();
0019   CaloWaveFormSim *ca = new CaloWaveFormSim("CALOWAVEFORMSIM",outfile);
0020   ca->Detector("CEMC");
0021   se->registerSubsystem(ca);
0022 
0023   Fun4AllInputManager *in = new Fun4AllDstInputManager("in");
0024   in->fileopen(fname);
0025 
0026   Fun4AllInputManager *in2 = new Fun4AllDstInputManager("in2");
0027   in2->fileopen(fname2);
0028 
0029   // in->AddListFile("g4hits.list");
0030 
0031 // Fun4All
0032   se->registerInputManager(in2);
0033   se->registerInputManager(in);
0034   se->run();
0035   se->End();
0036 }