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

Add ACTS tracking in all CIs #1518

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/validation_samples/ecal_pn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
p.histogramFile = f'hist.root'
p.outputFiles = [f'events.root']

# The Tracking modules produce a lot of helpful messages
# but (at the debug level) is too much for commiting the gold log
# into the git working tree on GitHub
p.termLogLevel = 1

# Load the tracking module
from LDMX.Tracking import tracking
from LDMX.Tracking import geo
Expand Down Expand Up @@ -199,6 +194,22 @@
ecalVeto = ecal_vetos.EcalVetoProcessor()
ecalVeto.recoil_from_tracking = True

# The Tracking modules produce a lot of helpful messages
# but (at the debug level) is too much for commiting the gold log
# into the git working tree on GitHub
p.termLogLevel = 0
p.logger.custom(truth_tracking, level = 2)
p.logger.custom(digi_tagger, level = 2)
p.logger.custom(digi_recoil, level = 2)
p.logger.custom(seeder_tagger, level = 2)
p.logger.custom(seeder_recoil, level = 2)
p.logger.custom(tracking_tagger, level = 0)
p.logger.custom(tracking_recoil, level = 0)
p.logger.custom(seed_tagger_dqm, level = 2)
p.logger.custom(seed_recoil_dqm, level = 2)
p.logger.custom(tagger_dqm, level = 2)
p.logger.custom(recoil_dqm, level = 2)

p.sequence.extend([
digi_tagger,
digi_recoil,
Expand All @@ -223,5 +234,7 @@
tagger_dqm,
seed_recoil_dqm,
recoil_dqm,
] + dqm.all_dqm)
])

p.sequence.extend(dqm.all_dqm)

177 changes: 175 additions & 2 deletions .github/validation_samples/inclusive/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,113 @@

p.histogramFile = 'hist.root'
p.outputFiles = ['events.root']

# Load the tracking module
from LDMX.Tracking import tracking
from LDMX.Tracking import geo

from LDMX.Tracking.geo import TrackersTrackingGeometryProvider as trackgeo
trackgeo.get_instance().setDetector('ldmx-det-v14-8gev')

# Truth seeder
# Runs truth tracking producing tracks from target scoring plane hits for Recoil
# and generated electros for Tagger.
# Truth tracks can be used for assessing tracking performance or using as seeds
truth_tracking = tracking.TruthSeedProcessor()
truth_tracking.debug = True
truth_tracking.trk_coll_name = "RecoilTruthSeeds"
truth_tracking.pdgIDs = [11]
truth_tracking.scoring_hits = "TargetScoringPlaneHits"
truth_tracking.z_min = 0.
truth_tracking.track_id = -1
truth_tracking.p_cut = 0.05 # In MeV
truth_tracking.pz_cut = 0.03
truth_tracking.p_cutEcal = 0. # In MeV

# The Tracking modules produce a lot of helpful messages
# but (at the debug level) is too much for commiting the gold log
# into the git working tree on GitHub
p.termLogLevel = 0
p.logger.custom(truth_tracking, level = 2)

# These smearing quantities are default. We expect around 6um hit resolution in bending plane
# v-smearing is actually not used as 1D measurements are used for tracking. These smearing parameters
# are fed to the digitization producer.
uSmearing = 0.006 #mm
vSmearing = 0.000001 #mm

# Smearing Processor - Tagger
# Runs G4 hit smearing producing measurements in the Tagger tracker.
# Hits that belong to the same sensor with the same trackID are merged together to reduce combinatorics
digi_tagger = tracking.DigitizationProcessor("DigitizationProcessor")
digi_tagger.hit_collection = "TaggerSimHits"
digi_tagger.out_collection = "DigiTaggerSimHits"
digi_tagger.merge_hits = True
digi_tagger.sigma_u = uSmearing
digi_tagger.sigma_v = vSmearing

# Smearing Processor - Recoil
digi_recoil = tracking.DigitizationProcessor("DigitizationProcessorRecoil")
digi_recoil.hit_collection = "RecoilSimHits"
digi_recoil.out_collection = "DigiRecoilSimHits"
digi_recoil.merge_hits = True
digi_recoil.sigma_u = uSmearing
digi_recoil.sigma_v = vSmearing

# Seed Finder Tagger
# This runs the track seed finder looking for 5 hits in consecutive sensors and fitting them with a
# parabola+linear fit. Compatibility with expected particles is checked by looking at the track
# parameters and the impact parameters at the target or generation point. For the tagger one should look
# for compatibility with the beam orbit / beam spot
seeder_tagger = tracking.SeedFinderProcessor("SeedTagger")
seeder_tagger.input_hits_collection = digi_tagger.out_collection
seeder_tagger.out_seed_collection = "TaggerRecoSeeds"
seeder_tagger.pmin = 0.1
seeder_tagger.pmax = 10.0
seeder_tagger.d0min = -45.
seeder_tagger.d0max = 45.
seeder_tagger.z0max = 60.

#Seed finder processor - Recoil
seeder_recoil = tracking.SeedFinderProcessor("SeedRecoil")
seeder_recoil.perigee_location = [0.,0.,0.]
seeder_recoil.input_hits_collection = digi_recoil.out_collection
seeder_recoil.out_seed_collection = "RecoilRecoSeeds"
seeder_recoil.bfield = 1.5
seeder_recoil.pmin = 0.1
seeder_recoil.pmax = 10.0
seeder_recoil.d0min = -40.0
seeder_recoil.d0max = 40.0
seeder_recoil.z0max = 50.

# Producer for running the CKF track finding starting from the found seeds.
tracking_tagger = tracking.CKFProcessor("Tagger_TrackFinder")
tracking_tagger.dumpobj = False
tracking_tagger.debug = True
tracking_tagger.propagator_step_size = 1000. #mm
tracking_tagger.bfield = -1.5 #in T #From looking at the BField map
tracking_tagger.const_b_field = False
tracking_tagger.seed_coll_name = seeder_tagger.out_seed_collection
tracking_tagger.out_trk_collection = "TaggerTracks"
tracking_tagger.trackID = -1 #1
tracking_tagger.pdgID = -9999 #11
tracking_tagger.measurement_collection = digi_tagger.out_collection
tracking_tagger.min_hits = 6

#CKF Options
tracking_recoil = tracking.CKFProcessor("Recoil_TrackFinder")
tracking_recoil.dumpobj = False
tracking_recoil.debug = True
tracking_recoil.propagator_step_size = 1000. #mm
tracking_recoil.bfield = -1.5 #in T #From looking at the BField map
tracking_recoil.const_b_field = False
tracking_recoil.taggerTracking=False
tracking_recoil.seed_coll_name = "RecoilTruthSeeds"
tracking_recoil.out_trk_collection = "RecoilTracks"
tracking_recoil.trackID = -1 #1
tracking_recoil.pdgID = -9999 #11
tracking_recoil.measurement_collection = digi_recoil.out_collection
tracking_recoil.min_hits = 6

import LDMX.Ecal.EcalGeometry
import LDMX.Ecal.ecal_hardcoded_conditions
Expand All @@ -45,17 +151,78 @@
d.randomSeed = 1

from LDMX.DQM import dqm
from LDMX.Tracking import dqm as tkdqm

seed_tagger_dqm = tkdqm.TrackingRecoDQM("SeedTaggerDQM")
seed_tagger_dqm.track_collection = seeder_tagger.out_seed_collection
seed_tagger_dqm.truth_collection = "TaggerTruthTracks"
seed_tagger_dqm.title = ""
seed_tagger_dqm.buildHistograms()

tagger_dqm = tkdqm.TrackingRecoDQM("TaggerDQM")
tagger_dqm.track_collection = tracking_tagger.out_trk_collection
tagger_dqm.truth_collection = "TaggerTruthTracks"
tagger_dqm.trackStates = ["target"]
tagger_dqm.title = ""
tagger_dqm.measurement_collection=digi_tagger.out_collection
tagger_dqm.truth_hit_collection="TaggerSimHits"
tagger_dqm.buildHistograms()


seed_recoil_dqm = tkdqm.TrackingRecoDQM("SeedRecoilDQM")
seed_recoil_dqm.track_collection = seeder_recoil.out_seed_collection
seed_recoil_dqm.truth_collection = "RecoilTruthTracks"
seed_recoil_dqm.title = ""
seed_recoil_dqm.buildHistograms()


recoil_dqm = tkdqm.TrackingRecoDQM("RecoilDQM")
recoil_dqm.track_collection = tracking_recoil.out_trk_collection
recoil_dqm.truth_collection = "RecoilTruthTracks"
recoil_dqm.trackStates = ["ecal","target"]
recoil_dqm.title = ""
recoil_dqm.measurement_collection=digi_recoil.out_collection
recoil_dqm.truth_hit_collection="RecoilSimHits"
recoil_dqm.buildHistograms()


from LDMX.Recon.electronCounter import ElectronCounter
from LDMX.Recon.simpleTrigger import TriggerProcessor

count = ElectronCounter(1,'ElectronCounter')
count.input_pass_name = ''

# Load ecal veto and use tracking in it
ecalVeto = ecal_vetos.EcalVetoProcessor()
ecalVeto.recoil_from_tracking = False

# The Tracking modules produce a lot of helpful messages
# but (at the debug level) is too much for commiting the gold log
# into the git working tree on GitHub
p.termLogLevel = 0
p.logger.custom(truth_tracking, level = 2)
p.logger.custom(digi_tagger, level = 2)
p.logger.custom(digi_recoil, level = 2)
p.logger.custom(seeder_tagger, level = 2)
p.logger.custom(seeder_recoil, level = 2)
p.logger.custom(tracking_tagger, level = 0)
p.logger.custom(tracking_recoil, level = 0)
p.logger.custom(seed_tagger_dqm, level = 2)
p.logger.custom(seed_recoil_dqm, level = 2)
p.logger.custom(tagger_dqm, level = 2)
p.logger.custom(recoil_dqm, level = 2)

p.sequence.extend([
digi_tagger,
digi_recoil,
truth_tracking,
seeder_tagger,
seeder_recoil,
tracking_tagger,
tracking_recoil,
ecal_digi.EcalDigiProducer(),
ecal_digi.EcalRecProducer(),
ecal_vetos.EcalVetoProcessor(),
ecalVeto,
hcal_digi.HcalDigiProducer(),
hcal_digi.HcalRecProducer(),
*ts_digis,
Expand All @@ -65,4 +232,10 @@
trigScintTrack,
count, TriggerProcessor('trigger', 8000.),
dqm.PhotoNuclearDQM(verbose=False),
] + dqm.all_dqm)
seed_tagger_dqm,
tagger_dqm,
seed_recoil_dqm,
recoil_dqm,
])

p.sequence.extend(dqm.all_dqm)
Loading
Loading