14#ifdef HAS_RNTUPLE_SUPPORT
15#include "ROOT/RNTupleModel.hxx"
16#include "ROOT/RField.hxx"
25#ifdef __USE_DATABASE__
87 UInt_t word_position_in_buffer,UInt_t indexnumber)
override;
94 TString loc=
"QwLinearDiodeArray::GetPosition for "
96 throw std::out_of_range(loc.Data());
103 TString loc=
"QwLinearDiodeArray::GetPosition for "
105 throw std::out_of_range(loc.Data());
130 void SetBPMForCombo(
const VQwBPM* bpm, Double_t charge_weight, Double_t x_weight, Double_t y_weight,Double_t sumqw)
override;
134 void Scale(Double_t factor)
override;
158#ifdef HAS_RNTUPLE_SUPPORT
160 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
161 void FillNTupleVector(std::vector<Double_t>& values)
const override;
167 Double_t meanXslope, Double_t sigmaXslope, Double_t meanYslope, Double_t sigmaYslope)
override;
189#ifdef __USE_DATABASE__
190 std::vector<QwDBInterface> GetDBEntry();
191 std::vector<QwErrDBInterface> GetErrDBEntry();
199 Double_t
SumOver( std::vector <Double_t> weight , std::vector <T> val);
210 Double_t
A[2],
B[2],
D[2],
m[2];
Helper functions and utilities for analysis operations.
void QwCopyArray(const T &a, T &b)
Virtual base class for beam position monitors.
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
The pure virtual base class of all data elements.
virtual const TString & GetElementName() const
Get the name of this element.
void SetModuleType(TString ModuleType)
set the type of the beam instrument
Abstract base for concrete hardware channels implementing dual-operator pattern.
Template for combined beam position monitor using multiple BPMs.
void GetProjectedPosition(VQwBPM *device) override
void Scale(Double_t factor) override
void FillTreeVector(QwRootTreeBranchVector &values) const override
friend class QwEnergyCalculator
std::vector< Double_t > fQWeights
VQwBPM & operator-=(const VQwBPM &value) override
size_t GetNumberOfElements() override
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t indexnumber) override
Process the CODA event buffer for this element.
void LoadChannelParameters(QwParameterFile ¶mfile) override
void DeaccumulateRunningSum(VQwBPM &value, Int_t ErrorMask=0xFFFFFFF) override
VQwHardwareChannel * GetAngleX()
void RandomizeEventData(int helicity=0, double time=0.0) override
VQwHardwareChannel * GetSubelementByName(TString ch_name) override
void LoadMockDataParameters(QwParameterFile ¶mfile) override
UInt_t UpdateErrorFlag() override
Update the error flag based on the error flags of internally contained objects Return parameter is th...
std::array< T, 2 > fSlope
const VQwHardwareChannel * GetAngleY() const override
VQwHardwareChannel * GetAngleY()
Double_t SumOver(std::vector< Double_t > weight, std::vector< T > val)
std::vector< T > fBPMComboElementList
const VQwHardwareChannel * GetSlope(EBeamPositionMonitorAxis axis) const
void InitializeChannel(TString subsystem, TString name, TString type)
std::vector< Double_t > fYWeights
void InitializeChannel(TString name)
void ConstructHistograms(TDirectory *folder, TString &prefix) override
Construct the histograms for this data element.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
std::array< T, 2 > fIntercept
void LeastSquareFit(VQwBPM::EBeamPositionMonitorAxis axis, std::vector< Double_t > fWeights)
void Ratio(QwCombinedBPM &numer, QwCombinedBPM &denom)
std::array< T, 2 > fAbsPos
void IncrementErrorCounters() override
Bool_t CheckForBurpFail(const VQwDataElement *ev_error)
void PrintValue() const override
Print single line of value and error of this data element.
void ClearEventData() override
void ProcessEvent() override
const VQwHardwareChannel * GetAngleX() const override
QwCombinedBPM(TString subsystem, TString name, TString type)
Bool_t ApplySingleEventCuts() override
void CalculateFixedParameter(std::vector< Double_t > fWeights, Int_t pos)
std::array< T, 2 > fMinimumChiSquare
void FillHistograms() override
Fill the histograms for this data element.
void SetEventCutMode(Int_t bcuts) override
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit),...
QwCombinedBPM(TString subsystem, TString name)
TString GetSubElementName(Int_t index) override
std::vector< Double_t > fXWeights
VQwBPM & operator+=(const VQwBPM &value) override
Bool_t fixedParamCalculated
void ConstructBranch(TTree *tree, TString &prefix) override
const VQwHardwareChannel * GetEffectiveCharge() const override
void AccumulateRunningSum(const VQwBPM &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
void SetRandomEventParameters(Double_t meanX, Double_t sigmaX, Double_t meanY, Double_t sigmaY, Double_t meanXslope, Double_t sigmaXslope, Double_t meanYslope, Double_t sigmaYslope) override
UInt_t GetEventcutErrorFlag() override
VQwBPM & operator=(const VQwBPM &value) override
void SetBPMForCombo(const VQwBPM *bpm, Double_t charge_weight, Double_t x_weight, Double_t y_weight, Double_t sumqw) override
void PrintErrorCounters() const override
std::vector< const VQwBPM * > fElement
const VQwHardwareChannel * GetPosition(EBeamPositionMonitorAxis axis) const override
~QwCombinedBPM() override
QwCombinedBPM(TString name)
QwCombinedBPM(const QwCombinedBPM &source)
void PrintInfo() const override
Print multiple lines of information about this data element.
void CalculateRunningAverage() override
Abstract base for beam position monitors (BPMs)
static const TString axis[3]