BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
gemAlignment.C
Go to the documentation of this file.
1
#include <
TStopwatch.h
>
2
#include <
TString.h
>
3
4
void
gemAlignment
(
UInt_t
nEvents = 1e6,
TString
recoFileName =
"bmndst.root"
,
TString
addInfo =
""
)
5
{
6
gROOT
->LoadMacro(
"$VMCWORKDIR/macro/run/bmnloadlibs.C"
);
7
bmnloadlibs();
// load BmnRoot libraries
8
// ----- Timer ---------------------------------------------------------
9
TStopwatch
timer;
10
timer.
Start
();
11
FairRunAna* fRunAna =
new
FairRunAna();
12
FairSource
* fFileSource =
new
BmnFileSource
(recoFileName.Data());
13
fRunAna->SetSource(fFileSource);
14
// Output file
15
TString
outputFileName = recoFileName;
16
if
(addInfo !=
""
)
17
outputFileName.
ReplaceAll
(
"bmndst"
, addInfo +
"_align"
);
18
else
{
19
outputFileName.
ReplaceAll
(
"bmndst"
,
"align"
);
20
}
21
cout <<
"outputFileName: "
+ outputFileName << endl;
22
fRunAna->SetOutputFile(outputFileName);
23
// resultName will be only essential part without ".root":
24
TString
resultName = outputFileName;
25
resultName.
ReplaceAll
(
".root"
,
""
);
26
cout <<
"resultName: "
+ resultName << endl;
27
BmnGemAlignment* gemAlign =
new
BmnGemAlignment();
28
gemAlign->SetResultName(resultName);
29
gemAlign->SetGeometry(
BmnGemStripConfiguration::RunWinter2016
);
30
// GEM stations 4, 5 and 6 consist of two separate modules that can be either fixed or not simultaneously
31
// 0 1 2 3 4 5 6
32
TString
fixedStats[7] = {
"fixed"
,
""
,
""
,
""
,
""
,
""
,
""
};
33
gemAlign->SetStatNumFixed(fixedStats);
34
// gemAlign->SetRunType(type);
35
gemAlign->SetPreSigma(0.001);
// Default value is 1
36
gemAlign->SetAccuracy(0.001);
// Default value is 0.001
37
gemAlign->SetUseRealHitErrors(
kTRUE
);
// Default value is false
38
// gemAlign->SetUseTrackWithMinChi2(kTRUE); // Default value is false
39
gemAlign->SetUseRegularization(
kTRUE
);
// Default value is false
40
// gemAlign->SetHugecut(200.); // Default value is 50
41
// gemAlign->SetChisqcut(5., 2.); // Default value is (0., 0.)
42
// gemAlign->SetEntriesPerParam(100); // Default value is 10
43
gemAlign->SetOutlierdownweighting(4);
// Default value is 0
44
gemAlign->SetDwfractioncut(0.5);
// Default value is 0, should be less than 0.5
45
gemAlign->SetFixDetector(
kTRUE
,
kTRUE
,
kTRUE
);
// Default values are false(X), false(Y) and false(Z)
46
// gemAlign->SetDebugInfo(kTRUE); // Default value is false
47
48
// Restrictions on track params:
49
// gemAlign->SetMinHitsAccepted(5); // Default value is 3
50
// gemAlign->SetChi2MaxPerNDF(2.); // Cut on chi2/ndf for found tracks, default value is not limited
51
// gemAlign->SetTxMinMax(-1., 0.);
52
// gemAlign->SetTyMinMax(-0.05, 0.05);
53
54
fRunAna->AddTask(gemAlign);
55
fRunAna->
Init
();
56
fRunAna->Run(0, nEvents);
57
// ----- Finish --------------------------------------------------------
58
timer.
Stop
();
59
Double_t
rtime = timer.
RealTime
();
60
Double_t
ctime = timer.
CpuTime
();
61
cout << endl << endl;
62
cout <<
"Macro finished successfully."
<< endl;
63
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
" s"
<< endl;
64
cout << endl;
65
}
UInt_t
unsigned int UInt_t
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
gROOT
#define gROOT
TStopwatch.h
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
TString::Init
char * Init(Ssiz_t capacity, Ssiz_t nchar)
TString::ReplaceAll
TString & ReplaceAll(const char *s1, const char *s2)
gemAlignment
void gemAlignment(UInt_t nEvents=1e6, TString recoFileName="bmndst.root", TString addInfo="")
Definition
gemAlignment.C:4
BmnGemStripConfiguration::RunWinter2016
@ RunWinter2016
Definition
BmnGemStripConfiguration.h:13
install
macro
alignment
gemAlignment.C
Generated on
for BmnRoot by
1.17.0