File indexing completed on 2025-08-06 08:12:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <string>
0012
0013 void
0014 G4DSTreader( const char * outputFile = "G4sPHENIXCells.root",
0015 int absorberactive = 1,
0016 bool do_svtx = true,
0017 bool do_pstof = true,
0018 bool do_cemc = true,
0019 bool do_hcalin = true,
0020 bool do_magnet = true,
0021 bool do_hcalout = true,
0022 bool do_cemc_twr = true,
0023 bool do_hcalin_twr = true,
0024 bool do_magnet = true,
0025 bool do_hcalout_twr = true
0026 )
0027 {
0028
0029
0030 const bool debug = false;
0031
0032
0033 const bool save_g4_raw = true;
0034
0035
0036 PHG4DSTReader* ana = new PHG4DSTReader(
0037 string(outputFile) + string("_DSTReader.root"));
0038 ana->set_save_particle(true);
0039 ana->set_load_all_particle(false);
0040 ana->set_load_active_particle(true);
0041 ana->set_save_vertex(true);
0042
0043 if (debug)
0044 {
0045 ana->Verbosity(2);
0046 }
0047
0048 if (save_g4_raw)
0049 {
0050 if (do_svtx)
0051 {
0052 ana->AddNode("SVTX");
0053 }
0054
0055 if (do_pstof)
0056 {
0057 ana->AddNode("PSTOF_0");
0058 }
0059
0060 if (do_cemc)
0061 {
0062 ana->AddNode("CEMC");
0063 if (absorberactive)
0064 {
0065 ana->AddNode("ABSORBER_CEMC");
0066 ana->AddNode("CEMC_ELECTRONICS");
0067 ana->AddNode("CEMC_SPT");
0068 }
0069 }
0070
0071 if (do_hcalin)
0072 {
0073 ana->AddNode("HCALIN");
0074 if (absorberactive)
0075 ana->AddNode("ABSORBER_HCALIN");
0076 }
0077
0078 if (do_magnet)
0079 {
0080 if (absorberactive)
0081 ana->AddNode("MAGNET");
0082 }
0083
0084 if (do_hcalout)
0085 {
0086 ana->AddNode("HCALOUT");
0087 if (absorberactive)
0088 ana->AddNode("ABSORBER_HCALOUT");
0089 }
0090
0091
0092 ana->AddNode("BH_1");
0093 ana->AddNode("BH_FORWARD_PLUS");
0094 ana->AddNode("BH_FORWARD_NEG");
0095
0096 }
0097
0098 ana->set_tower_zero_sup(1e-6);
0099 if (do_cemc_twr)
0100 {
0101 ana->AddTower("SIM_CEMC");
0102 ana->AddTower("RAW_CEMC");
0103 ana->AddTower("CALIB_CEMC");
0104 }
0105 if (do_hcalin_twr)
0106 {
0107 ana->AddTower("SIM_HCALIN");
0108 ana->AddTower("RAW_HCALIN");
0109 ana->AddTower("CALIB_HCALIN");
0110 }
0111 if (do_hcalout_twr)
0112 {
0113 ana->AddTower("SIM_HCALOUT");
0114 ana->AddTower("RAW_HCALOUT");
0115 ana->AddTower("CALIB_HCALOUT");
0116 }
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130 Fun4AllServer *se = Fun4AllServer::instance();
0131 se->registerSubsystem(ana);
0132 }