//This macro is supposed to be used for the Hands on Neutrino Workshop void FillDetection(TH1D*,int events, double resol,TF1 *spectrum, TF1 *oscil); void Neutrino_2023() { gStyle->SetHistLineWidth(2); cout<<"Please use this macro to guide you through the neutrino's exercises."<Draw(); return; //comment '//' the two lines above and paste STEP 2 to proceed with the exercise } //This is the FillDetection function -- do NOT modify this function //The function generates an histogram given Ntotal events, an energy resultion res1, and the two initial functions: the reactor function (orig) and the oscillation function (oscil) void FillDetection(TH1D *detection,int Ntotal,double res1, TF1 *orig, TF1 *oscil) { double IBDthr = 1.8;//MeV This is the threhold of your reaction double emass = 0.511;//MeV This is the electron's mass TRandom tmp; for(int iev = 0; iev < Ntotal; iev++)//Loop over the input number of events { double NeutrinoEnergy=orig->GetRandom(); //obtain the energy from the given spectrum distribution //What will we detect? if(tmp.Uniform()>oscil->Eval(NeutrinoEnergy)) continue; //oscillated to another neutrino type, do not plot it if(NeutrinoEnergyFill(NeutrinoRecoE,1.); // this is what will be seen for this 1 event } return; }