diff --git a/benchmarks/clustering/options/full_cal_reco.py b/benchmarks/clustering/options/full_cal_reco.py index cd983a4bf9fb488552b620907a63d959974844de..24ef7bbe35411f49b9fe23463d00e2cfbf1f7da6 100644 --- a/benchmarks/clustering/options/full_cal_reco.py +++ b/benchmarks/clustering/options/full_cal_reco.py @@ -40,7 +40,6 @@ podioevent = EICDataSvc("EventDataSvc", inputs=input_sims) # juggler components -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__CalorimeterHitReco as CalHitReco from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger @@ -67,8 +66,6 @@ sim_coll = [ # input and output podin = PodioInput("PodioReader", collections=sim_coll) podout = PodioOutput("out", filename=output_rec) -# copier needed to get around input --> output copy bug. So truth (mcparticles) can be saved in output file -copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2") # Crystal Endcap Ecal @@ -367,14 +364,14 @@ ce_hcal_clreco = RecoCoG("ce_hcal_clreco", podout.outputCommands = ['drop *', - 'keep mcparticles2', + 'keep mcparticles', 'keep *Digi', 'keep *Reco*', 'keep *Cluster*', 'keep *Layers'] ApplicationMgr( - TopAlg = [podin, copier, + TopAlg = [podin, ce_ecal_digi, ce_ecal_reco, ce_ecal_cl, ce_ecal_clreco, ci_ecal_digi, ci_ecal_reco, ci_ecal_merger, ci_ecal_cl, ci_ecal_clreco, cb_ecal_digi, cb_ecal_reco, cb_ecal_cl, cb_ecal_clreco, diff --git a/benchmarks/clustering/scripts/deprecated/barrel_clusters.cxx b/benchmarks/clustering/scripts/deprecated/barrel_clusters.cxx index 8968d48d635e042b5ba76b8e1871a74167c8e956..5720c7ea3fa19f07154a41e325bd508c368e645e 100644 --- a/benchmarks/clustering/scripts/deprecated/barrel_clusters.cxx +++ b/benchmarks/clustering/scripts/deprecated/barrel_clusters.cxx @@ -91,8 +91,8 @@ int barrel_clusters(const char* in_fname = "topside/rec_barrel_clusters.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", in_fname); - auto d0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto d0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("thrownEta", eta, {"thrownParticles"}) .Define("thrownTheta", theta, {"thrownP"}) diff --git a/benchmarks/ecal/options/barrel.py b/benchmarks/ecal/options/barrel.py index 58b7bef2651dd2b20e026f63271415323160a72a..1919fbf045a3012995163a88ff54f4405f27729b 100644 --- a/benchmarks/ecal/options/barrel.py +++ b/benchmarks/ecal/options/barrel.py @@ -31,7 +31,6 @@ podioevent = EICDataSvc("EventDataSvc", inputs=input_sims) # juggler components -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__ImagingPixelReco as ImCalPixelReco from Configurables import Jug__Reco__ImagingTopoCluster as ImagingCluster @@ -46,8 +45,6 @@ sim_coll = [ # input and output podin = PodioInput("PodioReader", collections=sim_coll) podout = PodioOutput("out", filename=output_rec) -# copier needed to get around input --> output copy bug. So truth (mcparticles) can be saved in output file -copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2") # Central Barrel Ecal (Imaging Cal.) @@ -89,13 +86,13 @@ cb_ecal_clreco = ImagingClusterReco("cb_ecal_clreco", mcHits="EcalBarrelHits") podout.outputCommands = ['drop *', - 'keep mcparticles2', + 'keep mcparticles', 'keep *HitsReco', 'keep *HitsDigi', 'keep *Cluster*'] ApplicationMgr( - TopAlg = [podin, copier, + TopAlg = [podin, cb_ecal_digi, cb_ecal_reco, cb_ecal_cl, cb_ecal_clreco, podout], EvtSel = 'NONE', diff --git a/benchmarks/ecal/options/endcap_e.py b/benchmarks/ecal/options/endcap_e.py index 5a29973b57f85970a8b6eef33dd1a6a1cce1ccc9..9eb12ffe8f34848c95a17a8e6bce8354ca014ab8 100644 --- a/benchmarks/ecal/options/endcap_e.py +++ b/benchmarks/ecal/options/endcap_e.py @@ -24,7 +24,6 @@ podioevent = EICDataSvc("EventDataSvc", inputs=input_sims) # juggler components -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__CalorimeterHitReco as CalHitReco from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster @@ -39,8 +38,6 @@ sim_coll = [ # input and output podin = PodioInput("PodioReader", collections=sim_coll) podout = PodioOutput("out", filename=output_rec) -# copier needed to get around input --> output copy bug. So truth (mcparticles) can be saved in output file -copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2") # Crystal Endcap Ecal @@ -83,13 +80,13 @@ ce_ecal_clreco = RecoCoG("ce_ecal_clreco", logWeightBase=4.6) podout.outputCommands = ['drop *', - 'keep mcparticles2', + 'keep mcparticles', 'keep *HitsReco', 'keep *HitsDigi', 'keep *Cluster*'] ApplicationMgr( - TopAlg = [podin, copier, + TopAlg = [podin, ce_ecal_digi, ce_ecal_reco, ce_ecal_cl, ce_ecal_clreco, podout], EvtSel = 'NONE', diff --git a/benchmarks/ecal/options/endcap_i.py b/benchmarks/ecal/options/endcap_i.py index 1a7fd34280ae30c6bccd98486423eac426087069..aaa00dc7145735456441e98dc29e0a0b762b67c1 100644 --- a/benchmarks/ecal/options/endcap_i.py +++ b/benchmarks/ecal/options/endcap_i.py @@ -26,7 +26,6 @@ podioevent = EICDataSvc("EventDataSvc", inputs=input_sims) # juggler components -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__CalorimeterHitReco as CalHitReco from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger @@ -42,8 +41,6 @@ sim_coll = [ # input and output podin = PodioInput("PodioReader", collections=sim_coll) podout = PodioOutput("out", filename=output_rec) -# copier needed to get around input --> output copy bug. So truth (mcparticles) can be saved in output file -copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2") # Endcap sampling Ecal @@ -92,13 +89,13 @@ ci_ecal_clreco = RecoCoG("ci_ecal_clreco", samplingFraction=ci_ecal_sf) podout.outputCommands = ['drop *', - 'keep mcparticles2', + 'keep mcparticles', 'keep *HitsReco*', 'keep *HitsDigi', 'keep *Cluster*'] ApplicationMgr( - TopAlg = [podin, copier, + TopAlg = [podin, ci_ecal_digi, ci_ecal_reco, ci_ecal_merger, ci_ecal_cl, ci_ecal_clreco, podout], EvtSel = 'NONE', diff --git a/benchmarks/far_forward/analysis/rec_far_forward_protons.cxx b/benchmarks/far_forward/analysis/rec_far_forward_protons.cxx index a12c2d4059d87213d4ae8ca2f79b61d15e872041..9e0ae6b8c8dfdcd7e4cfde904fd5ea21c9219fd6 100644 --- a/benchmarks/far_forward/analysis/rec_far_forward_protons.cxx +++ b/benchmarks/far_forward/analysis/rec_far_forward_protons.cxx @@ -86,8 +86,8 @@ int rec_far_forward_protons(const char* fname = "topside/rec_far_forward_protons ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/far_forward/options/far_forward_reconstruction.py b/benchmarks/far_forward/options/far_forward_reconstruction.py index 0a28e70b8e5d8dcd500a7c3b33c8aa7f0e130c3b..7145ae962adcaeab3301bd84b21a445593f4774c 100644 --- a/benchmarks/far_forward/options/far_forward_reconstruction.py +++ b/benchmarks/far_forward/options/far_forward_reconstruction.py @@ -26,7 +26,6 @@ from Configurables import Jug__Reco__FarForwardParticles as FarForwardParticles from Configurables import Jug__Reco__TrackFindingAlgorithm as TrackFindingAlgorithm from Configurables import Jug__Reco__ParticlesFromTrackFit as ParticlesFromTrackFit -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Reco__TrackerHitReconstruction as TrackerHitReconstruction @@ -44,12 +43,6 @@ algorithms = [] podin = PodioInput("PodioReader", collections=sim_colls) algorithms.append(podin) -## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. -mccopier = MCCopier("MCCopier", - inputCollection="mcparticles", - outputCollection="mcparticles2") -algorithms.append(mccopier) - ## Roman pots ffi_romanpot_digi = TrackerDigi("ffi_romanpot_digi", inputHitCollection = "ForwardRomanPotHits", @@ -134,7 +127,7 @@ podout.outputCommands = [ "drop trajectories", "drop outputSourceLinks", "drop outputInitialTrackParameters", - "drop mcparticles", + "keep mcparticles", ] algorithms.append(podout) diff --git a/benchmarks/imaging_ecal/options/hybrid_cluster.py b/benchmarks/imaging_ecal/options/hybrid_cluster.py index 295be3918b2e918c0c4d62b70dcd60ead41221f1..223b61696e2e457084fc9939b6fe51fbcec8f765 100644 --- a/benchmarks/imaging_ecal/options/hybrid_cluster.py +++ b/benchmarks/imaging_ecal/options/hybrid_cluster.py @@ -6,7 +6,6 @@ from GaudiKernel.SystemOfUnits import MeV, mm, cm, mrad, rad, ns from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__CalorimeterHitReco as CalHitReco from Configurables import Jug__Reco__CalorimeterHitsMerger as CalHitsMerger @@ -50,11 +49,6 @@ sim_colls = [ podin = PodioInput('PodioReader', collections=sim_colls, OutputLevel=DEBUG) podout = PodioOutput('podout', filename=kwargs['output']) -mccopier = MCCopier('MCCopier', - # OutputLevel=DEBUG, - inputCollection='mcparticles', - outputCollection='mcparticles2') - # use the same daq_setting for digi/reco pair imcaldaq = dict( dynamicRangeADC=3*MeV, @@ -145,7 +139,7 @@ scfi_barrel_clreco = RecoCoG("scfi_barrel_clreco", # TODO: merge two types of clusters podout.outputCommands = ['drop *', - 'keep mcparticles2', + 'keep mcparticles', 'keep *Reco*', 'keep *Digi*', 'keep *Cluster*', @@ -153,7 +147,7 @@ podout.outputCommands = ['drop *', ] ApplicationMgr( - TopAlg=[podin, mccopier, + TopAlg=[podin, imcaldigi, imcalreco, imcalcluster, clusterreco, scfi_barrel_digi, scfi_barrel_reco, scfi_barrel_merger, scfi_barrel_cl, scfi_barrel_clreco, podout], diff --git a/benchmarks/imaging_ecal/options/imaging_2dcluster.py b/benchmarks/imaging_ecal/options/imaging_2dcluster.py index 9374a8f70bcbbde9b56f4dcee406186b4adb3571..b4ac4a6d8c336f4b92c8b81aab7aac2f590699d1 100644 --- a/benchmarks/imaging_ecal/options/imaging_2dcluster.py +++ b/benchmarks/imaging_ecal/options/imaging_2dcluster.py @@ -6,7 +6,6 @@ from GaudiKernel.SystemOfUnits import mm, MeV, rad, ns from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalHitDigi from Configurables import Jug__Reco__CalorimeterHitReco as CalHitReco from Configurables import Jug__Reco__CalorimeterHitsEtaPhiProjector as CalHitsProj @@ -39,11 +38,6 @@ podin = PodioInput('PodioReader', collections=['mcparticles', 'EcalBarrelHits'], podout = PodioOutput('out', filename=kwargs['output']) -mccopier = MCCopier('MCCopier', - # OutputLevel=DEBUG, - inputCollection='mcparticles', - outputCollection='mcparticles2') - # use the same daq_setting for digi/reco pair imcal_barrel_daq = dict( dynamicRangeADC=3.*MeV, @@ -93,7 +87,7 @@ imcal_barrel_clreco = RecoCoG('imcal_barrel_clreco', podout.outputCommands = ['keep *'] ApplicationMgr( - TopAlg=[podin, mccopier, + TopAlg=[podin, imcal_barrel_digi, imcal_barrel_reco, imcal_barrel_merger, imcal_barrel_cl, imcal_barrel_clreco, podout], diff --git a/benchmarks/imaging_ecal/options/imaging_topocluster.py b/benchmarks/imaging_ecal/options/imaging_topocluster.py index a42c3a107217db50b312afb721c07192d37fd404..fe243a1876a053d184ee0f3685a2d29bacff59ee 100644 --- a/benchmarks/imaging_ecal/options/imaging_topocluster.py +++ b/benchmarks/imaging_ecal/options/imaging_topocluster.py @@ -7,8 +7,6 @@ from GaudiKernel import SystemOfUnits as units from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier -from Configurables import Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_ as CalCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalorimeterHitDigi from Configurables import Jug__Reco__ImagingPixelReco as ImagingPixelReco from Configurables import Jug__Reco__ImagingTopoCluster as ImagingTopoCluster @@ -40,15 +38,6 @@ out = PodioOutput("out", filename=kwargs['output']) podioinput = PodioInput("PodioReader", collections=["mcparticles", "EcalBarrelHits"], OutputLevel=DEBUG) -copier = MCCopier("MCCopier", - # OutputLevel=DEBUG, - inputCollection="mcparticles", - outputCollection="mcparticles2") -calcopier = CalCopier("CalCopier", - # OutputLevel=DEBUG, - inputCollection="EcalBarrelHits", - outputCollection="EcalBarrelHits2") - # use the same daq_setting for digi/reco pair daq_setting = dict( dynamicRangeADC=3*units.MeV, @@ -91,7 +80,7 @@ clusterreco = ImagingClusterReco("imcal_clreco", out.outputCommands = ["keep *"] ApplicationMgr( - TopAlg=[podioinput, copier, calcopier, imcaldigi, imcalreco, imcalcluster, clusterreco, out], + TopAlg=[podioinput, imcaldigi, imcalreco, imcalcluster, clusterreco, out], EvtSel='NONE', EvtMax=kwargs['nev'], ExtSvc=[podioevent], diff --git a/benchmarks/imaging_ecal/scripts/draw_cluster.py b/benchmarks/imaging_ecal/scripts/draw_cluster.py index 6dedc2f64ea9eba73f2ae2cbfbb4922c99de372f..6ad5c05a8a4de79cceda1b2ef032fb294188df85 100644 --- a/benchmarks/imaging_ecal/scripts/draw_cluster.py +++ b/benchmarks/imaging_ecal/scripts/draw_cluster.py @@ -148,7 +148,7 @@ if __name__ == '__main__': df['eta'] = -np.log(np.tan(df['theta'].values/1000./2.)) # Read all mc particles - dfallmcp = get_all_mcp(args.file, args.iev, 'mcparticles2') + dfallmcp = get_all_mcp(args.file, args.iev, 'mcparticles') pdgbase = ROOT.TDatabasePDG() # Select decaying particles dftemp = dfallmcp[dfallmcp['g4Parent'] == 1.0] @@ -165,7 +165,7 @@ if __name__ == '__main__': dfdecaymcp['eta'] = -np.log(np.tan(dfdecaymcp['theta'].values/1000./2.)) # truth - dfmcp = get_mcp_simple(args.file, args.iev, 'mcparticles2').iloc[0] + dfmcp = get_mcp_simple(args.file, args.iev, 'mcparticles').iloc[0] #pdgbase = ROOT.TDatabasePDG() inpart = pdgbase.GetParticle(int(dfmcp['pid'])) print("Incoming particle = {}, pdgcode = {}, charge = {}, mass = {}"\ diff --git a/benchmarks/imaging_ecal/scripts/draw_cluster_layers.py b/benchmarks/imaging_ecal/scripts/draw_cluster_layers.py index b0a06b12e799bad55313db031027a38d1c95cf11..89578104ae8408eb77bb74910b584d6a0b32575a 100644 --- a/benchmarks/imaging_ecal/scripts/draw_cluster_layers.py +++ b/benchmarks/imaging_ecal/scripts/draw_cluster_layers.py @@ -98,7 +98,7 @@ if __name__ == '__main__': df['eta'] = -np.log(np.tan(df['theta'].values/1000./2.)) # truth - dfmcp = get_mcp_simple(args.file, args.iev, 'mcparticles2').iloc[0] + dfmcp = get_mcp_simple(args.file, args.iev, 'mcparticles').iloc[0] pdgbase = ROOT.TDatabasePDG() inpart = pdgbase.GetParticle(int(dfmcp['pid'])) print("Incoming particle = {}, pdgcode = {}, charge = {}, mass = {}"\ diff --git a/benchmarks/imaging_ecal/scripts/utils.py b/benchmarks/imaging_ecal/scripts/utils.py index 51f48c4ae860367dc3d5d122db2ef6790b0d2679..0f4e40a239a6aced7430162e11f932a8bffab05a 100644 --- a/benchmarks/imaging_ecal/scripts/utils.py +++ b/benchmarks/imaging_ecal/scripts/utils.py @@ -37,7 +37,7 @@ def load_root_macros(arg_macros): # read mc particles from root file -def get_mcp_data(path, evnums=None, branch='mcparticles2'): +def get_mcp_data(path, evnums=None, branch='mcparticles'): f = ROOT.TFile(path) events = f.events if evnums is None: @@ -61,7 +61,7 @@ def get_mcp_data(path, evnums=None, branch='mcparticles2'): # read mc particles from root file -def get_mcp_simple(path, evnums=None, branch='mcparticles2'): +def get_mcp_simple(path, evnums=None, branch='mcparticles'): f = ROOT.TFile(path) events = f.events if evnums is None: @@ -86,7 +86,7 @@ def get_mcp_simple(path, evnums=None, branch='mcparticles2'): ####################################### # read all mc particles from root file ####################################### -def get_all_mcp(path, evnums=None, branch='mcparticles2'): +def get_all_mcp(path, evnums=None, branch='mcparticles'): f = ROOT.TFile(path) events = f.events if evnums is None: diff --git a/benchmarks/imaging_shower_ML/options/imaging_ml_data.py b/benchmarks/imaging_shower_ML/options/imaging_ml_data.py index 7cf239564edd407c91af246f379a3d0bec8e9adb..22c87d9d042d3d6f7f037b7da3d342038a1d0723 100644 --- a/benchmarks/imaging_shower_ML/options/imaging_ml_data.py +++ b/benchmarks/imaging_shower_ML/options/imaging_ml_data.py @@ -6,7 +6,6 @@ from GaudiKernel import SystemOfUnits as units from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier from Configurables import Jug__Digi__CalorimeterHitDigi as CalorimeterHitDigi from Configurables import Jug__Reco__ImagingPixelReco as ImagingPixelReco from Configurables import Jug__Reco__ImagingPixelMerger as ImagingPixelMerger @@ -35,10 +34,6 @@ podev = EICDataSvc('EventDataSvc', inputs=[f.strip() for f in kwargs['input'].sp podin = PodioInput('PodioReader', collections=['mcparticles', 'EcalBarrelHits']) podout = PodioOutput('out', filename=kwargs['output']) -copier = MCCopier('MCCopier', - OutputLevel=DEBUG, - inputCollection='mcparticles', - outputCollection='mcparticles2') imcaldigi = CalorimeterHitDigi('imcal_digi', inputHitCollection='EcalBarrelHits', outputHitCollection='EcalBarrelHitsDigi', @@ -66,7 +61,7 @@ imcaldata = ImagingPixelMerger('imcal_merger', podout.outputCommands = ['keep *'] ApplicationMgr( - TopAlg=[podin, copier, imcaldigi, imcalreco, imcaldata, podout], + TopAlg=[podin, imcaldigi, imcalreco, imcaldata, podout], EvtSel='NONE', EvtMax=kwargs['nev'], ExtSvc=[podev], diff --git a/benchmarks/imaging_shower_ML/scripts/prepare_tf_dataset.py b/benchmarks/imaging_shower_ML/scripts/prepare_tf_dataset.py index 9355b5d94299f26735bdffb25f4dfb0778df1ccb..ea5ac2a1ce5091689acc0c072fc07c8a2706b846 100644 --- a/benchmarks/imaging_shower_ML/scripts/prepare_tf_dataset.py +++ b/benchmarks/imaging_shower_ML/scripts/prepare_tf_dataset.py @@ -31,7 +31,7 @@ def get_ml_data(path, evnums=None, shape=(20, 20, 3), branch='EcalBarrelHitsML') # execute this script # read mc particles from root file -def get_mcp_simple(path, evnums=None, branch='mcparticles2'): +def get_mcp_simple(path, evnums=None, branch='mcparticles'): f = ROOT.TFile(path) events = f.events if evnums is None: @@ -83,7 +83,7 @@ if __name__ == '__main__': os.makedirs(args.outdir, exist_ok=True) load_root_macros(args.macros) data = get_ml_data(args.file, shape=[int(i.strip()) for i in args.shape.split(',')]) - dfmcp = get_mcp_simple(args.file, branch='mcparticles2') + dfmcp = get_mcp_simple(args.file, branch='mcparticles') # dfmcp = dfmcp[dfmcp['status'] == 24578] dfmcp.loc[:, 'p'] = np.linalg.norm(dfmcp[['px', 'py', 'pz']].values, axis=1) dfmcp['phi'] = np.arctan2(dfmcp['py'].values, dfmcp['px'].values) diff --git a/benchmarks/rich/options/rich_reco.py b/benchmarks/rich/options/rich_reco.py index edf86520ecda033afe05918c548487c150673080..43a3d4bc39b101fd26b99776d5529df2739d7b86 100644 --- a/benchmarks/rich/options/rich_reco.py +++ b/benchmarks/rich/options/rich_reco.py @@ -22,15 +22,8 @@ from Configurables import Jug__Digi__PhotoMultiplierDigi as PhotoMultiplierDigi from Configurables import Jug__Reco__PhotoMultiplierReco as PhotoMultiplierReco from Configurables import Jug__Reco__PhotoRingClusters as PhotoRingClusters -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier -from Configurables import Jug__Base__InputCopier_dd4pod__PhotoMultiplierHitCollection_dd4pod__PhotoMultiplierHitCollection_ as PMTCopier - qe_data = [(1.0, 0.25), (7.5, 0.25),] podioinput = PodioInput("PodioReader", collections=["mcparticles", "ForwardRICHHits"], OutputLevel=DEBUG) -## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. -# copy these inputs to the output (a bug work around for now...). Note the the output name has a "2" at the end. -copier = MCCopier("MCCopier", inputCollection="mcparticles", outputCollection="mcparticles2",OutputLevel=DEBUG) -pmtcopier = PMTCopier("PMTCopier", inputCollection="ForwardRICHHits", outputCollection="ForwardRICHHits2",OutputLevel=DEBUG) pmtdigi = PhotoMultiplierDigi(inputHitCollection="ForwardRICHHits", outputHitCollection="DigiForwardRICHHits", quantumEfficiency=[(a*units.eV, b) for a, b in qe_data]) @@ -42,7 +35,7 @@ out = PodioOutput("out", filename=output_rec_file) out.outputCommands = ["keep *"] ApplicationMgr( - TopAlg = [podioinput, copier, pmtcopier, pmtdigi, pmtreco, richcluster, out], + TopAlg = [podioinput, pmtdigi, pmtreco, richcluster, out], EvtSel = 'NONE', EvtMax = n_events, ExtSvc = [podioevent], diff --git a/benchmarks/track_finding/options/track_reconstruction.py b/benchmarks/track_finding/options/track_reconstruction.py index 0831e95fcdbf9233a251859f1051cc316a50e4bd..1b428cc452275893d9fe9c4d04dbaf61b6eb93c3 100644 --- a/benchmarks/track_finding/options/track_reconstruction.py +++ b/benchmarks/track_finding/options/track_reconstruction.py @@ -20,9 +20,6 @@ geo_service = GeoSvc("GeoSvc", detectors=["{}/{}.xml".format(detector_path,dete podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=WARNING) from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier -from Configurables import Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_ as CalCopier -from Configurables import Jug__Base__InputCopier_dd4pod__TrackerHitCollection_dd4pod__TrackerHitCollection_ as TrkCopier from Configurables import Jug__Digi__SiliconTrackerDigi as TrackerDigi @@ -47,17 +44,6 @@ podioinput = PodioInput("PodioReader", collections=["mcparticles","TrackerEndcapHits","TrackerBarrelHits","VertexBarrelHits","VertexEndcapHits","GEMTrackerEndcapHits"]) algorithms.append( podioinput ) -## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. -copier = MCCopier("MCCopier", - inputCollection="mcparticles", - outputCollection="mcparticles2") -algorithms.append( copier ) - -trkcopier = TrkCopier("TrkCopier", - inputCollection="TrackerBarrelHits", - outputCollection="TrackerBarrelHits2") -algorithms.append( trkcopier ) - trk_b_digi = TrackerDigi("trk_b_digi", inputHitCollection="TrackerBarrelHits", outputHitCollection="TrackerBarrelRawHits", @@ -188,7 +174,7 @@ out.outputCommands = ["keep *", "drop trajectories", "drop outputSourceLinks", "drop outputInitialTrackParameters", - "drop mcparticles" + "keep mcparticles" ] algorithms.append(out) diff --git a/benchmarks/track_finding/scripts/rec_multiple_tracks.cxx b/benchmarks/track_finding/scripts/rec_multiple_tracks.cxx index 788b9e2a54964b742b6000b5553b4fdaddf79fb5..9b3e551205fed66a47e04e54e3ac2193202d8659 100644 --- a/benchmarks/track_finding/scripts/rec_multiple_tracks.cxx +++ b/benchmarks/track_finding/scripts/rec_multiple_tracks.cxx @@ -87,8 +87,8 @@ int rec_multiple_tracks(const char* fname = "topside/rec_multiple_tracks.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("nThrown", "thrownParticles.size()") .Define("nProto", "outputProtoTracks.size()") diff --git a/benchmarks/track_fitting/options/track_reconstruction.py b/benchmarks/track_fitting/options/track_reconstruction.py index b46c8804d028d6b2bee0cda3765d6e733e4dadef..fa6613a18b97d2cc0daeb5caa1ab4c2d8dc0c091 100644 --- a/benchmarks/track_fitting/options/track_reconstruction.py +++ b/benchmarks/track_fitting/options/track_reconstruction.py @@ -20,9 +20,6 @@ geo_service = GeoSvc("GeoSvc", detectors=["{}/{}.xml".format(detector_path,dete podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=WARNING) from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier -from Configurables import Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_ as CalCopier -from Configurables import Jug__Base__InputCopier_dd4pod__TrackerHitCollection_dd4pod__TrackerHitCollection_ as TrkCopier from Configurables import Jug__Digi__SiliconTrackerDigi as TrackerDigi @@ -47,17 +44,6 @@ podioinput = PodioInput("PodioReader", collections=["mcparticles","TrackerEndcapHits","TrackerBarrelHits","VertexBarrelHits","VertexEndcapHits","GEMTrackerEndcapHits"])#, OutputLevel=DEBUG) algorithms.append( podioinput ) -## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. -copier = MCCopier("MCCopier", - inputCollection="mcparticles", - outputCollection="mcparticles2") -algorithms.append( copier ) - -trkcopier = TrkCopier("TrkCopier", - inputCollection="TrackerBarrelHits", - outputCollection="TrackerBarrelHits2") -algorithms.append( trkcopier ) - trk_b_digi = TrackerDigi("trk_b_digi", inputHitCollection="TrackerBarrelHits", outputHitCollection="TrackerBarrelRawHits", @@ -180,7 +166,7 @@ out.outputCommands = ["keep *", "drop trajectories", "drop outputSourceLinks", "drop outputInitialTrackParameters", - "drop mcparticles" + "keep mcparticles" ] algorithms.append(out) diff --git a/benchmarks/track_fitting/scripts/rec_multiple_tracks.cxx b/benchmarks/track_fitting/scripts/rec_multiple_tracks.cxx index 02bd77de9c2f6596303874e0a03c0ab4378e5ec1..ada976a32d3f7af3c1f8762cb14bd729d8424c3e 100644 --- a/benchmarks/track_fitting/scripts/rec_multiple_tracks.cxx +++ b/benchmarks/track_fitting/scripts/rec_multiple_tracks.cxx @@ -84,8 +84,8 @@ int rec_multiple_tracks(const char* fname = "topside/rec_multiple_tracks.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/track_fitting/scripts/rec_single_tracks.cxx b/benchmarks/track_fitting/scripts/rec_single_tracks.cxx index 20c42392501859c59c465c5f9059175748fd3d7e..9aad6734df65ecd7fc0dec19ab4484addfefe63a 100644 --- a/benchmarks/track_fitting/scripts/rec_single_tracks.cxx +++ b/benchmarks/track_fitting/scripts/rec_single_tracks.cxx @@ -87,8 +87,8 @@ int rec_single_tracks(const char* fname = "topside/rec_single_tracks.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/tracking/central_electrons.sh b/benchmarks/tracking/central_electrons.sh index 0a278d96714ae189165c4825947261001a3f7323..1c0fe1bab7fec1a4613b41cd9e443f147cfd6b64 100644 --- a/benchmarks/tracking/central_electrons.sh +++ b/benchmarks/tracking/central_electrons.sh @@ -97,7 +97,7 @@ rootls -t ${JUGGLER_SIM_FILE} if [[ -z "${ANALYSIS_ONLY}" ]] ; then # Need to figure out how to pass file name to juggler from the commandline - xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv gaudirun.py benchmarks/tracking/options/track_reconstruction.py + gaudirun.py benchmarks/tracking/options/track_reconstruction.py if [[ "$?" -ne "0" ]] ; then echo "ERROR running juggler" exit 1 diff --git a/benchmarks/tracking/options/track_reconstruction.py b/benchmarks/tracking/options/track_reconstruction.py index 764659b7719d21d84165f70ae944d19a5e484596..27430cf316af6c32ffb715ddc9963f44d61d61a0 100644 --- a/benchmarks/tracking/options/track_reconstruction.py +++ b/benchmarks/tracking/options/track_reconstruction.py @@ -20,9 +20,6 @@ geo_service = GeoSvc("GeoSvc", detectors=["{}/{}.xml".format(detector_path,dete podioevent = EICDataSvc("EventDataSvc", inputs=[input_sim_file], OutputLevel=WARNING) from Configurables import PodioInput -from Configurables import Jug__Base__InputCopier_dd4pod__Geant4ParticleCollection_dd4pod__Geant4ParticleCollection_ as MCCopier -from Configurables import Jug__Base__InputCopier_dd4pod__CalorimeterHitCollection_dd4pod__CalorimeterHitCollection_ as CalCopier -from Configurables import Jug__Base__InputCopier_dd4pod__TrackerHitCollection_dd4pod__TrackerHitCollection_ as TrkCopier from Configurables import Jug__Digi__SiliconTrackerDigi as TrackerDigi @@ -47,17 +44,6 @@ podioinput = PodioInput("PodioReader", collections=["mcparticles","TrackerEndcapHits","TrackerBarrelHits","VertexBarrelHits","VertexEndcapHits","GEMTrackerEndcapHits"])#, OutputLevel=DEBUG) algorithms.append( podioinput ) -## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. -copier = MCCopier("MCCopier", - inputCollection="mcparticles", - outputCollection="mcparticles2") -algorithms.append( copier ) - -trkcopier = TrkCopier("TrkCopier", - inputCollection="TrackerBarrelHits", - outputCollection="TrackerBarrelHits2") -algorithms.append( trkcopier ) - trk_b_digi = TrackerDigi("trk_b_digi", inputHitCollection="TrackerBarrelHits", outputHitCollection="TrackerBarrelRawHits", @@ -186,7 +172,7 @@ out.outputCommands = ["keep *", "drop trajectories", "drop outputSourceLinks", "drop outputInitialTrackParameters", - "drop mcparticles" + "keep mcparticles" ] algorithms.append(out) diff --git a/benchmarks/tracking/run_tracking_benchmarks.py b/benchmarks/tracking/run_tracking_benchmarks.py index cc65ad6339fd19e8c90d354622c8f27fbe409f54..f474dadaccbb16cad8c3a389f849cac6b14cd660 100755 --- a/benchmarks/tracking/run_tracking_benchmarks.py +++ b/benchmarks/tracking/run_tracking_benchmarks.py @@ -80,9 +80,7 @@ if 'rec' in procs: os.environ['JUGGLER_COMPACT_PATH'] = args.compact os.environ['JUGGLER_N_EVENTS'] = '{}'.format(args.nev) - juggler_xenv = os.path.join(os.environ.get('JUGGLER_INSTALL_PREFIX', '../local'), 'Juggler.xenv') - - rec_cmd = ['xenv', '-x', juggler_xenv, 'gaudirun.py', os.path.join(sdir, 'options', option_script)] + rec_cmd = ['gaudirun.py', os.path.join(sdir, 'options', option_script)] return_code = subprocess.run(rec_cmd).returncode if return_code is not None and return_code != 0: print('ERROR running juggler ({})!'.format(opt)) @@ -93,7 +91,7 @@ if 'rec' in procs: if 'ana' in procs: os.makedirs('results', exist_ok=True) ana_cmd = ['python', analysis_script, rec_file, - '--mc-collection', 'mcparticles2', + '--mc-collection', 'mcparticles', '--tracking-collection', 'outputTrackParameters', '-o', 'results', '-t', args.nametag] return_code = subprocess.run(ana_cmd).returncode diff --git a/benchmarks/tracking/scripts/rec_central_electrons.cxx b/benchmarks/tracking/scripts/rec_central_electrons.cxx index 9bb12315020e3c8e8e1a62b8a2b7c3258e9e6533..8c3708f1c52d9d08b65dd53e52188176f94512a1 100644 --- a/benchmarks/tracking/scripts/rec_central_electrons.cxx +++ b/benchmarks/tracking/scripts/rec_central_electrons.cxx @@ -84,8 +84,8 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/tracking/scripts/rec_central_pions.cxx b/benchmarks/tracking/scripts/rec_central_pions.cxx index f761b66f9399c00a312c5df73a485181a3445982..516ecb2b315252dd495878472f0d8b58f9fab00a 100644 --- a/benchmarks/tracking/scripts/rec_central_pions.cxx +++ b/benchmarks/tracking/scripts/rec_central_pions.cxx @@ -84,8 +84,8 @@ int rec_central_pions(const char* fname = "topside/rec_central_pions.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/tracking/scripts/rec_multiple_tracks.cxx b/benchmarks/tracking/scripts/rec_multiple_tracks.cxx index 02bd77de9c2f6596303874e0a03c0ab4378e5ec1..ada976a32d3f7af3c1f8762cb14bd729d8424c3e 100644 --- a/benchmarks/tracking/scripts/rec_multiple_tracks.cxx +++ b/benchmarks/tracking/scripts/rec_multiple_tracks.cxx @@ -84,8 +84,8 @@ int rec_multiple_tracks(const char* fname = "topside/rec_multiple_tracks.root") ROOT::EnableImplicitMT(); ROOT::RDataFrame df("events", fname); - auto df0 = df.Define("isThrown", "mcparticles2.genStatus == 1") - .Define("thrownParticles", "mcparticles2[isThrown]") + auto df0 = df.Define("isThrown", "mcparticles.genStatus == 1") + .Define("thrownParticles", "mcparticles[isThrown]") .Define("thrownP", fourvec, {"thrownParticles"}) .Define("p_thrown", momentum, {"thrownP"}) .Define("theta_thrown", theta, {"thrownP"}) diff --git a/benchmarks/tracking/scripts/tracking_performance.py b/benchmarks/tracking/scripts/tracking_performance.py index 58256fb102bc3d2e61b71171a2743dd4059e1d25..66f6d73b81472a92dfe7e170b6f16da559435222 100644 --- a/benchmarks/tracking/scripts/tracking_performance.py +++ b/benchmarks/tracking/scripts/tracking_performance.py @@ -47,7 +47,7 @@ def flatten_collection(rdf, collection, cols=None): dfp.loc[:, 'event'] = evns return dfp -def thrown_particles_figure(rdf, save, mcbranch="mcparticles2"): +def thrown_particles_figure(rdf, save, mcbranch="mcparticles"): # define truth particle info dft = flatten_collection(rdf, mcbranch, ['genStatus', 'pdgID', 'ps.x', 'ps.y', 'ps.z', 'mass']) dft.rename(columns={c: c.replace(mcbranch + '.', '') for c in dft.columns}, inplace=True)