Skip to content
Snippets Groups Projects
Commit 108444fc authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Update benchmarks for new EICD

parent 5827fdc8
No related branches found
No related tags found
1 merge request!151Update eicd
This commit is part of merge request !151. Comments created here will be created in the context of that merge request.
...@@ -41,3 +41,13 @@ __pycache__/ ...@@ -41,3 +41,13 @@ __pycache__/
calorimeters/test/ calorimeters/test/
*.d *.d
*.pcm *.pcm
# transient directories and files
setup
results
*.root
fieldmaps
eic-env.sh
sim_output
*.obj
*.hepmc
...@@ -58,7 +58,7 @@ cb_ecal_digi = CalHitDigi("cb_ecal_digi", ...@@ -58,7 +58,7 @@ cb_ecal_digi = CalHitDigi("cb_ecal_digi",
**cb_ecal_daq) **cb_ecal_daq)
cb_ecal_reco = ImCalPixelReco("cb_ecal_reco", cb_ecal_reco = ImCalPixelReco("cb_ecal_reco",
inputHitCollection="EcalBarrelHitsDigi", inputHitCollection=cb_ecal_digi.outputHitCollection,
outputHitCollection="EcalBarrelHitsReco", outputHitCollection="EcalBarrelHitsReco",
thresholdFactor=3, # about 20 keV thresholdFactor=3, # about 20 keV
readoutClass="EcalBarrelHits", # readout class readoutClass="EcalBarrelHits", # readout class
...@@ -67,8 +67,8 @@ cb_ecal_reco = ImCalPixelReco("cb_ecal_reco", ...@@ -67,8 +67,8 @@ cb_ecal_reco = ImCalPixelReco("cb_ecal_reco",
**cb_ecal_daq) **cb_ecal_daq)
cb_ecal_cl = ImagingCluster("cb_ecal_cl", cb_ecal_cl = ImagingCluster("cb_ecal_cl",
inputHitCollection="EcalBarrelHitsReco", inputHitCollection=cb_ecal_reco.outputHitCollection,
outputHitCollection="EcalBarrelClusterHits", outputProtoClusterCollection="EcalBarrelProtoClusters",
localDistXY=[2.*mm, 2*mm], # same layer localDistXY=[2.*mm, 2*mm], # same layer
layerDistEtaPhi=[10*mrad, 10*mrad], # adjacent layer layerDistEtaPhi=[10*mrad, 10*mrad], # adjacent layer
neighbourLayersRange=2, # id diff for adjacent layer neighbourLayersRange=2, # id diff for adjacent layer
...@@ -76,16 +76,17 @@ cb_ecal_cl = ImagingCluster("cb_ecal_cl", ...@@ -76,16 +76,17 @@ cb_ecal_cl = ImagingCluster("cb_ecal_cl",
cb_ecal_clreco = ImagingClusterReco("cb_ecal_clreco", cb_ecal_clreco = ImagingClusterReco("cb_ecal_clreco",
samplingFraction=cb_ecal_sf, samplingFraction=cb_ecal_sf,
inputHitCollection="EcalBarrelClusterHits", inputHitCollection=cb_ecal_cl.inputHitCollection,
inputProtoClusterCollection=cb_ecal_cl.outputProtoClusterCollection,
outputClusterCollection="EcalBarrelClusters", outputClusterCollection="EcalBarrelClusters",
outputLayerCollection="EcalBarrelLayers") outputLayerCollection="EcalBarrelLayers",
outputInfoCollection="EcalBarrelClustersInfo")
podout.outputCommands = ['drop *', podout.outputCommands = ['drop *',
'keep mcparticles2', 'keep mcparticles2',
'keep *HitsReco', 'keep *HitsReco',
'keep *HitsDigi', 'keep *HitsDigi',
'keep *ClusterHits', 'keep *Cluster*']
'keep *Clusters']
ApplicationMgr( ApplicationMgr(
TopAlg = [podin, copier, TopAlg = [podin, copier,
......
...@@ -15,19 +15,19 @@ import argparse ...@@ -15,19 +15,19 @@ import argparse
default_type = { default_type = {
'endcap_e': [ 'endcap_e': [
['endcap_e.py'], ['endcap_e.py'],
['draw_cluters.py'], ['draw_clusters.py'],
['EcalEndcapNClusters']], ['EcalEndcapNClusters']],
'endcap_i': [ 'endcap_i': [
['endcap_i.py'], ['endcap_i.py'],
['draw_cluters.py'], ['draw_clusters.py'],
['EcalEndcapPClusters']], ['EcalEndcapPClusters']],
'barrel': [ 'barrel': [
['barrel.py'], ['barrel.py'],
['draw_cluters.py'], ['draw_clusters.py'],
['EcalBarrelClusters']], ['EcalBarrelClusters']],
# 'all': [ # 'all': [
# ['all_ecal.py'], # ['all_ecal.py'],
# ['draw_cluters.py'], # ['draw_clusters.py'],
# ['EcalEndcapNClusters', 'EcalEndcapPClusters', 'EcalBarrelClusters']], # ['EcalEndcapNClusters', 'EcalEndcapPClusters', 'EcalBarrelClusters']],
} }
......
...@@ -25,7 +25,8 @@ def load_root_macros(arg_macros): ...@@ -25,7 +25,8 @@ def load_root_macros(arg_macros):
# read from RDataFrame and flatten a given collection, return pandas dataframe # read from RDataFrame and flatten a given collection, return pandas dataframe
def flatten_collection(rdf, collection, cols=None): def flatten_collection(rdf, collection, cols=None):
if not cols: if not cols:
cols = [str(c) for c in rdf.GetColumnNames() if str(c).startswith('{}.'.format(collection))] cols = [str(c) for c in rdf.GetColumnNames() if str(c).startswith('{}.'.format(collection))]
cols += [str(c) for c in rdf.GetColumnNames() if str(c).startswith('{}Info.'.format(collection))]
else: else:
cols = ['{}.{}'.format(collection, c) for c in cols] cols = ['{}.{}'.format(collection, c) for c in cols]
if not cols: if not cols:
...@@ -92,10 +93,10 @@ if __name__ == '__main__': ...@@ -92,10 +93,10 @@ if __name__ == '__main__':
] ]
for coll in [c.strip() for c in args.coll.split(',')]: for coll in [c.strip() for c in args.coll.split(',')]:
df = flatten_collection(rdf_rec, coll) df = flatten_collection(rdf_rec, coll)
# calculate eta # Get eta from info table
df.loc[:, '{}.eta'.format(coll)] = -np.log(np.tan(df['{}.polar.theta'.format(coll)].values/2.)) df[coll + '.eta'] = df[coll + 'Info.eta']
fig, axs = plt.subplots(2, 2, figsize=(12, 8), dpi=160) fig, axs = plt.subplots(2, 2, figsize=(12, 8), dpi=160)
ncl = df.groupby('event')['{}.clusterID'.format(coll)].nunique().values ncl = df.groupby('event')['{}.ID.value'.format(coll)].nunique().values
axs[0][0].hist(ncl, weights=np.repeat(1./float(ncl.shape[0]), ncl.shape[0]), axs[0][0].hist(ncl, weights=np.repeat(1./float(ncl.shape[0]), ncl.shape[0]),
bins=np.arange(0, 10), align='mid', ec='k') bins=np.arange(0, 10), align='mid', ec='k')
axs[0][0].set_xlabel('Number of Clusters', fontsize=16) axs[0][0].set_xlabel('Number of Clusters', fontsize=16)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment