BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
LambdaAnal.C
Go to the documentation of this file.
1// #include <Rtypes.h>
2#include <TString.h>
3
4R__ADD_INCLUDE_PATH($VMCWORKDIR)
5#include "macro/run/bmnloadlibs.C"
6
7// Macro to be used for Lambda0->Pi- + p reconstruction
8// inSim or inReco (not both simultaneously) can be empty depending on analysis you do!
9void LambdaAnal(UInt_t nEvents = 1e6,
10 TString inSim = "", // bmnsim.root
11 TString inReco = "", // dst file with matches or obtained from exp. data processing
12 TString output = "",
13 Int_t runId)
14{
15 bmnloadlibs(); // load BmnRoot libraries
16 // ----- Timer ---------------------------------------------------------
17 TStopwatch timer;
18 timer.Start();
19 FairRunAna* fRunAna = new FairRunAna();
20 if (inReco.Contains("root") && inSim.Contains("root")) {
21 fRunAna->SetInputFile(inReco);
22 fRunAna->AddFriend(inSim);
23 } else
24 fRunAna->SetInputFile(inReco.Contains("root") ? inReco : inSim);
25
26 fRunAna->SetOutputFile(output);
27
29 lambda->SetGeometryFile("");
30
31 fRunAna->AddTask(lambda);
32
33 fRunAna->Init();
34 fRunAna->Run(0, nEvents);
35 // ----- Finish --------------------------------------------------------
36 timer.Stop();
37 Double_t rtime = timer.RealTime();
38 Double_t ctime = timer.CpuTime();
39 cout << endl << endl;
40 cout << "Macro finished successfully." << endl;
41 cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl;
42 cout << endl;
43
44 delete lambda;
45}
int Int_t
unsigned int UInt_t
double Double_t
#define R__ADD_INCLUDE_PATH(PATH)
void SetGeometryFile(TString file)
Double_t RealTime()
void Start(Bool_t reset=kTRUE)
Double_t CpuTime()
void Stop()
void LambdaAnal(UInt_t nEvents=1e6, TString inSim="", TString inReco="", TString output="", Int_t runId)
Definition LambdaAnal.C:9