Skip to content

Commit 38cacf0

Browse files
committed
feat(g249 tracking): Add method to select the VFTX.
doc(tracking): change licenses fix: Fix classdefoverride fix: Fix typo fix(tracking): Add correct date in the copyright fix: Fixed minor errors suggested by copilot
1 parent e3d6a60 commit 38cacf0

4 files changed

Lines changed: 24 additions & 16 deletions

File tree

ssd/calibration/R3BFootHit2Track.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
* Copyright (C) 2025 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3-
* Copyright (C) 2019-2025 Members of R3B Collaboration *
3+
* Copyright (C) 2019-2026 Members of R3B Collaboration *
44
* *
55
* This software is distributed under the terms of the *
66
* GNU General Public Licence (GPL) version 3, *
@@ -165,8 +165,10 @@ void R3BFootHit2Track::Exec(Option_t* /*option*/)
165165
for (auto j = 0; j < nFrsHits; ++j)
166166
{
167167
auto frs_item = dynamic_cast<R3BFrsData*>(fFrsData->At(j));
168-
if (frs_item->GetStaId() != 2)
168+
169+
if (frs_item->GetStaId() != vftxNumber)
169170
continue; // 2 - new VFTX with 10ps resolution
171+
170172
frsZ = frs_item->GetZ();
171173
frsAoQ = frs_item->GetAq();
172174
}
@@ -486,4 +488,4 @@ void R3BFootHit2Track::FinishTask()
486488
std::cout << "\nN good events in all FOOTs = " << NgoodEventsInAllFoots << "\n";
487489
}
488490

489-
ClassImp(R3BFootHit2Track)
491+
ClassImp(R3BFootHit2Track)

ssd/calibration/R3BFootHit2Track.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
* Copyright (C) 2025 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3-
* Copyright (C) 2019-2025 Members of R3B Collaboration *
3+
* Copyright (C) 2019-2026 Members of R3B Collaboration *
44
* *
55
* This software is distributed under the terms of the *
66
* GNU General Public Licence (GPL) version 3, *
@@ -78,6 +78,8 @@ class R3BFootHit2Track : public FairTask
7878
void PrepareMinimizer(); // reset and set limits for the minimizer
7979
bool RunMinimizer(); // execute minimzation
8080

81+
void SetVFTXNumber(int nb) { vftxNumber = nb; };
82+
8183
R3BTrackingParticle* AddTrack(const R3BTrackingParticle& p);
8284
void Transform_Point(TString flag, TVector3& hit_point, TVector3* offset, TVector3* rotation);
8385
bool FitParticle(R3BTrackingParticle& part, TrackDirection direction); // flag = "in" or "out"
@@ -141,6 +143,9 @@ class R3BFootHit2Track : public FairTask
141143
TrackDirection fInOutFlag;
142144
R3BEventHeader* fHeader = nullptr;
143145

144-
public:
145-
ClassDefOverride(R3BFootHit2Track, 1);
146+
private:
147+
// Select the VFTX
148+
int vftxNumber = 2;
149+
150+
ClassDefOverride(R3BFootHit2Track, 2);
146151
};

tracking/R3BTrackingG249.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
* Copyright (C) 2025 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3-
* Copyright (C) 2025 Members of R3B Collaboration *
3+
* Copyright (C) 2025-2026 Members of R3B Collaboration *
44
* *
55
* This software is distributed under the terms of the *
66
* GNU General Public Licence (GPL) version 3, *
@@ -254,7 +254,7 @@ void R3BTrackingG249::Exec(Option_t* /*option*/)
254254
{
255255
auto frs_item = dynamic_cast<R3BFrsData*>(frs_DataItems->At(j));
256256
R3BLOG_IF(fatal, !frs_item, "ERROR in the FRS data");
257-
if (frs_item->GetStaId() != 2)
257+
if (frs_item->GetStaId() != vftxNumber)
258258
continue; // 2 - new VFTX with 10ps resolution
259259
frsZ = frs_item->GetZ();
260260
frsAoQ = frs_item->GetAq();
@@ -693,4 +693,4 @@ double R3BTrackingG249::AlignmentError(const double* par)
693693
return v;
694694
}
695695

696-
ClassImp(R3BTrackingG249);
696+
ClassImp(R3BTrackingG249)

tracking/R3BTrackingG249.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/******************************************************************************
22
* Copyright (C) 2025 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3-
* Copyright (C) 2025 Members of R3B Collaboration *
3+
* Copyright (C) 2025-2026 Members of R3B Collaboration *
44
* *
55
* This software is distributed under the terms of the *
66
* GNU General Public Licence (GPL) version 3, *
@@ -13,8 +13,7 @@
1313

1414
// Created on 16/09/2025 by V.Panin
1515

16-
#ifndef R3BTRACKINGG249
17-
#define R3BTRACKINGG249
16+
#pragma once
1817

1918
#include "FairTask.h"
2019
#include "R3BEventHeader.h"
@@ -74,6 +73,9 @@ class R3BTrackingG249 : public FairTask
7473
void SetAnglesFib33(double x, double y, double z) { f33_angles.SetXYZ(x, y, z); } // rad
7574
void SetAnglesTofd(double x, double y, double z) { tofd_angles.SetXYZ(x, y, z); } // rad
7675

76+
// Setter for the VFTX number
77+
void SetVFTXNumber(int nb) { vftxNumber = nb; }
78+
7779
// Get lab positions and angles (needed by alignment function)
7880
inline TVector3 GetPositionLOS() { return los_position; } // cm
7981
inline TVector3 GetPositionF30() { return f30_position; } // cm
@@ -187,6 +189,8 @@ class R3BTrackingG249 : public FairTask
187189
std::unique_ptr<ROOT::Math::Minimizer> minimizer;
188190

189191
private:
192+
int vftxNumber = 2;
193+
190194
//-- Input hit data from the TClonesArray
191195
// do not change the order, add new det in the end
192196
enum DetectorInstances
@@ -291,8 +295,5 @@ class R3BTrackingG249 : public FairTask
291295

292296
TH2F* h2_lab_XZ;
293297

294-
public:
295-
ClassDefOverride(R3BTrackingG249, 1)
298+
ClassDefOverride(R3BTrackingG249, 2)
296299
};
297-
298-
#endif

0 commit comments

Comments
 (0)