JAPAn
Just Another Parity Analyzer
|
Cavity-style BPM using VQWK channels. More...
#include <QwBPMCavity.h>
Public Types | |
enum | ECavElements { kXElem =0 , kYElem , kQElem , kNumElements } |
![]() | |
enum | EBeamPositionMonitorAxis { kXAxis =0 , kYAxis , kNumAxes } |
![]() | |
enum | EDataToSave { kRaw = 0 , kDerived , kMoments } |
Public Member Functions | |
QwBPMCavity () | |
QwBPMCavity (TString name) | |
QwBPMCavity (TString subsystemname, TString name) | |
QwBPMCavity (const QwBPMCavity &source) | |
~QwBPMCavity () override | |
void | InitializeChannel (TString name) |
void | InitializeChannel (TString subsystem, TString name) |
void | ClearEventData () override |
void | LoadChannelParameters (QwParameterFile ¶mfile) override |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t indexnumber) override |
void | ProcessEvent () override |
void | PrintValue () const override |
void | PrintInfo () const override |
const VQwHardwareChannel * | GetPosition (EBeamPositionMonitorAxis axis) const override |
const VQwHardwareChannel * | GetEffectiveCharge () const override |
TString | GetSubElementName (Int_t subindex) override |
void | GetAbsolutePosition () override |
Bool_t | ApplyHWChecks () |
Bool_t | ApplySingleEventCuts () override |
void | SetSingleEventCuts (TString ch_name, UInt_t errorflag, Double_t minX, Double_t maxX, Double_t stability, Double_t burplevel) |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. | |
void | SetEventCutMode (Int_t bcuts) override |
void | IncrementErrorCounters () override |
void | PrintErrorCounters () const override |
UInt_t | GetEventcutErrorFlag () override |
UInt_t | UpdateErrorFlag () override |
void | UpdateErrorFlag (const VQwBPM *ev_error) override |
Bool_t | CheckForBurpFail (const VQwDataElement *ev_error) override |
void | SetDefaultSampleSize (Int_t sample_size) override |
void | SetRandomEventParameters (Double_t meanX, Double_t sigmaX, Double_t meanY, Double_t sigmaY) override |
void | RandomizeEventData (int helicity=0, double time=0.0) override |
void | SetEventData (Double_t *block, UInt_t sequencenumber) |
void | EncodeEventData (std::vector< UInt_t > &buffer) override |
void | SetSubElementPedestal (Int_t j, Double_t value) override |
void | SetSubElementCalibrationFactor (Int_t j, Double_t value) override |
void | Ratio (QwBPMCavity &numer, QwBPMCavity &denom) |
void | Scale (Double_t factor) override |
VQwBPM & | operator= (const VQwBPM &value) override |
VQwBPM & | operator+= (const VQwBPM &value) override |
VQwBPM & | operator-= (const VQwBPM &value) override |
virtual QwBPMCavity & | operator= (const QwBPMCavity &value) |
virtual QwBPMCavity & | operator+= (const QwBPMCavity &value) |
virtual QwBPMCavity & | operator-= (const QwBPMCavity &value) |
void | AccumulateRunningSum (const VQwBPM &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override |
void | AccumulateRunningSum (const QwBPMCavity &value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) |
void | DeaccumulateRunningSum (VQwBPM &value, Int_t ErrorMask=0xFFFFFFF) override |
void | DeaccumulateRunningSum (QwBPMCavity &value, Int_t ErrorMask=0xFFFFFFF) |
void | CalculateRunningAverage () override |
void | ConstructHistograms (TDirectory *folder, TString &prefix) override |
void | FillHistograms () override |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override |
void | FillTreeVector (QwRootTreeBranchVector &values) const override |
void | ConstructBranch (TTree *tree, TString &prefix) override |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) override |
std::vector< QwDBInterface > | GetDBEntry () |
std::vector< QwErrDBInterface > | GetErrDBEntry () |
![]() | |
VQwBPM () | |
VQwBPM (TString &) | |
VQwBPM (const VQwBPM &source) | |
~VQwBPM () override | |
void | InitializeChannel (TString name) |
Initialize common BPM state and set the element name. | |
virtual void | GetProjectedPosition (VQwBPM *) |
virtual size_t | GetNumberOfElements () |
virtual void | FillRawEventData () |
void | GetSurveyOffsets (Double_t Xoffset, Double_t Yoffset, Double_t Zoffset) |
Store geometry/survey offsets for absolute position calibration. | |
void | GetElectronicFactors (Double_t BSENfactor, Double_t AlphaX, Double_t AlphaY) |
Apply per-detector electronic calibration and relative gains. | |
void | SetRotation (Double_t) |
Set detector rotation angle and update cached trigonometric values. | |
void | SetRotationOff () |
void | SetSingleEventCuts (TString, Double_t, Double_t) |
void | SetSingleEventCuts (TString, UInt_t, Double_t, Double_t, Double_t, Double_t) |
void | SetGains (TString pos, Double_t value) |
void | SetRootSaveStatus (TString &prefix) |
Double_t | GetPositionInZ () const |
virtual void | Ratio (VQwBPM &, VQwBPM &) |
void | PrintErrorCounters () const override |
report number of events failed due to HW and event cut failure | |
virtual const VQwHardwareChannel * | GetAngleX () const |
virtual const VQwHardwareChannel * | GetAngleY () const |
virtual void | SetBPMForCombo (const VQwBPM *, Double_t, Double_t, Double_t, Double_t) |
virtual void | SetResolution (Double_t resolutionX, Double_t resolutionY) |
virtual void | SetRandomEventParameters (Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t) |
virtual void | SetRandomEventAsymmetry (Double_t) |
virtual void | ApplyResolutionSmearing () |
virtual void | ApplyResolutionSmearing (EBeamPositionMonitorAxis) |
void | PrintInfo () const override |
Print multiple lines of information about this data element. | |
![]() | |
VQwDataElement () | |
Default constructor. | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. | |
~VQwDataElement () override | |
Virtual destructor. | |
void | CopyFrom (const VQwDataElement &value) |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? | |
void | SetElementName (const TString &name) |
Set the name of this element. | |
virtual const TString & | GetElementName () const |
Get the name of this element. | |
virtual void | LoadMockDataParameters (QwParameterFile &) |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. | |
UInt_t | GetGoodEventCount () const |
virtual void | AssignValueFrom (const VQwDataElement *) |
VQwDataElement & | operator+= (const VQwDataElement &) |
Addition-assignment operator. | |
VQwDataElement & | operator-= (const VQwDataElement &) |
Subtraction-assignment operator. | |
void | Sum (const VQwDataElement &, const VQwDataElement &) |
Sum operator (base class fallback throws runtime error) | |
void | Difference (const VQwDataElement &, const VQwDataElement &) |
Difference operator (base class fallback throws runtime error) | |
void | Ratio (const VQwDataElement &, const VQwDataElement &) |
Ratio operator (base class fallback throws runtime error) | |
void | SetSingleEventCuts (UInt_t, Double_t, Double_t, Double_t) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel | |
Bool_t | CheckForBurpFail (const VQwDataElement *) |
virtual void | SetNeedsExternalClock (Bool_t) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *) |
virtual void | SetExternalClockName (const std::string) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. | |
TString | GetModuleType () const |
Return the type of the beam instrument. | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. | |
Static Public Member Functions | |
static UInt_t | GetSubElementIndex (TString subname) |
static Bool_t | ParseChannelName (const TString &channel, TString &detname, TString &subname, UInt_t &localindex) |
![]() | |
static VQwBPM * | CreateStripline (TString subsystemname, TString type, TString name) |
A fast way of creating a BPM stripline of specified type. | |
static VQwBPM * | CreateStripline (const VQwBPM &source) |
static VQwBPM * | CreateCombo (TString subsystemname, TString type, TString name) |
A fast way of creating a BPM stripline of specified type. | |
static VQwBPM * | CreateCombo (const VQwBPM &source) |
Protected Member Functions | |
VQwHardwareChannel * | GetSubelementByName (TString ch_name) override |
![]() | |
virtual VQwHardwareChannel * | GetPosition (EBeamPositionMonitorAxis axis) |
VQwHardwareChannel * | GetSubelementByIndex (size_t index) |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. | |
VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. | |
void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. | |
virtual | ~MQwHistograms () |
Virtual destructor. | |
MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. | |
Protected Attributes | |
std::array< QwVQWK_Channel, kNumElements > | fElement |
std::array< QwVQWK_Channel, kNumAxes > | fRelPos |
std::array< QwVQWK_Channel, kNumAxes > | fAbsPos |
![]() | |
std::vector< TString > | fSubelementNames |
Double_t | fPositionCenter [3] |
Double_t | fQwStriplineCalibration |
Double_t | fQwStriplineCorrection |
Double_t | fRelativeGains [2] |
Double_t | fGains [2] |
Bool_t | bRotated |
Double_t | fRotationAngle |
Double_t | fCosRotation |
Double_t | fSinRotation |
Double_t | fResolution [2] |
Bool_t | fGoodEvent |
Bool_t | bFullSave |
![]() | |
TString | fElementName |
Name of this data element. | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. | |
UInt_t | fGoodEventCount |
Number of good events accumulated in this element. | |
TString | fSubsystemName |
TString | fModuleType |
UInt_t | fErrorFlag |
This the standard error code generated for the channel that contains the global/local/stability flags and the Device error code (Unique error code for HW failures) | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. | |
Private Member Functions | |
void | MakeBPMCavityList () |
Private Attributes | |
std::vector< QwVQWK_Channel > | fBPMElementList |
Static Private Attributes | |
static const Double_t | kQwCavityCalibration = 1.0 |
static const TString | subelement [kNumElements] ={"XI","YI","Q"} |
Friends | |
template<typename TT> | |
class | QwCombinedBPM |
class | QwEnergyCalculator |
Additional Inherited Members | |
![]() | |
static const TString | kAxisLabel [2] ={"X","Y"} |
static const TString | axis [3] |
static const Bool_t | bDEBUG =kFALSE |
Cavity-style BPM using VQWK channels.
Provides X/Y position and effective charge from cavity readouts, with utilities for cuts, histograms, and tree/NTuple output.
Definition at line 38 of file QwBPMCavity.h.
|
inline |
Definition at line 48 of file QwBPMCavity.h.
Referenced by AccumulateRunningSum(), AccumulateRunningSum(), CheckForBurpFail(), DeaccumulateRunningSum(), DeaccumulateRunningSum(), operator+=(), operator+=(), operator-=(), operator-=(), operator=(), operator=(), QwBPMCavity(), Ratio(), and UpdateErrorFlag().
|
inline |
Definition at line 49 of file QwBPMCavity.h.
References InitializeChannel(), and VQwBPM::VQwBPM().
|
inline |
Definition at line 52 of file QwBPMCavity.h.
References InitializeChannel(), VQwDataElement::SetSubsystemName(), and VQwBPM::VQwBPM().
|
inline |
Definition at line 57 of file QwBPMCavity.h.
References fAbsPos, fElement, fRelPos, QwBPMCavity(), QwCopyArray(), and VQwBPM::VQwBPM().
|
inlineoverride |
Definition at line 64 of file QwBPMCavity.h.
void QwBPMCavity::AccumulateRunningSum | ( | const QwBPMCavity & | value, |
Int_t | count = 0, | ||
Int_t | ErrorMask = 0xFFFFFFF ) |
Accumulate running sums for raw and derived channels.
Definition at line 717 of file QwBPMCavity.cc.
References AccumulateRunningSum(), fAbsPos, fElement, fRelPos, kNumElements, and QwBPMCavity().
|
overridevirtual |
Type-erased running-sum accumulate; forwards to concrete overload.
Reimplemented from VQwBPM.
Definition at line 712 of file QwBPMCavity.cc.
References AccumulateRunningSum(), QwBPMCavity(), and VQwBPM::VQwBPM().
Referenced by AccumulateRunningSum(), and AccumulateRunningSum().
Bool_t QwBPMCavity::ApplyHWChecks | ( | ) |
Apply hardware-level checks to each subelement and aggregate status.
Definition at line 158 of file QwBPMCavity.cc.
References VQwBPM::bDEBUG, fElement, and kNumElements.
Referenced by ProcessEvent().
|
overridevirtual |
Apply analysis-level single-event cuts to raw and derived quantities.
Implements VQwBPM.
Definition at line 246 of file QwBPMCavity.cc.
References ApplySingleEventCuts(), VQwBPM::bDEBUG, fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, kNumElements, and VQwBPM::kXAxis.
Referenced by ApplySingleEventCuts().
|
overridevirtual |
Update per-channel running averages based on accumulated sums.
Implements VQwBPM.
Definition at line 699 of file QwBPMCavity.cc.
References CalculateRunningAverage(), fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
Referenced by CalculateRunningAverage().
|
overridevirtual |
Polymorphic burp/burst failure check against a reference element of the same concrete type. For each subelement and derived channel, delegate to its CheckForBurpFail implementation.
ev_error | Reference data element to compare against. |
std::invalid_argument | if ev_error is not a QwBPMCavity. |
Reimplemented from VQwBPM.
Definition at line 399 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), kQElem, QwBPMCavity(), and VQwDataElement::VQwDataElement().
|
overridevirtual |
Clear all owned subelement and derived channel state for the current event.
Reimplemented from VQwDataElement.
Definition at line 139 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
|
overridevirtual |
Define TTree branches for output variables using the provided prefix. The prefix "asym_" is converted to "diff_" for positions.
Implements VQwBPM.
Definition at line 827 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kQElem, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().
|
overridevirtual |
Conditionally define TTree branches based on a module list filter. Only branches present in the module list are created.
Implements VQwBPM.
Definition at line 854 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, QwLog::endl(), fAbsPos, fElement, VQwDataElement::GetElementName(), QwParameterFile::HasValue(), VQwBPM::kNumAxes, kQElem, VQwBPM::kXAxis, QwMessage, and VQwBPM::SetRootSaveStatus().
|
overridevirtual |
Define TTree branches and attach backing vectors for output variables. The prefix "asym_" is converted to "diff_" for positions.
Implements VQwBPM.
Definition at line 800 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kQElem, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().
|
overridevirtual |
Define ROOT histograms for subelements and derived absolute positions. The prefix "asym_" is converted to "diff_" for positions.
Implements VQwBPM.
Definition at line 755 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kQElem, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().
void QwBPMCavity::DeaccumulateRunningSum | ( | QwBPMCavity & | value, |
Int_t | ErrorMask = 0xFFFFFFF ) |
Deaccumulate running sums for raw and derived channels.
Definition at line 736 of file QwBPMCavity.cc.
References DeaccumulateRunningSum(), fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, kNumElements, and QwBPMCavity().
|
overridevirtual |
Type-erased running-sum deaccumulate; forwards to concrete overload.
Implements VQwBPM.
Definition at line 731 of file QwBPMCavity.cc.
References DeaccumulateRunningSum(), QwBPMCavity(), and VQwBPM::VQwBPM().
Referenced by DeaccumulateRunningSum(), and DeaccumulateRunningSum().
|
overridevirtual |
Serialize raw element data into a CODA-like output buffer.
Reimplemented from VQwBPM.
Definition at line 1084 of file QwBPMCavity.cc.
References EncodeEventData(), fElement, and kNumElements.
Referenced by EncodeEventData().
|
overridevirtual |
Fill previously constructed ROOT histograms for this detector.
Implements VQwBPM.
Definition at line 778 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kQElem, and VQwBPM::kXAxis.
|
overridevirtual |
Append this detector's values to the provided output vector.
Implements VQwBPM.
Definition at line 901 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kQElem, and VQwBPM::kXAxis.
|
overridevirtual |
Recompute absolute positions from raw elements and stored offsets. Intended for use after externally setting raw subelements.
Reimplemented from VQwBPM.
Definition at line 573 of file QwBPMCavity.cc.
References fAbsPos, fElement, VQwBPM::fPositionCenter, fRelPos, VQwBPM::kNumAxes, and kQElem.
std::vector< QwDBInterface > QwBPMCavity::GetDBEntry | ( | ) |
|
inlineoverridevirtual |
std::vector< QwErrDBInterface > QwBPMCavity::GetErrDBEntry | ( | ) |
|
overridevirtual |
Return the OR of per-channel event-cut error flags for this detector. This includes raw elements, relative and absolute positions.
Reimplemented from VQwDataElement.
Definition at line 205 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
|
inlineoverridevirtual |
Reimplemented from VQwBPM.
Definition at line 82 of file QwBPMCavity.h.
References VQwBPM::axis, fAbsPos, and VQwDataElement::GetElementName().
|
overrideprotectedvirtual |
Map a human-readable subelement name to the corresponding channel. Valid names include: relx, rely, absx/x, absy/y, effectivecharge/charge/q, as well as xi/yi to access raw elements.
std::invalid_argument | on an unrecognized subelement request. |
Implements VQwBPM.
Definition at line 294 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), and kQElem.
|
static |
Convert a subelement tag (XI, YI, Q) into an enum index.
Definition at line 555 of file QwBPMCavity.cc.
References kInvalidSubelementIndex, kNumElements, and subelement.
|
overridevirtual |
Return the element name for a given raw subelement index.
subindex | Index into the raw elements array. |
Reimplemented from VQwBPM.
Definition at line 543 of file QwBPMCavity.cc.
References fElement, and VQwDataElement::GetElementName().
|
overridevirtual |
Increment persistent error counters across subelements and derived channels.
Implements VQwBPM.
Definition at line 175 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
void QwBPMCavity::InitializeChannel | ( | TString | name | ) |
Initialize channels and derived quantities using a simple name. Creates three raw hardware channels (XI, YI, Q) and two derived channels for relative and absolute positions along each transverse axis.
name | Detector base name. |
Definition at line 84 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, fRelPos, VQwBPM::InitializeChannel(), VQwBPM::kAxisLabel, VQwBPM::kNumAxes, kNumElements, VQwBPM::kXAxis, and subelement.
Referenced by QwBPMCavity(), and QwBPMCavity().
void QwBPMCavity::InitializeChannel | ( | TString | subsystem, |
TString | name ) |
Initialize channels with explicit subsystem and detector name. This variant forwards subsystem information down to subelements so that output branches and histograms carry proper scoping.
subsystem | Subsystem name. |
name | Detector base name. |
Definition at line 115 of file QwBPMCavity.cc.
References VQwBPM::bFullSave, fAbsPos, fElement, fRelPos, VQwBPM::InitializeChannel(), VQwBPM::kAxisLabel, VQwBPM::kNumAxes, kNumElements, VQwBPM::kXAxis, and subelement.
|
inlineoverridevirtual |
Implements VQwBPM.
Definition at line 71 of file QwBPMCavity.h.
References fElement, kNumElements, and LoadChannelParameters().
Referenced by LoadChannelParameters().
|
private |
Build a flat list of representative channels for legacy consumers.
Definition at line 981 of file QwBPMCavity.cc.
References fBPMElementList, fElement, fRelPos, VQwBPM::kNumAxes, kQElem, and VQwBPM::kXAxis.
|
virtual |
Element-wise addition of raw and derived channels.
Definition at line 614 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kNumElements, and QwBPMCavity().
Type-erased addition; forwards to the concrete operator+=.
Implements VQwBPM.
Definition at line 631 of file QwBPMCavity.cc.
References QwBPMCavity(), and VQwBPM::VQwBPM().
|
virtual |
Element-wise subtraction of raw and derived channels.
Definition at line 641 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kNumElements, and QwBPMCavity().
Type-erased subtraction; forwards to the concrete operator-=.
Implements VQwBPM.
Definition at line 658 of file QwBPMCavity.cc.
References QwBPMCavity(), and VQwBPM::VQwBPM().
|
virtual |
Concrete assignment; copies raw elements and derived channels.
Definition at line 595 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kNumElements, VQwBPM::operator=(), and QwBPMCavity().
Type-erased assignment; forwards to the concrete operator=.
Implements VQwBPM.
Definition at line 587 of file QwBPMCavity.cc.
References QwBPMCavity(), and VQwBPM::VQwBPM().
|
static |
Decode a fully qualified channel name into detector and subelement parts.
channel | Full channel name (e.g. "bpm3iXI"). |
detname | Out-parameter set to the detector base name. |
subname | Out-parameter set to the recognized subelement tag. |
localindex | Out-parameter set to the subelement enum index or kInvalidSubelementIndex on failure. |
Definition at line 47 of file QwBPMCavity.cc.
References QwLog::endl(), kInvalidSubelementIndex, kNumElements, QwWarning, and subelement.
Referenced by QwBeamDetectorID::QwBeamDetectorID().
|
overridevirtual |
Print persistent error counter summaries for diagnostics.
Reimplemented from VQwDataElement.
Definition at line 189 of file QwBPMCavity.cc.
References fAbsPos, fElement, VQwBPM::kNumAxes, and kNumElements.
|
overridevirtual |
Print a description of the raw and absolute position channels.
Reimplemented from VQwDataElement.
Definition at line 524 of file QwBPMCavity.cc.
References fAbsPos, fElement, VQwBPM::kNumAxes, and kNumElements.
|
overridevirtual |
Print the current values of raw and absolute position channels.
Reimplemented from VQwDataElement.
Definition at line 512 of file QwBPMCavity.cc.
References fAbsPos, fElement, VQwBPM::kNumAxes, and kNumElements.
|
overridevirtual |
Decode and route a raw data buffer into the requested subelement.
buffer | CODA/raw buffer pointer. |
word_position_in_buffer | Starting word index to parse. |
index | Target subelement index (0..kNumElements-1). |
Implements VQwDataElement.
Definition at line 497 of file QwBPMCavity.cc.
References fElement, and kNumElements.
|
overridevirtual |
Process the current event by first applying hardware checks and then computing relative and absolute positions from raw subelements.
First apply HW checks and update HW error flags. Calling this routine here and not in ApplySingleEventCuts
makes a difference for a BPMs because they have derived devices.
Implements VQwBPM.
Definition at line 465 of file QwBPMCavity.cc.
References ApplyHWChecks(), fAbsPos, fElement, VQwBPM::fPositionCenter, fRelPos, VQwBPM::kNumAxes, kNumElements, kQElem, kQwCavityCalibration, and VQwBPM::kXAxis.
|
overridevirtual |
Generate random event data in owned raw elements for mock runs.
Reimplemented from VQwBPM.
Definition at line 1063 of file QwBPMCavity.cc.
References fElement, kNumElements, and RandomizeEventData().
Referenced by RandomizeEventData().
void QwBPMCavity::Ratio | ( | QwBPMCavity & | numer, |
QwBPMCavity & | denom ) |
Special ratio behavior for cavity BPMs when forming asymmetries. Only the effective charge channel participates; transverse positions are kept as differences (consistent with stripline BPM behavior).
Definition at line 672 of file QwBPMCavity.cc.
References fElement, kQElem, and QwBPMCavity().
|
overridevirtual |
Scale all raw and derived channels by a common factor.
Reimplemented from VQwBPM.
Definition at line 685 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
|
overridevirtual |
Set the default sample size for all raw subelements.
Reimplemented from VQwBPM.
Definition at line 1092 of file QwBPMCavity.cc.
References fElement, kNumElements, and SetDefaultSampleSize().
Referenced by SetDefaultSampleSize().
|
overridevirtual |
Propagate event-cut mode bitmask to all owned subchannels.
Implements VQwBPM.
Definition at line 966 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, and kNumElements.
void QwBPMCavity::SetEventData | ( | Double_t * | relpos, |
UInt_t | sequencenumber ) |
Set relative position hardware sums and sequence numbers directly.
Definition at line 1072 of file QwBPMCavity.cc.
References fRelPos, and kNumElements.
|
overridevirtual |
Configure mock-data generation parameters for testing. Currently a placeholder for cavity-specific randomization strategies.
Reimplemented from VQwBPM.
Definition at line 1028 of file QwBPMCavity.cc.
void QwBPMCavity::SetSingleEventCuts | ( | TString | ch_name, |
UInt_t | errorflag, | ||
Double_t | minX, | ||
Double_t | maxX, | ||
Double_t | stability, | ||
Double_t | burplevel ) |
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
Configure single-event cuts for one subelement by name.
ch_name | Subchannel selector (e.g. relx, rely, absx, absy, effectivecharge, xi, yi). |
errorflag | Error mask bit(s) to associate with failures. |
minX | Lower limit for the channel value. |
maxX | Upper limit for the channel value. |
stability | Allowed fractional stability (implementation-specific). |
burplevel | Threshold for burp/burst detection (implementation-specific). |
Definition at line 356 of file QwBPMCavity.cc.
References QwLog::endl(), fAbsPos, fElement, fRelPos, kBPMErrorFlag, kQElem, and QwMessage.
|
overridevirtual |
Set the calibration factor for a specific raw subelement.
Reimplemented from VQwBPM.
Definition at line 1106 of file QwBPMCavity.cc.
References fElement.
|
overridevirtual |
Set the pedestal for a specific raw subelement.
Reimplemented from VQwBPM.
Definition at line 1100 of file QwBPMCavity.cc.
References fElement.
|
overridevirtual |
Update derived channel error flags based on raw element error codes and return the aggregated event-cut error mask.
Implements VQwBPM.
Definition at line 223 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwBPM::kNumAxes, kNumElements, and VQwBPM::kXAxis.
|
overridevirtual |
Update error flags by copying flags from a reference BPM of the same concrete type. This is used to propagate error state across containers.
ev_error | Reference BPM (must be QwBPMCavity). |
std::invalid_argument | if ev_error is not a QwBPMCavity. |
Implements VQwBPM.
Definition at line 433 of file QwBPMCavity.cc.
References fAbsPos, fElement, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, kNumElements, VQwBPM::kXAxis, QwBPMCavity(), and VQwBPM::VQwBPM().
|
friend |
|
friend |
Definition at line 40 of file QwBPMCavity.h.
References QwEnergyCalculator.
Referenced by QwEnergyCalculator.
|
protected |
Definition at line 167 of file QwBPMCavity.h.
Referenced by AccumulateRunningSum(), ApplySingleEventCuts(), CalculateRunningAverage(), CheckForBurpFail(), ClearEventData(), ConstructBranch(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), DeaccumulateRunningSum(), FillHistograms(), FillTreeVector(), GetAbsolutePosition(), GetEventcutErrorFlag(), GetPosition(), GetSubelementByName(), IncrementErrorCounters(), InitializeChannel(), InitializeChannel(), operator+=(), operator-=(), operator=(), PrintErrorCounters(), PrintInfo(), PrintValue(), ProcessEvent(), QwBPMCavity(), Scale(), SetEventCutMode(), SetSingleEventCuts(), UpdateErrorFlag(), and UpdateErrorFlag().
|
private |
Definition at line 173 of file QwBPMCavity.h.
Referenced by MakeBPMCavityList().
|
protected |
Definition at line 162 of file QwBPMCavity.h.
Referenced by AccumulateRunningSum(), ApplyHWChecks(), ApplySingleEventCuts(), CalculateRunningAverage(), CheckForBurpFail(), ClearEventData(), ConstructBranch(), ConstructBranch(), ConstructBranchAndVector(), ConstructHistograms(), DeaccumulateRunningSum(), EncodeEventData(), FillHistograms(), FillTreeVector(), GetAbsolutePosition(), GetEffectiveCharge(), GetEventcutErrorFlag(), GetSubelementByName(), GetSubElementName(), IncrementErrorCounters(), InitializeChannel(), InitializeChannel(), LoadChannelParameters(), MakeBPMCavityList(), operator+=(), operator-=(), operator=(), PrintErrorCounters(), PrintInfo(), PrintValue(), ProcessEvBuffer(), ProcessEvent(), QwBPMCavity(), RandomizeEventData(), Ratio(), Scale(), SetDefaultSampleSize(), SetEventCutMode(), SetSingleEventCuts(), SetSubElementCalibrationFactor(), SetSubElementPedestal(), UpdateErrorFlag(), and UpdateErrorFlag().
|
protected |
Definition at line 163 of file QwBPMCavity.h.
Referenced by AccumulateRunningSum(), ApplySingleEventCuts(), CalculateRunningAverage(), CheckForBurpFail(), ClearEventData(), DeaccumulateRunningSum(), GetAbsolutePosition(), GetEventcutErrorFlag(), GetSubelementByName(), IncrementErrorCounters(), InitializeChannel(), InitializeChannel(), MakeBPMCavityList(), operator+=(), operator-=(), operator=(), ProcessEvent(), QwBPMCavity(), Scale(), SetEventCutMode(), SetEventData(), SetSingleEventCuts(), UpdateErrorFlag(), and UpdateErrorFlag().
|
staticprivate |
Definition at line 156 of file QwBPMCavity.h.
Referenced by ProcessEvent().
|
staticprivate |
Definition at line 34 of file QwBPMCavity.h.
Referenced by GetSubElementIndex(), InitializeChannel(), InitializeChannel(), and ParseChannelName().