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_fsPHENIX( const char * outputFile = "G4sPHENIXCells.root",
0015 int absorberactive = 1,
0016 bool do_svtx = true,
0017 bool do_cemc = true,
0018 bool do_hcalin = true,
0019 bool do_magnet = true,
0020 bool do_hcalout = true,
0021 bool do_cemc_twr = true,
0022 bool do_hcalin_twr = true,
0023 bool do_magnet = true,
0024 bool do_hcalout_twr = true,
0025 bool do_FGEM = true,
0026 bool do_FHCAL = true,
0027 bool do_FHCAL_twr = true,
0028 bool do_FEMC = true,
0029 bool do_FEMC_twr = true
0030 )
0031 {
0032
0033
0034 const bool debug = false;
0035
0036
0037 const bool save_g4_raw = true;
0038
0039
0040 PHG4DSTReader* ana = new PHG4DSTReader(
0041 string(outputFile) + string("_DSTReader.root"));
0042 ana->set_save_particle(true);
0043 ana->set_load_all_particle(false);
0044 ana->set_load_active_particle(true);
0045 ana->set_save_vertex(true);
0046
0047 if (debug)
0048 {
0049 ana->Verbosity(2);
0050 }
0051
0052 if (save_g4_raw)
0053 {
0054 if (do_svtx)
0055 {
0056 ana->AddNode("SVTX");
0057 }
0058
0059 if (do_cemc)
0060 {
0061 ana->AddNode("CEMC");
0062 if (absorberactive)
0063 {
0064 ana->AddNode("ABSORBER_CEMC");
0065 ana->AddNode("CEMC_ELECTRONICS");
0066 ana->AddNode("CEMC_SPT");
0067 }
0068 }
0069
0070 if (do_hcalin)
0071 {
0072 ana->AddNode("HCALIN");
0073 if (absorberactive)
0074 ana->AddNode("ABSORBER_HCALIN");
0075 }
0076
0077 if (do_magnet)
0078 {
0079 if (absorberactive)
0080 ana->AddNode("MAGNET");
0081 }
0082
0083 if (do_hcalout)
0084 {
0085 ana->AddNode("HCALOUT");
0086 if (absorberactive)
0087 ana->AddNode("ABSORBER_HCALOUT");
0088 }
0089
0090 if (do_FHCAL)
0091 {
0092 ana->AddNode("FHCAL");
0093 if (absorberactive)
0094 ana->AddNode("ABSORBER_FHCAL");
0095 }
0096
0097 if (do_FEMC)
0098 {
0099 ana->AddNode("FEMC");
0100 if (absorberactive)
0101 ana->AddNode("ABSORBER_FEMC");
0102 }
0103
0104 if (do_FGEM)
0105 {
0106 ana->AddNode("FGEM_0");
0107 ana->AddNode("FGEM_1");
0108 ana->AddNode("FGEM_2");
0109 ana->AddNode("FGEM_3");
0110 ana->AddNode("FGEM_4");
0111 }
0112
0113 ana->AddNode("BH_1");
0114 ana->AddNode("BH_FORWARD_PLUS");
0115 ana->AddNode("BH_FORWARD_NEG");
0116
0117 }
0118
0119 ana->set_tower_zero_sup(1e-6);
0120 if (do_cemc_twr)
0121 {
0122 ana->AddTower("SIM_CEMC");
0123 ana->AddTower("RAW_CEMC");
0124 ana->AddTower("CALIB_CEMC");
0125 }
0126 if (do_hcalin_twr)
0127 {
0128 ana->AddTower("SIM_HCALIN");
0129 ana->AddTower("RAW_HCALIN");
0130 ana->AddTower("CALIB_HCALIN");
0131 }
0132 if (do_hcalout_twr)
0133 {
0134 ana->AddTower("SIM_HCALOUT");
0135 ana->AddTower("RAW_HCALOUT");
0136 ana->AddTower("CALIB_HCALOUT");
0137 }
0138 if (do_FHCAL_twr)
0139 {
0140 ana->AddTower("SIM_FHCAL");
0141 ana->AddTower("RAW_FHCAL");
0142 ana->AddTower("CALIB_FHCAL");
0143 }
0144 if (do_FEMC_twr)
0145 {
0146 ana->AddTower("SIM_FEMC");
0147 ana->AddTower("RAW_FEMC");
0148 ana->AddTower("CALIB_FEMC");
0149 }
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163 Fun4AllServer *se = Fun4AllServer::instance();
0164 se->registerSubsystem(ana);
0165 }