Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Qiunan Zhang
cbmroot
Commits
24bb56e2
Commit
24bb56e2
authored
4 years ago
by
Anna Senger
Browse files
Options
Downloads
Patches
Plain Diff
Update macro/much/run_ana.C
parent
bd7a7d62
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
macro/much/run_ana.C
+36
-35
36 additions, 35 deletions
macro/much/run_ana.C
with
36 additions
and
35 deletions
macro/much/run_ana.C
+
36
−
35
View file @
24bb56e2
...
...
@@ -4,32 +4,32 @@
//
//---------------------------------------------------
void
run_ana
(
Int_t
nEvents
=
3
,
TString
dataSet
=
"muons"
,
TString
setup
=
"sis100_muon_lmvm"
,
Bool_t
useMC
=
kTRUE
,
TString
pluto
=
""
)
{
TString
traFile
=
dataSet
+
".tra.root"
;
TString
parFile
=
dataSet
+
".par.root"
;
TString
recoFile
=
dataSet
+
".rec.root"
;
TString
outFile
=
dataSet
+
".ana.root"
;
void
run_ana
(
Int_t
nEvents
=
1000
,
TString
dataSet
=
"muons"
,
TString
setup
=
"sis100_muon_lmvm"
,
Bool_t
useMC
=
kTRUE
,
TString
pluto
=
""
,
Double_t
ANN
=-
1
)
{
TString
dir
=
""
;
TString
traFile
=
dir
+
dataSet
+
".tra.root"
;
TString
parFile
=
dir
+
dataSet
+
".par.root"
;
TString
recoFile
=
dir
+
dataSet
+
".rec.root"
;
TString
outFile
;
if
(
ANN
<
0
)
outFile
=
dataSet
+
".ana.root"
;
else
outFile
=
Form
(
"%s.ana.ANN_%1.2f.root"
,
dataSet
.
Data
(),
ANN
);
FairRunAna
*
run
=
new
FairRunAna
();
run
->
SetInputFile
(
recoFile
);
run
->
AddFriend
(
traFile
);
run
->
SetOutputFile
(
outFile
);
// run->SetGenerateRunInfo(kTRUE);
// ----- Load the geometry setup -------------------------------------
FairRunAna
*
run
=
new
FairRunAna
();
run
->
SetInputFile
(
recoFile
);
run
->
AddFriend
(
traFile
);
run
->
SetOutputFile
(
outFile
);
// run->SetGenerateRunInfo(kTRUE);
// ----- Load the geometry setup -------------------------------------
// ----- Environment --------------------------------------------------
TString
srcDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
// top source directory
// ------------------------------------------------------------------------
std
::
cout
<<
std
::
endl
;
TString
setupFile
=
srcDir
+
"/geometry/setup/setup_"
+
setup
+
".C"
;
TString
setupFile
=
srcDir
+
"/geometry/setup/setup_"
+
setup
+
".C"
;
TString
setupFunct
=
"setup_"
;
setupFunct
=
setupFunct
+
setup
+
"()"
;
std
::
cout
<<
"-I- "
<<
": Loading macro "
<<
setupFile
<<
std
::
endl
;
setupFunct
=
setupFunct
+
setup
+
"()"
;
std
::
cout
<<
"-I- "
<<
": Loading macro "
<<
setupFile
<<
std
::
endl
;
gROOT
->
LoadMacro
(
setupFile
);
gROOT
->
ProcessLine
(
setupFunct
);
// You can modify the pre-defined setup by using
...
...
@@ -43,7 +43,7 @@ void run_ana(Int_t nEvents = 3,
// ------------------------------------------------------------------------
CbmKF
*
kf
=
new
CbmKF
();
run
->
AddTask
(
kf
);
/* (VF) Not much sense in running L1 witout STS local reconstruction
CbmL1* L1 = new CbmL1();
TString stsGeoTag;
...
...
@@ -56,24 +56,25 @@ void run_ana(Int_t nEvents = 3,
}
run->AddTask(L1);
*/
CbmAnaDimuonAnalysis
*
ana
=
new
CbmAnaDimuonAnalysis
(
pluto
,
setup
);
CbmAnaDimuonAnalysis
*
ana
=
new
CbmAnaDimuonAnalysis
(
pluto
,
setup
);
/*
ana->SetChi2Mu
C
hCut(
2
.);
ana->SetChi2Mu
c
hCut(
3
.);
ana->SetChi2StsCut(2.);
ana->SetChi2VertexCut(3.);
ana->SetNofMuchCut(1
1
);
ana->SetNofMuchCut(1
0
);
ana->SetNofStsCut(7);
ana->SetNofTrdCut(1);
ana->SetSigmaTofCut(2);
*/
ana
->
UseCuts
(
kTRUE
);
ana
->
UseCuts
(
kFALSE
);
// ana->SetAnnCut(ANN, 5); // if SetAnnCut, than UseCuts(kFALSE) !
ana
->
UseMC
(
useMC
);
run
->
AddTask
(
ana
);
// ----- Parameter database --------------------------------------------
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
// ----- Parameter database --------------------------------------------
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
FairParRootFileIo
*
parIo1
=
new
FairParRootFileIo
();
//FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo1
->
open
(
parFile
.
Data
());
...
...
@@ -84,13 +85,13 @@ void run_ana(Int_t nEvents = 3,
rtdb
->
saveOutput
();
// ------------------------------------------------------------------------
// ----- Initialize and run --------------------------------------------
run
->
Init
();
run
->
Run
(
0
,
nEvents
);
// ------------------------------------------------------------------------
// ----- Initialize and run --------------------------------------------
run
->
Init
();
run
->
Run
(
0
,
nEvents
);
// ------------------------------------------------------------------------
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
endl
;
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
endl
;
RemoveGeoManager
();
//
RemoveGeoManager();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment