File indexing completed on 2025-08-05 08:13:28
0001 #include <string>
0002
0003 using namespace std;
0004
0005 void Fun4All_TestBeam(int nEvents = 250000,
0006 const char *input_file = "./beamtest2018/beam/beam_00000088-0000.prdf",
0007 const char *output_file = "beam_00000088.root"
0008 )
0009 {
0010 gSystem->Load("libfun4all");
0011
0012 gSystem->Load("libMvtxPrototype1.so");
0013 gSystem->Load("libAnaMvtxPrototype1.so");
0014
0015 Fun4AllServer *se = Fun4AllServer::instance();
0016 se->Verbosity(0);
0017
0018
0019 char ifile[strlen(input_file) + 1];
0020 strcpy(ifile, input_file);
0021 strtok(ifile, "_");
0022 int runnumber = atoi(strtok(0, "-"));
0023 int segnumber = atoi(strtok(strtok(0, "-"), "."));
0024 cout << "runnumber: " << runnumber << " segment " << segnumber << endl;
0025
0026 recoConsts *rc = recoConsts::instance();
0027 rc->set_IntFlag("RUNNUMBER", runnumber);
0028
0029 MvtxUnpackPRDF *unpack = new MvtxUnpackPRDF();
0030 unpack->Verbosity(0);
0031 se->registerSubsystem(unpack);
0032
0033 MvtxApplyHotDead *hotdead = new MvtxApplyHotDead("MvtxApplyHotDead",
0034 "hotmap/hotmap_testbeam_00000088.txt");
0035 hotdead->Verbosity(0);
0036 hotdead->PrintHotDeadMap();
0037 se->registerSubsystem(hotdead);
0038
0039 MvtxClusterizer *clus = new MvtxClusterizer();
0040 clus->Verbosity(0);
0041 se->registerSubsystem(clus);
0042
0043 MvtxDefUtil util;
0044 MvtxAlign *align = new MvtxAlign();
0045 align->Verbosity(0);
0046
0047
0048
0049
0050
0051 align->SetAlignmentParFileDir("beamcenter/");
0052 se->registerSubsystem(align);
0053
0054 AnaMvtxPrototype1* ana = new AnaMvtxPrototype1();
0055
0056 ana->Verbosity(0);
0057 se->registerSubsystem(ana);
0058
0059
0060 Fun4AllDstOutputManager *out_Manager = new Fun4AllDstOutputManager("DSTOUT", output_file);
0061 se->registerOutputManager(out_Manager);
0062
0063 Fun4AllInputManager *in = new Fun4AllPrdfInputManager("PRDFin");
0064 in->fileopen(input_file);
0065 se->registerInputManager(in);
0066
0067 se->run(nEvents);
0068
0069 se->End();
0070 }