Sep 16-17 Correction and Calibration
Load data:
TString datapath ="/data/chocula/fritts/data/k100proc/midasrq/byseries/"
TString ser[] = {"07220916_2059","07220916_2200","07220917_1039","07220917_1225","07220917_2125","07220917_2155"}
//TString lab[] = {"0V","-4V","-21V","-65V","-84V","-84V"}
int nser = 6
TChain *e
TChain *z
e = new TChain("rqDir/eventTree")
z = new TChain("rqDir/zip1")
// load odd-numbered series only, those are the NaI-triggered series
for(int s=0;s<nser;s++)if(s%2==1)e->Add(Form("%s/%s/umn*root",datapath.Data(),ser[s].Data()));
for(int s=0;s<nser;s++)if(s%2==1)z->Add(Form("%s/%s/umn*root",datapath.Data(),ser[s].Data()));
z->AddFriend(e)
//z->SetLineColor(kRed)
TCut crand = "EventCategory"
Correction and Calibration:
// Correction & Calibration
//
z->SetAlias("pt_keV","7.738820e+07*PTOFamps+1.653756e+13*PTOFamps**2")
z->SetAlias("pt0_keV","7.738820e+07*PTOFamps0+1.653756e+13*PTOFamps0**2")
z->SetAlias("PSUMbs","PAbs+PBbs+PCbs+PDbs+PEbs+PFbs")
//
z->SetAlias("BSel","PSUMbs-18400")
//
z->SetAlias("pt_keV_bscorr","pt_keV/(1.-0.0461538*BSel/165)")
z->SetAlias("pt0_keV_bscorr","pt0_keV/(1.-0.0461538*BSel/165)")
TCut cbs = "BSel<1100"
//
// note: this is an averaged calibration, rather than a time-dependent one. Not as precise.
z->SetAlias("pt_keVee","14.0821*pt_keV_bscorr/(333.899-pt_keV_bscorr)")
z->SetAlias("pt0_keVee","14.0821*pt0_keV_bscorr/(333.899-pt0_keV_bscorr)")