I want to draw superimpose graph from tree branches, but I can’t find the command for that. I tried to use “same”, but when I run the code, it draws the first graph only
Could someone tell me if something is missing here?
Here is the code
TFile *file1 = TFile::Open("******.root");
TTree *BeamS = (TTree*)file1->Get("**Nt");
Int_t X;
Int_t Y;
BeamS->SetBranchAddress("X", &X);
BeamS->SetBranchAddress("Y", &Y);
TCanvas *c = new TCanvas("c","c",800,500);
BeamS->Draw("X:Y","status==10 && Ang==40");
BeamS->Draw("X:Y","status==10 && Ang==37"," same");