Skip to content
Snippets Groups Projects
Unverified Commit 6c5ea786 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn Committed by GitHub
Browse files

Merge pull request #226 from zoujh/master

Update the example for reading LCIO data
parents 5cf624dc ad836d98
No related branches found
No related tags found
No related merge requests found
#!/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
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment