Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Computing
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
Tags containing commit
1 merge request
!110
ANN for muon selection
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 @@
...
@@ -4,32 +4,32 @@
//
//
//---------------------------------------------------
//---------------------------------------------------
void
run_ana
(
Int_t
nEvents
=
3
,
void
run_ana
(
Int_t
nEvents
=
1000
,
TString
dataSet
=
"muons"
,
TString
dataSet
=
"muons"
,
TString
setup
=
"sis100_muon_lmvm"
,
Bool_t
useMC
=
kTRUE
,
TString
pluto
=
""
,
Double_t
ANN
=-
1
)
TString
setup
=
"sis100_muon_lmvm"
,
{
Bool_t
useMC
=
kTRUE
,
TString
dir
=
""
;
TString
pluto
=
""
)
{
TString
traFile
=
dir
+
dataSet
+
".tra.root"
;
TString
traFile
=
dataSet
+
".tra.root"
;
TString
parFile
=
dir
+
dataSet
+
".par.root"
;
TString
parFile
=
dataSet
+
".par.root"
;
TString
recoFile
=
dir
+
dataSet
+
".rec.root"
;
TString
recoFile
=
dataSet
+
".rec.root"
;
TString
outFile
;
TString
outFile
=
dataSet
+
".ana.root"
;
if
(
ANN
<
0
)
outFile
=
dataSet
+
".ana.root"
;
else
outFile
=
Form
(
"%s.ana.ANN_%1.2f.root"
,
dataSet
.
Data
(),
ANN
);
FairRunAna
*
run
=
new
FairRunAna
();
FairRunAna
*
run
=
new
FairRunAna
();
run
->
SetInputFile
(
recoFile
);
run
->
SetInputFile
(
recoFile
);
run
->
AddFriend
(
traFile
);
run
->
AddFriend
(
traFile
);
run
->
SetOutputFile
(
outFile
);
run
->
SetOutputFile
(
outFile
);
// run->SetGenerateRunInfo(kTRUE);
// run->SetGenerateRunInfo(kTRUE);
// ----- Load the geometry setup -------------------------------------
// ----- Load the geometry setup -------------------------------------
// ----- Environment --------------------------------------------------
// ----- Environment --------------------------------------------------
TString
srcDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
// top source directory
TString
srcDir
=
gSystem
->
Getenv
(
"VMCWORKDIR"
);
// top source directory
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
TString
setupFile
=
srcDir
+
"/geometry/setup/setup_"
+
setup
+
".C"
;
TString
setupFile
=
srcDir
+
"/geometry/setup/setup_"
+
setup
+
".C"
;
TString
setupFunct
=
"setup_"
;
TString
setupFunct
=
"setup_"
;
setupFunct
=
setupFunct
+
setup
+
"()"
;
setupFunct
=
setupFunct
+
setup
+
"()"
;
std
::
cout
<<
"-I- "
std
::
cout
<<
"-I- "
<<
": Loading macro "
<<
setupFile
<<
std
::
endl
;
<<
": Loading macro "
<<
setupFile
<<
std
::
endl
;
gROOT
->
LoadMacro
(
setupFile
);
gROOT
->
LoadMacro
(
setupFile
);
gROOT
->
ProcessLine
(
setupFunct
);
gROOT
->
ProcessLine
(
setupFunct
);
// You can modify the pre-defined setup by using
// You can modify the pre-defined setup by using
...
@@ -43,7 +43,7 @@ void run_ana(Int_t nEvents = 3,
...
@@ -43,7 +43,7 @@ void run_ana(Int_t nEvents = 3,
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
CbmKF
*
kf
=
new
CbmKF
();
CbmKF
*
kf
=
new
CbmKF
();
run
->
AddTask
(
kf
);
run
->
AddTask
(
kf
);
/* (VF) Not much sense in running L1 witout STS local reconstruction
/* (VF) Not much sense in running L1 witout STS local reconstruction
CbmL1* L1 = new CbmL1();
CbmL1* L1 = new CbmL1();
TString stsGeoTag;
TString stsGeoTag;
...
@@ -56,24 +56,25 @@ void run_ana(Int_t nEvents = 3,
...
@@ -56,24 +56,25 @@ void run_ana(Int_t nEvents = 3,
}
}
run->AddTask(L1);
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->SetChi2StsCut(2.);
ana->SetChi2VertexCut(3.);
ana->SetChi2VertexCut(3.);
ana->SetNofMuchCut(1
1
);
ana->SetNofMuchCut(1
0
);
ana->SetNofStsCut(7);
ana->SetNofStsCut(7);
ana->SetNofTrdCut(1);
ana->SetNofTrdCut(1);
ana->SetSigmaTofCut(2);
ana->SetSigmaTofCut(2);
*/
*/
ana
->
UseCuts
(
kTRUE
);
ana
->
UseCuts
(
kFALSE
);
// ana->SetAnnCut(ANN, 5); // if SetAnnCut, than UseCuts(kFALSE) !
ana
->
UseMC
(
useMC
);
ana
->
UseMC
(
useMC
);
run
->
AddTask
(
ana
);
run
->
AddTask
(
ana
);
// ----- Parameter database --------------------------------------------
// ----- Parameter database --------------------------------------------
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
FairRuntimeDb
*
rtdb
=
run
->
GetRuntimeDb
();
FairParRootFileIo
*
parIo1
=
new
FairParRootFileIo
();
FairParRootFileIo
*
parIo1
=
new
FairParRootFileIo
();
//FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
//FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo1
->
open
(
parFile
.
Data
());
parIo1
->
open
(
parFile
.
Data
());
...
@@ -84,13 +85,13 @@ void run_ana(Int_t nEvents = 3,
...
@@ -84,13 +85,13 @@ void run_ana(Int_t nEvents = 3,
rtdb
->
saveOutput
();
rtdb
->
saveOutput
();
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// ----- Initialize and run --------------------------------------------
// ----- Initialize and run --------------------------------------------
run
->
Init
();
run
->
Init
();
run
->
Run
(
0
,
nEvents
);
run
->
Run
(
0
,
nEvents
);
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
cout
<<
" Test passed"
<<
endl
;
cout
<<
" Test passed"
<<
endl
;
cout
<<
" All ok "
<<
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