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
Merge requests
!468
Fix event display for mCBM and do not use SetOutputFile any longer, refs
#2215
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix event display for mCBM and do not use SetOutputFile any longer, refs
#2215
d.emschermann/cbmroot:evtdisplay
into
master
Overview
1
Commits
1
Pipelines
1
Changes
2
Merged
David Emschermann
requested to merge
d.emschermann/cbmroot:evtdisplay
into
master
3 years ago
Overview
1
Commits
1
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
e3c61ebc
1 commit,
3 years ago
2 files
+
22
−
131
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
macro/mcbm/eventDisplay.C
+
20
−
130
Options
/* Copyright (C) 20
19-2020
GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
/* Copyright (C) 20
08-2019
GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
SPDX-License-Identifier: GPL-3.0-only
Authors: David Emschermann [committer], Florian Uhlig */
Authors:
Andrey Lebedev,
David Emschermann
, Volker Friese, Mohammad Al-Turany
[committer], Florian Uhlig */
void
eventDisplay
(
TString
cSys
=
"lam"
,
TString
cEbeam
=
"2.5gev"
,
TString
cCentr
=
"-"
,
Int_t
iRun
=
0
,
const
char
*
setup
=
"sis18_mcbm"
)
void
eventDisplay
(
TString
dataset
=
"data/test"
)
{
TString
dataDir
=
"data/"
;
TString
InputFile
=
dataDir
+
setup
+
"_"
+
cSys
+
"."
+
cEbeam
+
"."
+
cCentr
+
".mc."
+
Form
(
"%05d"
,
iRun
)
+
".root"
;
TString
RecoFile
=
dataDir
+
setup
+
"_"
+
cSys
+
"."
+
cEbeam
+
"."
+
cCentr
+
".eds."
+
Form
(
"%05d"
,
iRun
)
+
".root"
;
TString
ParFile
=
dataDir
+
setup
+
"_"
+
cSys
+
"."
+
cEbeam
+
"."
+
cCentr
+
".params."
+
Form
(
"%05d"
,
iRun
)
+
".root"
;
TString
inFile
=
dataset
+
".tra.root"
;
TString
parFile
=
dataset
+
".par.root"
;
TString
outFile
=
dataset
+
".display.root"
;
// ----- Reconstruction run -------------------------------------------
FairRunAna
*
fRun
=
new
FairRunAna
();
fRun
->
SetInputFile
(
InputFile
.
Data
());
fRun
->
AddFriend
(
RecoFile
.
Data
());
fRun
->
SetOutputFile
(
dataDir
+
setup
+
"_test.root"
);
//FairLogger::GetLogger()->SetLogScreenLevel("INFO");
FairLogger
::
GetLogger
()
->
SetLogScreenLevel
(
"DEBUG1"
);
FairLogger
::
GetLogger
()
->
SetLogVerbosityLevel
(
"MEDIUM"
);
CbmHadronAnalysis
*
HadronAna
=
new
CbmHadronAnalysis
();
// interpret event
HadronAna
->
SetRecSec
(
kTRUE
);
// enable lambda reconstruction
Int_t
parSet
=
0
;
switch
(
parSet
)
{
case
0
:
// with background
HadronAna
->
SetDistPrimLim
(
1
.
2
);
// Max Tof-Sts trans distance for primaries
HadronAna
->
SetDistPrimLim2
(
0
.
3
);
// Max Sts-Sts trans distance for primaries
HadronAna
->
SetDistSecLim2
(
0
.
3
);
// Max Sts-Sts trans distance from TOF direction for secondaries
HadronAna
->
SetD0ProtLim
(
0
.
5
);
// Min impact parameter for secondary proton
HadronAna
->
SetOpAngMin
(
0
.
1
);
// Min opening angle for accepting pair
HadronAna
->
SetDCALim
(
0
.
1
);
// Max DCA for accepting pair
HadronAna
->
SetVLenMin
(
5
.);
// Min Lambda flight path length for accepting pair
HadronAna
->
SetVLenMax
(
25
.);
// Max Lambda flight path length for accepting pair
HadronAna
->
SetDistTRD
(
10
.);
// max accepted distance of Trd Hit from STS-TOF line
HadronAna
->
SetTRDHmulMin
(
0
.);
// min associated Trd Hits to Track candidates
HadronAna
->
SetNMixedEvents
(
10
);
// Number of events to be mixed with
break
;
case
1
:
// signal with background Ni+Ni
HadronAna
->
SetDistPrimLim
(
1
.);
// Max Tof-Sts trans distance for primaries
HadronAna
->
SetDistPrimLim2
(
0
.
3
);
// Max Sts-Sts trans distance for primaries
HadronAna
->
SetDistSecLim2
(
0
.
3
);
// Max Sts-Sts trans distance from TOF direction for secondaries
HadronAna
->
SetD0ProtLim
(
0
.
4
);
// Min impact parameter for secondary proton
HadronAna
->
SetOpAngMin
(
0
.
1
);
// Min opening angle for accepting pair
HadronAna
->
SetDCALim
(
0
.
1
);
// Max DCA for accepting pair
HadronAna
->
SetVLenMin
(
5
.);
// Min Lambda flight path length for accepting pair
HadronAna
->
SetVLenMax
(
25
.);
// Max Lambda flight path length for accepting pair
HadronAna
->
SetDistTRD
(
10
.);
// max accepted distance of Trd Hit from STS-TOF line
HadronAna
->
SetTRDHmulMin
(
0
.);
// min associated Trd Hits to Track candidates
HadronAna
->
SetNMixedEvents
(
10
);
// Number of events to be mixed with
break
;
case
2
:
// signal with background Au+Au
HadronAna
->
SetDistPrimLim
(
1
.);
// Max Tof-Sts trans distance for primaries
HadronAna
->
SetDistPrimLim2
(
0
.
3
);
// Max Sts-Sts trans distance for primaries
HadronAna
->
SetDistSecLim2
(
0
.
3
);
// Max Sts-Sts trans distance from TOF direction for secondaries
HadronAna
->
SetD0ProtLim
(
0
.
4
);
// Min impact parameter for secondary proton
HadronAna
->
SetOpAngMin
(
0
.
1
);
// Min opening angle for accepting pair
HadronAna
->
SetDCALim
(
0
.
1
);
// Max DCA for accepting pair
HadronAna
->
SetVLenMin
(
8
.);
// Min Lambda flight path length for accepting pair
HadronAna
->
SetVLenMax
(
25
.);
// Max Lambda flight path length for accepting pair
HadronAna
->
SetDistTRD
(
10
.);
// max accepted distance of Trd Hit from STS-TOF line
HadronAna
->
SetTRDHmulMin
(
0
.);
// min associated Trd Hits to Track candidates
HadronAna
->
SetNMixedEvents
(
10
);
// Number of events to be mixed with
break
;
case
10
:
// "0" with TRD Mul 1
HadronAna
->
SetDistPrimLim
(
1
.
2
);
// Max Tof-Sts trans distance for primaries
HadronAna
->
SetDistPrimLim2
(
0
.
3
);
// Max Sts-Sts trans distance for primaries
HadronAna
->
SetDistSecLim2
(
0
.
3
);
// Max Sts-Sts trans distance from TOF direction for secondaries
HadronAna
->
SetD0ProtLim
(
0
.
5
);
// Min impact parameter for secondary proton
HadronAna
->
SetOpAngMin
(
0
.
1
);
// Min opening angle for accepting pair
HadronAna
->
SetDCALim
(
0
.
1
);
// Max DCA for accepting pair
HadronAna
->
SetVLenMin
(
5
.);
// Min Lambda flight path length for accepting pair
HadronAna
->
SetVLenMax
(
25
.);
// Max Lambda flight path length for accepting pair
HadronAna
->
SetDistTRD
(
10
.);
// max accepted distance of Trd Hit from STS-TOF line
HadronAna
->
SetTRDHmulMin
(
1
.);
// min associated Trd Hits to Track candidates
HadronAna
->
SetNMixedEvents
(
10
);
// Number of events to be mixed with
break
;
case
20
:
// "0" with TRD Mul 2
HadronAna
->
SetDistPrimLim
(
1
.
2
);
// Max Tof-Sts trans distance for primaries
HadronAna
->
SetDistPrimLim2
(
0
.
3
);
// Max Sts-Sts trans distance for primaries
HadronAna
->
SetDistSecLim2
(
0
.
3
);
// Max Sts-Sts trans distance from TOF direction for secondaries
HadronAna
->
SetD0ProtLim
(
0
.
5
);
// Min impact parameter for secondary proton
HadronAna
->
SetOpAngMin
(
0
.
1
);
// Min opening angle for accepting pair
HadronAna
->
SetDCALim
(
0
.
1
);
// Max DCA for accepting pair
HadronAna
->
SetVLenMin
(
5
.);
// Min Lambda flight path length for accepting pair
HadronAna
->
SetVLenMax
(
25
.);
// Max Lambda flight path length for accepting pair
HadronAna
->
SetDistTRD
(
10
.);
// max accepted distance of Trd Hit from STS-TOF line
HadronAna
->
SetTRDHmulMin
(
2
.);
// min associated Trd Hits to Track candidates
HadronAna
->
SetNMixedEvents
(
10
);
// Number of events to be mixed with
break
;
default:
cout
<<
"Cut value set "
<<
parSet
<<
" not existing, stop macro "
<<
endl
;
return
;
}
fRun
->
AddTask
(
HadronAna
);
FairFileSource
*
inputSource
=
new
FairFileSource
(
inFile
.
Data
());
fRun
->
SetSource
(
inputSource
);
FairRootFileSink
*
outputSink
=
new
FairRootFileSink
(
outFile
);
fRun
->
SetSink
(
outputSink
);
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairParRootFileIo
*
parInput1
=
new
FairParRootFileIo
();
parInput1
->
open
(
P
arFile
.
Data
());
parInput1
->
open
(
p
arFile
.
Data
());
rtdb
->
setFirstInput
(
parInput1
);
FairEventManager
*
fMan
=
new
FairEventManager
();
FairMCTracks
*
Track
=
new
FairMCTracks
(
"Monte-Carlo Tracks"
);
FairMCPointDraw
*
MvdPoint
=
new
FairMCPointDraw
(
"MvdPoint"
,
kBlack
,
kFullSquare
);
FairMCPointDraw
*
StsPoint
=
new
FairMCPointDraw
(
"StsPoint"
,
kGreen
,
kFullSquare
);
FairMCPointDraw
*
MuchPoint
=
new
FairMCPointDraw
(
"MuchPoint"
,
kOrange
,
kFullSquare
);
FairMCPointDraw
*
RichPoint
=
new
FairMCPointDraw
(
"RichPoint"
,
kGreen
,
kFullSquare
);
FairMCPointDraw
*
TrdPoint
=
new
FairMCPointDraw
(
"TrdPoint"
,
kBlue
,
kFullSquare
);
FairMCPointDraw
*
StsPoint
=
new
FairMCPointDraw
(
"StsPoint"
,
kBlue
,
kFullSquare
);
FairMCPointDraw
*
RichPoint
=
new
FairMCPointDraw
(
"RichPoint"
,
kOrange
,
kFullSquare
);
FairMCPointDraw
*
RefPlanePoint
=
new
FairMCPointDraw
(
"RefPlanePoint"
,
kPink
,
kFullSquare
);
FairMCPointDraw
*
TrdPoint
=
new
FairMCPointDraw
(
"MuchPoint"
,
kYellow
,
kFullSquare
);
FairMCPointDraw
*
MuchPoint
=
new
FairMCPointDraw
(
"TrdPoint"
,
kCyan
,
kFullSquare
);
FairMCPointDraw
*
TofPoint
=
new
FairMCPointDraw
(
"TofPoint"
,
kRed
,
kFullSquare
);
FairMCPointDraw
*
EcalPoint
=
new
FairMCPointDraw
(
"EcalPoint"
,
kYellow
,
kFullSquare
);
FairMCPointDraw
*
RefPlanePoint
=
new
FairMCPointDraw
(
"RefPlanePoint"
,
kPink
,
kFullSquare
);
fMan
->
AddTask
(
Track
);
fMan
->
AddTask
(
MvdPoint
);
fMan
->
AddTask
(
StsPoint
);
fMan
->
AddTask
(
MuchPoint
);
fMan
->
AddTask
(
RichPoint
);
fMan
->
AddTask
(
RefPlanePoint
);
fMan
->
AddTask
(
MuchPoint
);
fMan
->
AddTask
(
TrdPoint
);
fMan
->
AddTask
(
TofPoint
);
fMan
->
AddTask
(
EcalPoint
);
fMan
->
AddTask
(
RefPlanePoint
);
CbmPixelHitSetDraw
*
StsHits
=
new
CbmPixelHitSetDraw
(
"StsHit"
,
kRed
,
kOpenCircle
);
// kFullSquare);
fMan
->
AddTask
(
StsHits
);
CbmPixelHitSetDraw
*
TrdHits
=
new
CbmPixelHitSetDraw
(
"TrdHit"
,
kRed
,
kOpenCircle
);
// kFullSquare);
fMan
->
AddTask
(
TrdHits
);
CbmPixelHitSetDraw
*
TofHits
=
new
CbmPixelHitSetDraw
(
"TofHit"
,
kRed
,
kOpenCircle
);
// kFullSquare);
fMan
->
AddTask
(
TofHits
);
CbmPixelHitSetDraw
*
TofUHits
=
new
CbmPixelHitSetDraw
(
"TofUHit"
,
kRed
,
kOpenCross
);
fMan
->
AddTask
(
TofUHits
);
CbmEvDisTracks
*
Tracks
=
new
CbmEvDisTracks
(
"Tof Tracks"
,
1
);
Tracks
->
SetVerbose
(
4
);
fMan
->
AddTask
(
Tracks
);
// fMan->Init(1,4,10000);
//
fMan->Init(1,5,10000); // make STS visible by default
fMan
->
Init
(
1
,
5
,
10000
);
// make STS visible by default
// fMan->Init(1,6,10000); // make MVD visible by default
fMan
->
Init
(
1
,
7
,
10000
);
// make MVD visible by default
cout
<<
"gEve "
<<
gEve
<<
endl
;
gEve
->
GetDefaultGLViewer
()
->
SetClearColor
(
kYellow
-
10
);
{
// from readCurrentCamera(const char* fname)
TGLCamera
&
c
=
gEve
->
GetDefaultGLViewer
()
->
CurrentCamera
();
const
char
*
fname
=
"Cam.sav"
;
TFile
*
f
=
TFile
::
Open
(
fname
,
"READ"
);
if
(
!
f
)
return
;
if
(
f
->
GetKey
(
c
.
ClassName
()))
{
f
->
GetKey
(
c
.
ClassName
())
->
Read
(
&
c
);
c
.
IncTimeStamp
();
gEve
->
GetDefaultGLViewer
()
->
RequestDraw
();
}
}
// fMan->Init(1,7,10000); // make MVD visible by default
}
Loading