EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
analysis.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file analysis.C
1 
2 void analysis()
3 {
4  // Input simulated & reconstructed files;
5  auto ff = new TFile("simulation.root");
6  auto cbmsim = dynamic_cast<TTree *>(ff->Get("cbmsim"));
7  cbmsim->AddFriend("cbmsim", "reconstruction.root");
8 
9  // Build 1D dE/E histogram;
10  auto de = new TH1D("de", "de", 100, -200., 200.);
11  cbmsim->Project("de", "100.*(FhacClusterGroup.mEnergy-MCTrack.fE)/MCTrack.fE",
12  "MCTrack.fMotherID==-1");
13  de->Fit("gaus");
14 } // analysis()