/* ======================================================================== *\ ! ! * ! * This file is part of MARS, the MAGIC Analysis and Reconstruction ! * Software. It is distributed to you in the hope that it can be a useful ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. ! * It is distributed WITHOUT ANY WARRANTY. ! * ! * Permission to use, copy, modify and distribute this software and its ! * documentation for any purpose is hereby granted without fee, ! * provided that the above copyright notice appear in all copies and ! * that both that copyright notice and this permission notice appear ! * in supporting documentation. It is provided "as is" without express ! * or implied warranty. ! * ! ! ! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de) ! ! Copyright: MAGIC Software Development, 2000-2001 ! ! \* ======================================================================== */ void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root") { // // This macro fill the container MHMcEnergies using the task // MMcThresholdCalc and shows the results. // MParList parlist; MTaskList tasklist; parlist.AddToList(&tasklist); // // Setup the parameter list // - You need create the container MHMcEnergies. // + You need to put the number of trigger conditions when // you declarete the MHMcEnergies // + If you don't put any dimension to MHMcEnergies it works // taking only the trigger information from MMcTrig // const UInt_t numtriggerconditions = 4; // // Create numtriggerconditions histograms of type MHMcEnergy // and store the histograms in an TObjArray // TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions)); // // Check if the list really contains the right number of histograms // if (hists->GetEntriesFast() != numtriggerconditions) return; // // Add the histograms to the paramater list. // parlist.AddToList(hists); // // Setup the task list // - You need the read and the MMcThresholdCalc tasks // - You have to fill the histograms for the Energy threshold // + You need to put the number of trigger conditions when // you declarete the MMcThresholdCalc // + If you don't put any dimension to MMcThresholdCalc it works // like one dimension MMcThresholdCalc // MReadTree read("Events;7", filename); MMcThresholdCalc calc(numtriggerconditions); tasklist.AddToList(&read); tasklist.AddToList(&calc); MEvtLoop evtloop; evtloop.SetParList(&parlist); // // Begin the loop (if the loop wasn't succesfull // don't try to draw the results // if (!evtloop.Eventloop()) return; // // Now you can display the results // for (UInt_t i=0; iDraw(); }