![]() |
|
|||
File indexing completed on 2025-08-06 08:14:17
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 <fun4all/Fun4AllDstOutputManager.h> 0009 #include <fun4all/Fun4AllOutputManager.h> 0010 #include <fun4all/Fun4AllServer.h> 0011 0012 #include <phool/PHRandomSeed.h> 0013 #include <phool/recoConsts.h> 0014 0015 //#include <g4jets/FastJetAlgo.h> 0016 //#include <g4jets/JetReco.h> 0017 //#include <g4jets/TowerJetInput.h> 0018 //#include <g4jets/TruthJetInput.h> 0019 #include <HIJetReco.C> 0020 #include <g4centrality/PHG4CentralityReco.h> 0021 0022 //#include <jetbackground/CopyAndSubtractJets.h> 0023 //#include <jetbackground/DetermineTowerBackground.h> 0024 //#include <jetbackground/FastJetAlgoSub.h> 0025 //#include <jetbackground/RetowerCEMC.h> 0026 //#include <jetbackground/SubtractTowers.h> 0027 //#include <jetbackground/SubtractTowersCS.h> 0028 0029 //#include <jetvalidation/JetValidation.h> 0030 #include <jetseedcount/JetSeedCount.h> 0031 0032 R__LOAD_LIBRARY(libfun4all.so) 0033 R__LOAD_LIBRARY(libg4jets.so) 0034 R__LOAD_LIBRARY(libjetbackground.so) 0035 R__LOAD_LIBRARY(libJetSeedCount.so) 0036 R__LOAD_LIBRARY(libg4centrality.so) 0037 R__LOAD_LIBRARY(libg4dst.so) 0038 0039 /* 0040 namespace Enable 0041 { 0042 bool HIJETS = true; 0043 int HIJETS_VERBOSITY = 1; 0044 } // namespace Enable 0045 0046 namespace G4HIJETS 0047 { 0048 bool do_flow = false; 0049 bool do_CS = false; 0050 } // namespace G4HIJETS 0051 */ 0052 #endif 0053 0054 0055 void Fun4All_JetSeedCount(const char *filelisttruth = "dst_truth_jet.list", 0056 const char *filelistcalo = "dst_calo_test.list", 0057 const char *filelistglobal = "dst_global.list", 0058 const char *outname = "SeedCountoutput.root", 0059 int n_skip = 1, 0060 int n_event = 1000) 0061 { 0062 0063 0064 Fun4AllServer *se = Fun4AllServer::instance(); 0065 int verbosity = 0; 0066 0067 se->Verbosity(verbosity); 0068 recoConsts *rc = recoConsts::instance(); 0069 0070 PHG4CentralityReco *cent = new PHG4CentralityReco(); 0071 cent->Verbosity(0); 0072 cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/")); 0073 se->registerSubsystem( cent ); 0074 0075 HIJetReco(); 0076 /* 0077 RetowerCEMC *rcemc = new RetowerCEMC(); 0078 rcemc->Verbosity(verbosity); 0079 rcemc->set_towerinfo(true); 0080 se->registerSubsystem(rcemc); 0081 0082 JetReco *towerjetreco = new JetReco(); 0083 towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWERINFO_RETOWER)); 0084 towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWERINFO)); 0085 towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWERINFO)); 0086 towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT, 0.2), "AntiKt_TowerInfo_HIRecoSeedsRaw_r02"); 0087 towerjetreco->set_algo_node("ANTIKT"); 0088 towerjetreco->set_input_node("TOWER"); 0089 towerjetreco->Verbosity(verbosity); 0090 se->registerSubsystem(towerjetreco); 0091 0092 DetermineTowerBackground *dtb = new DetermineTowerBackground(); 0093 dtb->SetBackgroundOutputName("TowerInfoBackground_Sub1"); 0094 dtb->SetFlow(0); 0095 dtb->SetSeedType(0); 0096 dtb->SetSeedJetD(3); 0097 dtb->set_towerinfo(true); 0098 dtb->Verbosity(10); 0099 se->registerSubsystem(dtb); 0100 0101 CopyAndSubtractJets *casj = new CopyAndSubtractJets(); 0102 casj->SetFlowModulation(0); 0103 casj->Verbosity(10); 0104 casj->set_towerinfo(true); 0105 se->registerSubsystem(casj); 0106 0107 DetermineTowerBackground *dtb2 = new DetermineTowerBackground(); 0108 dtb2->SetBackgroundOutputName("TowerInfoBackground_Sub2"); 0109 dtb2->SetFlow(0); 0110 dtb2->SetSeedType(1); 0111 dtb2->SetSeedJetPt(7); 0112 dtb2->Verbosity(10); 0113 dtb2->set_towerinfo(true); 0114 se->registerSubsystem(dtb2); 0115 0116 SubtractTowers *st = new SubtractTowers(); 0117 st->SetFlowModulation(0); 0118 st->Verbosity(10); 0119 st->set_towerinfo(true); 0120 se->registerSubsystem(st); 0121 0122 towerjetreco = new JetReco(); 0123 towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWERINFO_SUB1)); 0124 towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWERINFO_SUB1)); 0125 towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWERINFO_SUB1)); 0126 //towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.2, 1), "AntiKt_Tower_r02_Sub1"); 0127 //towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.3, 1), "AntiKt_Tower_r03_Sub1"); 0128 towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.4, 1), "AntiKt_Tower_r04_Sub1"); 0129 //towerjetreco->add_algo(new FastJetAlgoSub(Jet::ANTIKT, 0.5, 1), "AntiKt_Tower_r05_Sub1"); 0130 towerjetreco->set_algo_node("ANTIKT"); 0131 towerjetreco->set_input_node("TOWER"); 0132 towerjetreco->Verbosity(verbosity); 0133 se->registerSubsystem(towerjetreco); 0134 0135 */ 0136 JetSeedCount *myJetVal = new JetSeedCount("AntiKt_Tower_r04_Sub1", "AntiKt_Truth_r04", outname); 0137 0138 myJetVal->setPtRange(5, 100); 0139 myJetVal->setEtaRange(-1.1, 1.1); 0140 //myJetVal->doUnsub(1); 0141 //myJetVal->doTruth(1); 0142 //myJetVal->doSeeds(1); 0143 se->registerSubsystem(myJetVal); 0144 0145 0146 Fun4AllInputManager *intrue = new Fun4AllDstInputManager("DSTtruth"); 0147 intrue->AddListFile(filelisttruth,1); 0148 se->registerInputManager(intrue); 0149 0150 0151 Fun4AllInputManager *in2 = new Fun4AllDstInputManager("DSTcalo"); 0152 in2->AddListFile(filelistcalo,1); 0153 se->registerInputManager(in2); 0154 0155 Fun4AllInputManager *in3 = new Fun4AllDstInputManager("DSTglobal"); 0156 in3->AddListFile(filelistglobal,1); 0157 se->registerInputManager(in3); 0158 0159 //se->run(-1); 0160 se->run(n_event); 0161 se->skip(n_skip); 0162 se->End(); 0163 0164 gSystem->Exit(0); 0165 return 0; 0166 0167 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |