BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
trigEffRun7.C
Go to the documentation of this file.
1#include <Rtypes.h>
2#include <TCanvas.h>
3#include <TFile.h>
4#include <TH1F.h>
5#include <TH2F.h>
6
7R__ADD_INCLUDE_PATH($VMCWORKDIR)
8#include "macro/run/bmnloadlibs.C"
9
10using namespace std;
11using namespace TMath;
12
13// Used for stage 1 (producing inputs to calculate trigger efficiency)
14// Short description of arguments:
15// *input* is a directory filled with data produced by two-particle decay anal.
16// *output* is a desirable output filename (file with nom. and denom. histograms)
17// *trigger* is a trigger to process (five trigger conditions right now are supported: BT+BD2, BT+BD3, BT+FD2, BT+FD3,
18// BT+BD1+FD2) Output is a file having name convention as folows "out_TRIGGER_start(STARTRUN)_finish(FINISHRUN).root"
19// STARTRUN and FINISHRUN are set by default with 3589 and 4710 if not redefined by user
20
21void trigEffRun7(TString input, TString trigger)
22{
23
25 eff->SetTrigger(trigger);
26
27 // Resetting multiplicity bins ...
28 vector<pair<Int_t, Int_t>> bins;
29
30 bins.push_back(make_pair(2, 4));
31 bins.push_back(make_pair(4, 6));
32 bins.push_back(make_pair(6, 8));
33 bins.push_back(make_pair(8, 20));
34 eff->SetMultiplicityMap(bins);
35
36 vector<TString> targets{"Pb", "Sn", "Cu", "Al"};
37
38 // Common cuts for all targets (to get #Lambda^{0} mass spectrum) ...
39 for (TString target : targets) {
40 eff->SetCuts(target, 1.2, 0.3, 2.2, 0.7, 12.);
41 eff->SetTarget(target);
42 }
43
44 eff->triggerEfficiency();
45
46 delete eff;
47}
48
49// Used for stage 2 (calculating trigger efficiency, namely)
50// Short description of arguments:
51// *input1* is a directory filled with data produced by two-particle decay anal.
52// *input2* is a file produced at stage1 (file with nom. and denom. histograms)
53// *output* (should contain a formalized trigger condition as part, e.g. out_BT+FD2.root or something else)
54// *trigger* is a trigger to process (five trigger conditions right now are supported: BT+BD2, BT+BD3, BT+FD2, BT+FD3,
55// BT+BD1+FD2)
56
57void trigEffRun7(TString input1, TString input2, TString output, TString trigger)
58{
59
61 eff->SetTrigger(trigger);
62 eff->SetSpectraFile(input2);
63
64 // Setting eff. files (for triggers containing either BD and FD conditions) ...
65 eff->SetEffFiles(output);
66
67 // Resetting multiplicity bins ...
68 vector<pair<Int_t, Int_t>> bins;
69
70 bins.push_back(make_pair(2, 4));
71 bins.push_back(make_pair(4, 6));
72 bins.push_back(make_pair(6, 8));
73 bins.push_back(make_pair(8, 20));
74 eff->SetMultiplicityMap(bins);
75
76 vector<TString> targets{"Pb", "Sn", "Cu", "Al"};
77
78 // Common cuts for all targets (to get #Lambda^{0} mass spectrum) ...
79 for (TString target : targets) {
80 eff->SetCuts(target, 1.2, 0.3, 2.2, 0.7, 12.);
81 eff->SetTarget(target);
82 }
83
84 eff->triggerEfficiency();
85
86 delete eff;
87}
#define R__ADD_INCLUDE_PATH(PATH)
void SetCuts(TString target, Double_t DCA0, Double_t DCA1, Double_t DCA2, Double_t DCA12, Double_t PATH=-1, Int_t nHitsPos=2, Int_t nHitsNeg=2)
void SetTarget(TString t)
void SetMultiplicityMap(vector< pair< Int_t, Int_t > > bins)
void trigEffRun7(TString input, TString trigger)
Definition trigEffRun7.C:21
Definition json.hpp:4446