Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:19:43

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 <fun4allraw/Fun4AllPrdfInputManager.h>
0007 #include <fun4all/Fun4AllDstInputManager.h>
0008 //#include <rawwaveformtowerbuilder/RawWaveformTowerBuilder.h>
0009 #include <fun4all/Fun4AllDstOutputManager.h>
0010 
0011 #include <litecaloeval/LiteCaloEval.h>
0012 
0013 
0014 R__LOAD_LIBRARY(libfun4all.so)
0015 R__LOAD_LIBRARY(libfun4allraw.so)
0016 //R__LOAD_LIBRARY(libCaloTowerBuilder.so)
0017 R__LOAD_LIBRARY(libLiteCaloEvalTowSlope.so)
0018 
0019 
0020 #endif
0021 
0022 // to get files from my local area
0023 void dst_simple_towerslope_runmacro(int nevents = 1e5, const char *fname = "/sphenix/user/sregmi/FINAL_VERSION/tower_slope_old_tower_method/3_RawWaveformTowerBuilder/macro/testoutput_400.root")
0024 
0025 {
0026   gSystem->Load("libg4dst");
0027 
0028   Fun4AllServer *se = Fun4AllServer::instance();
0029 
0030   // CaloWaveFormSim *ca = new CaloWaveFormSim("CALOWAVEFORMSIM",outfile);
0031   // ca->Detector("CEMC");
0032   // se->registerSubsystem(ca);
0033 
0034   // Fun4AllInputManager *in = new Fun4AllPrdfInputManager("in");
0035   // in->fileopen(fname);
0036 
0037   Fun4AllInputManager *in = new Fun4AllDstInputManager("in");
0038 
0039   in->fileopen(fname);
0040   //CaloTowerBuilder *ca = new CaloTowerBuilder();
0041 
0042 
0043   LiteCaloEval *eval7e = new LiteCaloEval("CEMCEVALUATOR2", "CEMC", "output_towerslope.root");
0044   //  LiteCaloEval *eval = new LiteCaloEval("HOCEMCEVALUATOR2", "HCALOUT", outputfile.c_str());
0045   //  eval->Verbosity(verbosity);
0046   eval7e->CaloType(LiteCaloEval::CEMC);
0047   //eval->CaloType(LiteCaloEval::HCALOUT);
0048   se->registerSubsystem(eval7e);
0049 
0050 
0051 
0052 
0053   // in->AddListFile("g4hits.list");
0054 
0055 // Fun4All
0056   se->registerInputManager(in);
0057 
0058   //Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", "testoutput_400.root");
0059 
0060   //out->StripNode("WAVEFORMS_CEMC");
0061   //se->registerOutputManager(out);
0062 
0063   se->run(nevents);
0064 
0065   se->End();
0066   se->PrintTimer();
0067   gSystem->Exit(0);
0068 }