-
Notifications
You must be signed in to change notification settings - Fork 21
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
tvami
wants to merge
3
commits into
trunk
Choose a base branch
from
iss1517-tracking-prop-in-ecal
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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 | ||||||
|
@@ -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 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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, | ||||||
|
@@ -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) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to use the newer syntax? (I also want to double check that #1458 works.)