BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
globAlignment.C
Go to the documentation of this file.
1
#include <
Rtypes.h
>
2
3
R__ADD_INCLUDE_PATH
($VMCWORKDIR)
4
#include "macro/run/bmnloadlibs.C"
5
6
#include <
TStopwatch.h
>
7
#include <
TString.h
>
8
9
void
globAlignment
(
UInt_t
nEvents = 1e6,
10
TString
recoFileName =
"bmndst_RUN7_GEM.root"
,
11
TString
addInfo =
""
,
12
Int_t
runPeriod = 7)
13
{
14
bmnloadlibs();
// load BmnRoot libraries
15
// ----- Timer ---------------------------------------------------------
16
TStopwatch
timer;
17
timer.
Start
();
18
FairRunAna* fRunAna =
new
FairRunAna();
19
FairSource
* fFileSource =
new
BmnFileSource
(recoFileName.Data());
20
fRunAna->SetSource(fFileSource);
21
// Output file
22
TString
outputFileName = recoFileName;
23
if
(addInfo !=
""
)
24
outputFileName.
ReplaceAll
(
"bmndst"
, addInfo +
"_align"
);
25
else
{
26
outputFileName.
ReplaceAll
(
"bmndst"
,
"align"
);
27
}
28
cout <<
"outputFileName: "
+ outputFileName << endl;
29
fRunAna->SetOutputFile(outputFileName);
30
31
BmnGlobalAlignment
* globAlign =
new
BmnGlobalAlignment
(recoFileName);
32
globAlign->
SetDoTest
(
kTRUE
);
33
34
// "GEM", MWPC", "DCH", "Vp", "SILICON"
35
globAlign->
SetDetectors
(
kTRUE
,
kFALSE
,
kFALSE
,
kFALSE
,
kFALSE
);
36
37
globAlign->
SetPreSigma
(0.001);
// Default value is 1
38
globAlign->
SetAccuracy
(0.001);
// Default value is 0.001
39
globAlign->
SetOutlierDownweighting
(4);
// Default value is 0
40
globAlign->
SetDwfractionCut
(0.5);
// Default value is 0, should be less than 0.5
41
42
fRunAna->AddTask(globAlign);
43
44
fRunAna->Init();
45
fRunAna->Run(0, nEvents);
46
// ----------------------------- Finish ----------------------------------------------------
47
timer.
Stop
();
48
Double_t
rtime = timer.
RealTime
();
49
Double_t
ctime = timer.
CpuTime
();
50
cout << endl << endl;
51
cout <<
"Macro finished successfully."
<< endl;
52
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
" s"
<< endl;
53
cout << endl;
54
55
delete
globAlign;
56
}
Int_t
int Int_t
UInt_t
unsigned int UInt_t
kFALSE
constexpr Bool_t kFALSE
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
Rtypes.h
R__ADD_INCLUDE_PATH
#define R__ADD_INCLUDE_PATH(PATH)
TStopwatch.h
TString.h
BmnFileSource
BmnFileSource.h.
Definition
BmnFileSource.h:30
BmnGlobalAlignment
Definition
BmnGlobalAlignment.h:50
BmnGlobalAlignment::SetDwfractionCut
void SetDwfractionCut(Double_t fraction)
Definition
BmnGlobalAlignment.h:85
BmnGlobalAlignment::SetOutlierDownweighting
void SetOutlierDownweighting(Int_t n)
Definition
BmnGlobalAlignment.h:83
BmnGlobalAlignment::SetDoTest
void SetDoTest(Bool_t flag)
Definition
BmnGlobalAlignment.h:67
BmnGlobalAlignment::SetDetectors
void SetDetectors(Bool_t gem, Bool_t si)
Definition
BmnGlobalAlignment.h:69
BmnGlobalAlignment::SetAccuracy
void SetAccuracy(Double_t accuracy)
Definition
BmnGlobalAlignment.h:79
BmnGlobalAlignment::SetPreSigma
void SetPreSigma(Double_t presigma)
Definition
BmnGlobalAlignment.h:77
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::ReplaceAll
TString & ReplaceAll(const char *s1, const char *s2)
globAlignment
void globAlignment(UInt_t nEvents=1e6, TString recoFileName="bmndst_RUN7_GEM.root", TString addInfo="", Int_t runPeriod=7)
Definition
globAlignment.C:9
install
macro
alignment
QA
globAlignment.C
Generated on
for BmnRoot by
1.17.0