BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
gemReco.C
Go to the documentation of this file.
1
#include <
TString.h
>
2
#include <vector>
3
4
using namespace
std
;
5
// BEAM: 61, 62, 63, 64 and 65
6
// TARGET: 66, 67 and 68
7
8
// void gemReco(Int_t fileNumber = 65, Int_t nEvents = 10000) {
9
void
gemReco
(
Int_t
fileNumber = 65,
Int_t
nEvents = 10000,
TString
addInfo =
""
)
10
{
11
TString
type = (fileNumber < 66) ?
"beam"
:
"target"
;
12
13
gROOT
->LoadMacro(
"$VMCWORKDIR/macro/run/bmnloadlibs.C"
);
14
bmnloadlibs();
// load BmnRoot libraries
15
16
// ----- Timer --------------------------------------------------------
17
TStopwatch
timer;
18
timer.
Start
();
19
20
FairRunAna* fRun =
new
FairRunAna();
21
FairSource
* fFileSource;
22
TString
num =
""
;
23
// TString addInfo = "";
24
num += fileNumber;
25
// fFileSource = new BmnFileSource(TString("bmn_run0" + num + "_digi.root").Data());
26
fFileSource =
new
BmnFileSource
(
TString
(
"bmn_run00"
+ num +
"_digi.root"
).Data());
27
fRun->SetSource(fFileSource);
28
// fRun->SetOutputFile(TString("reco_" + num + addInfo + ".root").Data());
29
fRun->SetOutputFile(
TString
(
"bmn_run00"
+ num + addInfo +
"_reco.root"
).Data());
30
BmnGemReco*
gemReco
=
new
BmnGemReco();
31
32
/****DEFINE RECO CONFIG*****/
33
// gemReco->SetDebugInfo(kTRUE); // Print debug info
34
gemReco
->SetMaxNofHitsPerEvent(30);
35
36
// Restrictions on hit params, beam run only
37
if
(type ==
"beam"
) {
38
gemReco
->SetXMinMax(-3.5, -2.5);
// --
39
gemReco
->SetYMinMax(-0.5, 0.5);
40
}
41
42
// Restrictions on track params.
43
gemReco
->SetMinHitsAccepted(3);
// >=
44
if
(type ==
"beam"
) {
45
gemReco
->SetTxMinMax(-0.005, 0.005);
46
gemReco
->SetTyMinMax(-0.005, 0.005);
47
}
else
{
48
gemReco
->SetTxMinMax(-0.28, 0.28);
49
gemReco
->SetTyMinMax(-0.18, 0.18);
50
}
51
52
gemReco
->SetChi2MaxPerNDF(30.);
// Cut on chi2/ndf for found tracks
53
/********************************/
54
55
fRun->AddTask(
gemReco
);
56
57
fRun->Init();
58
fRun->Run(0, nEvents);
59
60
// ----- Finish -------------------------------------------------------
61
timer.
Stop
();
62
Double_t
rtime = timer.
RealTime
();
63
Double_t
ctime = timer.
CpuTime
();
64
cout << endl << endl;
65
cout <<
"Macro finished successfully."
<< endl;
66
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
" s"
<< endl;
67
cout << endl;
68
}
Int_t
int Int_t
Double_t
double Double_t
gROOT
#define gROOT
TString.h
BmnFileSource
BmnFileSource.h.
Definition
BmnFileSource.h:30
FairSource
TStopwatch
TStopwatch::RealTime
Double_t RealTime()
TStopwatch::Start
void Start(Bool_t reset=kTRUE)
TStopwatch::CpuTime
Double_t CpuTime()
TStopwatch::Stop
void Stop()
TString
gemReco
void gemReco(Int_t fileNumber=65, Int_t nEvents=10000, TString addInfo="")
Definition
gemReco.C:9
std
Definition
json.hpp:4446
install
macro
alignment
gemReco.C
Generated on
for BmnRoot by
1.17.0