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