Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-04-07 08:08:31

0001 #include <anneutral/AnNeutralMeson_micro_dst.h>
0002 #include <fun4all/Fun4AllServer.h>
0003 #include <fun4all/Fun4AllRunNodeInputManager.h>
0004 #include <fun4all/Fun4AllDstInputManager.h>
0005 #include <ffamodules/CDBInterface.h>
0006 #include <phool/recoConsts.h>
0007 
0008 R__LOAD_LIBRARY(libffamodules.so)
0009 R__LOAD_LIBRARY(libfun4all.so)
0010 R__LOAD_LIBRARY(libanneutral.so)
0011 
0012 void micro_DST_analysis_complete(const int runnumber = 47289, const int nevents = 0)
0013 {
0014   std::string inputfilename = "DST_MICRO_ANNEUTRALMESON_run2pp_ana509_2024p022_v001-000" + std::to_string(runnumber) + ".root";
0015   std::string outputfilename = "analysis_" + std::to_string(runnumber) + ".root";
0016   std::string outputfiletreename = "diphoton_minimal_" + std::to_string(runnumber) + ".root";
0017   
0018   Fun4AllServer *se = Fun4AllServer::instance();
0019   se->Verbosity(0);
0020 
0021   recoConsts *rc = recoConsts::instance();
0022   rc->set_StringFlag("CDB_GLOBALTAG", "ProdA_2024");
0023   rc->set_uint64Flag("TIMESTAMP", runnumber);
0024   rc->set_IntFlag("RUNNUMBER", runnumber);
0025 
0026   Fun4AllInputManager *ingeo = new Fun4AllRunNodeInputManager("DST_GEO");
0027   std::string geoLocation = CDBInterface::instance()->getUrl("calo_geo");
0028   ingeo->AddFile(geoLocation);
0029   se->registerInputManager(ingeo);
0030 
0031   Fun4AllInputManager *in = new Fun4AllDstInputManager("DST_MICRO");
0032   in->fileopen(inputfilename);
0033   se->registerInputManager(in);
0034 
0035   //Fun4AllInputManager *in_emulator = new Fun4AllDstInputManager("DST_EMULATOR");
0036   //in_emulator->fileopen(inputemulatorname);
0037   //se->registerInputManager(in_emulator);
0038   
0039   AnNeutralMeson_micro_dst *AN = new AnNeutralMeson_micro_dst("AnNeutralMeson_micro_dst", runnumber, outputfilename, outputfiletreename);
0040   AN->set_store_tree(true);
0041   AN->set_store_qa(true);
0042   std::vector<float> chi2_cuts = {1000}; // {1000, 6, 4, 2};
0043   //std::vector<float> chi2_cuts = {1000, 6, 4, 2};
0044   std::vector<float> ecore_cuts = {1.0}; // {0.5, 1.0, 1.5};
0045   //std::vector<float> ecore_cuts = {0.5, 1.0, 1.5};
0046   float alpha_cut = 0.7;
0047   //float pT_cut = 1.0;
0048   AN->set_chi2cut(chi2_cuts);
0049   AN->set_ecorecut(ecore_cuts);
0050   AN->set_alphacut(alpha_cut);
0051   AN->set_ptcut(1.0, 1000.0);
0052   //AN->set_pt_threshold(3.0);
0053   AN->set_mbd_trigger_bit_requirement(true);
0054   AN->set_photon_trigger_bit_requirement(false);
0055   AN->set_photon_trigger_efficiency_matching_requirement(false);
0056   //AN->set_photon_trigger_efficiency_threshold(30);
0057   AN->set_photon_trigger_emulator_matching_requirement(false);
0058   AN->set_event_mixing(false);
0059   se->registerSubsystem(AN);
0060 
0061   se->run(nevents);
0062   se->End();
0063   se->PrintTimer();
0064   delete se;
0065   
0066   gSystem->Exit(0);
0067 }