-
Notifications
You must be signed in to change notification settings - Fork 12
Inverse Variance Track Time Averages. #1089
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,25 @@ | |
| import org.lcsim.geometry.IDDecoder; | ||
| import org.lcsim.recon.tracking.digitization.sisim.SiTrackerHitStrip1D; | ||
| import org.lcsim.recon.tracking.digitization.sisim.TrackerHitType; | ||
| import org.hps.recon.tracking.FittedRawTrackerHit; | ||
| import org.hps.recon.tracking.ShaperFitAlgorithm; | ||
| import org.hps.recon.tracking.ShaperPileupFitAlgorithm; | ||
| import org.hps.recon.tracking.PulseShape; | ||
| import org.hps.recon.tracking.ShapeFitParameters; | ||
|
|
||
| import org.hps.conditions.database.DatabaseConditionsManager; | ||
| import org.hps.conditions.svt.SvtSyncStatus.SvtSyncStatusCollection; | ||
| import org.hps.conditions.svt.SvtTimingConstants; | ||
| import org.hps.readout.ecal.ReadoutTimestamp; | ||
| import org.hps.readout.svt.HPSSVTConstants; | ||
| import org.hps.recon.ecal.cluster.TriggerTime; | ||
| import org.lcsim.detector.tracker.silicon.HpsSiSensor; | ||
| import org.lcsim.event.EventHeader; | ||
| import org.lcsim.event.RawTrackerHit; | ||
| import org.lcsim.geometry.Detector; | ||
| import org.lcsim.lcio.LCIOConstants; | ||
| import org.lcsim.recon.cat.util.Const; | ||
| import org.lcsim.util.Driver; | ||
|
|
||
| /** | ||
| * This class provides an interface between hps-java and the Kalman Filter fitting and pattern recognition code. | ||
|
|
@@ -1058,7 +1077,24 @@ private boolean fillAllMeasurements(EventHeader event) { | |
| globalX.print("globalX"); | ||
| globalY.print("globalY"); | ||
| } | ||
| Measurement m = new Measurement(umeas, xStrip, du, time, localHit.getdEdx()*1000000.); | ||
| List<RawTrackerHit> rawhits = hit.getRawHits(); | ||
| ShaperFitAlgorithm fitter = new ShaperPileupFitAlgorithm(.5,1); | ||
| PulseShape shape = new PulseShape.FourPole(); | ||
| fitter.setRunNum(event.getRunNumber()); | ||
| double Variance=0.0; | ||
| for(RawTrackerHit rth: rawhits){ | ||
| double Min = 10000; | ||
| for(ShapeFitParameters fit : fitter.fitShape(rth, shape)){ | ||
| if(fit.getT0Err()<Min){ | ||
| Min=fit.getT0Err(); | ||
| } | ||
| } | ||
| if(module.Layer>1){ | ||
| Variance+=1/(Min*Min); | ||
| } | ||
| } | ||
| Variance=1.0/Variance; | ||
| Measurement m = new Measurement(umeas, xStrip, du, time, localHit.getdEdx()*1000000.,Variance); | ||
|
Contributor
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. Really, this should be done in clustering but SiTrackerHit doesn't have a place for the error on the time. We do extend SiTrackerHit in hps-java at org.hps.recon.tracking.SiTrackerHitStrip1D and we could put the error in there but it wouldn't be saved to the LCIO. For now this is ok...I think we have some other changes to LCIO/lcsim we need to make so we should put this on the list. |
||
| module.addMeasurement(m); | ||
| hitMap.put(m, hit); | ||
| hitsFilled++; | ||
|
|
@@ -1159,7 +1195,7 @@ private double fillMeasurements(List<TrackerHit> hits1D, int addMode) { | |
| globalX.print("globalX"); | ||
| globalY.print("globalY"); | ||
| } | ||
| Measurement m = new Measurement(umeas, xStrip, du, 0., hit.getdEdx()*1000000.); | ||
| Measurement m = new Measurement(umeas, xStrip, du, 0., hit.getdEdx()*1000000.,1.0); | ||
|
|
||
| KalHit hitPair = new KalHit(mod,m); | ||
| trackHitsKalman.add(hitPair); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.