Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:34

0001 int
0002 mergefiles()
0003 {
0004   TChain chain("pid_rich_small");
0005 
0006   TString base("eval_RICH_PID_p");
0007   for ( float p = 2; p < 71; p+=2 )
0008     {
0009       TString file = base;
0010       file += p;
0011       file.Append(".root");
0012 
0013       cout << "Adding file: " << file << endl;
0014       chain.Add( file );
0015     }
0016 
0017   TFile *output = new TFile("output.root","RECREATE");
0018   chain.CloneTree(-1,"fast");
0019   output->Write(); 
0020   delete output;
0021 
0022   chain.Draw("theta_mean:ptot","ptot>1","profs");
0023 
0024   return 1;
0025 }