File indexing completed on 2025-08-05 08:13:23
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 <jetbackground/DetermineTowerRho.h>
0009
0010 #include <jetbase/TowerJetInput.h>
0011
0012 #include <towerrhoana/TowerRhoAna.h>
0013
0014
0015 #include <HIJetReco.C>
0016
0017 R__LOAD_LIBRARY(libfun4all.so)
0018 R__LOAD_LIBRARY(libg4jets.so)
0019 R__LOAD_LIBRARY(libjetbackground.so)
0020 R__LOAD_LIBRARY(libg4dst.so)
0021
0022 R__LOAD_LIBRARY(libjetbase.so)
0023 R__LOAD_LIBRARY(libTowerRhoAna.so)
0024
0025 #endif
0026
0027 void Fun4All_jetQA(const int nEvents = -1,
0028 const char *filelistcalo = "dst_calo_cluster.list",
0029 const char *filelistglobal = "dst_global.list",
0030 const char *outname = "test.root")
0031 {
0032
0033
0034 Fun4AllServer *se = Fun4AllServer::instance();
0035
0036
0037 int verbosity = 0;
0038 se->Verbosity(verbosity);
0039 Enable::VERBOSITY = verbosity;
0040
0041
0042 HIJetReco();
0043
0044 std::vector<TowerJetInput*> background_inputs =
0045 {
0046 new TowerJetInput(Jet::CEMC_TOWERINFO_RETOWER),
0047 new TowerJetInput(Jet::HCALIN_TOWERINFO),
0048 new TowerJetInput(Jet::HCALOUT_TOWERINFO)
0049 };
0050
0051
0052 DetermineTowerRho *dtr = new DetermineTowerRho();
0053 dtr->add_method(TowerRho::Method::AREA);
0054 dtr->add_method(TowerRho::Method::MULT);
0055 dtr->set_algo(Jet::ALGO::KT);
0056 dtr->set_par(0.4);
0057 dtr->set_tower_abs_eta(1.1);
0058 dtr->set_jet_abs_eta(0.7);
0059 dtr->set_omit_nhardest(2);
0060 dtr->set_ghost_area(0.01);
0061 dtr->set_jet_min_pT(0.0);
0062 for(auto input : background_inputs) dtr->add_tower_input(input);
0063 dtr->Verbosity(verbosity);
0064 se->registerSubsystem(dtr);
0065
0066
0067
0068 TowerRhoAna *ana = new TowerRhoAna(outname);
0069 ana->Verbosity(verbosity);
0070 ana->add_area_rho_node("TowerRho_AREA");
0071 ana->add_mult_rho_node("TowerRho_MULT");
0072 se->registerSubsystem(ana);
0073
0074
0075
0076 Fun4AllInputManager *incalo = new Fun4AllDstInputManager("DSTcalo");
0077 incalo->AddListFile(filelistcalo,1);
0078 se->registerInputManager(incalo);
0079
0080 Fun4AllInputManager *inglobal = new Fun4AllDstInputManager("DSTglobal");
0081 inglobal->AddListFile(filelistglobal,1);
0082 se->registerInputManager(inglobal);
0083
0084
0085 se->run(nEvents);
0086 se->End();
0087
0088 gSystem->Exit(0);
0089 return 0;
0090 }