#define Tree1_cxx #include "Tree1.h" #include #include #include #include void Tree1::Loop() { // In a ROOT session, you can do: // root> .L Tree1.C // root> Tree1 t // root> t.GetEntry(12); // Fill t data members with entry number 12 // root> t.Show(); // Show values of entry 12 // root> t.Show(16); // Read and show values of entry 16 // root> t.Loop(); // Loop on all entries // // This is the loop skeleton where: // jentry is the global entry number in the chain // ientry is the entry number in the current Tree // Note that the argument to GetEntry must be: // jentry for TChain::GetEntry // ientry for TTree::GetEntry and TBranch::GetEntry // // To read only selected branches, Insert statements like: // METHOD1: // fChain->SetBranchStatus("*",0); // disable all branches // fChain->SetBranchStatus("branchname",1); // activate branchname // METHOD2: replace line // fChain->GetEntry(jentry); //read all branches //by b_branchname->GetEntry(ientry); //read only this branch if (fChain == 0) return; ofstream results; results.open("Results.txt", ios::out); Long64_t nentries = fChain->GetEntriesFast(); Long64_t nbytes = 0, nb = 0; for (Long64_t jentry=0; jentryGetEntry(jentry); nbytes += nb; // if (Cut(ientry) < 0) continue; } unsigned long Ep_size = Ep->size(); unsigned long Edep_size = Edep->size(); unsigned long Egammacascade_size = Egammacascade->size(); double FusionEvents = (Ep_size > 0 ? Ep->at(0) : 0.); double DetEventPD = (Edep_size > 0 ? Edep->at(0) : 0.); double DetEventDD = (Edep_size > 0 ? Edep->at(1) : 0.); double PrimGamma = (Egammacascade_size ? Egammacascade->at(0) : 0.); double Gamma1824 = (Egammacascade_size > 1820 && Egammacascade_size < 1828 ? Egammacascade->at(0) : 0.); double Gamma4028 = (Egammacascade_size > 4024 && Egammacascade_size < 4033 ? Egammacascade->at(0) : 0.); double Gamma5014 = (Egammacascade_size > 5010 && Egammacascade_size < 5019 ? Egammacascade->at(0) : 0.); double Gamma5045 = (Egammacascade_size > 5040 && Egammacascade_size < 5051 ? Egammacascade->at(0) : 0.); double Gamma5060 = (Egammacascade_size > 5054 && Egammacascade_size < 5066 ? Egammacascade->at(0) : 0.); double Gamma6414 = (Egammacascade_size > 6410 && Egammacascade_size < 6419 ? Egammacascade->at(0) : 0.); double Gamma6996 = (Egammacascade_size > 6991 && Egammacascade_size < 7001 ? Egammacascade->at(0) : 0.); results << "**************************************** "<< endl; results << "Results "<< endl; results << "Total simulated eventes= " << nentries <