diff --git a/CLDConfig/CLDReconstruction.py b/CLDConfig/CLDReconstruction.py index b82f84a..297b780 100644 --- a/CLDConfig/CLDReconstruction.py +++ b/CLDConfig/CLDReconstruction.py @@ -17,7 +17,7 @@ # limitations under the License. # import os -from Gaudi.Configuration import INFO, WARNING, DEBUG +from Gaudi.Configuration import INFO, WARNING, INFO from Configurables import k4DataSvc, MarlinProcessorWrapper from k4MarlinWrapper.inputReader import create_reader, attach_edm4hep2lcio_conversion @@ -468,7 +468,7 @@ JetClusteringAndRefiner.OutputLevel = WARNING JetClusteringAndRefiner.ProcessorType = "LcfiplusProcessor" JetClusteringAndRefiner.Parameters = { - "Algorithms": ["JetClustering", "JetVertexRefiner"], + "Algorithms": ["JetClustering"], "JetClustering.AlphaParameter": ["1.0"], "JetClustering.BetaParameter": ["1.0"], "JetClustering.GammaParameter": ["1.0"], @@ -1097,7 +1097,7 @@ "DropCollectionNames": [], "DropCollectionTypes": ["MCParticle", "LCRelation", "SimCalorimeterHit", "CalorimeterHit", "SimTrackerHit", "TrackerHit", "TrackerHitPlane", "Track", "ReconstructedParticle", "LCFloatVec"], "FullSubsetCollections": ["EfficientMCParticles", "InefficientMCParticles", "MCPhysicsParticles"], - "KeepCollectionNames": ["MCParticlesSkimmed", "MCPhysicsParticles", "RecoMCTruthLink", "SiTracks", "SiTracks_Refitted", "PandoraClusters", "PandoraPFOs", "SelectedPandoraPFOs", "LooseSelectedPandoraPFOs", "TightSelectedPandoraPFOs", "RefinedVertexJets", "RefinedVertexJets_rel", "RefinedVertexJets_vtx", "RefinedVertexJets_vtx_RP", "BuildUpVertices", "BuildUpVertices_res", "BuildUpVertices_RP", "BuildUpVertices_res_RP", "BuildUpVertices_V0", "BuildUpVertices_V0_res", "BuildUpVertices_V0_RP", "BuildUpVertices_V0_res_RP", "PrimaryVertices", "PrimaryVertices_res", "PrimaryVertices_RP", "PrimaryVertices_res_RP", "RefinedVertices", "RefinedVertices_RP"], + "KeepCollectionNames": ["MCParticlesSkimmed", "MCPhysicsParticles", "RecoMCTruthLink", "SiTracks", "SiTracks_Refitted", "PandoraClusters", "PandoraPFOs", "SelectedPandoraPFOs", "LooseSelectedPandoraPFOs", "TightSelectedPandoraPFOs", "BuildUpVertices", "BuildUpVertices_res", "BuildUpVertices_RP", "BuildUpVertices_res_RP", "BuildUpVertices_V0", "BuildUpVertices_V0_res", "BuildUpVertices_V0_RP", "BuildUpVertices_V0_res_RP", "PrimaryVertices", "PrimaryVertices_res", "PrimaryVertices_RP", "PrimaryVertices_res_RP", "RefinedVertices", "RefinedVertices_RP"], "LCIOOutputFile": [f"{reco_args.outputBasename}_DST.slcio"], "LCIOWriteMode": ["WRITE_NEW"] } @@ -1111,13 +1111,15 @@ lcioConvTool.collNameMapping = { "MCParticle": "MCParticles" } - lcioConvTool.OutputLevel = DEBUG + lcioConvTool.OutputLevel = INFO # attach to the last non output processor EventNumber.Lcio2EDM4hepTool = lcioConvTool from Configurables import PodioOutput out = PodioOutput("PodioOutput", filename = f"{reco_args.outputBasename}_edm4hep.root") - out.outputCommands = ["keep *"] + out.outputCommands = [ + "keep *", + ] algList.append(out) # We need to convert the inputs in case we have EDM4hep input diff --git a/CLDConfig/CLDReconstruction.xml b/CLDConfig/CLDReconstruction.xml index 65272cc..ccb43c6 100644 --- a/CLDConfig/CLDReconstruction.xml +++ b/CLDConfig/CLDReconstruction.xml @@ -1474,16 +1474,6 @@ MCPhysicsParticles - MCParticle - LCRelation - SimCalorimeterHit - CalorimeterHit - SimTrackerHit - TrackerHit - TrackerHitPlane - Track - ReconstructedParticle - LCFloatVec MCParticlesSkimmed diff --git a/CLDConfig/p8_ee_tt_dilep_ecm365.cmd b/CLDConfig/p8_ee_tt_dilep_ecm365.cmd new file mode 100644 index 0000000..a45ca30 --- /dev/null +++ b/CLDConfig/p8_ee_tt_dilep_ecm365.cmd @@ -0,0 +1,44 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : tt at 365 GeV +Beams:eCM = 365 ! CM energy of collision +Top:ffbar2ttbar(s:gmZ) = on + +! Control W decay modes +24:onMode = off +24:onIfMatch = 11 -12 ! W+ → e⁺ νₑ +24:onIfMatch = 13 -14 ! W+ → μ⁺ ν_μ +! 24:onIfAny = 1 2 3 4 ! W→qq + +-24:onMode = off +-24:onIfMatch = -11 12 ! W− → e⁻ anti-νₑ +-24:onIfMatch = -13 14 ! W− → μ⁻ anti-ν_μ +! -24:onIfAny = 1 2 3 4 ! W→qq + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/p8_ee_tt_ecm240.cmd b/CLDConfig/p8_ee_tt_ecm240.cmd new file mode 100644 index 0000000..f146992 --- /dev/null +++ b/CLDConfig/p8_ee_tt_ecm240.cmd @@ -0,0 +1,33 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : tt at 365 GeV +Beams:eCM = 240 ! CM energy of collision +Top:ffbar2ttbar(s:gmZ) = on + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/p8_ee_tt_ecm365.cmd b/CLDConfig/p8_ee_tt_ecm365.cmd new file mode 100644 index 0000000..448739c --- /dev/null +++ b/CLDConfig/p8_ee_tt_ecm365.cmd @@ -0,0 +1,33 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : tt at 365 GeV +Beams:eCM = 365 ! CM energy of collision +Top:ffbar2ttbar(s:gmZ) = on + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/p8_ee_ww_lvqq_ecm365.cmd b/CLDConfig/p8_ee_ww_lvqq_ecm365.cmd new file mode 100644 index 0000000..bfb9727 --- /dev/null +++ b/CLDConfig/p8_ee_ww_lvqq_ecm365.cmd @@ -0,0 +1,47 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : WW at 365 GeV +Beams:eCM = 365 ! CM energy of collision +WeakDoubleBoson:ffbar2gmZgmZ = off +WeakDoubleBoson:ffbar2WW = on +WeakDoubleBoson:ffbar2ZW = off + +! Control W decay modes +! => W → (mu,nu) or (udsc) +| W-> muv = 0.1, W->qq = 0.67 +! 0.2% muvmuv, 23% muvqq, 76% qqqq +24:onMode = off +24:onIfMatch = 13 -14 ! W -> mu+ nu_mu (and charge-conjugate) +24:onIfAny = 1 2 3 4 ! W -> qq′ (u,d,s,c) + +-24:onMode = off +-24:onIfMatch = -13 14 ! W− → μ⁻ anti-ν_μ +-24:onIfAny = 1 2 3 4 ! W→qq + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/p8_ee_zh_vvbb_ecm365.cmd b/CLDConfig/p8_ee_zh_vvbb_ecm365.cmd new file mode 100644 index 0000000..bc3528a --- /dev/null +++ b/CLDConfig/p8_ee_zh_vvbb_ecm365.cmd @@ -0,0 +1,44 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : ZH at 365 GeV (not the Higgs factory of 240 GeV) +Beams:eCM = 365 ! CM energy of collision +HiggsSM:ffbar2HZ = on +HiggsSM:gg2H = off +HiggsSM:ffbar2H = off + +! Control Z decay modes +23:onMode = off +23:onIfAny = 12 14 16 ! Z->vv + +! Control H decay modes +25:onMode = off +25:onIfMatch = 5 -5 ! H->bb +25:onIfMatch = 4 -4 ! H->cc + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/p8_ee_zz_vvqq_ecm365.cmd b/CLDConfig/p8_ee_zz_vvqq_ecm365.cmd new file mode 100644 index 0000000..c26dc07 --- /dev/null +++ b/CLDConfig/p8_ee_zz_vvqq_ecm365.cmd @@ -0,0 +1,43 @@ +Random:setSeed = on +Main:numberOfEvents = 1000 ! number of events to generate +Main:timesAllowErrors = 5 ! how many aborts before run stops + +! 2) Settings related to output in init(), next() and stat(). +Init:showChangedSettings = on ! list changed settings +Init:showChangedParticleData = off ! list changed particle data +Next:numberCount = 100 ! print message every n events +Next:numberShowInfo = 1 ! print event information n times +Next:numberShowProcess = 1 ! print process record n times +Next:numberShowEvent = 0 ! print event record n times + +Beams:idA = 11 ! first beam, e+ = 11 +Beams:idB = -11 ! second beam, e- = -11 + +Beams:allowMomentumSpread = off + +! Vertex smearing : +Beams:allowVertexSpread = on +Beams:sigmaVertexX = 27.3e-3 +Beams:sigmaVertexY = 48.8E-6 +Beams:sigmaVertexZ = 1.33 +Beams:sigmaTime = 1.94 ! 6.46 ps + + +! 3) Hard process : ZZ at 365 GeV +Beams:eCM = 365 ! CM energy of collision +WeakDoubleBoson:ffbar2gmZgmZ = on +WeakDoubleBoson:ffbar2WW = off +WeakDoubleBoson:ffbar2ZW = off + +! Control Z decay modes +! => Z → (u,d,s,c,b) or (v_e,v_mu,v_tau) will get qq+qq, qq+vv, vv+vv +! Z->qq = 0.7, Z->vv = 0.2 +! 35% vvqq, 5% vvvv, 60% qqqq +23:onMode = off +23:onIfAny = 1 2 3 4 5 12 14 16 + + +! 4) Settings for the event generation process in the Pythia8 library. +PartonLevel:ISR = on ! no initial-state radiation +PartonLevel:FSR = on ! no final-state radiation + diff --git a/CLDConfig/pythia.py b/CLDConfig/pythia.py new file mode 100644 index 0000000..b54e4d7 --- /dev/null +++ b/CLDConfig/pythia.py @@ -0,0 +1,73 @@ +""" +Pythia8, integrated in the FCCSW framework. + +Generates according to a pythia .cmd file and saves them in fcc edm format. + +""" + +import os +from GaudiKernel import SystemOfUnits as units +from Gaudi.Configuration import * + +from Configurables import ApplicationMgr +ApplicationMgr().EvtSel = 'NONE' +ApplicationMgr().EvtMax = 1000 +ApplicationMgr().OutputLevel = INFO +ApplicationMgr().ExtSvc +=["RndmGenSvc"] + +#### Data service +from Configurables import k4DataSvc +podioevent = k4DataSvc("EventDataSvc") +ApplicationMgr().ExtSvc += [podioevent] + +from Configurables import GaussSmearVertex +smeartool = GaussSmearVertex() +smeartool.xVertexSigma = 0.5*units.mm +smeartool.yVertexSigma = 0.5*units.mm +smeartool.zVertexSigma = 40.0*units.mm +smeartool.tVertexSigma = 180.0*units.picosecond + +from Configurables import PythiaInterface +pythia8gentool = PythiaInterface() +### Example of pythia configuration file to generate events +# take from $K4GEN if defined, locally if not +pythia8gentool.pythiacard = "p8_ee_Z_Ztautau_ecm125.cmd" +pythia8gentool.doEvtGenDecays = False +pythia8gentool.printPythiaStatistics = True + +from Configurables import GenAlg +pythia8gen = GenAlg("Pythia8") +pythia8gen.SignalProvider = pythia8gentool +pythia8gen.VertexSmearingTool = smeartool +pythia8gen.hepmc.Path = "hepmc" +ApplicationMgr().TopAlg += [pythia8gen] + +### Reads an HepMC::GenEvent from the data service and writes a collection of EDM Particles +from Configurables import HepMCToEDMConverter +hepmc_converter = HepMCToEDMConverter() +ApplicationMgr().TopAlg += [hepmc_converter] + +### Filters generated particles +# accept is a list of particle statuses that should be accepted +from Configurables import GenParticleFilter +genfilter = GenParticleFilter("StableParticles") +genfilter.accept = [1] +genfilter.GenParticles.Path = "GenParticles" +genfilter.GenParticlesFiltered.Path = "GenParticlesStable" +ApplicationMgr().TopAlg += [genfilter] + +from Configurables import EDMToHepMCConverter +edm_converter = EDMToHepMCConverter("BackConverter") +edm_converter.GenParticles.Path="GenParticleStable" + +from Configurables import HepMCFileWriter +dumper = HepMCFileWriter("Dumper") +dumper.hepmc.Path = "hepmc" +ApplicationMgr().TopAlg += [dumper] + +#from Configurables import PodioOutput +#out = PodioOutput("out") +#out.filename = "out_pythia.root" +#out.outputCommands = ["keep *"] + +