- evt : |--- 0 ---|------ 1 ------|------- 2 -------|-------- 3 ----------|
- time: 0 200 355 365 450 700 710 430 740 1200 1300 1350 1400
- det: ref LS1 P1 P2 LS1 P1 P3 LS2 LS4 LS1 P1 LS3 LS4
- nref: 1 0 0 0
- nls: 1 1 2 1
- nppac: 0 2 2 3
TCanvas *c1 = new TCanvas("c1");
TFile *f1 = new TFile("ana_0354_W300.root", "READ");
f1->ls();
TTree *fChain = (TTree *)f1->Get("tree");
fChain->Print();
void Reset(Short_t *ppace, Double_t *ppact,
Double_t *lsqs, Double_t *lsql, Double_t *lsq, Double_t *lst)
{
for(int i=0;i<4;i++) {
ppace[i] = 0;
ppact[i] = -1;
lsqs[i] = -1;
lsql[i] = -1;
lst[i] = -1;
lsq[i] = -1;
}
}
void convert()
{
//input
TFile *f1 = new TFile("ana_0354_W300.root", "READ");
TTree *fChain = (TTree *)f1->Get("tree");
// Declaration of leaf types
Int_t nref;
Long64_t refts[128];
Double_t refsubts[128];
Int_t nppac;
Short_t ppacid[128];
Long64_t ppacts[128];
Double_t ppacsubts[128];
UShort_t ppacraw[128];
Int_t nls;
Short_t lsid[128];
Long64_t lsts[128];
Double_t lssubts[128];
Double_t lse[128];
Double_t lssg[128];
Double_t lslg[128];
// List of branches
TBranch *b_nref;
TBranch *b_refts;
TBranch *b_refsubts;
TBranch *b_nppac;
TBranch *b_ppacid;
TBranch *b_ppacts;
TBranch *b_ppacsubts;
TBranch *b_ppacraw;
TBranch *b_nls;
TBranch *b_lsid;
TBranch *b_lsts;
TBranch *b_lssubts;
TBranch *b_lse;
TBranch *b_lssg;
TBranch *b_lslg;
fChain->SetBranchAddress("nref", &nref, &b_nref);
fChain->SetBranchAddress("refts", refts, &b_refts);
fChain->SetBranchAddress("refsubts", refsubts, &b_refsubts);
fChain->SetBranchAddress("nppac", &nppac, &b_nppac);
fChain->SetBranchAddress("ppacid", ppacid, &b_ppacid);
fChain->SetBranchAddress("ppacts", ppacts, &b_ppacts);
fChain->SetBranchAddress("ppacsubts", ppacsubts, &b_ppacsubts);
fChain->SetBranchAddress("ppacraw", ppacraw, &b_ppacraw);
fChain->SetBranchAddress("nls", &nls, &b_nls);
fChain->SetBranchAddress("lsid", lsid, &b_lsid);
fChain->SetBranchAddress("lsts", lsts, &b_lsts);
fChain->SetBranchAddress("lssubts", lssubts, &b_lssubts);
fChain->SetBranchAddress("lse", lse, &b_lse);
fChain->SetBranchAddress("lssg", lssg, &b_lssg);
fChain->SetBranchAddress("lslg", lslg, &b_lslg);
//output
Short_t ppace[4];
Double_t ppact[4],lsqs[4],lsql[4],lsq[4],lst[4],ppacem;
Double_t t0;
Int_t ppacidm;
TFile *fout = new TFile("ana354.root", "RECREATE");
TTree *tout = new TTree("tree", "tree");
tout->Branch("nppac", &nppac, "nppac/I");
tout->Branch("ppace", &ppace, "ppace[4]/s"); //ppac energy
tout->Branch("ppact", &ppact, "ppact[4]/D"); //ppac time - ref time
tout->Branch("ppacem", &ppacem, "ppacem/D"); //
tout->Branch("ppacidm",&ppacidm, "ppacidm/I"); //maximum ppac energy
tout->Branch("nls", &nls, "nls/I");
tout->Branch("lsqs", &lsqs, "lsqs[4]/D"); //ls Q_short_gate
tout->Branch("lsql", &lsql, "lsql[4]/D"); //ls Q_long_gate
tout->Branch("lse", &lsq, "lse[4]/D"); //ls energy
tout->Branch("lst", &lst, "lst[4]/D"); //ls time - ref time
Long64_t nentries = fChain->GetEntriesFast();
t0 = -1;
for (Long64_t jentry = 0; jentry < nentries; jentry++)
{
Reset(ppace, ppact, lsqs, lsql, lsq, lst);
fChain->GetEntry(jentry);
if(nref > 0) {
t0 = refts[0] + refsubts[0];
}
if(t0 > 0 && nref == 0 && nppac > 0) {
double t1 = -1;
ppacem = -1;
ppacidm = -1;
for(int i=0; i<nppac; i++) {
ppace[ppacid[i]] = ppacraw[i];
ppact[ppacid[i]] = ppacts[i] + ppacsubts[i] - t0;
if(t1 < ppact[ppacid[i]]) t1 = ppact[ppacid[i]];
if(ppacraw[i] > ppacem) {
ppacem = ppacraw[i];
ppacidm = ppacid[i];
}
}
for(int i=0; i<nls; i++) {
lsqs[lsid[i]] = lssg[i];
lsql[lsid[i]] = lslg[i];
lsq[lsid[i]] = lse[i];
lst[lsid[i]] = lsts[i] + lssubts[i] - t0;
}
if(t1>40000 && t1<3.9e7) tout->Fill(); // 40us - 39 ms; 0.01 eV-10 keV
}
if((jentry) % Long64_t(1e5) == 0) {
printf("Process %.2f %%, %5d k / %5d k \r",
Double_t(jentry)/nentries*100.,int(jentry/1000), int(nentries/1000));
fflush(stdout);
}
}
cout<<endl;
tout->Write();
fout->Close();
}
TFile *f1 = new TFile("ana354.root", "READ");
TTree *tree = (TTree *)f1->Get("tree");
tree->Draw("ppact[0]>>h1(2000,40000,15e6)","");
c1->SetLogy();
c1->Draw();
//PPAC En
tree->SetAlias("Enp0","72.3*56.4/ppact[0]*72.3*56.4/ppact[0]*1e6");
tree->Draw("Enp0>>henp(1000,5,1e2)","");
c1->SetLogx();
c1->Draw();
//LS En
tree->SetAlias("Enl0","72.3*56.4/lst[0]*72.3*56.4/lst[0]*1e6");
tree->Draw("Enl0>>henl(1000,5,1e2)","");
c1->SetLogx();
c1->Draw();
利用PPAC,LS时间信号得到的中子能谱与已知截面符合。
TCut cenp0 = "Enp0>5 && Enp0<100";
tree->Draw("ppace[0]:Enp0>>hpen(1000,5,100,1000,0,20000)",cenp0,"colz");
c1->SetLogy(0);
c1->SetLogz();
c1->Draw();
tree->Draw("nppac","nls>0");
c1->SetLogx(0);
c1->Draw();
tree->Draw("ppace[0]:ppace[1]>>(1000,0,60000,1000,0,60000)","","colz");
c1->SetLogx(0);
c1->Draw();
tree->SetAlias("pe0","TMath::Log(ppace[0])");
tree->SetAlias("pe1","TMath::Log(ppace[1])");
tree->Draw("pe0:pe1>>(1000,0,12,1000,0,12)","","colz");
c1->SetLogx(0);
c1->Draw();
tree->Draw("nppac:ppacem>>(1000,0,70000,4,0.5,4.5)","","colz");
c1->Draw();
tree->Draw("lse[3]:lsqs[3]/lsql[3]>>(100,0.8,1.2,400,0,6000","","colz");
c1->Draw();
//1-4重事件
TCut cls3p0 = "lsqs[3]/lsql[3]>0.94 && ppact[0]>0 && lst[3]>0";
tree->Draw("lst[3]-ppact[0]>>hm1a(100,-10,25)",cls3p0 && "nppac==1");
tree->Draw("lst[3]-ppact[0]>>hm2a(100,-10,25)",cls3p0 && "nppac==2");
tree->Draw("lst[3]-ppact[0]>>hm3a(100,-10,25)",cls3p0 && "nppac==3");
tree->Draw("lst[3]-ppact[0]>>hm4a(100,-10,25)",cls3p0 && "nppac==4");
hm4a->SetFillColor(6);
hm3a->SetFillColor(7);
hm2a->SetFillColor(8);
hm1a->SetFillColor(9);
auto hsa = new THStack("hsa","");
hsa->Add(hm1a);
hsa->Add(hm2a);
hsa->Add(hm3a);
hsa->Add(hm4a);
hsa->Draw();
c1->SetLogy();
c1->Draw();
//1-4重事件
TCut cls3p0m = cls3p0 && "ppacidm == 0";
tree->Draw("lst[3]-ppact[0]>>hm1(100,-10,25)", cls3p0m && "nppac==1");
tree->Draw("lst[3]-ppact[0]>>hm2(100,-10,25)", cls3p0m && "nppac==2");
tree->Draw("lst[3]-ppact[0]>>hm3(100,-10,25)", cls3p0m && "nppac==3");
tree->Draw("lst[3]-ppact[0]>>hm4(100,-10,25)", cls3p0m && "nppac==4");
hm4->SetFillColor(6);
hm3->SetFillColor(7);
hm2->SetFillColor(8);
hm1->SetFillColor(9);
auto hs = new THStack("hs","");
hs->Add(hm1);
hs->Add(hm2);
hs->Add(hm3);
hs->Add(hm4);
hs->Draw();
c1->SetLogy();
c1->Draw();
tree->Draw("ppace[0]:lst[3]-ppact[0]>>hm2(10,-10,25,200,0,20000)",
"lst[3]>0 && ppacidm ==0","");
c1->SetLogy(0);
c1->Draw();
tree->Draw("lse[3]:lst[3]-ppact[0]>>hm2(10,-10,25,200,0,2000)",cls3p0 && "ppacidm ==0","");
c1->SetLogy(0);
c1->Draw();
a). 验证其他ppac单元具有类似的特征。
b). 对齐ppac的时间信号:
c). 对齐ls探测器的时间信号:
d). 对每轮数据,进行2-3步骤,得到修正系数$t_{pi}$,$t_{li}$。
- fluctuations of the signals’ leading edge are determined on a run-by-run basis (for each data file). Fluctuations of ±5 ns are observed and they are an artifact of the fast digital electronics.
[Ref.] Nuclear Inst. and Method. A 882 (2018) 105–113
e). 对ls和ppac进行时间修正,利用ls的PSD选择中子事件:
f). 随机本底估计
g). 散射本底估计
通过MC模拟确定环境(探测器外壳,周围环境)带来的本底成分。
TFile *f2=new TFile("tof.root");
TH1F *htofraw = (TH1F*)f2->Get("dtlsppacallg");
TH1F *htofcor = (TH1F*)f2->Get("dtcorrlsppacall");
//所有ls与ppac的飞行时间谱(修正前)
htofraw->Draw();
c1->Draw();
//所有ls与ppac的飞行时间谱(修正后)
htofcor->Draw();
c1->Draw();