File indexing completed on 2025-08-06 08:14:01
0001 #include "Fun4All_Intt_Reco.hh"
0002
0003 void Fun4All_Intt_Reco( int run_num = 50889,
0004 int fphx_bco = -1
0005 )
0006 {
0007
0008
0009
0010
0011
0012
0013
0014
0015 int nevents = 100000;
0016
0017
0018 if( run_num == 50337 || run_num == 50339 )
0019 nevents = 0;
0020
0021 string run_type = "physics";
0022 string run_num_str = string( "000" ) + to_string( run_num );
0023
0024 string list_file = string( "list_run" ) + to_string( run_num ) + ".txt";
0025
0026
0027
0028
0029
0030
0031
0032 string output_base = string("_") + run_type + "_intt-" + run_num_str;
0033 string output_dst = string("results/") + "DST" + output_base;
0034 output_dst += "_no_hot";
0035 output_dst += ".root";
0036
0037 string cdb_hot_list = string( "data/hotmap_run_000" ) + to_string( run_num ) + ".root";
0038
0039 string cdbtree_name_dac = kIntt_cdb_dir + "dac_map/"
0040 + "cdb_intt_dac_35_45_60_90_120_150_180_210_streaming.root";
0041
0042 Fun4AllServer* se = Fun4AllServer::instance();
0043
0044
0045
0046 recoConsts *rc = recoConsts::instance();
0047
0048 Enable::CDB = true;
0049 rc->set_StringFlag("CDB_GLOBALTAG",CDB::global_tag);
0050
0051 rc->set_uint64Flag("TIMESTAMP",CDB::timestamp);
0052 rc->set_IntFlag("RUNNUMBER", run_num );
0053
0054
0055 Fun4AllInputManager *in = new Fun4AllDstInputManager("DST");
0056 in->Verbosity(2);
0057 in->AddListFile( list_file );
0058 se->registerInputManager(in);
0059
0060
0061 Enable::MVTX = true;
0062 Enable::INTT = true;
0063 Enable::TPC = true;
0064 Enable::MICROMEGAS = true;
0065 G4Init();
0066 G4Setup();
0067
0068 TrackingInit();
0069
0070
0071 InttCombinedRawDataDecoder* inttdecode = new InttCombinedRawDataDecoder();
0072
0073
0074 inttdecode->writeInttEventHeader( true );
0075 inttdecode->LoadHotChannelMapLocal( cdb_hot_list );
0076
0077 inttdecode->SetCalibDAC( cdbtree_name_dac, InttCombinedRawDataDecoder::FILE );
0078 se->registerSubsystem( inttdecode );
0079
0080
0081
0082
0083
0084
0085 Fun4AllOutputManager* out = new Fun4AllDstOutputManager("DST", output_dst );
0086 se->registerOutputManager(out);
0087
0088 se->run(nevents);
0089 se->End();
0090
0091 cout << "CDB (hot channel) " << cdb_hot_list << endl;
0092 cout << "CDB (DAC map) " << cdbtree_name_dac << endl;
0093 cout << "Output: " << output_dst << endl;
0094
0095 delete se;
0096 }