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 VQwBPM & operator= (const VQwBPM &value)=0
 
virtual VQwBPM & operator+= (const VQwBPM &value)=0
 
virtual VQwBPM & operator-= (const VQwBPM &value)=0
 
void SetRootSaveStatus (TString &prefix)
 
virtual const VQwHardwareChannel * GetPosition (EBeamPositionMonitorAxis axis) const
 
virtual const VQwHardwareChannel * GetEffectiveCharge () 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 VQwHardwareChannel * GetAngleX () const
 
virtual const VQwHardwareChannel * GetAngleY () 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 *)
 
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)
 
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 VQwBPM * CreateStripline (TString subsystemname, TString name, TString type)
 A fast way of creating a BPM stripline of specified type.
 
static VQwBPM * CreateStripline (const VQwBPM &source)
 
static VQwBPM * CreateCombo (TString subsystemname, TString name, TString type)
 A fast way of creating a BPM stripline of specified type.
 
static VQwBPM * CreateCombo (const VQwBPM &source)
 
static VQwBPM * CreateLinearDiodeArray (TString subsystemname, TString name, TString type)
 
static VQwBPM * CreateLinearDiodeArray (const VQwBPM &source)
 

Protected Member Functions

virtual VQwHardwareChannel * GetPosition (EBeamPositionMonitorAxis axis)
 
virtual VQwHardwareChannel * GetSubelementByName (TString ch_name)=0
 
VQwHardwareChannel * GetSubelementByIndex (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.
 
VQwDataElement & operator= (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.
 
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::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_ptr > fHistograms
 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:302

References InitializeChannel_base().

Referenced by QwBPMCavity::AccumulateRunningSum(), QwBPMStripline< T >::AccumulateRunningSum(), QwCombinedBPM< T >::AccumulateRunningSum(), QwLinearDiodeArray< ChannelType >::AccumulateRunningSum(), QwQPD::AccumulateRunningSum(), AccumulateRunningSum(), CreateCombo(), CreateCombo(), CreateLinearDiodeArray(), CreateLinearDiodeArray(), CreateStripline(), CreateStripline(), QwBPMCavity::DeaccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwCombinedBPM< T >::DeaccumulateRunningSum(), QwLinearDiodeArray< ChannelType >::DeaccumulateRunningSum(), QwQPD::DeaccumulateRunningSum(), DeaccumulateRunningSum(), GetPosition(), QwCombinedBPM< T >::GetProjectedPosition(), GetProjectedPosition(), QwBPMCavity::operator+=(), QwBPMStripline< T >::operator+=(), QwCombinedBPM< T >::operator+=(), QwLinearDiodeArray< ChannelType >::operator+=(), QwQPD::operator+=(), operator+=(), QwBPMCavity::operator-=(), QwBPMStripline< T >::operator-=(), QwCombinedBPM< T >::operator-=(), QwLinearDiodeArray< ChannelType >::operator-=(), QwQPD::operator-=(), operator-=(), QwBPMCavity::operator=(), QwBPMStripline< T >::operator=(), QwCombinedBPM< T >::operator=(), QwLinearDiodeArray< ChannelType >::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< ChannelType >::QwLinearDiodeArray(), QwLinearDiodeArray< ChannelType >::QwLinearDiodeArray(), QwLinearDiodeArray< ChannelType >::QwLinearDiodeArray(), QwLinearDiodeArray< ChannelType >::QwLinearDiodeArray(), QwQPD::QwQPD(), QwQPD::QwQPD(), QwQPD::QwQPD(), QwBPMCavity::Ratio(), QwBPMStripline< T >::Ratio(), QwCombinedBPM< T >::Ratio(), QwLinearDiodeArray< ChannelType >::Ratio(), QwQPD::Ratio(), Ratio(), QwCombinedBPM< T >::SetBPMForCombo(), SetBPMForCombo(), QwLinearDiodeArray< ChannelType >::SetSubElementName(), QwBPMCavity::UpdateErrorFlag(), QwBPMStripline< T >::UpdateErrorFlag(), QwCombinedBPM< T >::UpdateErrorFlag(), QwLinearDiodeArray< ChannelType >::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:330
Bool_t bFullSave
Definition VQwBPM.h:350
Bool_t bRotated
Definition VQwBPM.h:338

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< ChannelType >, 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< ChannelType >, 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< ChannelType >, and QwQPD.

◆ CreateCombo() [1/2]

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

Definition at line 367 of file VQwBPM.cc.

368{
369 Bool_t localDebug = kFALSE;
370 TString type = source.GetModuleType();
371 type.ToUpper();
372 if( localDebug ) QwMessage<<"Creating CombinedBCM of type: "<<type<< QwLog::endl;
373 // (jc2) As a first try, let's do this the ugly way (but rather very
374 // simple), just list out the types of BCM's supported by this code!!!
375 if( type == "VQWK") {
376 return new QwCombinedBPM<QwVQWK_Channel>(dynamic_cast<const QwCombinedBPM<QwVQWK_Channel>&>(source));
377 } else if ( type == "SIS3801" ) { // Default SCALER channel
378 return new QwCombinedBPM<QwSIS3801_Channel>(dynamic_cast<const QwCombinedBPM<QwSIS3801_Channel>&>(source));
379 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
380 return new QwCombinedBPM<QwSIS3801D24_Channel>(dynamic_cast<const QwCombinedBPM<QwSIS3801D24_Channel>&>(source));
381 } else if ( type == "MOLLERADC" ) {
382 return new QwCombinedBPM<QwMollerADC_Channel>(dynamic_cast<const QwCombinedBPM<QwMollerADC_Channel>&>(source));
383 } else { // Unsupported one!
384 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
385 exit(-1);
386 }
387}
#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 name,
TString type )
static

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

Definition at line 344 of file VQwBPM.cc.

346{
347 Bool_t localDebug = kFALSE;
348 type.ToUpper();
349 if( localDebug ) QwMessage<<"Creating CombinedBPM of type: "<<type<<" with name: "<<
350 name<<". Subsystem Name: " <<subsystemname<<"\n";
351 // (jc2) As a first try, let's do this the ugly way (but rather very
352 // simple), just list out the types of BPM's supported by this code!!!
353 if( type == "VQWK") {
354 return new QwCombinedBPM<QwVQWK_Channel>(subsystemname,name,type);
355 } else if (type == "SIS3801" ) { // Default SCALER channel
356 return new QwCombinedBPM<QwSIS3801_Channel>(subsystemname,name,type);
357 } else if ( type == "SCALER" || type == "SIS3801D24" ) {
358 return new QwCombinedBPM<QwSIS3801D24_Channel>(subsystemname,name,type);
359 } else if ( type == "MOLLERADC" ) {
360 return new QwCombinedBPM<QwMollerADC_Channel>(subsystemname,name,type);
361 } else { // Unsupported one!
362 QwWarning << "BPM of type="<<type<<" is UNSUPPORTED!!\n";
363 exit(-1);
364 }
365}

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:

◆ CreateLinearDiodeArray() [1/2]

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

Definition at line 326 of file VQwBPM.cc.

326 {
327 Bool_t localdebug = kFALSE;
328 TString type = source.GetModuleType();
329 type.ToUpper();
330 if( localdebug ) QwMessage<<"Create Linear Diode Array of type: "<<type<<QwLog::endl;
331 if( type == "VQWK") {
332 return new QwLinearDiodeArray<QwVQWK_Channel>(dynamic_cast<const QwLinearDiodeArray<QwVQWK_Channel>&>(source));
333 } else if( type == "MOLLERADC" ) {
334 return new QwLinearDiodeArray<QwMollerADC_Channel>(dynamic_cast<const QwLinearDiodeArray<QwMollerADC_Channel>&>(source));
335 } else {
336 QwWarning<<"Linear Diode Array of type="<<type<<" is UNSUPPORTED!!\n";
337 exit(-1);
338 }
339}

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

+ Here is the call graph for this function:

◆ CreateLinearDiodeArray() [2/2]

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

Definition at line 312 of file VQwBPM.cc.

312 {
313 Bool_t localdebug = kFALSE;
314 type.ToUpper();
315 if( localdebug ) QwMessage<<"Create Linear Diode Array of type: "<<type<<". Subsystem Name: "<<subsystemname<<"\n";
316 if( type == "VQWK") {
317 return new QwLinearDiodeArray<QwVQWK_Channel>(subsystemname, name, type);
318 } else if( type == "MOLLERADC" ) {
319 return new QwLinearDiodeArray<QwMollerADC_Channel>(subsystemname, name, type);
320 } else {
321 QwWarning<<"Linear Diode Array of type="<<type<<" is UNSUPPORTED!!\n";
322 exit(-1);
323 }
324}

References 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:

◆ CreateStripline() [1/2]

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

Definition at line 290 of file VQwBPM.cc.

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

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

Definition at line 268 of file VQwBPM.cc.

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

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< ChannelType >, 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< ChannelType >, 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< ChannelType >, 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< ChannelType >, 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< ChannelType >, 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 78 of file VQwBPM.cc.

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

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:335

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< ChannelType >, 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 322 of file VQwBPM.h.

322 {
323 return GetSubelementByName(fSubelementNames.at(index));
324 };
std::vector< TString > fSubelementNames
Definition VQwBPM.h:327

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< ChannelType >, 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< ChannelType >, 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 57 of file VQwBPM.cc.

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

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 36 of file VQwBPM.cc.

37{
38 Short_t i = 0;
39
40 for(i=0;i<3;i++) fPositionCenter[i] = 0.0;
41
42 SetElementName(name);
43
44 return;
45}
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< ChannelType >::InitializeChannel(), QwLinearDiodeArray< ChannelType >::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 302 of file VQwBPM.h.

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

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< ChannelType >, 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< ChannelType >, 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< ChannelType >, and QwQPD.

Definition at line 157 of file VQwBPM.cc.

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

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< ChannelType >::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< ChannelType >, 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 QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray< ChannelType >, and QwQPD.

Definition at line 204 of file VQwBPM.h.

204 {
205 throw std::runtime_error(std::string("Ratio() is not defined for BPM named ") + GetElementName().Data());
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< ChannelType >, 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< ChannelType >, 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 135 of file VQwBPM.cc.

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

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< ChannelType >, 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 109 of file VQwBPM.cc.

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

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 127 of file VQwBPM.cc.

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

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 140 of file VQwBPM.cc.

141{
142 VQwHardwareChannel* tmpptr = GetSubelementByName(ch_name);
143 QwMessage << GetElementName() << " " << ch_name
144 << " LL " << minX <<" UL " << maxX <<QwLog::endl;
145 tmpptr->SetSingleEventCuts(minX,maxX);
146}
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 148 of file VQwBPM.cc.

149{
150 VQwHardwareChannel* tmpptr = GetSubelementByName(ch_name);
151 errorflag|=kBPMErrorFlag;//update the device flag
152 QwMessage << GetElementName() << " " << ch_name
153 << " LL " << minX <<" UL " << maxX <<QwLog::endl;
154 tmpptr->SetSingleEventCuts(errorflag,minX,maxX,stability,burplevel);
155}
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< ChannelType >, 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< ChannelType >, 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< ChannelType >, and QwQPD.

◆ UpdateErrorFlag() [2/2]

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

Implemented in QwBPMCavity, QwBPMStripline< T >, QwCombinedBPM< T >, QwLinearDiodeArray< ChannelType >, 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 335 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< ChannelType >::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 347 of file VQwBPM.h.

Referenced by operator=().

◆ fPositionCenter

◆ fQwStriplineCalibration

Double_t VQwBPM::fQwStriplineCalibration
protected

◆ fQwStriplineCorrection

Double_t VQwBPM::fQwStriplineCorrection
protected

Definition at line 332 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 327 of file VQwBPM.h.

Referenced by GetSubelementByIndex().

◆ kAxisLabel


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