Skip to content

Commit

Permalink
moved RF offsets to time written to RUN::rf bank
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaelladevita committed Jan 29, 2025
1 parent 3a79c67 commit ea32cc8
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public double getStartTime(DetectorParticle trigger,final DetectorType type,fin
// to accommadate the modulus in the next step, as it was done in CLAS6.
// Probably this should be "simplified" with Math.IEEERemainder.)
final double tVertexRF = - tVertex - dzTargetVertex / PhysicsConstants.speedOfLight()
+ this.rfTime + this.ccdb.getDouble(EBCCDBEnum.RF_OFFSET)
+ (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;
+ this.rfTime + (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;

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

0 comments on commit ea32cc8

Please sign in to comment.