Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back the old simple reconstruction chain #1351

Open
EinarElen opened this issue Apr 7, 2024 · 3 comments · May be fixed by LDMX-Software/Hcal#75
Open

Bring back the old simple reconstruction chain #1351

EinarElen opened this issue Apr 7, 2024 · 3 comments · May be fixed by LDMX-Software/Hcal#75
Labels

Comments

@EinarElen
Copy link
Contributor

When developing, debugging, or trying to understand reconstructed quantities people often have to work with simulation level hits which are quite different from their reconstructed counterparts. This means that people have to re-create an entire (often worse) reco-chain in their analysis.

Having the old reconstruction tool available as an alternative would solve this problem. It should of course be clearly marked as simplified & not the default use.

@EinarElen
Copy link
Contributor Author

I made a quick implementation of the old producer here
LDMX-Software/Hcal@a6a4dab

I'll update Some quick DQM results from 10k 4 GeV Ecal PN with the following config

#!/usr/bin/env python3
from LDMX.Framework import ldmxcfg
p = ldmxcfg.Process('test')

p.maxTriesPerEvent = 10000

from LDMX.Biasing import ecal, util
from LDMX.SimCore import generators as gen
mySim = ecal.photo_nuclear('ldmx-det-v14',gen.single_4gev_e_upstream_tagger())
mySim.beamSpotSmear = [20.,80.,0.]
mySim.description = 'ECal PN Test Simulation'
# step = util.StepPrinter(process_name='CoulombScat', track_id=-1)
# step.depth=3
# mySim.actions.extend([step])

p.sequence = [ mySim ]

##################################################################
# Below should be the same for all sim scenarios

import os
import sys

if 'LDMX_NUM_EVENTS' in os.environ:
    p.maxEvents = int(os.environ['LDMX_NUM_EVENTS'])
else:
    p.maxEvents = int(sys.argv[1])
if 'LDMX_RUN_NUMBER' in os.environ:
    p.run = int(os.environ['LDMX_RUN_NUMBER'])
else:
    p.run = 1




rectype = sys.argv[2]

output_base = f'swan/data/type_ecalpn_N_{p.maxEvents}_rectype_{rectype}'
output_base = f'data/type_hcalrectest_N_{p.maxEvents}_rectype_{rectype}'

p.histogramFile = f'{output_base}_kind_hist.root'
p.outputFiles = [f'{output_base}_kind_events.root']

import LDMX.Ecal.EcalGeometry
import LDMX.Ecal.ecal_hardcoded_conditions
import LDMX.Hcal.HcalGeometry
import LDMX.Hcal.hcal_hardcoded_conditions
import LDMX.Hcal.digi as digi


from LDMX.DQM import dqm

if rectype == 'simple':
    p.sequence.extend([digi.HcalSimpleDigiAndRecProducer()])
else:
    p.sequence.extend([
        digi.HcalDigiProducer(),
        digi.HcalRecProducer(),
    ])
p.sequence.extend(
                   dqm.hcal_dqm
                  )
![hcal_dqm_back_along_x](https://github.com/LDMX-Software/Hcal/assets/14233914/9f8d189f-1986-46f4-8543-2f797adf9517)

PE
hcal_dqm_back_pe
hcal_dqm_back_total_pe

Positions along bars
hcal_dqm_back_along_y

Vetoable hits
hcal_dqm_back_vetoable_hit_multiplicity

@tomeichlersmith
Copy link
Member

Draft solution in submodule: LDMX-Software/Hcal#75

@cmantill
Copy link
Contributor

hi @EinarElen, thinking about using this for clustering plots in the DR and I want to make sure that the position reconstruction is understood.

Could you provide from your file above, a plot comparing the position reconstruction but split x- and y-oriented layers so that the coordinate is given by the layer/bar measurement only? If you are swamped, I could make that plot too if you point me to the output file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants