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
e3c61ebc
Commit
e3c61ebc
authored
3 years ago
by
David Emschermann
Browse files
Options
Downloads
Patches
Plain Diff
Fix event display for mCBM and do not use SetOutputFile any longer, refs #2215
parent
1c361b0a
No related branches found
No related tags found
1 merge request
!468
Fix event display for mCBM and do not use SetOutputFile any longer, refs #2215
Pipeline
#12803
passed
3 years ago
Stage: documentation
Stage: deploy
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
macro/mcbm/eventDisplay.C
+20
-130
20 additions, 130 deletions
macro/mcbm/eventDisplay.C
macro/run/eventDisplay.C
+2
-1
2 additions, 1 deletion
macro/run/eventDisplay.C
with
22 additions
and
131 deletions
macro/mcbm/eventDisplay.C
+
20
−
130
View file @
e3c61ebc
/* 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
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
,
void
eventDisplay
(
TString
dataset
=
"data/test"
)
const
char
*
setup
=
"sis18_mcbm"
)
{
{
TString
inFile
=
dataset
+
".tra.root"
;
TString
dataDir
=
"data/"
;
TString
parFile
=
dataset
+
".par.root"
;
TString
outFile
=
dataset
+
".display.root"
;
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"
;
// ----- Reconstruction run -------------------------------------------
// ----- Reconstruction run -------------------------------------------
FairRunAna
*
fRun
=
new
FairRunAna
();
FairRunAna
*
fRun
=
new
FairRunAna
();
fRun
->
SetInputFile
(
InputFile
.
Data
());
FairFileSource
*
inputSource
=
new
FairFileSource
(
inFile
.
Data
());
fRun
->
AddFriend
(
RecoFile
.
Data
());
fRun
->
SetSource
(
inputSource
);
FairRootFileSink
*
outputSink
=
new
FairRootFileSink
(
outFile
);
fRun
->
SetOutputFile
(
dataDir
+
setup
+
"_test.root"
);
fRun
->
SetSink
(
outputSink
);
//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
);
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairParRootFileIo
*
parInput1
=
new
FairParRootFileIo
();
FairParRootFileIo
*
parInput1
=
new
FairParRootFileIo
();
parInput1
->
open
(
P
arFile
.
Data
());
parInput1
->
open
(
p
arFile
.
Data
());
rtdb
->
setFirstInput
(
parInput1
);
rtdb
->
setFirstInput
(
parInput1
);
FairEventManager
*
fMan
=
new
FairEventManager
();
FairEventManager
*
fMan
=
new
FairEventManager
();
FairMCTracks
*
Track
=
new
FairMCTracks
(
"Monte-Carlo Tracks"
);
FairMCTracks
*
Track
=
new
FairMCTracks
(
"Monte-Carlo Tracks"
);
FairMCPointDraw
*
MvdPoint
=
new
FairMCPointDraw
(
"MvdPoint"
,
kBlack
,
kFullSquare
);
FairMCPointDraw
*
MvdPoint
=
new
FairMCPointDraw
(
"MvdPoint"
,
kBlack
,
kFullSquare
);
FairMCPointDraw
*
StsPoint
=
new
FairMCPointDraw
(
"StsPoint"
,
kGreen
,
kFullSquare
);
FairMCPointDraw
*
StsPoint
=
new
FairMCPointDraw
(
"StsPoint"
,
kBlue
,
kFullSquare
);
FairMCPointDraw
*
MuchPoint
=
new
FairMCPointDraw
(
"MuchPoint"
,
kOrange
,
kFullSquare
);
FairMCPointDraw
*
RichPoint
=
new
FairMCPointDraw
(
"RichPoint"
,
kOrange
,
kFullSquare
);
FairMCPointDraw
*
RichPoint
=
new
FairMCPointDraw
(
"RichPoint"
,
kGreen
,
kFullSquare
);
FairMCPointDraw
*
RefPlanePoint
=
new
FairMCPointDraw
(
"RefPlanePoint"
,
kPink
,
kFullSquare
);
FairMCPointDraw
*
TrdPoint
=
new
FairMCPointDraw
(
"TrdPoint"
,
kBlue
,
kFullSquare
);
FairMCPointDraw
*
TrdPoint
=
new
FairMCPointDraw
(
"MuchPoint"
,
kYellow
,
kFullSquare
);
FairMCPointDraw
*
MuchPoint
=
new
FairMCPointDraw
(
"TrdPoint"
,
kCyan
,
kFullSquare
);
FairMCPointDraw
*
TofPoint
=
new
FairMCPointDraw
(
"TofPoint"
,
kRed
,
kFullSquare
);
FairMCPointDraw
*
TofPoint
=
new
FairMCPointDraw
(
"TofPoint"
,
kRed
,
kFullSquare
);
FairMCPointDraw
*
EcalPoint
=
new
FairMCPointDraw
(
"EcalPoint"
,
kYellow
,
kFullSquare
);
FairMCPointDraw
*
EcalPoint
=
new
FairMCPointDraw
(
"EcalPoint"
,
kYellow
,
kFullSquare
);
FairMCPointDraw
*
RefPlanePoint
=
new
FairMCPointDraw
(
"RefPlanePoint"
,
kPink
,
kFullSquare
);
fMan
->
AddTask
(
Track
);
fMan
->
AddTask
(
Track
);
fMan
->
AddTask
(
MvdPoint
);
fMan
->
AddTask
(
MvdPoint
);
fMan
->
AddTask
(
StsPoint
);
fMan
->
AddTask
(
StsPoint
);
fMan
->
AddTask
(
MuchPoint
);
fMan
->
AddTask
(
RichPoint
);
fMan
->
AddTask
(
RichPoint
);
fMan
->
AddTask
(
RefPlanePoint
);
fMan
->
AddTask
(
MuchPoint
);
fMan
->
AddTask
(
TrdPoint
);
fMan
->
AddTask
(
TrdPoint
);
fMan
->
AddTask
(
TofPoint
);
fMan
->
AddTask
(
TofPoint
);
fMan
->
AddTask
(
EcalPoint
);
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,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,6,10000); // make MVD visible by default
fMan
->
Init
(
1
,
7
,
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
();
}
}
}
}
This diff is collapsed.
Click to expand it.
macro/run/eventDisplay.C
+
2
−
1
View file @
e3c61ebc
...
@@ -13,7 +13,8 @@ void eventDisplay(TString dataset = "test")
...
@@ -13,7 +13,8 @@ void eventDisplay(TString dataset = "test")
FairFileSource
*
inputSource
=
new
FairFileSource
(
inFile
.
Data
());
FairFileSource
*
inputSource
=
new
FairFileSource
(
inFile
.
Data
());
fRun
->
SetSource
(
inputSource
);
fRun
->
SetSource
(
inputSource
);
fRun
->
SetOutputFile
(
outFile
);
FairRootFileSink
*
outputSink
=
new
FairRootFileSink
(
outFile
);
fRun
->
SetSink
(
outputSink
);
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairRuntimeDb
*
rtdb
=
fRun
->
GetRuntimeDb
();
FairParRootFileIo
*
parInput1
=
new
FairParRootFileIo
();
FairParRootFileIo
*
parInput1
=
new
FairParRootFileIo
();
...
...
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