source: trunk/MagicSoft/Mars/macros/getRate.C@ 872

Last change on this file since 872 was 872, checked in by magicsol, 23 years ago
Macro to compute the trigger rate from a Montecarlo file given the rate of incident showers. It needs informatino about the trigger rate due only to the assumed NSB.
File size: 1.4 KB
Line 
1void getRate(int dim=0, char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" )
2{
3 // This macro has two input parameter:
4 // dim : = 0 -> root file with 1 trigger condition.
5 // > 0 -> number of trigger condition to be analised
6 // in multi conditon file.
7 // < 0 -> selects the -dim trigger condition.
8 //
9 // first we have to create our empty lists
10 //
11 MParList parlist;
12 MTaskList tasklist;
13
14 //
15 // Setup the parameter list.
16 // - we do not need to create any other container. All of them
17 // are created automatically without loss - we don't have to
18 // access them-
19 //
20
21 parlist.AddToList(&tasklist);
22
23 //
24 // Setup out tasks:
25 // - First we have to read the events
26 // - Then we can calculate rates, for what the number of
27 // triggered showers from a empty reflector file for the
28 // analised trigger conditions should be set (BgR[])
29 //
30 MReadTree reader("Events", filename);
31 tasklist.AddToList(&reader);
32
33 Float_t BgR[10]={20907,352,0,0,0,0,0,0,0,0};
34 cout<<dim<<endl;
35
36 MMcTriggerRateCalc rate(dim, 14, BgR, 100000, 2.75, 10.91e-2);
37 tasklist.AddToList(&rate);
38
39 //
40 // set up the loop for the processing
41 //
42 MEvtLoop magic;
43 magic.SetParList(&parlist);
44
45 //
46 // Start to loop over all events
47 //
48 magic.Eventloop();
49
50}
Note: See TracBrowser for help on using the repository browser.