JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
VQwBPM Class Referenceabstract

Abstract base for beam position monitors (BPMs) More...

#include <VQwBPM.h>

+ Inheritance diagram for VQwBPM:
+ Collaboration diagram for VQwBPM:

Public Types

enum  EBeamPositionMonitorAxis { kXAxis =0 , kYAxis , kNumAxes }
 
- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0 , kDerived , kMoments }
 

Public Member Functions

 VQwBPM ()
 
 VQwBPM (TString &)
 
 VQwBPM (const VQwBPM &source)
 
 ~VQwBPM () override
 
void InitializeChannel (TString name)
 Initialize common BPM state and set the element name.
 
void LoadChannelParameters (QwParameterFile &paramfile) override=0
 
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)
 
UInt_t UpdateErrorFlag () override=0
 Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag".
 
virtual void UpdateErrorFlag (const VQwBPM *ev_error)=0
 
virtual void Scale (Double_t)
 
void SetGains (TString pos, Double_t value)
 
virtual VQwBPMoperator= (const VQwBPM &value)=0
 
virtual VQwBPMoperator+= (const VQwBPM &value)=0
 
virtual VQwBPMoperator-= (const VQwBPM &value)=0
 
void SetRootSaveStatus (TString &prefix)
 
virtual const VQwHardwareChannelGetPosition (EBeamPositionMonitorAxis axis) const
 
virtual const VQwHardwareChannelGetEffectiveCharge () const =0
 
Double_t GetPositionInZ () const
 
virtual void CalculateRunningAverage ()=0
 
virtual void AccumulateRunningSum (const VQwBPM &, Int_t=0, Int_t=0xFFFFFFF)
 
virtual void DeaccumulateRunningSum (VQwBPM &value, Int_t ErrorMask=0xFFFFFFF)=0
 
void ConstructHistograms (TDirectory *folder, TString &prefix) override=0
 Construct the histograms for this data element.
 
void FillHistograms () override=0
 Fill the histograms for this data element.
 
virtual void ConstructBranchAndVector (TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0
 
virtual void ConstructBranch (TTree *tree, TString &prefix)=0
 
virtual void ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist)=0
 
virtual void FillTreeVector (QwRootTreeBranchVector &values) const =0
 
virtual void Ratio (VQwBPM &, VQwBPM &)
 
virtual Bool_t CheckForBurpFail (const VQwDataElement *ev_error)
 
virtual TString GetSubElementName (Int_t)
 
virtual void GetAbsolutePosition ()
 
virtual void SetEventCutMode (Int_t bcuts)=0
 
void PrintErrorCounters () const override
 report number of events failed due to HW and event cut failure
 
virtual Bool_t ApplySingleEventCuts ()=0
 
virtual void IncrementErrorCounters ()=0
 
virtual void ProcessEvent ()=0
 
virtual const VQwHardwareChannelGetAngleX () const
 
virtual const VQwHardwareChannelGetAngleY () const
 
virtual void SetBPMForCombo (const VQwBPM *, Double_t, Double_t, Double_t, Double_t)
 
virtual void SetDefaultSampleSize (Int_t)
 
virtual void SetResolution (Double_t resolutionX, Double_t resolutionY)
 
virtual void SetRandomEventParameters (Double_t, Double_t, Double_t, Double_t)
 
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 RandomizeEventData (int=0, double=0.0)
 
virtual void ApplyResolutionSmearing ()
 
virtual void ApplyResolutionSmearing (EBeamPositionMonitorAxis)
 
virtual void EncodeEventData (std::vector< UInt_t > &)
 
virtual void SetSubElementPedestal (Int_t, Double_t)
 
virtual void SetSubElementCalibrationFactor (Int_t, Double_t)
 
void PrintInfo () const override
 Print multiple lines of information about this data element.
 
- Public Member Functions inherited from VQwDataElement
 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 &)
 
virtual void ClearEventData ()
 Clear the event data in this element.
 
virtual Int_t ProcessEvBuffer (UInt_t *buffer, UInt_t num_words_left, UInt_t subelement=0)=0
 Process the CODA event buffer for this element.
 
size_t GetNumberOfDataWords ()
 Get the number of data words in this data element.
 
UInt_t GetGoodEventCount () const
 
virtual void AssignValueFrom (const VQwDataElement *)
 
VQwDataElementoperator+= (const VQwDataElement &)
 Addition-assignment operator.
 
VQwDataElementoperator-= (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)
 
virtual void PrintValue () const
 Print single line of value and error of this data element.
 
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 UInt_t GetEventcutErrorFlag ()
 return the error flag on this channel/device
 
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
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 

Static Public Member Functions

static VQwBPMCreateStripline (TString subsystemname, TString type, TString name)
 A fast way of creating a BPM stripline of specified type.
 
static VQwBPMCreateStripline (const VQwBPM &source)
 
static VQwBPMCreateCombo (TString subsystemname, TString type, TString name)
 A fast way of creating a BPM stripline of specified type.
 
static VQwBPMCreateCombo (const VQwBPM &source)
 

Protected Member Functions

virtual VQwHardwareChannelGetPosition (EBeamPositionMonitorAxis axis)
 
virtual VQwHardwareChannelGetSubelementByName (TString ch_name)=0
 
VQwHardwareChannelGetSubelementByIndex (size_t index)
 
- Protected Member Functions inherited from VQwDataElement
void SetNumberOfDataWords (const UInt_t &numwords)
 Set the number of data words in this data element.
 
VQwDataElementoperator= (const VQwDataElement &value)
 Arithmetic assignment operator: Should only copy event-based data.
 
void UpdateErrorFlag (const UInt_t &error)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram.
 

Protected Attributes

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
 
- Protected Attributes inherited from VQwDataElement
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
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element.
 

Static Protected Attributes

static const TString kAxisLabel [2] ={"X","Y"}
 
static const TString axis [3]
 
static const Bool_t bDEBUG =kFALSE
 

Private Member Functions

void InitializeChannel_base ()
 

Friends

template<typename TT>
class QwBPMStripline
 
template<typename TT>
class QwCombinedBPM
 
class QwEnergyCalculator
 

Detailed Description

Abstract base for beam position monitors (BPMs)

Defines the common interface for BPM-like data elements, including decoding of position channels, per-event cuts, error propagation, and output. Concrete implementations such as QwBPMStripline<T> and QwCombinedBPM<T> inherit from this base to provide hardware-specific logic while sharing the higher-level processing contract.

Definition at line 52 of file VQwBPM.h.

Member Enumeration Documentation

◆ EBeamPositionMonitorAxis

Axis enumerator for the BPMs; Z will never be an instrumented axis.

Enumerator
kXAxis 
kYAxis 
kNumAxes 

Definition at line 72 of file VQwBPM.h.

@ kXAxis
Definition VQwBPM.h:72
@ kYAxis
Definition VQwBPM.h:72
@ kNumAxes
Definition VQwBPM.h:72

Constructor & Destructor Documentation

◆ VQwBPM() [1/3]

VQwBPM::VQwBPM ( )
inline

Definition at line 76 of file VQwBPM.h.

void InitializeChannel_base()
Definition VQwBPM.h:300

References InitializeChannel_base().

Referenced by QwBPMCavity::AccumulateRunningSum(), QwBPMStripline< T >::AccumulateRunningSum(), QwCombinedBPM< T >::AccumulateRunningSum(), QwLinearDiodeArray::AccumulateRunningSum(), QwQPD::AccumulateRunningSum(), AccumulateRunningSum(), CreateCombo(), CreateCombo(), CreateStripline(), CreateStripline(), QwBPMCavity::DeaccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwCombinedBPM< T >::DeaccumulateRunningSum(), QwLinearDiodeArray::DeaccumulateRunningSum(), QwQPD::DeaccumulateRunningSum(), DeaccumulateRunningSum(), GetPosition(), QwCombinedBPM< T >::GetProjectedPosition(), GetProjectedPosition(), QwBPMCavity::operator+=(), QwBPMStripline< T >::operator+=(), QwCombinedBPM< T >::operator+=(), QwLinearDiodeArray::operator+=(), QwQPD::operator+=(), operator+=(), QwBPMCavity::operator-=(), QwBPMStripline< T >::operator-=(), QwCombinedBPM< T >::operator-=(), QwLinearDiodeArray::operator-=(), QwQPD::operator-=(), operator-=(), QwBPMCavity::operator=(), QwBPMStripline< T >::operator=(), QwCombinedBPM< T >::operator=(), QwLinearDiodeArray::operator=(), QwQPD::operator=(), operator=(), QwBPMCavity::QwBPMCavity(), QwBPMCavity::QwBPMCavity(), QwBPMCavity::QwBPMCavity(), QwBPMStripline< T >::QwBPMStripline(), QwCombinedBPM< T >::QwCombinedBPM(), QwCombinedBPM< T >::QwCombinedBPM(), QwCombinedBPM< T >::QwCombinedBPM(), QwCombinedBPM< T >::QwCombinedBPM(), QwLinearDiodeArray::QwLinearDiodeArray(), QwLinearDiodeArray::QwLinearDiodeArray(), QwLinearDiodeArray::QwLinearDiodeArray(), QwQPD::QwQPD(), QwQPD::QwQPD(), QwQPD::QwQPD(), QwBPMStripline< T >::Ratio(), QwCombinedBPM< T >::Ratio(), Ratio(), QwCombinedBPM< T >::SetBPMForCombo(), SetBPMForCombo(), QwLinearDiodeArray::SetSubElementName(), QwBPMCavity::UpdateErrorFlag(), QwBPMStripline< T >::UpdateErrorFlag(), QwCombinedBPM< T >::UpdateErrorFlag(), QwLinearDiodeArray::UpdateErrorFlag(), QwQPD::UpdateErrorFlag(), UpdateErrorFlag(), and VQwBPM().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VQwBPM() [2/3]

VQwBPM::VQwBPM ( TString & )
inline

Definition at line 77 of file VQwBPM.h.

References InitializeChannel_base().

+ Here is the call graph for this function:

◆ VQwBPM() [3/3]

VQwBPM::VQwBPM ( const VQwBPM & source)
inline

Definition at line 78 of file VQwBPM.h.

79 : VQwDataElement(source),
80 bRotated(source.bRotated),
81 bFullSave(source.bFullSave)
82 {
83 for (size_t i = 0; i < 3; i++)
84 fPositionCenter[i] = source.fPositionCenter[i];
85 }
VQwDataElement()
Default constructor.
Double_t fPositionCenter[3]
Definition VQwBPM.h:328
Bool_t bFullSave
Definition VQwBPM.h:348
Bool_t bRotated
Definition VQwBPM.h:336

References bFullSave, bRotated, fPositionCenter, VQwBPM(), and VQwDataElement::VQwDataElement().

+ Here is the call graph for this function:

◆ ~VQwBPM()

VQwBPM::~VQwBPM ( )
inlineoverride

Definition at line 86 of file VQwBPM.h.

86{ };

Member Function Documentation

◆ AccumulateRunningSum()

virtual void VQwBPM::AccumulateRunningSum ( const VQwBPM & ,
Int_t = 0,
Int_t = 0xFFFFFFF )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 178 of file VQwBPM.h.

178 {
179 std::cerr << "AccumulateRunningSum not implemented for BPM named="
180 <<GetElementName()<<"\n";
181 };
virtual const TString & GetElementName() const
Get the name of this element.

References VQwDataElement::GetElementName(), and VQwBPM().

+ Here is the call graph for this function:

◆ ApplyResolutionSmearing() [1/2]

virtual void VQwBPM::ApplyResolutionSmearing ( )
inlinevirtual

Reimplemented in QwBPMStripline< T >.

Definition at line 273 of file VQwBPM.h.

273 {
274 std::cerr << "ApplyResolutionSmearing is undefined" << GetElementName() << "!!!\n";
275 }

References VQwDataElement::GetElementName().

Referenced by QwCombinedBPM< T >::GetProjectedPosition(), and QwEnergyCalculator::GetProjectedPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ApplyResolutionSmearing() [2/2]

virtual void VQwBPM::ApplyResolutionSmearing ( EBeamPositionMonitorAxis )
inlinevirtual

Reimplemented in QwBPMStripline< T >.

Definition at line 276 of file VQwBPM.h.

276 {
277 std::cerr << "ApplyResolutionSmearing(EBeamPositionMonitorAxis iaxis) is undefined!!!\n";
278 }

◆ ApplySingleEventCuts()

virtual Bool_t VQwBPM::ApplySingleEventCuts ( )
pure virtual

◆ CalculateRunningAverage()

virtual void VQwBPM::CalculateRunningAverage ( )
pure virtual

◆ CheckForBurpFail()

virtual Bool_t VQwBPM::CheckForBurpFail ( const VQwDataElement * ev_error)
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 209 of file VQwBPM.h.

209 {
210 // Default: delegate to VQwDataElement (throws). Derived classes should override.
211 return VQwDataElement::CheckForBurpFail(ev_error);
212 }
Bool_t CheckForBurpFail(const VQwDataElement *)

References VQwDataElement::CheckForBurpFail(), and VQwDataElement::VQwDataElement().

+ Here is the call graph for this function:

◆ ConstructBranch() [1/2]

virtual void VQwBPM::ConstructBranch ( TTree * tree,
TString & prefix )
pure virtual

◆ ConstructBranch() [2/2]

virtual void VQwBPM::ConstructBranch ( TTree * tree,
TString & prefix,
QwParameterFile & modulelist )
pure virtual

◆ ConstructBranchAndVector()

virtual void VQwBPM::ConstructBranchAndVector ( TTree * tree,
TString & prefix,
QwRootTreeBranchVector & values )
pure virtual

◆ ConstructHistograms()

void VQwBPM::ConstructHistograms ( TDirectory * folder,
TString & prefix )
overridepure virtual

Construct the histograms for this data element.

Implements VQwDataElement.

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

◆ CreateCombo() [1/2]

VQwBPM * VQwBPM::CreateCombo ( const VQwBPM & source)
static

Definition at line 337 of file VQwBPM.cc.

338{
339 Bool_t localDebug = kFALSE;
340 TString type = source.GetModuleType();
341 type.ToUpper();
342 if( localDebug ) QwMessage<<"Creating CombinedBCM of type: "<<type<< QwLog::endl;
343 // (jc2) As a first try, let's do this the ugly way (but rather very
344 // simple), just list out the types of BCM's supported by this code!!!
345 if( type == "VQWK") {
346 return new QwCombinedBPM<QwVQWK_Channel>(dynamic_cast<const QwCombinedBPM<QwVQWK_Channel>&>(source));
347 } else if ( type == "SIS3801" ) { // Default SCALER channel
348 return new QwCombinedBPM<QwSIS3801_Channel>(dynamic_cast<const QwCombinedBPM<QwSIS3801_Channel>&>(source));
349 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
350 return new QwCombinedBPM<QwSIS3801D24_Channel>(dynamic_cast<const QwCombinedBPM<QwSIS3801D24_Channel>&>(source));
351 } else if ( type == "MOLLERADC" ) {
352 return new QwCombinedBPM<QwMollerADC_Channel>(dynamic_cast<const QwCombinedBPM<QwMollerADC_Channel>&>(source));
353 } else { // Unsupported one!
354 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
355 exit(-1);
356 }
357}
#define QwWarning
Predefined log drain for warnings.
Definition QwLog.h:44
#define QwMessage
Predefined log drain for regular messages.
Definition QwLog.h:49
static std::ostream & endl(std::ostream &)
End of the line.
Definition QwLog.cc:297
TString GetModuleType() const
Return the type of the beam instrument.
friend class QwCombinedBPM
Definition VQwBPM.h:66

References QwLog::endl(), VQwDataElement::GetModuleType(), QwCombinedBPM, QwMessage, QwWarning, and VQwBPM().

+ Here is the call graph for this function:

◆ CreateCombo() [2/2]

VQwBPM * VQwBPM::CreateCombo ( TString subsystemname,
TString type,
TString name )
static

A fast way of creating a BPM stripline of specified type.

Definition at line 314 of file VQwBPM.cc.

316{
317 Bool_t localDebug = kFALSE;
318 type.ToUpper();
319 if( localDebug ) QwMessage<<"Creating CombinedBPM of type: "<<type<<" with name: "<<
320 name<<". Subsystem Name: " <<subsystemname<<"\n";
321 // (jc2) As a first try, let's do this the ugly way (but rather very
322 // simple), just list out the types of BPM's supported by this code!!!
323 if( type == "VQWK") {
324 return new QwCombinedBPM<QwVQWK_Channel>(subsystemname,name,type);
325 } else if (type == "SIS3801" ) { // Default SCALER channel
326 return new QwCombinedBPM<QwSIS3801_Channel>(subsystemname,name,type);
327 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
328 return new QwCombinedBPM<QwSIS3801D24_Channel>(subsystemname,name,type);
329 } else if ( type == "MOLLERADC" ) {
330 return new QwCombinedBPM<QwMollerADC_Channel>(subsystemname,name,type);
331 } else { // Unsupported one!
332 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
333 exit(-1);
334 }
335}

References QwCombinedBPM, QwMessage, QwWarning, and VQwBPM().

Referenced by QwBeamLine::CopyTemplatedDataElements(), and QwBeamLine::LoadChannelMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CreateStripline() [1/2]

VQwBPM * VQwBPM::CreateStripline ( const VQwBPM & source)
static

Definition at line 289 of file VQwBPM.cc.

290{
291 Bool_t localDebug = kFALSE;
292 TString type = source.GetModuleType();
293 type.ToUpper();
294 if( localDebug ) QwMessage<<"Creating BPM of type: "<<type << QwLog::endl;
295 // (jc2) As a first try, let's do this the ugly way (but rather very
296 // simple), just list out the types of BPM's supported by this code!!!
297 if( type == "VQWK") {
298 return new QwBPMStripline<QwVQWK_Channel>(dynamic_cast<const QwBPMStripline<QwVQWK_Channel>&>(source));
299 } else if ( type == "SIS3801" ) {
300 return new QwBPMStripline<QwSIS3801_Channel>(dynamic_cast<const QwBPMStripline<QwSIS3801_Channel>&>(source));
301 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
302 return new QwBPMStripline<QwSIS3801D24_Channel>(dynamic_cast<const QwBPMStripline<QwSIS3801D24_Channel>&>(source));
303 } else if ( type == "MOLLERADC" ) {
304 return new QwBPMStripline<QwMollerADC_Channel>(dynamic_cast<const QwBPMStripline<QwMollerADC_Channel>&>(source));
305 } else { // Unsupported one!
306 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
307 exit(-1);
308 }
309}
friend class QwBPMStripline
Definition VQwBPM.h:65

References QwLog::endl(), VQwDataElement::GetModuleType(), QwBPMStripline, QwMessage, QwWarning, and VQwBPM().

+ Here is the call graph for this function:

◆ CreateStripline() [2/2]

VQwBPM * VQwBPM::CreateStripline ( TString subsystemname,
TString type,
TString name )
static

A fast way of creating a BPM stripline of specified type.

Definition at line 267 of file VQwBPM.cc.

268{
269 Bool_t localDebug = kFALSE;
270 type.ToUpper();
271 if( localDebug ) QwMessage<<"Creating BPM of type: "<<type<<" with name: "<<
272 name<<". Subsystem Name: " <<subsystemname<<"\n";
273 // (jc2) As a first try, let's do this the ugly way (but rather very
274 // simple), just list out the types of BPM's supported by this code!!!
275 if( type == "VQWK") {
276 return new QwBPMStripline<QwVQWK_Channel>(subsystemname,name,type);
277 } else if ( type == "SIS3801" ) {
278 return new QwBPMStripline<QwSIS3801_Channel>(subsystemname,name,type);
279 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
280 return new QwBPMStripline<QwSIS3801D24_Channel>(subsystemname,name,type);
281 } else if ( type == "MOLLERADC" ) {
282 return new QwBPMStripline<QwMollerADC_Channel>(subsystemname,name,type);
283 } else { // Unsupported one!
284 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
285 exit(-1);
286 }
287}

References QwBPMStripline, QwMessage, QwWarning, and VQwBPM().

Referenced by QwBeamLine::AddToElementList(), and QwBeamLine::CopyTemplatedDataElements().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeaccumulateRunningSum()

virtual void VQwBPM::DeaccumulateRunningSum ( VQwBPM & value,
Int_t ErrorMask = 0xFFFFFFF )
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

References VQwBPM().

+ Here is the call graph for this function:

◆ EncodeEventData()

virtual void VQwBPM::EncodeEventData ( std::vector< UInt_t > & )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 279 of file VQwBPM.h.

279 {
280 std::cerr << "EncodeEventData is undefined!!!\n";
281 }

◆ FillHistograms()

void VQwBPM::FillHistograms ( )
overridepure virtual

Fill the histograms for this data element.

Implements VQwDataElement.

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

◆ FillRawEventData()

virtual void VQwBPM::FillRawEventData ( )
inlinevirtual

Reimplemented in QwBPMStripline< T >.

Definition at line 98 of file VQwBPM.h.

99 {std::cerr << "FillRawEventData for VQwBPM not implemented for device " << GetElementName() << "!\n";};

References VQwDataElement::GetElementName().

Referenced by QwCombinedBPM< T >::GetProjectedPosition(), and QwEnergyCalculator::GetProjectedPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FillTreeVector()

virtual void VQwBPM::FillTreeVector ( QwRootTreeBranchVector & values) const
pure virtual

◆ GetAbsolutePosition()

virtual void VQwBPM::GetAbsolutePosition ( )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 224 of file VQwBPM.h.

224 {
225 std::cerr << "GetAbsolutePosition() is not implemented!!\n";
226 }

◆ GetAngleX()

virtual const VQwHardwareChannel * VQwBPM::GetAngleX ( ) const
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 236 of file VQwBPM.h.

236 {
237 std::cerr << "GetAngleX() is not implemented for VQwBPM, must be"
238 "used in a CombinedBPM!\n";
239 return 0;
240 }

◆ GetAngleY()

virtual const VQwHardwareChannel * VQwBPM::GetAngleY ( ) const
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 241 of file VQwBPM.h.

241 {
242 std::cerr << "GetAngleY() is not implemented for VQwBPM, must be"
243 "used in a CombinedBPM!\n";
244 return 0;
245 }

◆ GetEffectiveCharge()

virtual const VQwHardwareChannel * VQwBPM::GetEffectiveCharge ( ) const
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Referenced by QwBeamLine::GetChannel().

+ Here is the caller graph for this function:

◆ GetElectronicFactors()

void VQwBPM::GetElectronicFactors ( Double_t BSENfactor,
Double_t AlphaX,
Double_t AlphaY )

Apply per-detector electronic calibration and relative gains.

Parameters
BSENfactorBeam sensitivity factor for position calibration.
AlphaXRelative gain correction factor for X position.
AlphaYRelative gain correction factor for Y position.

Reads electronic factors from calibration file and applies stripline-specific calibrations. BSENfactor is scaled by 18.81 to convert to mm/V, and a correction factor of 0.250014 is applied for stripline geometry.

Definition at line 77 of file VQwBPM.cc.

78{
79 // Read in the electronic factors from the file
80 Bool_t ldebug = kFALSE;
81
82 fQwStriplineCalibration = BSENfactor*18.81;
83 fQwStriplineCorrection = 0.250014;
84
85 fRelativeGains[0]=AlphaX;
86 fRelativeGains[1]=AlphaY;
87
88 if(ldebug){
89 std::cout<<"\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
90 std::cout<<this->GetElementName();
91 std::cout<<"\nfQwStriplineCalibration = "<<fQwStriplineCalibration<<std::endl;
92 std::cout<<"\nfQwStriplineCorrection = "<<fQwStriplineCorrection<<std::endl;
93 std::cout<<"AlphaX = "<<fRelativeGains[0]<<std::endl;
94 std::cout<<"AlphaY = "<<fRelativeGains[1]<<std::endl;
95
96 }
97 return;
98}
Double_t fQwStriplineCalibration
Definition VQwBPM.h:329
Double_t fRelativeGains[2]
Definition VQwBPM.h:331
Double_t fQwStriplineCorrection
Definition VQwBPM.h:330

References fQwStriplineCalibration, fQwStriplineCorrection, fRelativeGains, and VQwDataElement::GetElementName().

Referenced by QwBeamLine::LoadGeometryDefinition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNumberOfElements()

virtual size_t VQwBPM::GetNumberOfElements ( )
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 97 of file VQwBPM.h.

97{return size_t(1);}

◆ GetPosition() [1/2]

virtual VQwHardwareChannel * VQwBPM::GetPosition ( EBeamPositionMonitorAxis axis)
inlineprotectedvirtual

Reimplemented in QwBPMStripline< T >.

Definition at line 148 of file VQwBPM.h.

148 {
149 VQwHardwareChannel* tmpptr = NULL;
150 if (axis==kXAxis){
151 tmpptr = GetSubelementByName("x");
152 } else if (axis==kYAxis){
153 tmpptr = GetSubelementByName("y");
154 } else {
155 TString loc="VQwBPM::GetPosition for "
156 +this->GetElementName()+" failed for axis value "+Form("%d",axis);
157 throw std::out_of_range(loc.Data());
158 }
159 return tmpptr;
160 }
virtual VQwHardwareChannel * GetSubelementByName(TString ch_name)=0
static const TString axis[3]
Definition VQwBPM.h:333

References axis, VQwDataElement::GetElementName(), GetSubelementByName(), kXAxis, and kYAxis.

+ Here is the call graph for this function:

◆ GetPosition() [2/2]

virtual const VQwHardwareChannel * VQwBPM::GetPosition ( EBeamPositionMonitorAxis axis) const
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 140 of file VQwBPM.h.

140 {
141 return const_cast<VQwBPM*>(this)->GetPosition(axis);
142 }
virtual const VQwHardwareChannel * GetPosition(EBeamPositionMonitorAxis axis) const
Definition VQwBPM.h:140
VQwBPM()
Definition VQwBPM.h:76

References axis, GetPosition(), and VQwBPM().

Referenced by QwBeamLine::GetChannel(), GetPosition(), QwCombinedBPM< T >::GetProjectedPosition(), and QwEnergyCalculator::GetProjectedPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetPositionInZ()

Double_t VQwBPM::GetPositionInZ ( ) const
inline

Definition at line 171 of file VQwBPM.h.

171 {
172 return fPositionCenter[2];
173 };

References fPositionCenter.

Referenced by QwCombinedBPM< T >::GetProjectedPosition(), QwCombinedBPM< T >::LeastSquareFit(), and QwCombinedBPM< T >::RandomizeEventData().

+ Here is the caller graph for this function:

◆ GetProjectedPosition()

virtual void VQwBPM::GetProjectedPosition ( VQwBPM * )
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 96 of file VQwBPM.h.

96{}; // The base class function GetProjectedPosition is defined to have no effect.

References VQwBPM().

+ Here is the call graph for this function:

◆ GetSubelementByIndex()

VQwHardwareChannel * VQwBPM::GetSubelementByIndex ( size_t index)
inlineprotected

Definition at line 320 of file VQwBPM.h.

320 {
321 return GetSubelementByName(fSubelementNames.at(index));
322 };
std::vector< TString > fSubelementNames
Definition VQwBPM.h:325

References fSubelementNames, and GetSubelementByName().

+ Here is the call graph for this function:

◆ GetSubelementByName()

virtual VQwHardwareChannel * VQwBPM::GetSubelementByName ( TString ch_name)
protectedpure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Referenced by GetPosition(), GetSubelementByIndex(), SetSingleEventCuts(), and SetSingleEventCuts().

+ Here is the caller graph for this function:

◆ GetSubElementName()

virtual TString VQwBPM::GetSubElementName ( Int_t )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 220 of file VQwBPM.h.

220 {
221 std::cerr << "GetSubElementName() is not implemented!! for device: " << GetElementName() << "\n";
222 return TString("OBJECT_UNDEFINED"); // Return an erroneous TString
223 }

References VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ GetSurveyOffsets()

void VQwBPM::GetSurveyOffsets ( Double_t Xoffset,
Double_t Yoffset,
Double_t Zoffset )

Store geometry/survey offsets for absolute position calibration.

Parameters
XoffsetX-axis survey offset in mm.
YoffsetY-axis survey offset in mm.
ZoffsetZ-axis survey offset in mm.

Reads position offsets from geometry map file for absolute position calibration. These offsets correct for known mechanical installation differences from ideal positions.

Definition at line 56 of file VQwBPM.cc.

57{
58 // Read in the position offsets from the geometry map file
59 for(Short_t i=0;i<3;i++) fPositionCenter[i]=0.0;
60 fPositionCenter[0]=Xoffset;
61 fPositionCenter[1]=Yoffset;
62 fPositionCenter[2]=Zoffset;
63 return;
64}

References fPositionCenter.

Referenced by QwBeamLine::LoadGeometryDefinition().

+ Here is the caller graph for this function:

◆ IncrementErrorCounters()

virtual void VQwBPM::IncrementErrorCounters ( )
pure virtual

◆ InitializeChannel()

void VQwBPM::InitializeChannel ( TString name)

Initialize common BPM state and set the element name.

Parameters
nameElement name to assign to this BPM.

Initializes position center array to zero and sets the element name. This is the base initialization common to all BPM types.

Definition at line 35 of file VQwBPM.cc.

36{
37 Short_t i = 0;
38
39 for(i=0;i<3;i++) fPositionCenter[i] = 0.0;
40
41 SetElementName(name);
42
43 return;
44}
void SetElementName(const TString &name)
Set the name of this element.

References fPositionCenter, and VQwDataElement::SetElementName().

Referenced by QwBPMCavity::InitializeChannel(), QwBPMCavity::InitializeChannel(), QwBPMStripline< T >::InitializeChannel(), QwBPMStripline< T >::InitializeChannel(), QwCombinedBPM< T >::InitializeChannel(), QwCombinedBPM< T >::InitializeChannel(), QwLinearDiodeArray::InitializeChannel(), QwLinearDiodeArray::InitializeChannel(), QwQPD::InitializeChannel(), and QwQPD::InitializeChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeChannel_base()

void VQwBPM::InitializeChannel_base ( )
inlineprivate

Definition at line 300 of file VQwBPM.h.

300 {
301/* fAbsPos_base[0] = NULL; */
302/* fAbsPos_base[1] = NULL; */
303/* fEffectiveCharge_base = NULL; */
304 fQwStriplineCalibration = 18.81; // adc counts/mm default value
305 fQwStriplineCorrection = 0.250014;
306 for(Short_t i=0;i<2;i++) {
307 fRelativeGains[i]=1.0;
308 fGains[i]=1.0;
309 fResolution[i]=0.0001;
310 }
311 };
Double_t fResolution[2]
Definition VQwBPM.h:342
Double_t fGains[2]
Definition VQwBPM.h:332

References fGains, fQwStriplineCalibration, fQwStriplineCorrection, fRelativeGains, and fResolution.

Referenced by VQwBPM(), and VQwBPM().

+ Here is the caller graph for this function:

◆ LoadChannelParameters()

void VQwBPM::LoadChannelParameters ( QwParameterFile & paramfile)
overridepure virtual

◆ operator+=()

virtual VQwBPM & VQwBPM::operator+= ( const VQwBPM & value)
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

References VQwBPM().

+ Here is the call graph for this function:

◆ operator-=()

virtual VQwBPM & VQwBPM::operator-= ( const VQwBPM & value)
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

References VQwBPM().

+ Here is the call graph for this function:

◆ operator=()

VQwBPM & VQwBPM::operator= ( const VQwBPM & value)
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 156 of file VQwBPM.cc.

157{
158 if (GetElementName()!=""){
161 bRotated = value.bRotated;
165 fGoodEvent = value.fGoodEvent;
166 // fDeviceErrorCode = value.fDeviceErrorCode;
167 // bFullSave = value.bFullSave;
168 for(size_t axis=kXAxis;axis<kNumAxes;axis++){
171 }
172 // Copy Z center position
173 this->fPositionCenter[2]=value.fPositionCenter[2];
174 }
175 return *this;
176}
Double_t fRotationAngle
Definition VQwBPM.h:337
Double_t fCosRotation
Definition VQwBPM.h:338
Bool_t fGoodEvent
Definition VQwBPM.h:345
Double_t fSinRotation
Definition VQwBPM.h:339

References axis, bRotated, fCosRotation, fGoodEvent, fPositionCenter, fQwStriplineCalibration, fQwStriplineCorrection, fRelativeGains, fRotationAngle, fSinRotation, VQwDataElement::GetElementName(), kNumAxes, kXAxis, and VQwBPM().

Referenced by QwBPMCavity::operator=(), QwBPMStripline< T >::operator=(), QwCombinedBPM< T >::operator=(), and QwLinearDiodeArray::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PrintErrorCounters()

void VQwBPM::PrintErrorCounters ( ) const
inlineoverridevirtual

report number of events failed due to HW and event cut failure

Reimplemented from VQwDataElement.

Definition at line 228 of file VQwBPM.h.

228 {// report number of events failed due to HW and event cut failure
229 std::cerr << "PrintErrorCounters() is not implemented!!\n";
230 }

◆ PrintInfo()

void VQwBPM::PrintInfo ( ) const
inlineoverridevirtual

Print multiple lines of information about this data element.

Reimplemented from VQwDataElement.

Definition at line 288 of file VQwBPM.h.

288 {
289 std::cout<<"PrintInfo() for VQwBPM not impletemented\n";
290 };

◆ ProcessEvent()

virtual void VQwBPM::ProcessEvent ( )
pure virtual

◆ RandomizeEventData()

virtual void VQwBPM::RandomizeEventData ( int = 0,
double = 0.0 )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 270 of file VQwBPM.h.

270 {
271 std::cerr << "RandomizeEventData is undefined for device" << GetElementName() << "!!!\n";
272 }

References VQwDataElement::GetElementName().

+ Here is the call graph for this function:

◆ Ratio()

virtual void VQwBPM::Ratio ( VQwBPM & ,
VQwBPM &  )
inlinevirtual

Reimplemented in QwBPMStripline< T >, and QwCombinedBPM< T >.

Definition at line 204 of file VQwBPM.h.

204 {
205 std::cerr << "Ratio() is not defined for BPM named="<<GetElementName()<<"\n";
206 }

References VQwDataElement::GetElementName(), and VQwBPM().

+ Here is the call graph for this function:

◆ Scale()

virtual void VQwBPM::Scale ( Double_t )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 113 of file VQwBPM.h.

113 {
114 std::cerr << "Scale for VQwBPM not implemented!\n";
115 }

◆ SetBPMForCombo()

virtual void VQwBPM::SetBPMForCombo ( const VQwBPM * ,
Double_t ,
Double_t ,
Double_t ,
Double_t  )
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 246 of file VQwBPM.h.

247 {
248 std::cerr << "VQwBPM::SetBPMForCombo only defined for CombinedBPM's!!!\n";
249 }

References VQwBPM().

+ Here is the call graph for this function:

◆ SetDefaultSampleSize()

virtual void VQwBPM::SetDefaultSampleSize ( Int_t )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 252 of file VQwBPM.h.

252 {
253 std::cerr << "SetDefaultSampleSize() is undefined!!!\n";
254 }

◆ SetEventCutMode()

virtual void VQwBPM::SetEventCutMode ( Int_t bcuts)
pure virtual

◆ SetGains()

void VQwBPM::SetGains ( TString pos,
Double_t value )

Configure position-dependent gains (X or Y).

Definition at line 134 of file VQwBPM.cc.

134 {
135 if(pos.Contains("X")) fGains[0] = value;
136 if(pos.Contains("Y")) fGains[1] = value;
137}

References fGains.

Referenced by QwBeamLine::AssignGeometry().

+ Here is the caller graph for this function:

◆ SetRandomEventAsymmetry()

virtual void VQwBPM::SetRandomEventAsymmetry ( Double_t )
inlinevirtual

Definition at line 267 of file VQwBPM.h.

267 {
268 std::cerr<< "SetRandomEventAsymmetry undefined!!\n";
269 }

◆ SetRandomEventParameters() [1/2]

virtual void VQwBPM::SetRandomEventParameters ( Double_t ,
Double_t ,
Double_t ,
Double_t  )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 261 of file VQwBPM.h.

261 {
262 std::cerr<< "SetRandomEventParameters undefined!!\n";
263 }

◆ SetRandomEventParameters() [2/2]

virtual void VQwBPM::SetRandomEventParameters ( Double_t ,
Double_t ,
Double_t ,
Double_t ,
Double_t ,
Double_t ,
Double_t ,
Double_t  )
inlinevirtual

Reimplemented in QwCombinedBPM< T >.

Definition at line 264 of file VQwBPM.h.

264 {
265 std::cerr<< "SetRandomEventParameters undefined!!\n";
266 }

◆ SetResolution()

virtual void VQwBPM::SetResolution ( Double_t resolutionX,
Double_t resolutionY )
inlinevirtual

Definition at line 256 of file VQwBPM.h.

256 {
257 fResolution[kXAxis] = resolutionX;
258 fResolution[kYAxis] = resolutionY;
259 }

References fResolution, kXAxis, and kYAxis.

Referenced by QwBPMStripline< T >::LoadMockDataParameters(), and QwCombinedBPM< T >::LoadMockDataParameters().

+ Here is the caller graph for this function:

◆ SetRootSaveStatus()

◆ SetRotation()

void VQwBPM::SetRotation ( Double_t rotation_angle)

Set detector rotation angle and update cached trigonometric values.

Parameters
rotation_angleRotation angle in degrees (positive = clockwise from beam's perspective).

Sets the BPM rotation angle and pre-computes sin/cos values for efficient coordinate transformations. Rotation is applied to correct for mechanical installation angles that differ from ideal orientation.

Definition at line 108 of file VQwBPM.cc.

108 {
109 // Read the rotation angle in degrees (to beam right)
110 Bool_t ldebug = kFALSE;
111 fSinRotation = 0;
112 fCosRotation = 0;
113 fRotationAngle = rotation_angle;
114 fSinRotation = TMath::Sin(fRotationAngle*(TMath::DegToRad()));
115 fCosRotation = TMath::Cos(fRotationAngle*(TMath::DegToRad()));
116
117 if(ldebug){
118 std::cout<<"\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
119 std::cout<<this->GetElementName();
120 std::cout<<" is rotated by angle = "<<rotation_angle<<std::endl;
121
122 }
123}

References fCosRotation, fRotationAngle, fSinRotation, and VQwDataElement::GetElementName().

Referenced by QwBeamLine::AssignGeometry(), QwBPMStripline< T >::QwBPMStripline(), QwBPMStripline< T >::QwBPMStripline(), QwBPMStripline< T >::QwBPMStripline(), and SetRotationOff().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRotationOff()

void VQwBPM::SetRotationOff ( )

Disable rotation, restoring accelerator coordinates (0 degrees).

Definition at line 126 of file VQwBPM.cc.

126 {
127 // Turn off rotation. This object is already in accelerator coordinates.
128 fRotationAngle = 0.0;
130 bRotated=kFALSE;
131}
void SetRotation(Double_t)
Set detector rotation angle and update cached trigonometric values.
Definition VQwBPM.cc:108

References bRotated, fRotationAngle, and SetRotation().

Referenced by QwBeamLine::AssignGeometry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSingleEventCuts() [1/2]

void VQwBPM::SetSingleEventCuts ( TString ch_name,
Double_t minX,
Double_t maxX )

Definition at line 139 of file VQwBPM.cc.

140{
141 VQwHardwareChannel* tmpptr = GetSubelementByName(ch_name);
142 QwMessage << GetElementName() << " " << ch_name
143 << " LL " << minX <<" UL " << maxX <<QwLog::endl;
144 tmpptr->SetSingleEventCuts(minX,maxX);
145}
void SetSingleEventCuts(Double_t min, Double_t max)
Set the upper and lower limits (fULimit and fLLimit) for this channel.

References QwLog::endl(), VQwDataElement::GetElementName(), GetSubelementByName(), QwMessage, and VQwHardwareChannel::SetSingleEventCuts().

+ Here is the call graph for this function:

◆ SetSingleEventCuts() [2/2]

void VQwBPM::SetSingleEventCuts ( TString ch_name,
UInt_t errorflag,
Double_t minX,
Double_t maxX,
Double_t stability,
Double_t burplevel )

Definition at line 147 of file VQwBPM.cc.

148{
149 VQwHardwareChannel* tmpptr = GetSubelementByName(ch_name);
150 errorflag|=kBPMErrorFlag;//update the device flag
151 QwMessage << GetElementName() << " " << ch_name
152 << " LL " << minX <<" UL " << maxX <<QwLog::endl;
153 tmpptr->SetSingleEventCuts(errorflag,minX,maxX,stability,burplevel);
154}
static const UInt_t kBPMErrorFlag
Definition QwTypes.h:170

References QwLog::endl(), VQwDataElement::GetElementName(), GetSubelementByName(), kBPMErrorFlag, QwMessage, and VQwHardwareChannel::SetSingleEventCuts().

+ Here is the call graph for this function:

◆ SetSubElementCalibrationFactor()

virtual void VQwBPM::SetSubElementCalibrationFactor ( Int_t ,
Double_t  )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 285 of file VQwBPM.h.

285 {
286 std::cerr << "SetSubElementCalibrationFactor is undefined!!!\n";
287 }

◆ SetSubElementPedestal()

virtual void VQwBPM::SetSubElementPedestal ( Int_t ,
Double_t  )
inlinevirtual

Reimplemented in QwBPMCavity, QwBPMStripline< T >, QwLinearDiodeArray, and QwQPD.

Definition at line 282 of file VQwBPM.h.

282 {
283 std::cerr << "SetSubElementPedestal is undefined!!!\n";
284 }

◆ UpdateErrorFlag() [1/2]

UInt_t VQwBPM::UpdateErrorFlag ( )
overridepure virtual

Update the error flag based on the error flags of internally contained objects Return parameter is the "Eventcut Error Flag".

Reimplemented from VQwDataElement.

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

◆ UpdateErrorFlag() [2/2]

virtual void VQwBPM::UpdateErrorFlag ( const VQwBPM * ev_error)
pure virtual

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray, and QwQPD.

References VQwBPM().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QwBPMStripline

template<typename TT>
friend class QwBPMStripline
friend

Definition at line 65 of file VQwBPM.h.

References QwBPMStripline.

Referenced by CreateStripline(), CreateStripline(), and QwBPMStripline.

◆ QwCombinedBPM

template<typename TT>
friend class QwCombinedBPM
friend

Definition at line 66 of file VQwBPM.h.

References QwCombinedBPM.

Referenced by CreateCombo(), CreateCombo(), and QwCombinedBPM.

◆ QwEnergyCalculator

friend class QwEnergyCalculator
friend

Definition at line 67 of file VQwBPM.h.

References QwEnergyCalculator.

Referenced by QwEnergyCalculator.

Field Documentation

◆ axis

const TString VQwBPM::axis[3]
staticprotected

Definition at line 333 of file VQwBPM.h.

Referenced by QwCombinedBPM< T >::AccumulateRunningSum(), QwCombinedBPM< T >::ApplySingleEventCuts(), QwCombinedBPM< T >::CalculateRunningAverage(), QwCombinedBPM< T >::ClearEventData(), QwCombinedBPM< T >::ConstructBranch(), QwCombinedBPM< T >::ConstructBranch(), QwCombinedBPM< T >::ConstructBranchAndVector(), QwCombinedBPM< T >::ConstructHistograms(), QwCombinedBPM< T >::DeaccumulateRunningSum(), QwCombinedBPM< T >::FillHistograms(), QwCombinedBPM< T >::FillTreeVector(), QwCombinedBPM< T >::GetEventcutErrorFlag(), QwBPMCavity::GetPosition(), QwBPMStripline< T >::GetPosition(), QwBPMStripline< T >::GetPosition(), QwCombinedBPM< T >::GetPosition(), QwLinearDiodeArray::GetPosition(), QwQPD::GetPosition(), GetPosition(), GetPosition(), QwCombinedBPM< T >::GetProjectedPosition(), QwCombinedBPM< T >::GetSlope(), QwCombinedBPM< T >::IncrementErrorCounters(), QwCombinedBPM< T >::InitializeChannel(), QwCombinedBPM< T >::InitializeChannel(), QwCombinedBPM< T >::LeastSquareFit(), QwCombinedBPM< T >::MakeBPMComboList(), QwCombinedBPM< T >::operator+=(), QwCombinedBPM< T >::operator-=(), QwCombinedBPM< T >::operator=(), operator=(), QwCombinedBPM< T >::PrintErrorCounters(), QwCombinedBPM< T >::PrintInfo(), QwCombinedBPM< T >::PrintValue(), QwCombinedBPM< T >::ProcessEvent(), QwCombinedBPM< T >::RandomizeEventData(), QwCombinedBPM< T >::Ratio(), QwCombinedBPM< T >::Scale(), QwCombinedBPM< T >::SetEventCutMode(), and QwCombinedBPM< T >::UpdateErrorFlag().

◆ bDEBUG

◆ bFullSave

◆ bRotated

◆ fCosRotation

Double_t VQwBPM::fCosRotation
protected

◆ fGains

◆ fGoodEvent

Bool_t VQwBPM::fGoodEvent
protected

Definition at line 345 of file VQwBPM.h.

Referenced by operator=().

◆ fPositionCenter

◆ fQwStriplineCalibration

Double_t VQwBPM::fQwStriplineCalibration
protected

◆ fQwStriplineCorrection

Double_t VQwBPM::fQwStriplineCorrection
protected

Definition at line 330 of file VQwBPM.h.

Referenced by GetElectronicFactors(), InitializeChannel_base(), and operator=().

◆ fRelativeGains

Double_t VQwBPM::fRelativeGains[2]
protected

◆ fResolution

Double_t VQwBPM::fResolution[2]
protected

◆ fRotationAngle

◆ fSinRotation

Double_t VQwBPM::fSinRotation
protected

◆ fSubelementNames

std::vector<TString> VQwBPM::fSubelementNames
protected

Definition at line 325 of file VQwBPM.h.

Referenced by GetSubelementByIndex().

◆ kAxisLabel


The documentation for this class was generated from the following files: