Skip to content

Commit 1563cd9

Browse files
undoing RF offset changes
1 parent bd70417 commit 1563cd9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ 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 + (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;
58+
+ this.rfTime + this.ccdb.getDouble(EBCCDBEnum.RF_OFFSET)
59+
+ (EBConstants.RF_LARGE_INTEGER+0.5)*rfPeriod;
5960

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

reconstruction/eb/src/main/java/org/jlab/service/eb/EBEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public boolean processDataEventUser(DataEvent de,EBScalers ebs) {
113113

114114
// Process RF:
115115
EBRadioFrequency rf = new EBRadioFrequency(ccdb);
116-
eb.getEvent().getEventHeader().setRfTime(rf.getTime(de));
116+
eb.getEvent().getEventHeader().setRfTime(rf.getTime(de)+ccdb.getDouble(EBCCDBEnum.RF_OFFSET));
117117

118118
List<DetectorResponse> responseECAL = CalorimeterResponse.readHipoEvent(de, "ECAL::clusters", DetectorType.ECAL,"ECAL::moments", "ECAL::calib");
119119
List<DetectorResponse> responseFTOF = ScintillatorResponse.readHipoEvent(de, ftofHitsType, DetectorType.FTOF);

0 commit comments

Comments
 (0)