Skip to content

Commit 5621ca4

Browse files
authored
Merge pull request #25 from JeffersonLab/24
changes to tracking to resolve L0 not using L6
2 parents 99080f4 + 3a2604b commit 5621ca4

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

steering-files/src/main/resources/org/hps/steering/recon/EngineeringRun2015FullReconMCLayer0.lcsim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@
146146
<ecalClusterCollectionName>EcalClustersCorr</ecalClusterCollectionName>
147147
<trackCollectionNames>MatchedTracks GBLTracks</trackCollectionNames>
148148
</driver>
149-
<driver name="TrackDataDriver" type="org.hps.recon.tracking.TrackDataDriver" />
149+
<driver name="TrackDataDriver" type="org.hps.recon.tracking.TrackDataDriver">
150+
<layerNum>7</layerNum>
151+
</driver>
150152
<driver name="LCIOWriter" type="org.lcsim.util.loop.LCIODriver">
151153
<outputFilePath>${outputFile}.slcio</outputFilePath>
152154
</driver>

steering-files/src/main/resources/org/hps/steering/recon/PhysicsRun2016FullReconLayer0.lcsim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@
133133
<rmsTimeCut>8.0</rmsTimeCut>
134134
</driver>
135135
<driver name="MergeTrackCollections" type="org.hps.recon.tracking.MergeTrackCollections" />
136-
<driver name="TrackDataDriver" type="org.hps.recon.tracking.TrackDataDriver" />
136+
<driver name="TrackDataDriver" type="org.hps.recon.tracking.TrackDataDriver">
137+
<layerNum>7</layerNum>
138+
</driver>
137139
<driver name="ReconParticleDriver" type="org.hps.recon.particle.HpsReconParticleDriver" >
138140
<ecalClusterCollectionName>EcalClustersCorr</ecalClusterCollectionName>
139141
<trackCollectionNames>MatchedTracks GBLTracks</trackCollectionNames>

tracking/src/main/java/org/hps/recon/tracking/TrackDataDriver.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ public final class TrackDataDriver extends Driver {
7373
/** The extrapolation step size */
7474
double stepSize = 5.0; // mm
7575

76+
/** The default number of layers */
77+
int layerNum = 6;
78+
7679
/** Default constructor */
7780
public TrackDataDriver() {
7881
}
@@ -98,6 +101,15 @@ void setStepSize(double stepSize) {
98101
this.stepSize = stepSize;
99102
}
100103

104+
/**
105+
* Set number of tracking layers. Default is 6 layers.
106+
*
107+
*/
108+
109+
public void setLayerNum(int layerNum) {
110+
this.layerNum = layerNum;
111+
}
112+
101113
/**
102114
* Method called by the framework when a new {@link Detector} geometry is
103115
* loaded. This method is called at the beginning of every run and
@@ -283,7 +295,7 @@ protected void process(EventHeader event) {
283295

284296
// Calculate the track isolation constants for each of the
285297
// layers
286-
Double[] isolations = TrackUtils.getIsolations(track, hitToStrips, hitToRotated);
298+
Double[] isolations = TrackUtils.getIsolations(track, hitToStrips, hitToRotated,layerNum);
287299
double qualityArray[] = new double[isolations.length];
288300
for (int i = 0; i < isolations.length; i++) {
289301
qualityArray[i] = isolations[i] == null ? -99999999.0 : isolations[i];

tracking/src/main/java/org/hps/recon/tracking/TrackUtils.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public static double[] getParametersAtNewRefPoint(double[] newRefPoint, double[]
129129
if (Math.abs( dphi ) > Math.PI)
130130
throw new RuntimeException("dphi is large " + dphi + " from phi0 " + phi0
131131
+ " and phinew " + phinew + " take care of the ambiguity!!??");
132+
//System.out.println("dphi is large " + dphi + " from phi0 " + phi0 + " and phinew " + phinew + " take care of the ambiguity!!??");
132133

133134
// calculate new dca
134135
double dcanew = dca + dx*sinphi - dy*cosphi + (dx*cosphi + dy*sinphi)*Math.tan( dphi/2. );
@@ -1286,8 +1287,8 @@ public static double getIsolation(TrackerHit strip, TrackerHit otherStrip, Relat
12861287
* @param hitToRotated
12871288
* @return isolations for all 12 strip layers
12881289
*/
1289-
public static Double[] getIsolations(Track trk, RelationalTable hitToStrips, RelationalTable hitToRotated) {
1290-
Double[] isolations = new Double[12];
1290+
public static Double[] getIsolations(Track trk, RelationalTable hitToStrips, RelationalTable hitToRotated, int layers) {
1291+
Double[] isolations = new Double[2*layers];
12911292
for (TrackerHit hit : trk.getTrackerHits()) {
12921293
Set<TrackerHit> htsList = hitToStrips.allFrom(hitToRotated.from(hit));
12931294
TrackerHit[] strips = new TrackerHit[2];
@@ -1298,7 +1299,9 @@ public static Double[] getIsolations(Track trk, RelationalTable hitToStrips, Rel
12981299
return isolations;
12991300
}
13001301

1301-
1302+
public static Double[] getIsolations(Track trk, RelationalTable hitToStrips, RelationalTable hitToRotated) {
1303+
return getIsolations(trk, hitToStrips, hitToRotated, 6);
1304+
}
13021305

13031306
/**
13041307
* Backward compatibility function for {@code extrapolateTrackUsingFieldMap}.

0 commit comments

Comments
 (0)