Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
run_macro.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file run_macro.C
2  std::string infile = "G4sPHENIX.root",
3  std::string outfile = "test.root"
4  )
5 {
6 
7  gSystem->Load("libTreeMaker.so");
8 
10  se->Verbosity( 0 );
11  // just if we set some flags somewhere in this macro
13 
14  Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
15  //hitsin->fileopen("");
16  //hitsin->fileopen("$SPHENIX/blank/macros/macros/g4simulations/output/outputDijetTrig_35.root");
17  hitsin->fileopen( infile );
18  se->registerInputManager(hitsin);
19 
20  JetReco *truthjetreco = new JetReco();
22  tji->add_embedding_flag( 2 );
23  truthjetreco->add_input(tji);
24  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.2),"AntiKt_Truth_r02");
25  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.3),"AntiKt_Truth_r03");
26  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.4),"AntiKt_Truth_r04");
27  truthjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.5),"AntiKt_Truth_r05");
28  truthjetreco->set_algo_node("ANTIKT");
29  truthjetreco->set_input_node("TRUTH");
30  truthjetreco->Verbosity(0);
31  se->registerSubsystem(truthjetreco);
32 
33  JetReco *towerjetreco = new JetReco();
35  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
36  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
37  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.2),"AntiKt_Tower_HIRecoSeedsRaw_r02");
38  towerjetreco->set_algo_node("ANTIKT");
39  towerjetreco->set_input_node("TOWER");
40  towerjetreco->Verbosity(0);
41  se->registerSubsystem(towerjetreco);
42 
43  JetReco *towerjetreco = new JetReco();
44  // --- added by Ron (is this right?)
45  towerjetreco->add_input(new TowerJetInput(Jet::CEMC_TOWER));
46  towerjetreco->add_input(new TowerJetInput(Jet::HCALIN_TOWER));
47  towerjetreco->add_input(new TowerJetInput(Jet::HCALOUT_TOWER));
48  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.2),"AntiKt_Tower_r02");
49  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.3),"AntiKt_Tower_r03");
50  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.4),"AntiKt_Tower_r04");
51  towerjetreco->add_algo(new FastJetAlgo(Jet::ANTIKT,0.5),"AntiKt_Tower_r05");
52  // ---
53  towerjetreco->set_algo_node("ANTIKT");
54  towerjetreco->set_input_node("TOWER");
55  towerjetreco->Verbosity( 0 );
56  se->registerSubsystem(towerjetreco);
57 
58  TreeMaker *tt = new TreeMaker( outfile );
59  tt->Verbosity(2);
60  se->registerSubsystem( tt );
61 
62  se->run( 1 );
63 
64  se->End();
65  std::cout << "All done" << std::endl;
66  delete se;
67 
68  gSystem->Exit(0);
69 }