Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
8397cb4
Implemented a way to invert the drift velocity direction inside the A…
RealAurio Sep 8, 2025
43ddd7a
Changed the part of the code that finds the vertex. Also passed the A…
RealAurio Sep 29, 2025
21a117f
Refactored a bunch of the code related to the fitting step of the ana…
RealAurio Jul 21, 2025
ae9dba2
Renamed and most changes regarding rebranding of AtFitMetadata (previ…
RealAurio Sep 1, 2025
a911f4a
Last changes, in different commit due to renaming of the file.
RealAurio Sep 1, 2025
95c0de8
Changes some comments, removed statistics from AtFittedTrack and clan…
RealAurio Sep 1, 2025
34014b2
Brought back the old getters and setters, as well as split the Kinema…
RealAurio Sep 2, 2025
d2acaae
Changed the interface of AtFitter, changed the name of namespace from…
RealAurio Sep 3, 2025
3eef235
Last change?
RealAurio Sep 3, 2025
95c877e
Very last change?
RealAurio Sep 5, 2025
b4eb689
Removed stuff from AtFitter that ended up being too case specific to …
RealAurio Sep 22, 2025
f22589f
Added class template for the Bragg curve fitter.
RealAurio Sep 9, 2025
c36225d
Added a getter for the density in the AtELossModels. Also added a mem…
RealAurio Sep 9, 2025
91ef46d
Added an AtBraggFitMetadata.
RealAurio Sep 15, 2025
b969a50
Setting angles in AtSampleConsensus. Added a base method to AtPattern…
RealAurio Sep 15, 2025
829384f
Added particle information in the AtELossModels so that it can eventu…
RealAurio Sep 15, 2025
7805a8b
Added a way to forze GetBraggCurve to compute dE/dx values up to a mi…
RealAurio Sep 18, 2025
3014fbf
Stupid mistake.
RealAurio Sep 18, 2025
f4ac692
Fixed yet another infinite loop... Also added a method to AtELossMode…
RealAurio Sep 22, 2025
5ab53d0
First iteration of the Bragg curve fitter that at least does not die …
RealAurio Sep 22, 2025
37fffb4
Removing this before I forget.
RealAurio Sep 22, 2025
9439f86
The fit metadatas can now be saved in their respective containers wit…
RealAurio Sep 22, 2025
1601608
Added the AtTrackingEvent and AtFitMetadata branches to the viewer.
RealAurio Sep 22, 2025
4b44670
Added to the metadata and fitted track classes some copy constructors…
RealAurio Sep 23, 2025
1577f6e
Started implementing some of the AtFittedTrack and AtFitMetadata stuf…
RealAurio Sep 23, 2025
3fb3037
Stored the best fitting ELoss profile in the metadata so it can be us…
RealAurio Sep 24, 2025
dea9b11
Display more information on the viewer regarding the fit metadata. Al…
RealAurio Sep 25, 2025
a3a3013
Started implementing an AtTools class to check if an AtTrack punches …
RealAurio Sep 29, 2025
3fa2c55
First implementation of the punch through checker class.
RealAurio Oct 7, 2025
a715ed6
Finished implementing the punch through filter on the Bragg curve fit…
RealAurio Oct 15, 2025
d12a2c0
Changed the way the punch through checker is implemented in the fitte…
RealAurio Oct 20, 2025
abc550d
If no ELoss profile was reconstructed, then the fitter would die. Add…
RealAurio Oct 20, 2025
a080d32
Passed the vertex used in the Bragg curve reconstruction into the AtF…
RealAurio Oct 29, 2025
ee81dea
Changed how the geometric angles are calculated for the AtTracks in t…
RealAurio Oct 30, 2025
390af57
Clang-format.
RealAurio Oct 30, 2025
68774d6
Clang-format 2.
RealAurio Oct 30, 2025
1d35137
Added a track number controller in order to be able to print and draw…
RealAurio Nov 9, 2025
8c27d82
Merge branch '8397cb49'
RealAurio Nov 9, 2025
e9eee9e
Copied parameter file, script and unpacker for the E546 experiment. C…
RealAurio Oct 20, 2025
db897aa
Refixing something on the FRIB linked unpacker that was fixed before …
RealAurio Oct 20, 2025
6fd21cc
Added the bragg curve fitter to the unpacker and the bragg curve tab …
RealAurio Oct 20, 2025
638ac13
Fine tuned the amplitude factor parameter a bit.
RealAurio Oct 20, 2025
8a1fb62
Merge branch 'abc550d9'
RealAurio Nov 9, 2025
780640d
Updated code + RCNP sim
dpalac May 26, 2025
e85495b
Made subfolder for E565 experiment.
RealAurio Oct 22, 2025
19fecab
E565: Changed pressure to 600Torr and beam energy to 21MeV/u. Also cl…
RealAurio Oct 24, 2025
6ff545d
E565: Added digitalization macro and parameters for the simulation. A…
RealAurio Oct 24, 2025
47b815e
E565: Added PDG codes to the digitizer macro so they can be used in l…
RealAurio Oct 29, 2025
72091bc
Merge branch 'a080d32e'
RealAurio Nov 9, 2025
b43fb4e
E565: Removed d, t and 4He from the fitter for now. Created a macro t…
RealAurio Oct 29, 2025
2a3086f
E565: Added a kinematic line for both the start and the end of the AT…
RealAurio Oct 30, 2025
86cc000
E565: Moved kinematic files to a separate folder just for them. Added…
RealAurio Oct 30, 2025
9432080
Merge branch '68774d64'
RealAurio Nov 9, 2025
f56a67e
E565: Renaming simulation macro to make it more clear.
RealAurio Oct 30, 2025
294cb0e
E565: Failed rename.
RealAurio Oct 30, 2025
bde4332
E565: Moved things around to keep the main folder a bit cleaner. Adde…
RealAurio Oct 31, 2025
96094c5
Just small changes to geometry and media.geo
RealAurio Nov 7, 2025
db22f0e
E565: Additions to the getSetupAcceptance.C macro.
RealAurio Nov 7, 2025
dbd9dfd
E565: Changed the paths to the ones on the analysis PC. Decreased the…
RealAurio Nov 7, 2025
d333e4f
E565: Fixing small mistake in previous commit.
RealAurio Nov 7, 2025
bc9ab9b
E565: Fixing yet another small mistake in previous commit.
RealAurio Nov 7, 2025
212dc6e
E565: Added the decay 13Be->12Be+n to the simulation. This fixes the …
RealAurio Nov 8, 2025
da1684f
E565: Reconfigured the trackIDs in the getSetupAcceptance.C macro. Ad…
RealAurio Nov 8, 2025
6fd73ce
E565: Made the simulation for 500Torr, 600Torr and 700Torr.
RealAurio Nov 9, 2025
efbebc0
E565: Added the Ex and thetaCM histograms.
RealAurio Nov 9, 2025
da9980d
Merge branch 'origin/braggCurveFitter'
RealAurio Nov 9, 2025
5267208
E565: Added simulation for 2.53MeV excitation energy.
RealAurio Nov 10, 2025
c1bf89d
Made a folder for all the RCNP parameters... Best to keep it organized.
RealAurio Nov 10, 2025
6732e6b
E565: Added analysis folder, media entry for the C3D8 pressure used a…
RealAurio Nov 10, 2025
5437b0c
E565: Adjusted the exit window TB. Added the actual mapping that the …
RealAurio Nov 12, 2025
39e5675
E565: Added the actual Silicon unpacker. Tried to get the silicon dat…
RealAurio Nov 12, 2025
75c7d1b
E565: Managed to get something that could be the elastic scattering c…
RealAurio Nov 12, 2025
0e83a45
E565: Added a Si only unpacker to check only silicon data.
RealAurio Nov 12, 2025
9776ee6
E565: Improved PID by using only the small pads for dEdx calculation.…
RealAurio Nov 14, 2025
f6fe0d3
Added event class AtSiEvent to store the Si detector's events from RC…
RealAurio Nov 16, 2025
f447ded
Fixed the kinematic lines to 22MeV/u and added some new ones.
RealAurio Nov 16, 2025
4f5fa5a
E565: Last changes to the kinematics and unpacker for this experiment…
RealAurio Nov 16, 2025
b9d952e
Forgot to commit this important change to the formatting of the Si au…
RealAurio Nov 16, 2025
be07771
E565: Adding this so the next person analyzing this has it ready.
RealAurio Nov 17, 2025
dabbb69
E534: Added AtGaggEvent and AtGaggTask to process the GAGG data from …
RealAurio Nov 17, 2025
1530754
Changed the initializer of the arrays in AtGaggEvent so that all valu…
RealAurio Nov 18, 2025
0cfb96e
Really important.
RealAurio Nov 18, 2025
7090b24
E534: Played around with the GAGG analysis. However, there is an issu…
RealAurio Nov 18, 2025
1659d54
E565: Some missing macros and changes. Commiting just to have them sa…
RealAurio Dec 19, 2025
aaa888e
Added all uncommited changes of everything in the folders of the RCNP…
RealAurio Jan 17, 2026
d59b6f7
Merging vetoBeamPads branch.
RealAurio Feb 14, 2026
2fcf382
Merged ENCourseMerger branch.
RealAurio Mar 2, 2026
3e6f6fe
Merged updated ENCourseMerger branch.
RealAurio Mar 5, 2026
d942e2d
Merged IonChamberAnalysis branch.
RealAurio Mar 6, 2026
d03cdb7
Added the IC events to the ENCourse test macros to check if the beam …
RealAurio Mar 6, 2026
519017e
Removing mapping that is wrong.
RealAurio Mar 16, 2026
650d4f0
Merged fixed ENCourseMerger branch.
RealAurio Mar 17, 2026
6680b24
Clang-formatted.
RealAurio Mar 17, 2026
c4c3098
Clang-formatted 2.
RealAurio Mar 17, 2026
b7caf0c
Added the possibility to pass negative silicon traces to the AtPSASi …
RealAurio Mar 23, 2026
f73f329
Added silicon mapping files, both in csv and xml.
RealAurio Mar 23, 2026
0c3e7fc
Fixed how the baseline is substracted for the case of negative traces…
RealAurio Mar 26, 2026
426ab99
Merging origin/AtMapCalibration branch.
RealAurio Mar 26, 2026
df9a3c7
Protected switched back to private in AtPSA after the merge. Changing…
RealAurio Mar 26, 2026
6963c03
Changing AtPSA to AtPSASi in AtSiTask, since it needs to be an AtPSAS…
RealAurio Mar 26, 2026
b9a0201
Turns out the negative polarity implementation in the AtPSASi class w…
RealAurio Mar 26, 2026
56a7022
Setting the ADC values of the GAGG to the array. For some reason, Get…
RealAurio Mar 27, 2026
fcecdd4
Merging astinso4/SiAnalysis branch
astinso4 Apr 8, 2026
49f2929
clang-formatted.
RealAurio Apr 9, 2026
cc1e0ea
Added a constructor for AtSiTask which does not take in a silicon map…
RealAurio Apr 9, 2026
494081b
Re-enabled the GAGG analysis. Set some of the couts to LOG(debug).
RealAurio Apr 9, 2026
1e8142e
GAGG processing updates (#5)
belmakier May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions AtData/AtBraggFitMetadata.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include "AtBraggFitMetadata.h"

#include <iostream>
ClassImp(AtBraggFitMetadata);

std::unique_ptr<AtFitTrackMetadata> AtBraggFitMetadata::Clone()
{
return std::make_unique<AtBraggFitMetadata>(*this);
}

void AtBraggFitMetadata::Print() const
{
AtFitTrackMetadata::Print();

std::cout << " Bragg fitting specifics: " << std::endl;
std::cout << " Punched through? " << fIsPunchThrough << std::endl;
std::cout << " Reconstructed ELoss profile? " << fIsReconstructedELoss << std::endl;
std::cout << " ELoss model name: " << fELossModelName.Data() << std::endl;
std::cout << " Particle: (A, Z) = (" << fA << ", " << fZ << "), mass = " << fMassAmu << " umas" << std::endl;
std::cout << " KineticEnergy = (" << fKineticEnergy << " +- " << fKineticEnergyUncertainty << ") MeV" << std::endl;
std::cout << " AmplitudeFactor = (" << fAmplitudeFactor << " +- " << fAmplitudeFactorUncertainty << ") ADC/MeV"
<< std::endl;
}
81 changes: 81 additions & 0 deletions AtData/AtBraggFitMetadata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#ifndef ATBRAGGFITMETADATA_H
#define ATBRAGGFITMETADATA_H

#include "AtFitTrackMetadata.h"

#include <Rtypes.h> // for Double_t, THashConsistencyHolder, ClassDefOverride
#include <TObject.h>
#include <TString.h>

class TBuffer;
class TClass;
class TMemberInspector;

/**
* Class for storing the result of the fit of an AtTrack from an AtFitter class.
*/
class AtBraggFitMetadata : public AtFitTrackMetadata {
protected:
// Parameters of the fit and name of the ELoss model used.
TString fELossModelName{"none"};
Double_t fKineticEnergy{-1}; // MeV
Double_t fKineticEnergyUncertainty{-1}; // MeV
Double_t fAmplitudeFactor{-1}; // ADC/MeV
Double_t fAmplitudeFactorUncertainty{-1}; // ADC/MeV

// Particle information.
TString fPDGCode{"none"};
Int_t fA{0};
Int_t fZ{0};
Double_t fMassAmu{0};

// The ELoss profile that best fits the experimental Bragg curve. Stored here for quick access on the Bragg curve tab
// of the viewer for example.
std::vector<std::pair<Double_t, Double_t>> fELossFitValues;

// Parameter to store whether or not the track punched through. Most likely, yes.
Bool_t fIsPunchThrough{kTRUE};

// Sometimes, the experimental Bragg curve values could not be reconstructed (vertex not found for example).
Bool_t fIsReconstructedELoss{kFALSE};

public:
AtBraggFitMetadata() = default;
AtBraggFitMetadata(const AtBraggFitMetadata &) = default;
AtBraggFitMetadata(AtBraggFitMetadata &&) = default;
~AtBraggFitMetadata() = default;

virtual std::unique_ptr<AtFitTrackMetadata> Clone() override;

void SetELossModelName(std::string name) { fELossModelName = TString(name); }
void SetKineticEnergy(Double_t value) { fKineticEnergy = value; }
void SetKineticEnergyUncertainty(Double_t value) { fKineticEnergyUncertainty = value; }
void SetAmplitudeFactor(Double_t value) { fAmplitudeFactor = value; }
void SetAmplitudeFactorUncertainty(Double_t value) { fAmplitudeFactorUncertainty = value; }
void SetPDGCode(std::string value) { fPDGCode = TString(value); }
void SetAtomicMassNumber(Int_t value) { fA = value; }
void SetChargeNumber(Int_t value) { fZ = value; }
void SetMassAmu(Double_t value) { fMassAmu = value; }
void SetELossFitValues(std::vector<std::pair<Double_t, Double_t>> values) { fELossFitValues = values; }
void SetIsPunchThrough(Bool_t value) { fIsPunchThrough = value; }
void SetIsReconstructedELoss(Bool_t value) { fIsReconstructedELoss = value; }

TString GetELossModelName() { return fELossModelName; }
Double_t GetKineticEnergy() { return fKineticEnergy; }
Double_t GetKineticEnergyUncertainty() { return fKineticEnergyUncertainty; }
Double_t GetAmplitudeFactor() { return fAmplitudeFactor; }
Double_t GetAmplitudeFactorUncertainty() { return fAmplitudeFactorUncertainty; }
TString GetPDGCode() { return fPDGCode; }
Int_t GetAtomicMassNumber() { return fA; }
Int_t GetChargeNumber() { return fZ; }
Double_t GetMassAmu() { return fMassAmu; }
std::vector<std::pair<Double_t, Double_t>> GetELossFitValues() { return fELossFitValues; }
Bool_t GetIsPunchThrough() { return fIsPunchThrough; }
Bool_t GetIsReconstructedELoss() { return fIsReconstructedELoss; }

virtual void Print() const override;

ClassDefOverride(AtBraggFitMetadata, 1);
};

#endif
14 changes: 14 additions & 0 deletions AtData/AtDataLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@
#pragma link C++ class AtTrackingEvent + ;
#pragma link C++ class AtProtoQuadrant + ;
#pragma link C++ class AtTrack + ;
#pragma link C++ struct AtTrack::BraggCurve + ;
#pragma link C++ class AtFittedTrack + ;
#pragma link C++ class AtFissionEvent + ;
#pragma link C++ class AtGenericTrace + ;
#pragma link C++ class AtSiEvent + ;
#pragma link C++ class AtGaggEvent + ;
#pragma link C++ class AtENCourseEvent + ;
#pragma link C++ class AtPPACPair + ;
#pragma link C++ class AtICEvent + ;

#pragma link C++ class AtPatterns::AtPattern + ;
#pragma link C++ class AtPatterns::AtPatternLine + ;
Expand All @@ -43,5 +49,13 @@
#pragma link C++ enum AtPatterns::PatternType;
#pragma link C++ function AtPatterns::CreatePattern;

#pragma link C++ class AtFitMetadata + ;
#pragma link C++ class AtFitTrackMetadata + ;
#pragma link C++ class MCFitter::AtMCResult + ;
#pragma link C++ class AtBraggFitMetadata + ;

#pragma link C++ class AtTrackingEventOld + ;
#pragma link C++ class AtFittedTrackOld + ;
#pragma link C++ class MCFitter::AtMCResultOld + ;

#endif
38 changes: 38 additions & 0 deletions AtData/AtENCourseEvent.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include "AtENCourseEvent.h"

#include <Rtypes.h>

ClassImp(AtENCourseEvent);

AtENCourseEvent::AtENCourseEvent() : AtBaseEvent("AtENCourseEvent")
{
fF2PPACs = nullptr;
fF3PPACs = nullptr;
for (int i = 0; i < 4; i++)
fRFToF[i] = -999;
fTDCRef = 0;
}

AtENCourseEvent::AtENCourseEvent(const AtENCourseEvent &copy) : AtBaseEvent(copy), fTDCRef(copy.fTDCRef)
{
fF2PPACs = copy.fF2PPACs->Clone();
fF3PPACs = copy.fF3PPACs->Clone();
for (int i = 0; i < 4; i++)
fRFToF[i] = copy.fRFToF[i];
}

AtENCourseEvent &AtENCourseEvent::operator=(AtENCourseEvent object)
{
swap(*this, object);
return *this;
}

void AtENCourseEvent::Clear(Option_t *opt)
{
AtBaseEvent::Clear(opt);
fF2PPACs.reset();
fF3PPACs.reset();
for (int i = 0; i < 4; i++)
fRFToF[i] = -999;
fTDCRef = 0;
}
53 changes: 53 additions & 0 deletions AtData/AtENCourseEvent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef AtENCOURSEEVENT_H
#define AtENCOURSEEVENT_H

#include "AtBaseEvent.h"
#include "AtPPACPair.h"

#include <FairLogger.h>

#include <Rtypes.h>

class AtENCourseEvent : public AtBaseEvent {
private:
std::unique_ptr<AtPPACPair> fF2PPACs;
std::unique_ptr<AtPPACPair> fF3PPACs;

Int_t fRFToF[4];
Int_t fTDCRef;

public:
AtENCourseEvent();
AtENCourseEvent(const AtENCourseEvent &copy);
AtENCourseEvent(const AtBaseEvent &copy) : AtBaseEvent(copy) { SetName("AtENCourseEvent"); }
AtENCourseEvent &operator=(const AtENCourseEvent object);
virtual ~AtENCourseEvent() = default;

friend void swap(AtENCourseEvent &first, AtENCourseEvent &second)
{
using std::swap;
swap(dynamic_cast<AtBaseEvent &>(first), dynamic_cast<AtBaseEvent &>(second));

swap(first.fF2PPACs, second.fF2PPACs);
swap(first.fF3PPACs, second.fF3PPACs);
swap(first.fRFToF, second.fRFToF);
swap(first.fTDCRef, second.fTDCRef);
}

void Clear(Option_t *opt = nullptr) override;

void SetF2PPACs(std::unique_ptr<AtPPACPair> F2PPACs) { fF2PPACs = std::move(F2PPACs); }
void SetF3PPACs(std::unique_ptr<AtPPACPair> F3PPACs) { fF3PPACs = std::move(F3PPACs); }
void SetRFToF(Int_t RFToF, Int_t idx = 0) { fRFToF[idx] = RFToF; }
void SetTDCRef(Int_t TDCRef) { fTDCRef = TDCRef; }

const AtPPACPair &GetF2PPACs() const { return *fF2PPACs; }
const AtPPACPair &GetF3PPACs() const { return *fF3PPACs; }
const Int_t GetRFToF(Int_t idx = 0) const { return fRFToF[idx]; }
const Int_t GetTDCRef() const { return fTDCRef; }
const Int_t GetTDCRefRFToF(Int_t idx = 0) const { return fRFToF[idx] - fTDCRef; }

ClassDefOverride(AtENCourseEvent, 1);
};

#endif
14 changes: 14 additions & 0 deletions AtData/AtFitMetadata.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "AtFitMetadata.h"

ClassImp(AtFitMetadata);

AtFitMetadata::AtFitMetadata(const AtFitMetadata &copy) : fEventID(copy.fEventID)
{
for (auto const &entry : copy.fMetadatas) {
Int_t trackID = entry.first;
TrackMetadatasVector newMetadatasVector;
for (auto &&metadata : entry.second)
newMetadatasVector.push_back(metadata->Clone());
fMetadatas.insert({trackID, std::move(newMetadatasVector)});
}
}
61 changes: 61 additions & 0 deletions AtData/AtFitMetadata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#ifndef ATFITMETADATA_H
#define ATFITMETADATA_H

#include "AtFitTrackMetadata.h"

#include <FairLogger.h>

#include <Rtypes.h> // for Double_t, THashConsistencyHolder, ClassDefOverride
#include <TObject.h>

#include <functional>
#include <map>
#include <memory>
#include <utility>

class TBuffer;
class TClass;
class TMemberInspector;

/**
* Class for storing the result of the fit for the entire AtTrackingEvent from an AtFitter class.
*/
class AtFitMetadata : public TObject {
public:
using TrackMetadataPtr = std::unique_ptr<AtFitTrackMetadata>;
using TrackMetadatasVector = std::vector<TrackMetadataPtr>;
using MetadatasMap = std::map<Int_t, TrackMetadatasVector>;

protected:
/**
* Map to store the metadatas for all different fits done to all tracks in the event.
* The Int_t corresponds to the trackID for which the metadatas correspond to.
* The vector of AtFitTrackMetadata contains the different metadatas for all fits
* that have been done for the track (for example, different assumptions for the
* particles of the track, different initial conditions, etc...).
*/
MetadatasMap fMetadatas;

// Event ID for which this fit was done.
ULong_t fEventID;

public:
AtFitMetadata() = default;
AtFitMetadata(const AtFitMetadata &copy);
~AtFitMetadata() = default;

void SetTrackMetadatasVector(Int_t trackID, TrackMetadatasVector metadatas)
{
fMetadatas.insert({trackID, std::move(metadatas)});
}

void SetEventID(ULong_t id) { fEventID = id; }

TrackMetadatasVector &GetTrackMetadatasVector(Int_t trackID) { return fMetadatas.at(trackID); }
ULong_t GetEventID() { return fEventID; }
Int_t GetNumEntries() { return fMetadatas.size(); }

ClassDefOverride(AtFitMetadata, 1);
};

#endif
21 changes: 21 additions & 0 deletions AtData/AtFitTrackMetadata.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include "AtFitTrackMetadata.h"

#include <iostream>
ClassImp(AtFitTrackMetadata);

std::unique_ptr<AtFitTrackMetadata> AtFitTrackMetadata::Clone()
{
return std::make_unique<AtFitTrackMetadata>(*this);
}

void AtFitTrackMetadata::Print() const

{
std::cout << " Fit metadata " << fFitID << " for track with ID " << fTrackID << ":" << std::endl;

std::cout << " Statistics: " << std::endl;
std::cout << " PValue = " << fPValue << std::endl;
std::cout << " Chi2 = " << fChi2 << std::endl;
std::cout << " NDF = " << fNdf << std::endl;
std::cout << " Converged = " << fFitConverged << std::endl;
}
58 changes: 58 additions & 0 deletions AtData/AtFitTrackMetadata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#ifndef ATFITTRACKMETADATA_H
#define ATFITTRACKMETADATA_H

#include <Rtypes.h> // for Double_t, THashConsistencyHolder, ClassDefOverride
#include <TObject.h>

#include <memory>
class TBuffer;
class TClass;
class TMemberInspector;

/**
* Class for storing the result of the fit of an AtTrack from an AtFitter class.
*/
class AtFitTrackMetadata : public TObject {
protected:
// Statistics parameters of the fit.
Double_t fPValue{0};
Double_t fChi2{0};
Int_t fNdf{0};
Bool_t fFitConverged{false};

// The track ID for which this fit was done for.
Int_t fTrackID{-1};

// More than 1 fit may be done for each track. Adding a fit ID.
Int_t fFitID{-1};

public:
AtFitTrackMetadata() = default;
AtFitTrackMetadata(const AtFitTrackMetadata &) = default;
AtFitTrackMetadata(AtFitTrackMetadata &&) = default;
~AtFitTrackMetadata() = default;
AtFitTrackMetadata &operator=(const AtFitTrackMetadata &) = default;
AtFitTrackMetadata &operator=(AtFitTrackMetadata &&) = default;

virtual std::unique_ptr<AtFitTrackMetadata> Clone();

void SetPValue(Double_t value) { fPValue = value; }
void SetChi2(Double_t value) { fChi2 = value; }
void SetNdf(Int_t value) { fNdf = value; }
void SetFitConverged(Bool_t value) { fFitConverged = value; }
void SetTrackID(Int_t value) { fTrackID = value; }
void SetFitID(Int_t value) { fFitID = value; }

Double_t GetPValue() const { return fPValue; }
Double_t GetChi2() const { return fChi2; }
Int_t GetNdf() const { return fNdf; }
Bool_t GetFitConverged() const { return fFitConverged; }
Int_t GetTrackID() const { return fTrackID; }
Int_t GetFitID() const { return fFitID; }

virtual void Print() const;

ClassDefOverride(AtFitTrackMetadata, 1);
};

#endif
Loading