Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:12:49

0001 // $Id: $
0002 
0003 /*!
0004  * \file Fun4All_KFParticle_advanced.C
0005  * \brief 
0006  * \author Cameron Dean <cdean@bnl.gov>
0007  * \version $Revision:   $
0008  * \date $Date: $
0009  */
0010 
0011 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 00, 0)
0012 
0013 #include <fun4all/Fun4AllDstInputManager.h>
0014 #include <fun4all/Fun4AllDstOutputManager.h>
0015 #include <fun4all/Fun4AllOutputManager.h>
0016 #include <fun4all/Fun4AllServer.h>
0017 #include <fun4all/SubsysReco.h>
0018 #include <antitrigger/AntiTrigger.h>
0019 
0020 R__LOAD_LIBRARY(libantitrigger.so)
0021 R__LOAD_LIBRARY(libfun4all.so)
0022 R__LOAD_LIBRARY(libg4dst.so)
0023 
0024 #endif
0025 
0026 using namespace std;
0027 
0028 int Fun4All_testingGround(){
0029 
0030   const int nEvents = 200;
0031   int verbosity = INT_MAX - 10;
0032   //---------------
0033   // Load libraries
0034   //---------------
0035   gSystem->Load("libfun4all.so");
0036   gSystem->Load("libg4dst.so");
0037   //---------------
0038   // Fun4All server
0039   //---------------
0040   Fun4AllServer *se = Fun4AllServer::instance();
0041   se->Verbosity(verbosity);
0042 
0043   //--------------
0044   // IO management
0045   //--------------
0046   // Hits file
0047   Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
0048 
0049   hitsin->AddFile("DST_HF_BOTTOM_pythia8-0000000001-00000.root");
0050   se->registerInputManager(hitsin);
0051 
0052   AntiTrigger* myFinder = new AntiTrigger("myTestAntiTrigger");
0053   myFinder->Verbosity(verbosity);
0054   std::vector<std::string> particleList = {"D0", "D+", "Ds+", "Lambdac+", "B+", "B0", "Bs0", "Lambdab0"};
0055   myFinder->setParticleList(particleList);
0056   se->registerSubsystem(myFinder);
0057 
0058   //-----------------
0059   // Event processing
0060   //-----------------
0061   if (nEvents < 0)
0062     return 0;
0063 
0064   se->run(nEvents);
0065 
0066   //-----
0067   // Exit
0068   //-----
0069 
0070   se->End();
0071   std::cout << "All done" << std::endl;
0072   delete se;
0073   gSystem->Exit(0);
0074   return 0;
0075 }