Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CEPCSW
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
Li Zhihao
CEPCSW
Commits
d767bed8
"Examples/options/edm4hep_write.py" did not exist on "52d91c74e4c89420648c8e36a7661e0331670218"
Commit
d767bed8
authored
4 years ago
by
zhangyao@ihep.ac.cn
Browse files
Options
Downloads
Patches
Plain Diff
Add option file for DC fitting with RecGenfitAlgDC
parent
426a4c58
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Examples/options/tut_detsim_digi_truthTracker_fit_DC.py
+199
-0
199 additions, 0 deletions
Examples/options/tut_detsim_digi_truthTracker_fit_DC.py
Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.h
+1
-1
1 addition, 1 deletion
Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.h
with
200 additions
and
1 deletion
Examples/options/tut_detsim_digi_truthTracker_fit_DC.py
0 → 100644
+
199
−
0
View file @
d767bed8
#!/usr/bin/env python
import
os
print
(
os
.
environ
[
"
DD4HEP_LIBRARY_PATH
"
])
import
sys
# sys.exit(0)
from
Gaudi.Configuration
import
*
##############################################################################
# Random Number Svc
##############################################################################
from
Configurables
import
RndmGenSvc
,
HepRndm__Engine_CLHEP__RanluxEngine_
# rndmengine = HepRndm__Engine_CLHEP__RanluxEngine_() # The default engine in Gaudi
rndmengine
=
HepRndm__Engine_CLHEP__HepJamesRandom_
()
# The default engine in Geant4
rndmengine
.
SetSingleton
=
True
rndmengine
.
Seeds
=
[
42
]
# rndmgensvc = RndmGenSvc("RndmGenSvc")
# rndmgensvc.Engine = rndmengine.name()
##############################################################################
# Event Data Svc
##############################################################################
from
Configurables
import
k4DataSvc
dsvc
=
k4DataSvc
(
"
EventDataSvc
"
)
##############################################################################
# Geometry Svc
##############################################################################
# geometry_option = "CepC_v4-onlyTracker.xml"
geometry_option
=
"
det.xml
"
if
not
os
.
getenv
(
"
DETDRIFTCHAMBERROOT
"
):
print
(
"
Can
'
t find the geometry. Please setup envvar DETDRIFTCHAMBERROOT.
"
)
sys
.
exit
(
-
1
)
geometry_path
=
os
.
path
.
join
(
os
.
getenv
(
"
DETDRIFTCHAMBERROOT
"
),
"
compact
"
,
geometry_option
)
if
not
os
.
path
.
exists
(
geometry_path
):
print
(
"
Can
'
t find the compact geometry file: %s
"
%
geometry_path
)
sys
.
exit
(
-
1
)
from
Configurables
import
GeomSvc
geosvc
=
GeomSvc
(
"
GeomSvc
"
)
geosvc
.
compact
=
geometry_path
##############################################################################
# Physics Generator
##############################################################################
from
Configurables
import
GenAlgo
from
Configurables
import
GtGunTool
from
Configurables
import
StdHepRdr
from
Configurables
import
SLCIORdr
from
Configurables
import
HepMCRdr
from
Configurables
import
GenPrinter
gun
=
GtGunTool
(
"
GtGunTool
"
)
# gun.Particles = ["pi+"]
# gun.EnergyMins = [100.] # GeV
# gun.EnergyMaxs = [100.] # GeV
gun
.
Particles
=
[
"
e-
"
]
# gun.PositionXs = [100.] # mm
# gun.PositionYs = [100.] # mm
# gun.PositionZs = [0.] # mm
gun
.
EnergyMins
=
[
10.
]
# GeV
gun
.
EnergyMaxs
=
[
10.
]
# GeV
gun
.
ThetaMins
=
[
90
]
# rad; 45deg
gun
.
ThetaMaxs
=
[
90
]
# rad; 45deg
gun
.
PhiMins
=
[
0
]
# rad; 0deg
gun
.
PhiMaxs
=
[
360
]
# rad; 360deg
#gun.PhiMins = [0] # rad; 0deg
#gun.PhiMaxs = [360] # rad; 360deg
# stdheprdr = StdHepRdr("StdHepRdr")
# stdheprdr.Input = "/cefs/data/stdhep/CEPC250/2fermions/E250.Pbhabha.e0.p0.whizard195/bhabha.e0.p0.00001.stdhep"
# lciordr = SLCIORdr("SLCIORdr")
# lciordr.Input = "/cefs/data/stdhep/lcio250/signal/Higgs/E250.Pbbh.whizard195/E250.Pbbh_X.e0.p0.whizard195/Pbbh_X.e0.p0.00001.slcio"
# hepmcrdr = HepMCRdr("HepMCRdr")
# hepmcrdr.Input = "example_UsingIterators.txt"
genprinter
=
GenPrinter
(
"
GenPrinter
"
)
genalg
=
GenAlgo
(
"
GenAlgo
"
)
genalg
.
GenTools
=
[
"
GtGunTool
"
]
# genalg.GenTools = ["StdHepRdr"]
# genalg.GenTools = ["StdHepRdr", "GenPrinter"]
# genalg.GenTools = ["SLCIORdr", "GenPrinter"]
# genalg.GenTools = ["HepMCRdr", "GenPrinter"]
##############################################################################
# Detector Simulation
##############################################################################
from
Configurables
import
DetSimSvc
detsimsvc
=
DetSimSvc
(
"
DetSimSvc
"
)
# from Configurables import ExampleAnaElemTool
# example_anatool = ExampleAnaElemTool("ExampleAnaElemTool")
from
Configurables
import
DetSimAlg
detsimalg
=
DetSimAlg
(
"
DetSimAlg
"
)
if
int
(
os
.
environ
.
get
(
"
VIS
"
,
0
)):
detsimalg
.
VisMacs
=
[
"
vis.mac
"
]
detsimalg
.
RunCmds
=
[
# "/tracking/verbose 1",
]
detsimalg
.
AnaElems
=
[
# example_anatool.name()
# "ExampleAnaElemTool"
"
Edm4hepWriterAnaElemTool
"
]
detsimalg
.
RootDetElem
=
"
WorldDetElemTool
"
from
Configurables
import
AnExampleDetElemTool
example_dettool
=
AnExampleDetElemTool
(
"
AnExampleDetElemTool
"
)
from
Configurables
import
CalorimeterSensDetTool
from
Configurables
import
DriftChamberSensDetTool
calo_sensdettool
=
CalorimeterSensDetTool
(
"
CalorimeterSensDetTool
"
)
driftchamber_sensdettool
=
DriftChamberSensDetTool
(
"
DriftChamberSensDetTool
"
)
# dedxoption = "DummyDedxSimTool"
dedxoption
=
"
BetheBlochEquationDedxSimTool
"
driftchamber_sensdettool
.
DedxSimTool
=
dedxoption
from
Configurables
import
DummyDedxSimTool
from
Configurables
import
BetheBlochEquationDedxSimTool
if
dedxoption
==
"
DummyDedxSimTool
"
:
dedx_simtool
=
DummyDedxSimTool
(
"
DummyDedxSimTool
"
)
elif
dedxoption
==
"
BetheBlochEquationDedxSimTool
"
:
dedx_simtool
=
BetheBlochEquationDedxSimTool
(
"
BetheBlochEquationDedxSimTool
"
)
dedx_simtool
.
material_Z
=
2
dedx_simtool
.
material_A
=
4
dedx_simtool
.
scale
=
10
dedx_simtool
.
resolution
=
0.0001
##############################################################################
from
Configurables
import
DCHDigiAlg
dCHDigiAlg
=
DCHDigiAlg
(
"
DCHDigiAlg
"
)
##############################################################################
# POD I/O
##############################################################################
from
Configurables
import
PodioOutput
out
=
PodioOutput
(
"
outputalg
"
)
out
.
filename
=
"
rec_DCH.root
"
out
.
outputCommands
=
[
"
keep *
"
]
##############################################################################
# TruthTrackerAlg
##############################################################################
from
Configurables
import
TruthTrackerAlg
truthTrackerAlg
=
TruthTrackerAlg
(
"
TruthTrackerAlg
"
)
##############################################################################
# GenfitAlg
##############################################################################
from
Configurables
import
RecGenfitAlgDC
recGenfitAlgDC
=
RecGenfitAlgDC
(
"
RecGenfitAlgDC
"
)
##############################################################################
# NTupleSvc
##############################################################################
from
Configurables
import
NTupleSvc
ntsvc
=
NTupleSvc
(
"
NTupleSvc
"
)
ntsvc
.
Output
=
[
"
MyTuples DATAFILE=
'
dCHDigiAlg.root
'
OPT=
'
NEW
'
TYP=
'
ROOT
'"
,
"
RecGenfitAlgDC DATAFILE=
'
recGenfitAlgDC.root
'
OPT=
'
NEW
'
TYP=
'
ROOT
'"
]
##############################################################################
# ApplicationMgr
##############################################################################
from
Configurables
import
ApplicationMgr
ApplicationMgr
(
TopAlg
=
[
genalg
,
detsimalg
,
dCHDigiAlg
,
truthTrackerAlg
,
recGenfitAlgDC
,
out
],
EvtSel
=
'
NONE
'
,
EvtMax
=
10
,
ExtSvc
=
[
rndmengine
,
dsvc
,
geosvc
,
ntsvc
],
HistogramPersistency
=
"
ROOT
"
,
OutputLevel
=
DEBUG
)
This diff is collapsed.
Click to expand it.
Reconstruction/RecGenfitAlg/src/RecGenfitAlgDC.h
+
1
−
1
View file @
d767bed8
...
@@ -95,7 +95,7 @@ class RecGenfitAlgDC:public GaudiAlgorithm {
...
@@ -95,7 +95,7 @@ class RecGenfitAlgDC:public GaudiAlgorithm {
Gaudi
::
Property
<
std
::
string
>
m_readout_name
{
this
,
Gaudi
::
Property
<
std
::
string
>
m_readout_name
{
this
,
"readout"
,
"DriftChamberHitsCollection"
};
"readout"
,
"DriftChamberHitsCollection"
};
Gaudi
::
Property
<
int
>
m_debug
{
this
,
"debug"
,
false
};
Gaudi
::
Property
<
int
>
m_debug
{
this
,
"debug"
,
false
};
Gaudi
::
Property
<
bool
>
m_smearHit
{
this
,
"smearHit"
,
fals
e
};
Gaudi
::
Property
<
bool
>
m_smearHit
{
this
,
"smearHit"
,
tru
e
};
Gaudi
::
Property
<
float
>
m_sigmaHit
{
this
,
"sigmaHit"
,
0.11
};
//mm
Gaudi
::
Property
<
float
>
m_sigmaHit
{
this
,
"sigmaHit"
,
0.11
};
//mm
Gaudi
::
Property
<
float
>
m_nSigmaHit
{
this
,
"nSigmaHit"
,
5
};
Gaudi
::
Property
<
float
>
m_nSigmaHit
{
this
,
"nSigmaHit"
,
5
};
Gaudi
::
Property
<
double
>
m_initCovResPos
{
this
,
"initCovResPos"
,
1
};
Gaudi
::
Property
<
double
>
m_initCovResPos
{
this
,
"initCovResPos"
,
1
};
...
...
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