Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:20:35

0001 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
0002 #include <fun4all/Fun4AllServer.h>
0003 #include <fun4all/Fun4AllDstOutputManager.h>
0004 #include <fun4all/Fun4AllInputManager.h>
0005 
0006 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0007 
0008 #include <phool/recoConsts.h>
0009 
0010 #include <prototype4/CaloCalibration.h>
0011 #include <prototype4/CaloUnpackPRDF.h>
0012 #include <prototype4/EventInfoSummary.h>
0013 #include <prototype4/GenericUnpackPRDF.h>
0014 #include <prototype4/PROTOTYPE4_FEM.h>
0015 #include <prototype4/Prototype4DSTReader.h>
0016 #include <prototype4/RunInfoUnpackPRDF.h>
0017 #include <prototype4/TempInfoUnpackPRDF.h>
0018 
0019 R__LOAD_LIBRARY(libfun4allraw.so)
0020 R__LOAD_LIBRARY(libPrototype4.so)
0021 #endif
0022 
0023 void Fun4All_TestBeam(int nEvents = 100,
0024                       const char *input_file = "/sphenix/data/data02/sphenix/t1044/fnal/beam/beam_00000406-0000.prdf",
0025                       const char *output_file = "beam_00000406.root")
0026 {
0027   gSystem->Load("libfun4all");
0028   gSystem->Load("libPrototype4.so");
0029 
0030   const bool do_cemc = true;
0031   const bool do_hcal = true;
0032   //  const bool do_cemc = false;
0033   //  const bool do_hcal = false;
0034 
0035   Fun4AllServer *se = Fun4AllServer::instance();
0036   se->Verbosity(Fun4AllServer::VERBOSITY_SOME);
0037 
0038   recoConsts *rc = recoConsts::instance();
0039   //rc->set_IntFlag("RUNNUMBER",0);
0040 
0041   // ------------------- Run info -> RUN node -------------------
0042   RunInfoUnpackPRDF *unpack_run = new RunInfoUnpackPRDF();
0043   //  unpack_run->Verbosity(RunInfoUnpackPRDF::VERBOSITY_SOME);
0044 
0045   int i_offset = 0;
0046 
0047   //    rcdaq_client create_device device_filenumbers_delete 9 911 "$HOME/beam_values.txt"
0048   //  S:MTNRG  =  120   GeV
0049   //  F:MT6SC1 =  11127     Cnts
0050   //  F:MT6SC2 =  10585     Cnts
0051   //  F:MT6SC3 =  10442     Cnts
0052   //  F:MT6SC4 =  0         Cnts
0053   //  F:MT6SC5 =  20251     Cnts
0054   //  E:2CH    =  981.9 mm
0055   //  E:2CV    =  93.17 mm
0056   //  E:2CMT6T =  76.11 F
0057   //  E:2CMT6H =  18.09 %Hum
0058   //  F:MT5CP2 =  .0301 Psia
0059   //  F:MT6CP2 =  .6905 Psia
0060   i_offset = 0;
0061   unpack_run->add_channel("beam_MTNRG_GeV", 911, i_offset++, 1e-4);
0062   unpack_run->add_channel("beam_MT6SC1_Cnts", 911, i_offset++, 1e-4);
0063   unpack_run->add_channel("beam_MT6SC2_Cnts", 911, i_offset++, 1e-4);
0064   unpack_run->add_channel("beam_MT6SC3_Cnts", 911, i_offset++, 1e-4);
0065   unpack_run->add_channel("beam_MT6SC4_Cnts", 911, i_offset++, 1e-4);
0066   unpack_run->add_channel("beam_MT6SC5_Cnts", 911, i_offset++, 1e-4);
0067   unpack_run->add_channel("beam_2CH_mm", 911, i_offset++, 1e-4);
0068   unpack_run->add_channel("beam_2CV_mm", 911, i_offset++, 1e-4);
0069   unpack_run->add_channel("beam_2CMT6T_F", 911, i_offset++, 1e-4);
0070   unpack_run->add_channel("beam_2CMT6H_RH", 911, i_offset++, 1e-4);
0071   unpack_run->add_channel("beam_MT5CP2_Psia", 911, i_offset++, 1e-4);
0072   unpack_run->add_channel("beam_MT6CP2_Psia", 911, i_offset++, 1e-4);
0073 
0074   //  rcdaq_client create_device device_filenumbers_delete 9 984 "$HOME/DB_LOGGER_EMCAL_A0_values.txt"
0075   unpack_run->add_channel("EMCAL_A0_HighGain", 984, 0, 1);  // 1: pre-amp high gain, 0: nominal gain
0076 
0077   //  rcdaq_client create_device device_filenumbers_delete 9 983 "$HOME/DB_LOGGER_EMCAL_GR0.txt"
0078   unpack_run->add_channel("EMCAL_GR0_BiasOffset_Tower21", 983, 21 - 1, 1);  // bias offset in mV for tower 21
0079 
0080   // rcdaq_client create_device device_filenumbers_delete 9 982 "$HOME/DB_LOGGER_EMCAL_T0_values.txt"
0081   unpack_run->add_channel("EMCAL_T0_Tower21", 982, 21 - 1, 1e-3);  // temperature reading in C for tower 21
0082   //
0083   se->registerSubsystem(unpack_run);
0084   //
0085   // ------------------- Temperature output -------------------
0086   //  TempInfoUnpackPRDF *unpack_temp = new TempInfoUnpackPRDF();
0087   //  unpack_temp->Verbosity(RunInfoUnpackPRDF::VERBOSITY_SOME);
0088   //  se->registerSubsystem(unpack_temp);
0089 
0090   // ------------------- HCal and EMcal -------------------
0091 
0092   CaloCalibration *calib = NULL;
0093 
0094   if (do_cemc)
0095   {
0096     SubsysReco *unpack = new CaloUnpackPRDF();
0097     //  unpack->Verbosity(1);
0098     se->registerSubsystem(unpack);
0099 
0100     calib = new CaloCalibration("CEMC");
0101     //    calib->Verbosity(4);
0102     //    calib->GetCalibrationParameters().set_double_param("calib_const_scale", 8. / 3000);
0103     //    calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 0);
0104     calib->GetCalibrationParameters().ReadFromFile("CEMC", "xml", 0, 0,
0105                                                    string(getenv("CALIBRATIONROOT")) + string("/Prototype4/Calibration/"));  // calibration database
0106     se->registerSubsystem(calib);
0107   }
0108 
0109   if (do_hcal)
0110   {
0111     // leading order energy scale from Xu Sun
0112     const double cin_cali = 0.00270145;
0113     const double cout_cali = 0.0065718;
0114 
0115     calib = new CaloCalibration("HCALIN");
0116     calib->set_calib_tower_node_prefix("CALIB_LG");
0117     calib->set_raw_tower_node_prefix("RAW_LG");
0118     calib->GetCalibrationParameters().set_name("hcalin_lg");
0119 //    calib->GetCalibrationParameters().set_double_param("calib_const_scale", cin_cali);
0120 //    calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 0);
0121       calib->GetCalibrationParameters().ReadFromFile("hcalin_lg", "xml", 0, 0,
0122                                                      string(getenv("CALIBRATIONROOT")) + string("/Prototype4/Calibration/"));  // calibration database
0123     se->registerSubsystem(calib);
0124 
0125     //  calib = new CaloCalibration("HCALIN");
0126     //  calib->set_calib_tower_node_prefix("CALIB_HG");
0127     //  calib->set_raw_tower_node_prefix("RAW_HG");
0128     //  calib->GetCalibrationParameters().set_name("hcalin_hg");
0129     //  calib->GetCalibrationParameters().ReadFromFile("hcalin_hg", "xml", 0, 0,
0130     //                                                 string(getenv("CALIBRATIONROOT")) + string("/Prototype4/Calibration/"));  // calibration database
0131     //  se->registerSubsystem(calib);
0132 
0133     calib = new CaloCalibration("HCALOUT");
0134     calib->set_calib_tower_node_prefix("CALIB_LG");
0135     calib->set_raw_tower_node_prefix("RAW_LG");
0136     calib->GetCalibrationParameters().set_name("hcalout_lg");
0137 //    calib->GetCalibrationParameters().set_double_param("calib_const_scale", cout_cali);
0138 //    calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 0);
0139       calib->GetCalibrationParameters().ReadFromFile("hcalout_lg", "xml", 0, 0,
0140                                                      string(getenv("CALIBRATIONROOT")) + string("/Prototype4/Calibration/"));  // calibration database
0141     se->registerSubsystem(calib);
0142 
0143     calib = new CaloCalibration("HCALOUT");
0144     calib->set_calib_tower_node_prefix("CALIB_HG");
0145     calib->set_raw_tower_node_prefix("RAW_HG");
0146     calib->GetCalibrationParameters().set_name("hcalout_hg");
0147 //    calib->GetCalibrationParameters().set_double_param("calib_const_scale", cout_cali / 32);
0148 //    calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 0);
0149       calib->GetCalibrationParameters().ReadFromFile("hcalout_hg", "xml", 0, 0,
0150                                                      string(getenv("CALIBRATIONROOT")) + string("/Prototype4/Calibration/"));  // calibration database
0151     se->registerSubsystem(calib);
0152   }
0153   //
0154   //  // ------------------- Hodoscpes -------------------
0155   //
0156   const int first_packet_id = PROTOTYPE4_FEM::PACKET_ID;
0157   //  const int second_packet_id = 21102;
0158   //
0159   GenericUnpackPRDF *gunpack = NULL;
0160 
0161   const int N_hodo = 8;
0162   // mapping based on SPHENIX-doc-121-v6
0163   //  1 2 3 4 5 6 7 8
0164   //  101 100 103 102 97  96  99  98
0165   //
0166   //9 109
0167   //10  108
0168   //11  111
0169   //12  110
0170   //13  105
0171   //14  104
0172   //15  107
0173   //16  106
0174 
0175   gunpack = new GenericUnpackPRDF("HODO_VERTICAL");
0176   gunpack->add_channel(first_packet_id, 101, 0);
0177   gunpack->add_channel(first_packet_id, 100, 1);
0178   gunpack->add_channel(first_packet_id, 103, 2);
0179   gunpack->add_channel(first_packet_id, 102, 3);
0180   gunpack->add_channel(first_packet_id, 97, 4);
0181   gunpack->add_channel(first_packet_id, 96, 5);
0182   gunpack->add_channel(first_packet_id, 99, 6);
0183   gunpack->add_channel(first_packet_id, 98, 7);
0184   se->registerSubsystem(gunpack);
0185   //
0186   gunpack = new GenericUnpackPRDF("HODO_HORIZONTAL");
0187   gunpack->add_channel(first_packet_id, 109, 0);
0188   gunpack->add_channel(first_packet_id, 108, 1);
0189   gunpack->add_channel(first_packet_id, 111, 2);
0190   gunpack->add_channel(first_packet_id, 110, 3);
0191   gunpack->add_channel(first_packet_id, 105, 4);
0192   gunpack->add_channel(first_packet_id, 104, 5);
0193   gunpack->add_channel(first_packet_id, 107, 6);
0194   gunpack->add_channel(first_packet_id, 106, 7);
0195   se->registerSubsystem(gunpack);
0196   //
0197 
0198   //  Nicole Lewis [7:12 PM]
0199   //  added and commented on this Plain Text snippet: Run 545 MPV and Other Values
0200   //  Collumns: Height, MPV, Sigma, chi2, NDF
0201   //  Run 545
0202   //  HODO_HORIZONTAL[0] 18.0525 319.879 83.4359 139.487 199
0203   //  HODO_HORIZONTAL[1] 26.6811 262.209 65.1704 159.059 171
0204   //  HODO_HORIZONTAL[2] 27.5885 296.343 61.0538 171.291 205
0205   //  HODO_HORIZONTAL[3] 24.4132 299.135 72.4796 205.008 214
0206   //  HODO_HORIZONTAL[4] 28.6331 290.498 66.9209 177.386 205
0207   //  HODO_HORIZONTAL[5] 29.3528 263.781 61.5052 202.933 195
0208   //  HODO_HORIZONTAL[6] 21.5175 336.446 78.8985 170.031 206
0209   //  HODO_HORIZONTAL[7] 17.7948 336.247 91.8477 146.352 201
0210   //  HODO_VERTICAL[0] 15.3648 238.473 94.6679 111.272 166
0211   //  HODO_VERTICAL[1] 23.2368 225.202 54.8611 117.209 145
0212   //  HODO_VERTICAL[2] 25.3442 209.827 66.168 134.383 171
0213   //  HODO_VERTICAL[3] 36.8254 217.544 44.1445 122.811 167
0214   //  HODO_VERTICAL[4] 38.0982 210.6   44.9922 160.269 165
0215   //  HODO_VERTICAL[5] 38.1045 252.022 49.4073 165.239 200
0216   //  HODO_VERTICAL[6] 42.1052 223.528 44.5291 113.343 171
0217   //  HODO_VERTICAL[7] 31.1721 244.299 55.974 160.476 186
0218 
0219   calib = new CaloCalibration("HODO_VERTICAL");
0220   calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 1);
0221   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 0), 1 / 238.473);  // normalize to 1.0
0222   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 1), 1 / 225.202);  // normalize to 1.0
0223   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 2), 1 / 209.827);  // normalize to 1.0
0224   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 3), 1 / 217.544);  // normalize to 1.0
0225   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 4), 1 / 210.6);    // normalize to 1.0
0226   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 5), 1 / 252.022);  // normalize to 1.0
0227   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 6), 1 / 223.528);  // normalize to 1.0
0228   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 7), 1 / 244.299);  // normalize to 1.0
0229   se->registerSubsystem(calib);
0230 
0231   calib = new CaloCalibration("HODO_HORIZONTAL");
0232   calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 1);
0233   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 0), 1 / 319.879);  // normalize to 1.0
0234   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 1), 1 / 262.209);  // normalize to 1.0
0235   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 2), 1 / 296.343);  // normalize to 1.0
0236   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 3), 1 / 299.135);  // normalize to 1.0
0237   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 4), 1 / 290.498);  // normalize to 1.0
0238   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 5), 1 / 263.781);  // normalize to 1.0
0239   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 6), 1 / 336.446);  // normalize to 1.0
0240   calib->GetCalibrationParameters().set_double_param(Form("calib_const_column0_row%d", 7), 1 / 336.247);  // normalize to 1.0
0241   se->registerSubsystem(calib);
0242   //
0243   //  // ------------------- Other detectors -------------------
0244   //
0245   // mapping based on SPHENIX-doc-121-v6
0246   gunpack = new GenericUnpackPRDF("C1");
0247   // unpack->Verbosity(1);
0248   gunpack->add_channel(first_packet_id, 165, 0);  // 24 Cerenkov 1
0249   se->registerSubsystem(gunpack);
0250   //
0251   calib = new CaloCalibration("C1");
0252   calib->SetFitType(CaloCalibration::kPeakSample);
0253   se->registerSubsystem(calib);
0254   //
0255   // mapping based on SPHENIX-doc-121-v6
0256   gunpack = new GenericUnpackPRDF("C2");
0257   // unpack->Verbosity(1);
0258   gunpack->add_channel(first_packet_id, 166, 0);   // C2 inner fast
0259   gunpack->add_channel(first_packet_id, 160, 1);   // C2 outer fast
0260   gunpack->add_channel(first_packet_id, 167, 10);  // C2 inner slow
0261   se->registerSubsystem(gunpack);
0262   //
0263   calib = new CaloCalibration("C2");
0264   calib->SetFitType(CaloCalibration::kPeakSample);
0265   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0266   calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 1);
0267   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row0", 1);
0268   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row1", 1);
0269   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row10", 1);
0270   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row11", 1);
0271   se->registerSubsystem(calib);
0272   //
0273   ////  John H. : should be 19, 20, 21 and the other channels are a litle permuted from  what I thought
0274   //  gunpack = new GenericUnpackPRDF("HCAL_SCINT");
0275   //// unpack->Verbosity(1);
0276   //  gunpack->add_channel(second_packet_id, 19, 1);
0277   //  gunpack->add_channel(second_packet_id, 20, 2);
0278   //  gunpack->add_channel(second_packet_id, 21, 3);
0279   //  se->registerSubsystem(gunpack);
0280   //
0281   //  calib = new CaloCalibration("HCAL_SCINT");
0282   //  se->registerSubsystem(calib);
0283   //
0284   // mapping based on SPHENIX-doc-121-v6
0285   gunpack = new GenericUnpackPRDF("PbGL");
0286   // unpack->Verbosity(1);
0287   gunpack->add_channel(first_packet_id, 171, 0);  // PbGl (612AM-3)
0288   se->registerSubsystem(gunpack);
0289 
0290   calib = new CaloCalibration("PbGL");
0291   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0292   se->registerSubsystem(calib);
0293   //
0294   // mapping based on SPHENIX-doc-121-v6
0295   gunpack = new GenericUnpackPRDF("TRIGGER_VETO");
0296   // unpack->Verbosity(1);
0297   gunpack->add_channel(first_packet_id, 172, 0);  //  172 Counters  Bottom veto
0298   gunpack->add_channel(first_packet_id, 173, 1);  //  173 Counters  Top veto
0299   gunpack->add_channel(first_packet_id, 174, 2);  //  174 Counters  Right veto
0300   gunpack->add_channel(first_packet_id, 175, 3);  //  175 Counters  Left Veto
0301   se->registerSubsystem(gunpack);
0302 
0303   // Calibrate the MIP peak to an relative energy of +1.0
0304 
0305   //  Nicole Lewis [7:12 PM]
0306   //  added and commented on this Plain Text snippet: Run 545 MPV and Other Values
0307   //  Collumns: Height, MPV, Sigma, chi2, NDF
0308   //  Run 545
0309   //  TRIGGER_VETO[0] 501.958 295.811 51.6134 223.972 194
0310   //  TRIGGER_VETO[1] 262.321 305.247 52.5851 138.403 158
0311   //  TRIGGER_VETO[2] 238.726 451.48 99.6016 274.339 245
0312   //  TRIGGER_VETO[3] 135.541 624.076 132.313 284.532 240
0313 
0314   calib = new CaloCalibration("TRIGGER_VETO");
0315   calib->SetFitType(CaloCalibration::kPeakSample);
0316   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0317   calib->GetCalibrationParameters().set_int_param("use_chan_calibration", 1);
0318   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row0", 1. / 295.811);
0319   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row1", 1. / 305.247);
0320   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row2", 1. / 451.48);
0321   calib->GetCalibrationParameters().set_double_param("calib_const_column0_row3", 1. / 624.076);
0322   se->registerSubsystem(calib);
0323   //
0324   const int N_TileMapper = 16;
0325   //
0326   gunpack = new GenericUnpackPRDF("TILE_MAPPER");
0327   for (int i = 0; i < N_TileMapper; ++i)
0328     gunpack->add_channel(first_packet_id, 176 + i, i);  // 24 Cerenkov 1
0329   se->registerSubsystem(gunpack);
0330   //
0331   calib = new CaloCalibration("TILE_MAPPER");
0332   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0333   se->registerSubsystem(calib);
0334   //
0335   // mapping based on SPHENIX-doc-121-v6
0336   gunpack = new GenericUnpackPRDF("SC3");
0337   // unpack->Verbosity(1);
0338   gunpack->add_channel(first_packet_id, 169, 0);  // MT6SC3 (612AM-2)
0339   se->registerSubsystem(gunpack);
0340   //
0341   calib = new CaloCalibration("SC3");
0342   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0343   se->registerSubsystem(calib);
0344 
0345   gunpack = new GenericUnpackPRDF("FINGER_COUNTER");
0346   // unpack->Verbosity(1);
0347   gunpack->add_channel(first_packet_id, 168, 0);  // 168  Counters  Finger counter
0348   se->registerSubsystem(gunpack);
0349   //
0350   calib = new CaloCalibration("FINGER_COUNTER");
0351   calib->GetCalibrationParameters().set_double_param("calib_const_scale", 1);
0352   se->registerSubsystem(calib);
0353   //
0354   //  gunpack = new GenericUnpackPRDF("SC_MWPC4");
0355   //// unpack->Verbosity(1);
0356   //  gunpack->add_channel(second_packet_id, 18, 0); // 18  SC behind MWPC4 From channel 4 of adjacent 612AM amplifier
0357   //  se->registerSubsystem(gunpack);
0358   //
0359   //  calib = new CaloCalibration("SC_MWPC4");
0360   //  calib->GetCalibrationParameters().set_double_param("calib_const_scale", -1);
0361   //  se->registerSubsystem(calib);
0362   //
0363   //  gunpack = new GenericUnpackPRDF("SPILL_WARBLER");
0364   //// unpack->Verbosity(1);
0365   //  gunpack->add_channel(second_packet_id, 16, 0); // Short Meritec cable 0 16  Spill warbler
0366   //  se->registerSubsystem(gunpack);
0367   //
0368   //  // -------------------  Event summary -------------------
0369   //
0370   //  EventInfoSummary * es = new EventInfoSummary();
0371   //  es->Verbosity(EventInfoSummary::VERBOSITY_MORE);
0372   //  se->registerSubsystem(es);
0373 
0374   // -------------------  Output -------------------
0375   //main DST output
0376   Fun4AllDstOutputManager *out_Manager = new Fun4AllDstOutputManager("DSTOUT",
0377                                                                      output_file);
0378   se->registerOutputManager(out_Manager);
0379 
0380   //alternatively, fast check on DST using DST Reader:
0381   Prototype4DSTReader *reader = new Prototype4DSTReader(
0382       string(output_file) + string("_DSTReader.root"));
0383 
0384   reader->AddRunInfo("beam_MTNRG_GeV");
0385   reader->AddRunInfo("beam_2CH_mm");
0386   reader->AddRunInfo("beam_2CV_mm");
0387   reader->AddRunInfo("EMCAL_A0_HighGain");
0388   reader->AddRunInfo("EMCAL_GR0_BiasOffset_Tower21");
0389   reader->AddRunInfo("EMCAL_T0_Tower21");
0390   reader->AddRunInfo("EMCAL_Is_HighEta");
0391 
0392   //  reader->AddEventInfo("beam_Is_In_Spill");
0393   //  reader->AddEventInfo("beam_SPILL_WARBLER_RMS");
0394   //  reader->AddEventInfo("CALIB_CEMC_Sum");
0395   //  reader->AddEventInfo("CALIB_LG_HCALIN_Sum");
0396   //  reader->AddEventInfo("CALIB_LG_HCALOUT_Sum");
0397   //
0398   if (do_hcal)
0399   {
0400     reader->AddTower("RAW_LG_HCALIN");
0401     //  reader->AddTower("RAW_HG_HCALIN");
0402     reader->AddTower("RAW_LG_HCALOUT");
0403     reader->AddTower("RAW_HG_HCALOUT");
0404 
0405     reader->AddTower("CALIB_LG_HCALIN");
0406     //  reader->AddTower("CALIB_HG_HCALIN");
0407     reader->AddTower("CALIB_LG_HCALOUT");
0408     reader->AddTower("CALIB_HG_HCALOUT");
0409   }
0410 
0411   if (do_cemc)
0412   {
0413     reader->AddTower("RAW_CEMC");
0414     reader->AddTower("CALIB_CEMC");
0415   }
0416 
0417   //
0418   reader->AddTower("RAW_HODO_VERTICAL");
0419   reader->AddTower("RAW_HODO_HORIZONTAL");
0420   reader->AddTower("CALIB_HODO_VERTICAL");
0421   reader->AddTower("CALIB_HODO_HORIZONTAL");
0422   //
0423   reader->AddTower("RAW_C1");
0424   reader->AddTower("CALIB_C1");
0425 
0426   reader->AddTower("RAW_C2");
0427   reader->AddTower("CALIB_C2");
0428   //
0429   //  reader->AddTower("RAW_HCAL_SCINT");
0430   //  reader->AddTower("CALIB_HCAL_SCINT");
0431   //
0432   reader->AddTower("RAW_PbGL");
0433   reader->AddTower("CALIB_PbGL");
0434   //
0435   reader->AddTower("RAW_TRIGGER_VETO");
0436   reader->AddTower("CALIB_TRIGGER_VETO");
0437   //
0438   reader->AddTower("RAW_TILE_MAPPER");
0439   reader->AddTower("CALIB_TILE_MAPPER");
0440   //
0441   reader->AddTower("RAW_SC3");
0442   reader->AddTower("CALIB_SC3");
0443 
0444   reader->AddTower("RAW_FINGER_COUNTER");
0445   reader->AddTower("CALIB_FINGER_COUNTER");
0446 
0447   //
0448   //  reader->AddTower("RAW_SC_MWPC4");
0449   //  reader->AddTower("CALIB_SC_MWPC4");
0450   //
0451   //  reader->AddTower("RAW_SPILL_WARBLER");
0452 
0453   //  reader->AddTowerTemperature("EMCAL");
0454   //  reader->AddTowerTemperature("HCALIN");
0455   //  reader->AddTowerTemperature("HCALOUT");
0456 
0457   se->registerSubsystem(reader);
0458 
0459   Fun4AllInputManager *in = new Fun4AllPrdfInputManager("PRDFin");
0460   in->fileopen(input_file);
0461   se->registerInputManager(in);
0462 
0463   se->run(nEvents);
0464 
0465   se->End();
0466 }