11 int hbdchanIHC[4][4] = {{4, 8, 12, 16},
16 TH1F *h_hcal_tower_sim[16];
20 for(
int i_col = 0; i_col < 4; ++i_col)
22 string inputfile = Form(
"/sphenix/user/xusun/software/data/cosmic/TowerCalibAna/Proto4TowerInfoSIM_%s_%d.root",det.c_str(),i_col);
23 File_InPut[i_col] = TFile::Open(inputfile.c_str());
24 for(
int i_row = 0; i_row < 4; ++i_row)
26 int i_tower = hbdchanIHC[i_row][i_col]-1;
27 if(det ==
"HCALIN") HistName = Form(
"h_mHCALIN_SIM_twr_%d",i_tower);
28 if(det ==
"HCALOUT") HistName = Form(
"h_mHCALOUT_SIM_twr_%d",i_tower);
29 h_hcal_tower_sim[i_tower] = (TH1F*)File_InPut[i_col]->
Get(HistName.c_str())->Clone();
33 string outputfile = Form(
"/sphenix/user/xusun/software/data/cosmic/TowerCalibAna/Proto4TowerInfoSIM_%s.root",det.c_str());
34 TFile *File_OutPut =
new TFile(outputfile.c_str(),
"RECREATE");
36 for(
int i_tower = 0; i_tower < 16; ++i_tower)
38 h_hcal_tower_sim[i_tower]->Write();