| 1 | void 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 | }
|
|---|