Skip to content

Commit 68e6d61

Browse files
raffaelladevitabaltzell
authored andcommitted
moved RF offsets to time written to RUN::rf bank
1 parent c45776e commit 68e6d61

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

reconstruction/eb/src/main/java/org/jlab/rec/eb/EBRadioFrequency.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public double getStartTime(DetectorParticle trigger,final DetectorType type,fin
5555
// to accommadate the modulus in the next step, as it was done in CLAS6.
5656
// Probably this should be "simplified" with Math.IEEERemainder.)
5757
final double tVertexRF = - tVertex - dzTargetVertex / PhysicsConstants.speedOfLight()
58-
+ this.rfTime + this.ccdb.getDouble(EBCCDBEnum.RF_OFFSET)
59-
+ (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;
58+
+ this.rfTime + (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;
6059

6160
// The relative, RF-beam-bucket-centering correction, based only on the
6261
// trigger particle:
@@ -168,7 +167,7 @@ public boolean add(int tdc) {
168167
final double rfOffset = ccdb.getDouble(EBCCDBEnum.RF_OFFSET);
169168
final double rfBucketLength = ccdb.getDouble(EBCCDBEnum.RF_BUCKET_LENGTH);
170169
boolean skip = false;
171-
double time = (tdc*rfTdc2Time) % (rfCycles*rfBucketLength) - this.getJitter();
170+
double time = (tdc*rfTdc2Time) % (rfCycles*rfBucketLength) - this.getJitter() + rfOffset;
172171
// check if new TDC value compared to previous one is consistent with 80*2.004 ns interval
173172
if(this._tdc.size()>0) {
174173
int deltaTDC = tdc - this._tdc.get(this._tdc.size()-1);

0 commit comments

Comments
 (0)