From ad836d98f3ce65cede6c8174df0710b454870a55 Mon Sep 17 00:00:00 2001
From: zoujh <zoujh@ihep.ac.cn>
Date: Thu, 28 Jul 2022 11:43:17 +0800
Subject: [PATCH] update the example options for reading LCIO data

---
 Examples/options/LCIO_read.py | 91 +++++++++++++++++------------------
 1 file changed, 44 insertions(+), 47 deletions(-)

diff --git a/Examples/options/LCIO_read.py b/Examples/options/LCIO_read.py
index 8beafb93..f0d34348 100644
--- a/Examples/options/LCIO_read.py
+++ b/Examples/options/LCIO_read.py
@@ -1,61 +1,58 @@
 #!/usr/bin/env python
 
 from Gaudi.Configuration import *
+from Configurables import k4DataSvc
+dsvc = k4DataSvc("EventDataSvc")
 
-from Configurables import LCIODataSvc, CEPCDataSvc
-
-svcname = "LCIODataSvc"
-rsvc = LCIODataSvc(svcname, inputs = [
-"/cefs/data/FullSim/CEPC240/CEPC_v4/higgs/smart_final_states/E240.Pffh_invi.e0.p0.whizard195//ffh_inv.e0.p0.00001_1000_sim.slcio"
-])
-
-wsvc = CEPCDataSvc("EventDataSvc")
-
-from Configurables import PlcioReadAlg
-alg = PlcioReadAlg("PlcioReadAlg")
-alg.InputCol.Path = "MCParticle"
-alg.HeaderCol.Path = "EventHeader"
-
+# read LCIO files
 from Configurables import LCIOInput
-lcioinput = LCIOInput("LCIOReader", collections=[
-    "EventHeader",
-    "MCParticle",
-    "TPCCollection"
-    #"EventHeader",
-    #"MCParticle",
-    #"COILCollection",
-    #"EcalBarrelSiliconCollection",
-    #"EcalBarrelSiliconPreShowerCollection",
-    #"EcalEndcapRingCollection",
-    #"EcalEndcapRingPreShowerCollection",
-    #"EcalEndcapSiliconCollection",
-    #"EcalEndcapSiliconPreShowerCollection",
-    #"FTD_PIXELCollection",
-    #"FTD_STRIPCollection",
-    #"HcalBarrelCollection",
-    #"HcalEndCapRingsCollection",
-    #"HcalEndCapsCollection",
-    #"LumiCalCollection",
-    #"MuonBarrelCollection",
-    #"MuonEndCapCollection",
-    #"SETCollection",
-    #"SITCollection",
-    #"TPCCollection",
-    #"TPCSpacePointCollection",
-    #"VXDCollection"
-    ])
-lcioinput.DataSvc = svcname
+read = LCIOInput("read")
+read.inputs = [
+"/cefs/data/FullSim/CEPC240/CEPC_v4/higgs/smart_final_states/E240.Pffh_invi.e0.p0.whizard195/ffh_inv.e0.p0.00001_1000_sim.slcio"
+]
+read.collections = [
+        "MCParticle:MCParticle",
+        "SimCalorimeterHit:EcalBarrelSiliconCollection",
+        #"CalorimeterHit:ECALBarrel",
+        #"CalorimeterHit:ECALEndcap",
+        #"CalorimeterHit:ECALOther" ,
+        ########## HCAL will effect the reco efficiency close to gap region ######
+        #"CalorimeterHit:HCALBarrel",
+        #"CalorimeterHit:HCALEndcap",
+        #"CalorimeterHit:HCALOther",
+        ##"TrackerHit:VXDTrackerHits",
+        ##"TrackerHit:SITTrackerHits",
+        #"TrackerHit:SITSpacePoints",
+        #"TrackerHit:TPCTrackerHits",
+        ##"TrackerHit:SETTrackerHits",
+        #"TrackerHit:SETSpacePoints",
+        ##"TrackerHit:FTDStripTrackerHits",
+        #"TrackerHit:FTDSpacePoints",
+        ##"TrackerHit:FTDPixelTrackerHits",
+        #"Track:ClupatraTrackSegments", 
+        #"Track:ClupatraTracks", 
+        #"Track:ForwardTracks", 
+        #"Track:SiTracks", 
+        #"Track:SubsetTracks",
+        #"Track:MarlinTrkTracks", 
+        #"Vertex:KinkVertices",
+        #"Vertex:ProngVertices",
+        #"Vertex:V0Vertices",
+        #"ReconstructedParticle:KinkRecoParticles",
+        #"ReconstructedParticle:ProngRecoParticles",
+        #"ReconstructedParticle:V0RecoParticles"
+]
 
 from Configurables import PodioOutput
-plcioout = PodioOutput("PlcioWriter")
-plcioout.filename = "lcio2plcio.root"
-plcioout.outputCommands = ["keep *"]
+write = PodioOutput("write")
+write.filename = "lcio2plcio.root"
+write.outputCommands = ["keep *"]
 
 # ApplicationMgr
 from Configurables import ApplicationMgr
-ApplicationMgr( TopAlg = [lcioinput, alg, plcioout],
+ApplicationMgr( TopAlg = [read, write],
                 EvtSel = 'NONE',
                 EvtMax = 10,
-                ExtSvc = [rsvc, wsvc],
+                ExtSvc = [dsvc],
                 OutputLevel=DEBUG
 )
-- 
GitLab