Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:14: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 <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 #include <G4_Global.C>
0015 
0016 #include <jetbase/FastJetAlgo.h>
0017 #include <jetbase/JetReco.h>
0018 #include <jetbase/TowerJetInput.h>
0019 #include <g4jets/TruthJetInput.h>
0020 
0021 #include <g4centrality/PHG4CentralityReco.h>
0022 
0023 #include <HIJetReco.C>
0024 
0025 #include <tracksinjets/StructureinJets.h>
0026 //#include </sphenix/u/jamesj3j3/analysis/JS-Jet/StructureinJets/src/StructureinJets.h>
0027 
0028 
0029 R__LOAD_LIBRARY(libfun4all.so)
0030 R__LOAD_LIBRARY(libg4jets.so)
0031 R__LOAD_LIBRARY(libjetbackground.so)
0032 R__LOAD_LIBRARY(libTracksInJets.so)
0033 R__LOAD_LIBRARY(libg4centrality.so)
0034 R__LOAD_LIBRARY(libg4dst.so)
0035 
0036 #endif
0037 
0038 void Fun4All_StructureinJets(const char *filelisttrk = "dst_tracks.list",
0039             const char *filelistcalo = "dst_calo_cluster.list",
0040             const char *filelistbbc = "dst_mbd_epd.list",
0041             const char *outname = "outputest.root")
0042 {
0043 
0044   // Set do_global flag to true to enable reconstruction of the global vertex
0045   
0046   Fun4AllServer *se = Fun4AllServer::instance();
0047   int verbosity = 0;
0048 
0049   se->Verbosity(verbosity);
0050   recoConsts *rc = recoConsts::instance();
0051 
0052   Enable::CDB = true;
0053   // global tag
0054   rc->set_StringFlag("CDB_GLOBALTAG",CDB::global_tag);
0055   // 64 bit timestamp
0056   rc->set_uint64Flag("TIMESTAMP",CDB::timestamp);
0057 
0058   Global_Reco(); 
0059 
0060   PHG4CentralityReco *cent = new PHG4CentralityReco();
0061   cent->Verbosity(0);
0062   cent->GetCalibrationParameters().ReadFromFile("centrality", "xml", 0, 0, string(getenv("CALIBRATIONROOT")) + string("/Centrality/"));
0063   se->registerSubsystem( cent );
0064 
0065   HIJetReco();  
0066 
0067   bool isAA = false; // Set the value of isAA for AA collisions. Produces figures projected accross centrality bins {0,100,10}. False for pp.
0068 
0069   StructureinJets *trksinjets = new StructureinJets("AntiKt_Tower_r04_Sub1", outname);
0070 
0071   se->registerSubsystem(trksinjets);  
0072   
0073   Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTcalo");
0074   in->AddListFile(filelistcalo,1);
0075   se->registerInputManager(in);
0076 
0077   Fun4AllInputManager *intrk = new Fun4AllDstInputManager("DSTtrk");
0078   intrk->AddListFile(filelisttrk,1);
0079   se->registerInputManager(intrk);
0080   
0081   Fun4AllInputManager *inbbc = new Fun4AllDstInputManager("DSTbbc");
0082   inbbc->AddListFile(filelistbbc,1);
0083   se->registerInputManager(inbbc);
0084 
0085   se->run(1000);
0086   se->End();
0087 
0088   gSystem->Exit(0);
0089   return 0;
0090 
0091 }