//%jsroot on
TFile *ipf = new TFile("./data/cal_16C.root");
TTree *tree = (TTree*)ipf->Get("tree");
TCanvas *c1=new TCanvas("c1","c1");
Int_t x1hit; //multiplicity
Int_t x1[x1hit]; //Strip
double x1e[x1hit]; //energy
Int_t y1hit;
Int_t y1[y1hit];
Int_t y1e[y1hit];
double x1es,y1es; //total energy of x,y side.
int x1m,y1m; //multiplicity, adjacent tracks are counted as one.
...
int off[3] = {25, 25, 30};
//DSSD1
for(int id=1; id<=3; id++){
for(int i=0; i<3; i++){
tree->SetAlias(Form("x%da%d",id,i),Form("x%de[%d]-%d",id,i,off[id-1]));
tree->SetAlias(Form("y%da%d",id,i),Form("y%de[%d]-%d",id,i,off[id-1]));
}
}
gROOT->LoadMacro("cutd1esc.cut");
gROOT->LoadMacro("cutd2esc.cut");
gROOT->LoadMacro("cutd3esc.cut");
c1->Clear();
c1->SetWindowSize(1200,300);
gStyle->SetOptStat(0);
c1->Divide(3,1);
c1->cd(1);
TCut cdet1 ="x1hit>0 && y1hit>0 ";
tree->SetAlias("x1esc","x1es+x1hit*(-25)");
tree->SetAlias("y1esc","y1es+y1hit*(-25)");
tree->Draw("x1esc:x1esc-y1esc>>hds1(200,-100,100,200,0,8000)",cdet1,"colz");
cutd1esc->Draw("same");
gPad->SetLogz();
c1->cd(2);
TCut cdet2 ="x2hit>0 && y2hit>0";
tree->SetAlias("x2esc","x2es+x2hit*(-25)");
tree->SetAlias("y2esc","y2es+y2hit*(-25)");
tree->Draw("x2esc:x2esc-y2esc>>hds2(200,-100,100,200,0,8000)",cdet2,"colz");
cutd2esc->Draw("same");
gPad->SetLogz();
c1->cd(3);
TCut cdet3 ="x3hit>0 && y3hit>0 ";
tree->SetAlias("x3esc","x3es+x3hit*(-30)");
tree->SetAlias("y3esc","y3es+y3hit*(-30)");
tree->Draw("x3esc:x3esc-y3esc>>hds3(200,-100,100,200,0,8000)",cdet3,"colz");
cutd3esc->Draw("same");
gPad->SetLogz();
c1->Draw();
TCut cut ;
c1->SetWindowSize(1200,800);
c1->Clear();
c1->Divide(3,2);
/*
x: 0 1 | 01 | 0 1 | 01 |
y: 0 1 | 0 1 | 01 | 01 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==2 && x%dm==2 && y%dm==2 && cutd%desc",i,i,i,i,i);
c1->cd(i);
TString sdraw = Form("x%da0-y%da0:x%da1-y%da1>>h%da(200,-50,50,200,-50,50)",i,i,i,i,i);
tree->Draw(sdraw,cut,"colz");
gPad->SetLogz();
}
/*
x: 0 1 | 01 | 0 1 | 01 |
y: 0 1 | 0 1 | 01 | 01 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==2 && x%dm==1 && y%dm==2 && cutd%desc",i,i,i,i,i);
c1->cd(i+3);
TString sdraw = Form("x%da0-y%da0:x%da1-y%da1>>h%db(200,-50,50,200,-50,50)",i,i,i,i,i);
tree->Draw(sdraw,cut,"colz");
gPad->SetLogz();
}
c1->Draw();
TCut cut ;
c1->SetWindowSize(1200,800);
c1->Clear();
c1->Divide(3,2);
/*
x: 0 1 | 01 | 0 1 | 01 |
y: 0 1 | 0 1 | 01 | 01 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==2 && x%dm==2 && y%dm==1 && cutd%desc",i,i,i,i,i);
c1->cd(i);
TString sdraw = Form("x%da0-y%da0:x%da1-y%da1>>h%dc(200,-50,50,200,-50,50)",i,i,i,i,i);
tree->Draw(sdraw,cut,"colz");
gPad->SetLogz();
}
/*
x: 0 1 | 01 | 0 1 | 01 |
y: 0 1 | 0 1 | 01 | 01 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==2 && x%dm==1 && y%dm==1 && cutd%desc",i,i,i,i,i);
c1->cd(i+3);
TString sdraw = Form("x%da0-y%da0:x%da1-y%da1>>h%dd(200,-50,50,200,-50,50)",i,i,i,i,i);
tree->Draw(sdraw,cut,"colz");
gPad->SetLogz();
}
c1->Draw();
xhit=2 and yhit=3
¶TCut cut ;
c1->SetWindowSize(1200,1000);
c1->Clear();
c1->Divide(3,3);
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==3 && x%dm==2 && y%dm==2 && abs(y%d[0]-y%d[1])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i);
gPad->SetLogz();
tree->Draw(Form("x%da0-(y%da0+y%da1):x%da1-y%da2>>h%da(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==3 && x%dm==2 && y%dm==2 && abs(y%d[1]-y%d[2])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i+3);
gPad->SetLogz();
tree->Draw(Form("x%da0-y%da0:x%da1-(y%da1+y%da2)>>h%db(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==2 && y%dhit==3 && x%dm==2 && y%dm==2 && abs(y%d[0]-y%d[2])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i+6);
gPad->SetLogz();
tree->Draw(Form("x%da0-(y%da0+y%da2):x%da1-y%da1>>h%dc(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
c1->Draw();
xhit=3 and yhit=2
¶TCut cut ;
c1->SetWindowSize(1200,1000);
c1->Clear();
c1->Divide(3,3);
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==3 && y%dhit==2 && x%dm==2 && y%dm==2 && abs(x%d[0]-x%d[1])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i);
gPad->SetLogz();
tree->Draw(Form("(x%da0+x%da1)-y%da0:x%da2-y%da1>>h%de(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==3 && y%dhit==2 && x%dm==2 && y%dm==2 && abs(x%d[1]-x%d[2])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i+3);
gPad->SetLogz();
tree->Draw(Form("x%da0-y%da0:(x%da1+x%da2)-y%da1>>h%df(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
/*
x: 0 1 | 0 1 | 0 1 | 01 2 | 0 12 | 02 1 |
y: 01 2 | 0 12 | 02 1 | 0 1 | 0 1 | 0 1 |
——
*/
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==3 && y%dhit==2 && x%dm==2 && y%dm==2 && abs(x%d[0]-x%d[2])==1 && cutd%desc",i,i,i,i,i,i,i);
c1->cd(i+6);
gPad->SetLogz();
tree->Draw(Form("(x%da0+x%da2-y%da0):x%da1-y%da1>>h%dg(200,-50,50,200,-50,50)",i,i,i,i,i,i),cut,"colz");;
}
c1->Draw();
TCut cut ;
c1->SetWindowSize(1200,1200);
c1->Clear();
c1->Divide(3,3);
for(int i=1; i<=3; i++) {
cut = Form("x%dhit==3 && y%dhit==3 && x%dm==3 && y%dm==3 && cutd%desc",i,i,i,i,i);
c1->cd(3*i-2);
gPad->SetLogz();
tree->Draw(Form("x%da0-y%da0:x%da1-y%da1>>h%da(200,-50,50,200,-50,50)",i,i,i,i,i),cut ,"colz");
c1->cd(3*i-1);
gPad->SetLogz();
tree->Draw(Form("x%da0-y%da0:x%da2-y%da2>>h%db(200,-50,50,200,-50,50)",i,i,i,i,i),cut ,"colz");
c1->cd(3*i);
gPad->SetLogz();
tree->Draw(Form("x%da1-y%da1:x%da2-y%da2>>h%dc(200,-50,50,200,-50,50)",i,i,i,i,i),cut ,"colz");
}
c1->Draw();
Note: Multiple particles may be incident on the same strip, for example, two particles at coordinates (16,14)
and (16,15)
. In such cases, the amplitude relationship is given by $A'_{x16} = A'_{y14} + A'_{y15}$
.
Find the conditions for additional three-particle incidents and all possible two-particle incidents when xhit=3 and yhit=3
, and provide corresponding figures.
For cases where xhit=2 and yhit=3
or xhit=3 and yhit=2
, determine the conditions for three-particle incidents and provide figures.
Based on the above discussion, reclassify events according to the number of incident particles and save them to new ROOT files:
hit
represents the number of incident particles for each detector, with the incident particle energy e
equal to the x-side energy.Event structure:
//det1
Int_t hit1;
double e1[hit1];
Int_t x1[hit1],y1[hit1];
//det2
Int_t hit2;
double e2[hit2];
Int_t x2[hit2],y1[hit2];
//det3
Int_t hit3;
double e3[hit3];
Int_t x3[hit3],y3[hit3];