@@ -1039,6 +1039,15 @@ private boolean fillAllMeasurements(EventHeader event) {
1039
1039
// Get the collection of 1D hits
1040
1040
String stripHitInputCollectionName = "StripClusterer_SiTrackerHitStrip1D" ;
1041
1041
List <TrackerHit > striphits = event .get (TrackerHit .class , stripHitInputCollectionName );
1042
+
1043
+ // LCRelations
1044
+ String fittedHitsCollectionName = "SVTFittedRawTrackerHits" ;
1045
+ List <LCRelation > _fittedHits = event .get (LCRelation .class , fittedHitsCollectionName );
1046
+
1047
+ Map <RawTrackerHit , LCRelation > fittedRawTrackerHitMap = new HashMap <RawTrackerHit , LCRelation >();
1048
+ for (LCRelation fittedHit : _fittedHits ) {
1049
+ fittedRawTrackerHitMap .put (FittedRawTrackerHit .getRawTrackerHit (fittedHit ), fittedHit );
1050
+ }
1042
1051
1043
1052
if (striphits .size () > maxHits ) maxHits = striphits .size ();
1044
1053
if (striphits .size () > 200 ) nBigEvents ++;
@@ -1175,18 +1184,15 @@ private boolean fillAllMeasurements(EventHeader event) {
1175
1184
fitter .setRunNum (event .getRunNumber ());
1176
1185
double Variance =0.0 ;
1177
1186
for (RawTrackerHit rth : rawhits ){
1178
- double Min = 10000 ;
1179
- for (ShapeFitParameters fit : fitter .fitShape (rth , shape )){
1180
- if (fit .getT0Err ()<Min ){
1181
- Min =fit .getT0Err ();
1182
- }
1183
- }
1184
- if (module .Layer >1 ){
1185
- Variance +=1 /(Min *Min );
1186
- }
1187
+ double t0err = FittedRawTrackerHit .getT0Err (fittedRawTrackerHitMap .get (rth ));
1188
+ Variance +=1.0 /(t0err *t0err );
1189
+ // Why were we ignoring Layer 0...?
1190
+ // if(module.Layer>1){
1191
+ // Variance+=1/(Min*Min);
1192
+ // }
1187
1193
}
1188
1194
Variance =1.0 /Variance ;
1189
- Measurement m = new Measurement (umeas , xStrip , du , time , localHit .getdEdx ()*1000000. ,Variance );
1195
+ Measurement m = new Measurement (umeas , xStrip , du , time , localHit .getdEdx ()*1000000.0 ,Variance );
1190
1196
module .addMeasurement (m );
1191
1197
hitMap .put (m , hit );
1192
1198
hitsFilled ++;
0 commit comments