Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestBeam_HCAL_ShowerCalibAna.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TestBeam_HCAL_ShowerCalibAna.C
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <proto4showercalib/Proto4ShowerCalib.h>
4 R__LOAD_LIBRARY(/direct/phenix+u/xusun/WorkSpace/sPHENIX/install/lib/libProto4HCalShowerCalib.so)
5 #endif
6 
7 int TestBeam_HCAL_ShowerCalibAna(const int nEvents = 10000000, const string runID = "1087") // -5 GeV meson
8 // int TestBeam_HCAL_ShowerCalibAna(const int nEvents = 10000000, const string runID = "0422") // -8 GeV meson
9 // int TestBeam_HCAL_ShowerCalibAna(const int nEvents = 10000000, const string runID = "0571") // -12 GeV meson
10 // int TestBeam_HCAL_ShowerCalibAna(const int nEvents = 10000000, const string runID = "0821") // 60 GeV proton
11 // int TestBeam_HCAL_ShowerCalibAna(const int nEvents = 10000000, const string runID = "0498") // 120 GeV proton
12 {
13  gSystem->Load("/direct/phenix+u/xusun/WorkSpace/sPHENIX/install/lib/libProto4HCalShowerCalib.so");
14 
15  bool _is_sim = false;
16 
17  std::string outputfile;
18  if(_is_sim) outputfile = Form("/sphenix/user/xusun/Simulation/ShowerCalibAna/Proto4ShowerInfoSIM_%s.root",runID.c_str());
19  if(!_is_sim) outputfile = Form("/sphenix/user/xusun/TestBeam/ShowerCalibAna/Proto4ShowerInfoRAW_%s.root",runID.c_str());
20 
21  Proto4ShowerCalib* hcal_ana = new Proto4ShowerCalib(outputfile.c_str());
22  hcal_ana->is_sim(_is_sim);
23  hcal_ana->set_runID(runID);
24  hcal_ana->InitAna();
25  hcal_ana->MakeAna();
26  hcal_ana->FinishAna();
27 
28  std::cout << "All done" << std::endl;
29 
30  return 0;
31 }