(F.Gaede, R.Ete, DESY)
This document describes :
- How this directory is structured
- How to run a DDSim simulation
- How to directly run the reconstruction chain
- How to generate a steering file for Marlin using our template
For more information on the iLCSoft tools refer to the iLCSoft Portal or directly to the source code documentation of the individual packages.
The structure of this directory relies on a functionality introduced in Marlin v01-14 that allows to include xml file within the top-level Marlin steering file. The different sub-directories are thus used for splitting the reconstruction in smaller blocks: Tracking Digi and Reco, CaloDigi, PFA, HLR, etc ...
Currently you can find the following sub-directories for usual processors :
- Tracking : The tracking digitization and reconstruction processors
- CaloDigi : The calorimeter digitizer (Ecal, Hcal, Fcal and Muon system) processors
- ParticleFlow : The PandoraPFA processor(s)
- HighLevelReco : The high level reconstruction (PID, vertexing, cluster shape, MC truth linker) processors
- BeamCalReco : The BeamCal reconstruction settings
In addition, you may find the following sub-directories :
- Config : Specific configuration files that may depends on CMS energy or detector models
- Calibration : The calibration constants for the different detector flavors currently under study. Constants are mainly related to energy calibration, dEdX, and particle identification.
- Examples : Example scripts to run 3 ttbar events simulation and reconstruction
- Gear : The geometry files of the (deprecated) GEAR package of the detector geometries currently under study
- PandoraSettings : A directory containing the PandoraPFA steering files
- RootMacros : A set of root macros for quick checks of output files
- Documentation : Additional documentation on ILDConfig on overlay background and production parameters
Most of these directories are used by the top-level Marlin steering file MarlinStdReco.xml as include sources. Please to not move them except if you know what you are doing.
source /cvmfs/ilc.desy.de/sw/x86_64_gcc82_centos7/v02-03-03/init_ilcsoft.sh
Each release of iLCSoft has a corresponding tag for ILDConfig. Usually, multiple versions of ILDConfig work with a given release, but if you want to make sure to get consistent results you can also check out a specific tag for ILDConfig.
If you start from scratch (i.e. before cloning this repository) you can directly clone the corresponding tag via
git clone -b v02-03-03 https://github.com/iLCSoft/ILDConfig
If you already have cloned this repository than you can simply go to the corresponding tag via
git checkout v02-03-03
In both cases you will get a message about being in detached HEAD
state from
git. This is simply gits way of telling you that you are not currently on a
branch. For simply running things this is no problem. If you want to make
changes it's easiest to simply create a new branch before doing so.
ddsim \
--inputFiles Examples/bbudsc_3evt/bbudsc_3evt.stdhep \
--outputFile bbudsc_3evt_SIM.slcio \
--compactFile $k4geo_DIR/ILD/compact/ILD_l5_v02/ILD_l5_v02.xml \
--steeringFile ddsim_steer.py
this creates the file: bbudsc_3evt_SIM.slcio
You can now examine the collections in the file:
anajob bbudsc_3evt_SIM.slcio
Marlin MarlinStdReco.xml \
--constant.lcgeo_DIR=$k4geo_DIR \
--constant.DetectorModel=ILD_l5_o1_v02 \
--constant.OutputBaseName=bbudsc_3evt \
--global.LCIOInputFiles=bbudsc_3evt_SIM.slcio
This will create the 4 following files :
- bbudsc_3evt_AIDA.root : Check plots from various processors
- bbudsc_3evt_REC.slcio : Output lcio file containing all collections from the reconstruction chain
- bbudsc_3evt_DST.slcio : Output file file containing the collections suited for physics analysis (PFO, cluster, rec hits, etc ...)
- bbudsc_3evt_PfoAnalysis.root : A root file with a simple analysis of produced PFO. It is mainly used to study single particle performance and calibration or JER performances
For single particles reconstruction you may also want to switch off the BeamCal reconstruction (time consuming) if you don't shoot in this region and/or if you have time processing constraints. To do this you can add the argument --constant.RunBeamCalReco=false
. Example:
Marlin MarlinStdReco.xml \
--constant.lcgeo_DIR=$k4geo_DIR \
--constant.DetectorModel=ILD_l5_o1_v02 \
--constant.OutputBaseName=bbudsc_3evt \
--constant.RunBeamCalReco=false \
--global.LCIOInputFiles=bbudsc_3evt_SIM.slcio
If you are in a Key4hep environment you can also run the reconstruction using the k4MarlinWrapper and the Gaudi based framework via
k4run ILDReconstruction.py --inputFiles=bbudsc_3evt_SIM.slcio
This will by default produce an EDM4hep output file with similar contents as the REC file described above.
ILDReconstruction.py
has a few command line options / flags
--inputFiles
takes a list of input files to run over. It will automatically detect whether these are LCIO or EDM4hep input files and instantiate the appropriate reader (and a potentially necessary conversion). It is not possible to mix EDM4hep and LCIO input file--detectorModel
is necessary to specify the detector model to run the reconstruction for. Default isILD_l5_o1_v02
--compactFile
can be used to specify a compact detector file. By default this will be constructed to use the compact file from$K4GEO
that corresponds to the specified detectorModel.--outputFileBase
is the basename for all the output files that will be created. Defaults toStandardReco
--lcioOutput
can be set to eitheron
,off
, oronly
and steers whether there is additional (or exclusive) LCIO output produced as well. Defaults tooff
.--cmsEnergy
can be used to set the desired center-of-mass energy. Possible values are 250, 250, 500 and 1000 GeV. The default is 250 GeV.--[run|no]BeamCalReco
toggle whether to run BeamCal reconstruction or not. Defaults to true. Use the--beamCalCalibFactor
to set the calibration constant (defaults to79.6
)--runOverlay
turns on overlay of background events. Defaults to false. NOTE that you have to configure the necessary overlay files first inBgOverlay/BgOverlay.py
!
Here two solutions :
- start the event display (server) first and view REC or DST events:
# Start the server
glced &
# Run the REC viewer
Marlin MarlinStdRecoViewer.xml \
--global.GearXMLFile=Gear/gear_ILD_l5_o1_v02.xml \
--global.LCIOInputFiles=bbudsc_3evt_REC.slcio
# Or run the DST viewer
Marlin MarlinStdRecoViewerDST.xml \
--global.GearXMLFile=Gear/gear_ILD_l5_o1_v02.xml \
--global.LCIOInputFiles=bbudsc_3evt_DST.slcio
- start both, glced and Marlin in one go:
# Option -s 1 to display also tracking surfaces
ced2go -s 1 -d $k4geo_DIR/ILD/compact/ILD_l5_o1_v02/ILD_l5_o1_v02.xml bbudsc_3evt_REC.slcio
Marlin MarlinStdRecoLCTuple.xml \
--global.LCIOInputFiles=bbudsc_3evt_DST.slcio \
--MyAIDAProcessor.FileName=bbudsc_3evt_LCTuple
This will produce the file bbudsc_3evt_LCTuple.root
In order to run the standard full reconstruction with the ILD_l5_v09 model, in the MarlinStdReco.xml
file:
- replace
TrackingDigi
andTrackingReco
groups in the<execute>
section bySiliconTrackingDigi
andConformalTrackingReco
- include
Tracking/TrackingDigi_SiILD.xml
,Tracking/ConformalTracking_SiILD.xml
,HighLevelReco/HighLevelReco_SiILD.xml
,ParticleFlow/PandoraPFA_SiILD.xml
files instead of the respective default ones - Make sure to pass the right compact file with the ILD_l5_v09 model definition.
Then run the reconstruction as described above, providing the proper detector model.