Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:12:31

0001 void read_inttZ_test()
0002 {
0003     string folder_direction = "/sphenix/user/ChengWei/INTT/INTT_commissioning/ZeroField/20869/folder_beam_inttall-00020869-0000_event_base_ana_cluster_full_survey_3.32_excludeR40000_200kEvent_3HotCut_advanced_test";
0004     TFile * f_intt = TFile::Open(Form("%s/INTT_zvtx.root", folder_direction.c_str()));
0005     // gDirectory = gDir;
0006     TTree * t_intt = (TTree * ) f_intt -> Get("tree_Z");
0007     if (!t_intt) return;
0008 
0009     int intt_eID, intt_N_cluster_outer, intt_N_cluster_inner, intt_N_good, intt_ES_N_good, intt_N_group;
0010     double intt_ES_zvtx, intt_ES_zvtxE, intt_ES_rangeL, intt_ES_rangeR, intt_ES_width_density;
0011     double intt_LB_Gaus_mean, intt_LB_Gaus_meanE, intt_LB_Gaus_width, intt_LB_Gaus_offset, intt_LB_Gaus_chi2, intt_LB_Gaus_size_width, intt_LB_geo_mean;
0012     double MC_true_zvtx;
0013     bool intt_good_zvtx_tag;
0014     Long64_t intt_bco_full; 
0015 
0016     t_intt -> Branch("eID",&intt_eID);
0017     t_intt -> Branch("bco_full",&intt_bco_full);
0018     t_intt -> Branch("nclu_inner",&intt_N_cluster_inner);
0019     t_intt -> Branch("nclu_outer",&intt_N_cluster_outer);
0020     t_intt -> Branch("ES_zvtx",&intt_ES_zvtx);
0021     t_intt -> Branch("ES_zvtxE",&intt_ES_zvtxE);
0022     t_intt -> Branch("ES_rangeL",&intt_ES_rangeL);
0023     t_intt -> Branch("ES_rangeR",&intt_ES_rangeR);
0024     t_intt -> Branch("ES_N_good",&intt_ES_N_good);
0025     t_intt -> Branch("ES_Width_density",&intt_ES_width_density);
0026     t_intt -> Branch("LB_Gaus_mean",&intt_LB_Gaus_mean);
0027     t_intt -> Branch("LB_Gaus_meanE",&intt_LB_Gaus_meanE);
0028     t_intt -> Branch("LB_Gaus_width",&intt_LB_Gaus_width);
0029     t_intt -> Branch("LB_Gaus_offset", &intt_LB_Gaus_offset);
0030     t_intt -> Branch("LB_Gaus_chi2", &intt_LB_Gaus_chi2);
0031     t_intt -> Branch("LB_Gaus_size_width", &intt_LB_Gaus_size_width);
0032     t_intt -> Branch("LB_geo_mean", &intt_LB_geo_mean);
0033     t_intt -> Branch("good_zvtx_tag", &intt_good_zvtx_tag);
0034     t_intt -> Branch("N_group", &intt_N_group);
0035     t_intt -> Branch("MC_true_zvtx",&MC_true_zvtx);
0036 
0037     cout <<"second test : "<< t_mbd -> GetEntries() << " " << t_intt -> GetEntries() << endl;
0038     t_intt -> GetEntry(0);
0039     cout <<"second test : "<<intt_N_cluster_inner<<endl;
0040 
0041     cout << t_mbd -> GetEntries() << " " << t_intt -> GetEntries() << endl;
0042 }