Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestBeam_HCAL_TowerCalibAna.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TestBeam_HCAL_TowerCalibAna.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/libProto4HCalTowerCalib.so)
5 #endif
6 
7 int TestBeam_HCAL_TowerCalibAna(const int nEvents = 50000, const int colID = 0, const string det = "HCALOUT")
8 {
9  gSystem->Load("/direct/phenix+u/xusun/WorkSpace/sPHENIX/install/lib/libProto4HCalTowerCalib.so");
10 
11  bool _is_sim = false;
12 
13  std::string outputfile;
14  if(_is_sim) outputfile = Form("/sphenix/user/xusun/Simulation/TowerCalibAna/Proto4TowerInfoSIM_%s_%d.root",det.c_str(),colID);
15  if(!_is_sim) outputfile = Form("/sphenix/user/xusun/TestBeam/TowerCalibAna/Proto4TowerInfoRAW_%s_%d.root",det.c_str(),colID);
16 
17  Proto4TowerCalib* hcal_ana = new Proto4TowerCalib(outputfile.c_str());
18  hcal_ana->is_sim(_is_sim);
19  hcal_ana->set_det(det);
20  hcal_ana->set_colID(colID);
21  hcal_ana->InitAna();
22  hcal_ana->MakeAna();
23  hcal_ana->FinishAna();
24 
25  std::cout << "All done" << std::endl;
26 
27  return 0;
28 }