Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:18

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 <jetnconstituents/JetNconstituents.h>
0009 
0010 
0011 #include <HIJetReco.C>
0012 
0013 R__LOAD_LIBRARY(libfun4all.so)
0014 R__LOAD_LIBRARY(libg4jets.so)
0015 R__LOAD_LIBRARY(libjetbackground.so)
0016 R__LOAD_LIBRARY(libg4dst.so)
0017 R__LOAD_LIBRARY(libJetNconstituents.so)
0018 
0019 #endif
0020 
0021 void Fun4All_jetQA(const int nEvents = 10,
0022            const char *filelistcalo = "dst_calo_cluster.list",
0023            const char *filelistglobal = "dst_global.list",
0024            const char *outname = "test.root")
0025 {
0026 
0027   //make the fun4all server
0028   Fun4AllServer *se = Fun4AllServer::instance();
0029 
0030   //set the verbosity (increase to print more output for debugging)
0031   int verbosity = 0;
0032   se->Verbosity(verbosity);
0033   Enable::VERBOSITY = verbosity;
0034 
0035   //run the jet reconstruction
0036   HIJetReco();
0037 
0038   //run your module
0039   //replace TestModule with your own module
0040   JetNconstituents *myJetNconst = new JetNconstituents(outname);
0041   myJetNconst->setPtRange(1.0, 1000);
0042   myJetNconst->setEtaRange(-1.1, 1.1);
0043   myJetNconst->setRecoJetNodeName("AntiKt_Tower_r04_Sub1");
0044 
0045   se->registerSubsystem(myJetNconst);
0046 
0047   //add inputs
0048   //add any additional needed inputs here
0049   Fun4AllInputManager *incalo = new Fun4AllDstInputManager("DSTcalo");
0050   incalo->AddListFile(filelistcalo,1);
0051   se->registerInputManager(incalo);
0052 
0053   Fun4AllInputManager *inglobal = new Fun4AllDstInputManager("DSTglobal");
0054   inglobal->AddListFile(filelistglobal,1);
0055   se->registerInputManager(inglobal);
0056 
0057   //run
0058   se->run(nEvents);
0059   se->End();
0060 
0061   gSystem->Exit(0);
0062   return 0;
0063 }