// File: inv14.cc // Glen Cowan // RHUL Physics // Statistics problem for Invisibles 2014 #include #include #include #include #include #include #include using namespace std; int main() { TFile* histFile = new TFile("inv14.root", "recreate"); TH1D* h_q0 = new TH1D("h_q0", "q0", 200, 0, 40.); int seed = 12345; TRandom3* ran = new TRandom3(seed); double s = 0.; double sigma_bTilde = 1.0; double b = 6.0; int numExp = 10000000; // number of Toy MC experiments for (int i=0; iPoisson(s+b); double bTilde = ran->Gaus(b, sigma_bTilde); // Insert your code here to calculate q0 and enter into histogram } histFile->Write(); histFile->Close(); return 0; }