BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
bmn_qa_generator_lambda.C
Go to the documentation of this file.
1// --------------------------------------------------------------------------
2// Macro for generating QA-reports
3// --------------------------------------------------------------------------
4#include <Rtypes.h>
5#include <TString.h>
6
7R__ADD_INCLUDE_PATH($VMCWORKDIR)
8#include "macro/run/bmnloadlibs.C"
9
10/*Important note: */
11/*Evetest.root must be passed obligatory!*/
12/*All other files can be omitted*/
13void bmn_qa_generator_lambda(TString recoFile = "", // bmndst.root file with matches
14 TString mcFile = "", // evetest.root
15 TString lambdaFile = "", // File got from LambdaAnal.root with DST-input
16 TString lambdaEveFile = "", // File got from LambdaAnal.root with EVE-input
17 TString outFile = "qa.root",
18 Int_t nStartEvent = 0,
19 Int_t nEvents = 1e6)
20{
21 // ---- Load libraries -------------------------------------------------
22
23 bmnloadlibs(); // load bmn libraries
24 if (mcFile.IsNull()) {
25 cout << "No correct input specified! At least, evetest.root must be passed!" << endl;
26 return;
27 }
28
29 // ------------------------------------------------------------------------
30
31 FairRunAna* fRun = new FairRunAna();
32
33 fRun->SetInputFile(mcFile);
34 if (!lambdaEveFile.IsNull())
35 fRun->AddFriend(lambdaEveFile);
36 if (!lambdaFile.IsNull())
37 fRun->AddFriend(lambdaFile);
38 if (!recoFile.IsNull())
39 fRun->AddFriend(recoFile);
40 fRun->SetOutputFile(outFile);
41
42 fRun->SetGenerateRunInfo(false);
43
44 // ============ TASKS ============= //
45
46 BmnMatchRecoToMC* mcMatching = new BmnMatchRecoToMC();
47 if (!recoFile.IsNull() && !mcFile.IsNull())
48 fRun->AddTask(mcMatching);
49
50 BmnLambdaQa* lambdaQa = new BmnLambdaQa();
51
52 // Geometry cuts if necessary
53 lambdaQa->SetDCA1(0., 1000.);
54 lambdaQa->SetDCA2(0., 1000.);
55 lambdaQa->SetDCA12(0., 1000.);
56 lambdaQa->SetPath(0., 1000.);
57
58 // Kinematic cuts, if necessary
59 lambdaQa->SetMom1(0., 10.);
60 lambdaQa->SetMom2(0., 10.);
61 lambdaQa->SetEta1(0., 10.);
62 lambdaQa->SetEta2(0., 10.);
63
64 fRun->AddTask(lambdaQa);
65
66 // ============ TASKS ============= //
67
68 // ----- Intialise and run --------------------------------------------
69 fRun->Init();
70 cout << "Starting run" << endl;
71 fRun->Run(nStartEvent, nStartEvent + nEvents);
72 // ------------------------------------------------------------------------
73}
int Int_t
#define R__ADD_INCLUDE_PATH(PATH)
void SetDCA12(Double_t min, Double_t max)
Definition BmnLambdaQa.h:65
void SetEta1(Double_t min, Double_t max)
Definition BmnLambdaQa.h:90
void SetPath(Double_t min, Double_t max)
Definition BmnLambdaQa.h:71
void SetEta2(Double_t min, Double_t max)
Definition BmnLambdaQa.h:96
void SetDCA2(Double_t min, Double_t max)
Definition BmnLambdaQa.h:59
void SetMom2(Double_t min, Double_t max)
Definition BmnLambdaQa.h:84
void SetMom1(Double_t min, Double_t max)
Definition BmnLambdaQa.h:78
void SetDCA1(Double_t min, Double_t max)
Definition BmnLambdaQa.h:53
void bmn_qa_generator_lambda(TString recoFile="", TString mcFile="", TString lambdaFile="", TString lambdaEveFile="", TString outFile="qa.root", Int_t nStartEvent=0, Int_t nEvents=1e6)