Skip to content
Snippets Groups Projects
Commit 28364bf4 authored by Chao Peng's avatar Chao Peng
Browse files

Change parameters for imaging ecal

parent e0bb61b1
No related branches found
No related tags found
1 merge request!123Change parameters for imaging ecal
......@@ -38,11 +38,11 @@ out = PodioOutput("out", filename=kwargs['output'])
podioinput = PodioInput("PodioReader", collections=["mcparticles", "EcalBarrelHits"], OutputLevel=DEBUG)
copier = MCCopier("MCCopier",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputCollection="mcparticles",
outputCollection="mcparticles2")
calcopier = CalCopier("CalCopier",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputCollection="EcalBarrelHits",
outputCollection="EcalBarrelHits2")
......@@ -52,15 +52,14 @@ daq_setting = dict(
capacityADC=32767,
pedestalMean=400,
pedestalSigma=50) # 50/32767*3 MeV ~ 5 keV
imcaldigi = CalorimeterHitDigi("imcal_digi",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputHitCollection="EcalBarrelHits",
outputHitCollection="DigiEcalBarrelHits",
energyResolutions=[0., 0.02, 0.],
**daq_setting)
imcalreco = ImagingPixelReco("imcal_reco",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputHitCollection="DigiEcalBarrelHits",
outputHitCollection="RecoEcalBarrelHits",
readoutClass="EcalBarrelHits",
......@@ -69,15 +68,16 @@ imcalreco = ImagingPixelReco("imcal_reco",
**daq_setting)
imcalcluster = ImagingTopoCluster("imcal_cluster",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputHitCollection="RecoEcalBarrelHits",
outputHitCollection="EcalBarrelClusterHits",
localDistXY=[2.*units.mm, 2*units.mm],
layerDistEtaPhi=[10*units.mrad, 10*units.mrad],
neighbourLayersRange=2,
sectorDist=3.*units.cm)
sectorDist=3.*units.cm,
minClusterNhits=5)
clusterreco = ImagingClusterReco("imcal_clreco",
OutputLevel=DEBUG,
# OutputLevel=DEBUG,
inputHitCollection="EcalBarrelClusterHits",
outputLayerCollection="EcalBarrelClustersLayers",
outputClusterCollection="EcalBarrelClusters",
......@@ -88,8 +88,7 @@ out.outputCommands = ["keep *"]
ApplicationMgr(
TopAlg=[podioinput, copier, calcopier, imcaldigi, imcalreco, imcalcluster, clusterreco, out],
EvtSel='NONE',
# EvtMax=kwargs['nev'],
EvtMax=3,
EvtMax=kwargs['nev'],
ExtSvc=[podioevent],
OutputLevel=DEBUG
)
......@@ -47,7 +47,7 @@ if __name__ == '__main__':
dfe.loc[:, 'total_edep'] = dfe.groupby(['event', 'cluster'])['edep'].transform('sum')
# dfe.loc[:, 'efrac'] = dfe['edep']/dfe['total_edep']
dfe.loc[:, 'efrac'] = dfe['edep']/(args.energy*1000.)
dfe = dfe[dfe['cluster'] == 0]
# dfe = dfe[dfe['cluster'] == 0]
os.makedirs(args.outdir, exist_ok=True)
......
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