diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/README b/Detector/DetCRD/scripts/TDR_o1_v01/README new file mode 100644 index 0000000000000000000000000000000000000000..32e06f7e860d7c6ab92bfebe804eafec2d127792 --- /dev/null +++ b/Detector/DetCRD/scripts/TDR_o1_v01/README @@ -0,0 +1,18 @@ +### python job option for Gaudi framework ### +change through option python file + +example: +run.sh job.py [option1.py option2.py ...] +or +gaudirun.py job.py [option1.py option2.py ...] + +### particle gun ### +run.sh sim.py +run.sh tracking.py + +### physical sample ### +run.sh sim.py gen-option.py +run.sh calodigi.py [user-option.py] +run.sh tracking.py tracking-io-option.py +run.sh rec.py [user-option.py] +run.sh ana.py [user-option.py] diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/ana.py b/Detector/DetCRD/scripts/TDR_o1_v01/ana.py new file mode 100644 index 0000000000000000000000000000000000000000..0679acd1dea718168c63baeb91b444e0f3d0fc77 --- /dev/null +++ b/Detector/DetCRD/scripts/TDR_o1_v01/ana.py @@ -0,0 +1,43 @@ +import os, sys +from Gaudi.Configuration import * + +########### k4DataSvc #################### +from Configurables import k4DataSvc +podioevent = k4DataSvc("EventDataSvc", input="Rec_TDR_o1_v01.root") +########################################## + +########## CEPCSWData ################# +cepcswdatatop ="/cvmfs/cepcsw.ihep.ac.cn/prototype/releases/data/latest" +####################################### + + +########## Podio Input ################### +from Configurables import PodioInput +inp = PodioInput("InputReader") +inp.collections = [ "CyberPFO", "CyberPFOPID", "MCParticle" ] +########################################## + + + +from Configurables import GenMatch +genmatch = GenMatch("GenMatch") +genmatch.InputPFOs = "CyberPFOPID" +genmatch.nJets = 2 +genmatch.R = 0.6 +genmatch.OutputFile = "Jets_TDR_o1_v01.root" +#genmatch.OutputFile = "./FullSim_samples/RecJets_TDR_o1_v01_E240_nnh_gg_CalHits.root" + +############################################################################## +# POD I/O +############################################################################## + + +######################################## + +from Configurables import ApplicationMgr +mgr = ApplicationMgr() +mgr.TopAlg=[inp, genmatch ] +mgr.EvtSel="NONE" +mgr.EvtMax=10 +mgr.ExtSvc=[podioevent] +#mgr.OutputLevel=DEBUG diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/calodigi.py b/Detector/DetCRD/scripts/TDR_o1_v01/calodigi.py index b90d25ae67adfccf5589f6ba4d0a5808adff96d1..545831b7c311ab3243095bae5bc88c264fefcc29 100644 --- a/Detector/DetCRD/scripts/TDR_o1_v01/calodigi.py +++ b/Detector/DetCRD/scripts/TDR_o1_v01/calodigi.py @@ -3,7 +3,7 @@ import os from Gaudi.Configuration import * from Configurables import k4DataSvc -dsvc = k4DataSvc("EventDataSvc", input="rec_v01.root") +dsvc = k4DataSvc("EventDataSvc", input="Sim_TDR_o1_v01.root") from Configurables import RndmGenSvc, HepRndm__Engine_CLHEP__RanluxEngine_ seed = [12340] @@ -48,12 +48,12 @@ from Configurables import PodioInput podioinput = PodioInput("PodioReader", collections=[ # "EventHeader", "MCParticle", - "EcalBarrelCollection", + "EcalBarrelCollection", "EcalBarrelContributionCollection", "EcalEndcapsCollection", - "EcalEndcapsContributionCollection", - "HcalBarrelCollection", - "HcalBarrelContributionCollection", + "EcalEndcapsContributionCollection", + "HcalBarrelCollection", + "HcalBarrelContributionCollection", "HcalEndcapsCollection", "HcalEndcapsContributionCollection" ]) @@ -72,13 +72,13 @@ EcalDigi.SkipEvt = 0 EcalDigi.Seed = 2079 #Digitalization parameters EcalDigi.TimeResolution = 0.7 # 0.7 ns -EcalDigi.EcalMIPEnergy = 8.9 # MIP energy 8.9 MeV for 1 cm BGO +EcalDigi.EcalMIPEnergy = 13.35 # MIP energy 13.35 MeV for 1.5 cm BGO EcalDigi.EcalMIP_Thre = 0.05 # 0.05 mip at each side, 0.1 mip for one bar EcalDigi.UseRealisticDigi = 1 # scintillation EcalDigi.UseDigiScint = 1 EcalDigi.EcalCryIntLY = 8200 #intrinsic LY 8200 [p.e./MIP] -EcalDigi.EcalCryMipLY = 200 #Detected effective LY 200 [p.e./MIP] +EcalDigi.EcalCryMipLY = 300 #Detected effective LY 300 [p.e./MIP] EcalDigi.AttenuationLength = 1e8 # 8000 mm for 5% non-uniformity # SiPM EcalDigi.SiPMDigiVerbose = 2 # 0:w/o response, w/o correction; 1:w/ response, w/o correction; 2:w/ response, w/ simple correction; 3:w/ response, w/ full correction @@ -86,14 +86,18 @@ EcalDigi.EcalSiPMPDE = 0.25 # NDL-EQR06, PDE 0.25 EcalDigi.EcalSiPMDCR = 0 # NDL-EQR06, dark count rate 2500000 [Hz] EcalDigi.EcalTimeInterval = 0. # Time interval 0.000002 [s]. DCR*TimeInterval = dark count noise EcalDigi.EcalSiPMCT = 0. # SiPM crosstalk Probability 12% -EcalDigi.EcalSiPMGainMean = 50 # 50 [ADC/p.e.] +EcalDigi.EcalSiPMGainMean = 5 # 5 [ADC/p.e.] EcalDigi.EcalSiPMGainSigma = 0.08 # 0.08 +#EcalDigi.EcalSiPMNoiseSigma = 0 # 0 # ADC EcalDigi.ADC = 8192 # 13-bit, 8192 EcalDigi.ADCSwitch = 8000 # 8000 EcalDigi.Pedestal = 50 # Pedestal 50 ADC -EcalDigi.GainRatio_12 = 50 # Gain ratio 50 -EcalDigi.GainRatio_23 = 60 # Gain ratio 60 +EcalDigi.GainRatio_12 = 30 # Gain ratio 30 +EcalDigi.GainRatio_23 = 10 # Gain ratio 10 +EcalDigi.EcalASICNoiseSigma = 4 +EcalDigi.EcalFEENoiseSigma = 5 +EcalDigi.ADCNonLinearity = 0 # ADC non-linearity 0 # temperature control EcalDigi.UseCryTemp = 0 EcalDigi.UseCryTempCor = 0 @@ -103,9 +107,8 @@ EcalDigi.EcalTempGrad = 3./27 # 3./27 = 3K from 0 to 27 layer EcalDigi.EcalBGOTempCoef = -0.0138 # -0.0138 [%/K] EcalDigi.EcalSiPMGainTempCoef = -0.03 # -0.03 [%/K] EcalDigi.EcalSiPMDCRTempCoef = 3.34/80 # 3.34/80 [10^{k*deltaT}] -EcalDigi.WriteNtuple = 0 -EcalDigi.OutFileName = "Digi_ECAL.root" ######################################### +EcalDigi.WriteNtuple = 0 ##HCAL## from Configurables import HcalDigiAlg @@ -146,22 +149,38 @@ HcalDigi.SiPMNoiseSigma = 0 # SiPM noise sigma HcalDigi.Pedestal = 50 # Pedestal 50 ADC HcalDigi.PedestalSigma = 4 # Sigma of electronic noise (4 ADC) HcalDigi.WriteNtuple = 0 -HcalDigi.OutFileName = "Digi_HCAL.root" # output from Configurables import PodioOutput out = PodioOutput("outputalg") -out.filename = "CaloDigi_TDR_o1_v01_00.root" -out.outputCommands = ["keep *"] +out.filename = "CaloDigi_TDR_o1_v01.root" +out.outputCommands = ["drop *", + "keep MCParticle", + "keep VXDCollection", + "keep ITKBarrelCollection", + "keep ITKEndcapCollection", + "keep TPCCollection", + "keep OTKBarrelCollection", + "keep OTKEndcapCollection", + "keep MuonBarrelCollection", + "keep MuonEndcapCollection", + "keep ECALBarrel", + "keep HCALBarrel", + "keep ECALBarrelParticleAssoCol", + "keep HCALBarrelParticleAssoCol", + "keep ECALEndcaps", + "keep HCALEndcaps", + "keep ECALEndcapsParticleAssoCol", + "keep HCALEndcapsParticleAssoCol" ] + # ApplicationMgr from Configurables import ApplicationMgr -mgr = ApplicationMgr( - TopAlg = [podioinput, EcalDigi, HcalDigi, out], - EvtSel = 'NONE', - EvtMax = 5, - ExtSvc = [dsvc, rndmengine, rndmgensvc, geosvc], - HistogramPersistency = 'ROOT', - OutputLevel = ERROR -) +mgr = ApplicationMgr() +mgr.TopAlg = [podioinput, EcalDigi, HcalDigi, out] +mgr.EvtSel = 'NONE' +mgr.EvtMax = 10 +mgr.ExtSvc = [dsvc, rndmengine, rndmgensvc, geosvc] +mgr.HistogramPersistency = 'ROOT' +mgr.OutputLevel = ERROR diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/gen-option.py b/Detector/DetCRD/scripts/TDR_o1_v01/gen-option.py new file mode 100644 index 0000000000000000000000000000000000000000..77ff25c769ab9a7377e04619f4a897e03f9cf277 --- /dev/null +++ b/Detector/DetCRD/scripts/TDR_o1_v01/gen-option.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +############################################################################## +from Configurables import GenAlgo +from Configurables import StdHepRdr +from Configurables import SLCIORdr +from Configurables import HepMCRdr +from Configurables import GenPrinter + +# input +stdheprdr = StdHepRdr("StdHepRdr") +stdheprdr.Input = "/cefs/data/stdhep/CEPC240/higgs/update_from_LiangHao_1M/data/E240.Pnnh_gg.e0.p0.whizard195/nnh_gg.e0.p0.00001.stdhep" + +genalg = GenAlgo("GenAlgo") +genalg.GenTools = ["StdHepRdr"] + +# output +from Configurables import PodioOutput +out = PodioOutput("outputalg") +out.filename = "Sim_TDR_o1_v01.root" +out.outputCommands = ["keep *"] + +# ApplicationMgr +from Configurables import ApplicationMgr +mgr = ApplicationMgr() +mgr.EvtMax = 10 diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/rec.py b/Detector/DetCRD/scripts/TDR_o1_v01/rec.py index 172e8e938d849cdd4745d17470e2bd7c32a99266..782f7286ed9fd79c122c8d550d514b5fb1bf235b 100644 --- a/Detector/DetCRD/scripts/TDR_o1_v01/rec.py +++ b/Detector/DetCRD/scripts/TDR_o1_v01/rec.py @@ -20,7 +20,7 @@ geomsvc.compact = geometry_path ########### k4DataSvc #################### from Configurables import k4DataSvc -podioevent = k4DataSvc("EventDataSvc", input="CaloDigi_TDR_o1_v01_00.root") +podioevent = k4DataSvc("EventDataSvc", input="Tracking_TDR_o1_v01.root") ########################################## ########## CEPCSWData ################# @@ -39,12 +39,12 @@ inp = PodioInput("InputReader") inp.collections = [ "ECALBarrel", "ECALBarrelParticleAssoCol", -# "ECALEndcaps", -# "ECALEndcapsParticleAssoCol", + "ECALEndcaps", + "ECALEndcapsParticleAssoCol", "HCALBarrel", "HCALBarrelParticleAssoCol", -# "HCALEndcaps", -# "HCALEndcapsParticleAssoCol", + "HCALEndcaps", + "HCALEndcapsParticleAssoCol", "MCParticle", "CompleteTracks", "CompleteTracksParticleAssociation", @@ -60,7 +60,7 @@ CyberPFAlg.Seed = 1024 CyberPFAlg.BField = 3. CyberPFAlg.Debug = 0 CyberPFAlg.SkipEvt = 0 -CyberPFAlg.WriteAna = 1 +CyberPFAlg.WriteAna = 0 CyberPFAlg.AnaFileName = "RecAnaTuple_TDR_o1_v01.root" CyberPFAlg.UseMCPTrack = 0 CyberPFAlg.UseTruthMatchTrack = 0 @@ -75,18 +75,12 @@ CyberPFAlg.HcalNeutralCalib = 4.0 CyberPFAlg.MCParticleCollection = "MCParticle" CyberPFAlg.TrackCollections = ["CompleteTracks"] CyberPFAlg.MCRecoTrackParticleAssociationCollection = "CompleteTracksParticleAssociation" -#CyberPFAlg.ECalCaloHitCollections = ["ECALBarrel","ECALEndcaps"] -#CyberPFAlg.ECalReadOutNames = ["EcalBarrelCollection","EcalEndcapsCollection"] -#CyberPFAlg.ECalMCPAssociationName = ["ECALBarrelParticleAssoCol", "ECALEndcapsParticleAssoCol"] -#CyberPFAlg.HCalCaloHitCollections = ["HCALBarrel", "HCALEndcaps"] -#CyberPFAlg.HCalReadOutNames = ["HcalBarrelCollection", "HcalEndcapsCollection"] -#CyberPFAlg.HCalMCPAssociationName = ["HCALBarrelParticleAssoCol", "HCALEndcapsParticleAssoCol"] -CyberPFAlg.ECalCaloHitCollections = ["ECALBarrel"] -CyberPFAlg.ECalReadOutNames = ["EcalBarrelCollection"] -CyberPFAlg.ECalMCPAssociationName = ["ECALBarrelParticleAssoCol"] -CyberPFAlg.HCalCaloHitCollections = ["HCALBarrel"] -CyberPFAlg.HCalReadOutNames = ["HcalBarrelCollection"] -CyberPFAlg.HCalMCPAssociationName = ["HCALBarrelParticleAssoCol"] +CyberPFAlg.ECalCaloHitCollections = ["ECALBarrel","ECALEndcaps"] +CyberPFAlg.ECalReadOutNames = ["EcalBarrelCollection","EcalEndcapsCollection"] +CyberPFAlg.ECalMCPAssociationName = ["ECALBarrelParticleAssoCol", "ECALEndcapsParticleAssoCol"] +CyberPFAlg.HCalCaloHitCollections = ["HCALBarrel", "HCALEndcaps"] +CyberPFAlg.HCalReadOutNames = ["HcalBarrelCollection", "HcalEndcapsCollection"] +CyberPFAlg.HCalMCPAssociationName = ["HCALBarrelParticleAssoCol", "HCALEndcapsParticleAssoCol"] ##--- Output collections --- CyberPFAlg.OutputPFO = "outputPFO"; @@ -113,8 +107,8 @@ CyberPFAlg.AlgParNames = [ ["InputECALBars","OutputECAL1DClusters","OutputECALHa ["OutputAxisName"], #6 ["ReadinAxisName", "OutputClusName", "OutputTowerName"], #9 ["ReadinHFClusterName", "ReadinTowerName","OutputClusterName"], #11 - ["InputHCALHits", "OutputHCALClusters"], #12 - ["DoECALClustering","DoHCALClustering","InputHCALHits","OutputHCALClusters"], #15 + ["OutputHCALClusters"], #12 + ["DoECALClustering","DoHCALClustering","OutputHCALClusters"], #15 ["ReadinECALClusterName", "ReadinHCALClusterName", "OutputCombPFO"], #16 ["ECALChargedCalib", "HCALChargedCalib", "ECALNeutralCalib", "HCALNeutralCalib"] ]#17 CyberPFAlg.AlgParTypes = [ ["string","string","string"],#1 @@ -125,8 +119,8 @@ CyberPFAlg.AlgParTypes = [ ["string","string","string"],#1 ["string"], #6 ["string","string","string"], #9 ["string","string","string"], #11 - ["string", "string"], #12 - ["bool","bool","string","string"], #15 + ["string"], #12 + ["bool","bool","string"], #15 ["string","string","string"], #16 ["double","double", "double","double"] ]#17 CyberPFAlg.AlgParValues = [ ["BarCol","Cluster1DCol","HalfClusterCol"],#1 @@ -137,8 +131,8 @@ CyberPFAlg.AlgParValues = [ ["BarCol","Cluster1DCol","HalfClusterCol"],#1 ["MergedAxis"], #6 ["MergedAxis","ESHalfCluster","ESTower"], #9 ["ESHalfCluster","ESTower","EcalCluster"], #11 - ["HCALBarrel", "SimpleHCALCluster"], #12 - ["0","1","HCALBarrel","HCALCluster"], #15 + ["SimpleHCALCluster"], #12 + ["0","1","HCALCluster"], #15 ["EcalCluster", "SimpleHCALCluster", "outputPFO"], #16 ["1.26","4.", "1.", "4."] ]#17 @@ -146,28 +140,21 @@ from Configurables import FinalPIDAlg pid = FinalPIDAlg("FinalPIDAlg") pid.OutputPFOName = "CyberPFOPID" - -from Configurables import GenMatch -genmatch = GenMatch("GenMatch") -genmatch.nJets = 2 -genmatch.R = 0.6 -genmatch.OutputFile = "Jets_TDR_o1_v01.root" - ############################################################################## # POD I/O ############################################################################## from Configurables import PodioOutput out = PodioOutput("outputalg") -out.filename = "Rec_TDR_o1_v01_00.root" +out.filename = "Rec_TDR_o1_v01.root" out.outputCommands = ["keep *"] + ######################################## from Configurables import ApplicationMgr -ApplicationMgr( - TopAlg=[inp, CyberPFAlg, pid, out ], - EvtSel="NONE", - EvtMax=5, - ExtSvc=[podioevent, geomsvc], - #OutputLevel=DEBUG -) +mgr = ApplicationMgr() +mgr.TopAlg=[inp, CyberPFAlg, pid, out ] +mgr.EvtSel="NONE" +mgr.EvtMax=10 +mgr.ExtSvc=[podioevent, geomsvc] +#mgr.OutputLevel=DEBUG diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/sim.py b/Detector/DetCRD/scripts/TDR_o1_v01/sim.py index fa0e1eadfdff61dff65657f4ff9718898cba56b0..c61925ded13dc4a402d63ee8f4a5f638b70ebd61 100644 --- a/Detector/DetCRD/scripts/TDR_o1_v01/sim.py +++ b/Detector/DetCRD/scripts/TDR_o1_v01/sim.py @@ -33,14 +33,9 @@ from Configurables import DetGeomSvc geosvc = DetGeomSvc("GeomSvc") geosvc.compact = geometry_path -############################################################################## -# Physics Generator -############################################################################## +# Genrator 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") @@ -112,11 +107,10 @@ out.outputCommands = ["keep *"] # ApplicationMgr from Configurables import ApplicationMgr -mgr = ApplicationMgr( - TopAlg = [genalg, detsimalg, out], - EvtSel = 'NONE', - EvtMax = 50, - ExtSvc = [rndmengine, rndmgensvc, dsvc, geosvc], - HistogramPersistency = 'ROOT', - OutputLevel = ERROR -) +mgr = ApplicationMgr() +mgr.TopAlg = [genalg, detsimalg, out] +mgr.EvtSel = 'NONE' +mgr.EvtMax = 50 +mgr.ExtSvc = [rndmengine, rndmgensvc, dsvc, geosvc] +mgr.HistogramPersistency = 'ROOT' +mgr.OutputLevel = ERROR diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/tracking-io-option.py b/Detector/DetCRD/scripts/TDR_o1_v01/tracking-io-option.py new file mode 100644 index 0000000000000000000000000000000000000000..b6df6ba721608fcb13859af0c7a8fdc0aa846c05 --- /dev/null +++ b/Detector/DetCRD/scripts/TDR_o1_v01/tracking-io-option.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# input +from Configurables import k4DataSvc +dsvc = k4DataSvc("EventDataSvc") +dsvc.input = "CaloDigi_TDR_o1_v01.root" + +# output +from Configurables import PodioOutput +out = PodioOutput("outputalg") +out.filename = "Tracking_TDR_o1_v01.root" +out.outputCommands = ["keep *"] + +# ApplicationMgr +from Configurables import ApplicationMgr +mgr = ApplicationMgr() +mgr.EvtMax = 10 diff --git a/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py b/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py index 9430d6943d43ed2cd155412d3ef29d05ef4faaa7..fdfc6dca03f073c0623103c60897fe8304dd8f96 100644 --- a/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py +++ b/Detector/DetCRD/scripts/TDR_o1_v01/tracking.py @@ -315,11 +315,10 @@ out.outputCommands = ["keep *"] # ApplicationMgr from Configurables import ApplicationMgr -mgr = ApplicationMgr( - TopAlg = [podioinput, digiVXD, digiITKB, digiITKE, digiOTKB, digiOTKE, digiTPC, digiMuon, tracking, clupatra, full, tpr, tpc_dndx, tof, tmt, out], - EvtSel = 'NONE', - EvtMax = 50, - ExtSvc = [rndmengine, rndmgensvc, dsvc, evtseeder, geosvc, gearsvc, tracksystemsvc, pidsvc], - HistogramPersistency = 'ROOT', - OutputLevel = ERROR -) +mgr = ApplicationMgr() +mgr.TopAlg = [podioinput, digiVXD, digiITKB, digiITKE, digiOTKB, digiOTKE, digiTPC, digiMuon, tracking, clupatra, full, tpr, tpc_dndx, tof, tmt, out] +mgr.EvtSel = 'NONE' +mgr.EvtMax = 50 +mgr.ExtSvc = [rndmengine, rndmgensvc, dsvc, evtseeder, geosvc, gearsvc, tracksystemsvc, pidsvc] +mgr.HistogramPersistency = 'ROOT' +mgr.OutputLevel = ERROR