QwAnalysis
|
#include <QwBPMStripline.h>
Public Member Functions | |
QwBPMStripline () | |
QwBPMStripline (TString name) | |
QwBPMStripline (TString subsystemname, TString name) | |
QwBPMStripline (TString subsystemname, TString name, TString type) | |
QwBPMStripline (const QwBPMStripline &source) | |
virtual | ~QwBPMStripline () |
void | InitializeChannel (TString name) |
void | InitializeChannel (TString subsystem, TString name) |
void | InitializeChannel (TString subsystem, TString name, TString type) |
void | ClearEventData () |
Clear the event data in this element. More... | |
void | LoadChannelParameters (QwParameterFile ¶mfile) |
Int_t | ProcessEvBuffer (UInt_t *buffer, UInt_t word_position_in_buffer, UInt_t indexnumber) |
Process the CODA event buffer for this element. More... | |
void | ProcessEvent () |
void | PrintValue () const |
Print single line of value and error of this data element. More... | |
void | PrintInfo () const |
Print multiple lines of information about this data element. More... | |
void | WritePromptSummary (QwPromptSummary *ps, TString type) |
const VQwHardwareChannel * | GetPosition (EBeamPositionMonitorAxis axis) const |
const VQwHardwareChannel * | GetEffectiveCharge () const |
TString | GetSubElementName (Int_t subindex) |
void | GetAbsolutePosition () |
Bool_t | ApplyHWChecks () |
Bool_t | ApplySingleEventCuts () |
void | SetEventCutMode (Int_t bcuts) |
void | IncrementErrorCounters () |
void | PrintErrorCounters () const |
report number of events failed due to HW and event cut failure More... | |
UInt_t | GetEventcutErrorFlag () |
return the error flag on this channel/device More... | |
UInt_t | UpdateErrorFlag () |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag". More... | |
void | UpdateErrorFlag (const VQwBPM *ev_error) |
void | SetDefaultSampleSize (Int_t sample_size) |
void | SetRandomEventParameters (Double_t meanX, Double_t sigmaX, Double_t meanY, Double_t sigmaY) |
void | RandomizeEventData (int helicity=0, double time=0.0) |
void | EncodeEventData (std::vector< UInt_t > &buffer) |
void | SetSubElementPedestal (Int_t j, Double_t value) |
void | SetSubElementCalibrationFactor (Int_t j, Double_t value) |
void | Ratio (VQwBPM &numer, VQwBPM &denom) |
void | Ratio (QwBPMStripline &numer, QwBPMStripline &denom) |
void | Scale (Double_t factor) |
VQwBPM & | operator= (const VQwBPM &value) |
VQwBPM & | operator+= (const VQwBPM &value) |
VQwBPM & | operator-= (const VQwBPM &value) |
virtual QwBPMStripline & | operator= (const QwBPMStripline &value) |
virtual QwBPMStripline & | operator+= (const QwBPMStripline &value) |
virtual QwBPMStripline & | operator-= (const QwBPMStripline &value) |
void | AccumulateRunningSum (const QwBPMStripline &value) |
void | AccumulateRunningSum (const VQwBPM &value) |
void | DeaccumulateRunningSum (VQwBPM &value) |
void | DeaccumulateRunningSum (QwBPMStripline &value) |
void | CalculateRunningAverage () |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this data element. More... | |
void | FillHistograms () |
Fill the histograms for this data element. More... | |
void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values) |
void | ConstructBranch (TTree *tree, TString &prefix) |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &modulelist) |
void | FillTreeVector (std::vector< Double_t > &values) const |
std::vector< QwDBInterface > | GetDBEntry () |
std::vector< QwErrDBInterface > | GetErrDBEntry () |
![]() | |
VQwBPM () | |
VQwBPM (TString &name) | |
VQwBPM (const VQwBPM &source) | |
virtual | ~VQwBPM () |
void | InitializeChannel (TString name) |
void | GetSurveyOffsets (Double_t Xoffset, Double_t Yoffset, Double_t Zoffset) |
void | GetElectronicFactors (Double_t BSENfactor, Double_t AlphaX, Double_t AlphaY) |
void | SetRotation (Double_t) |
void | SetRotationOff () |
void | SetSingleEventCuts (TString, Double_t, Double_t) |
void | SetSingleEventCuts (TString, UInt_t, Double_t, Double_t, Double_t) |
void | SetGains (TString pos, Double_t value) |
void | SetRootSaveStatus (TString &prefix) |
Double_t | GetPositionInZ () const |
virtual const VQwHardwareChannel * | GetAngleX () const |
virtual const VQwHardwareChannel * | GetAngleY () const |
virtual void | SetBPMForCombo (const VQwBPM *bpm, Double_t charge_weight, Double_t x_weight, Double_t y_weight, Double_t sumqw) |
![]() | |
VQwDataElement () | |
Default constructor. More... | |
VQwDataElement (const VQwDataElement &value) | |
Copy constructor. More... | |
virtual | ~VQwDataElement () |
Virtual destructor. More... | |
Bool_t | IsNameEmpty () const |
Is the name of this element empty? More... | |
void | SetElementName (const TString &name) |
Set the name of this element. More... | |
virtual const TString & | GetElementName () const |
Get the name of this element. More... | |
size_t | GetNumberOfDataWords () |
Get the number of data words in this data element. More... | |
UInt_t | GetGoodEventCount () const |
virtual void | AssignValueFrom (const VQwDataElement *valueptr) |
virtual VQwDataElement & | operator+= (const VQwDataElement &value) |
Addition-assignment operator. More... | |
virtual VQwDataElement & | operator-= (const VQwDataElement &value) |
Subtraction-assignment operator. More... | |
virtual void | Sum (const VQwDataElement &value1, const VQwDataElement &value2) |
Sum operator. More... | |
virtual void | Difference (const VQwDataElement &value1, const VQwDataElement &value2) |
Difference operator. More... | |
virtual void | Ratio (const VQwDataElement &numer, const VQwDataElement &denom) |
Ratio operator. More... | |
virtual void | SetSingleEventCuts (UInt_t errorflag, Double_t min, Double_t max, Double_t stability) |
set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel More... | |
virtual void | SetNeedsExternalClock (Bool_t needed) |
virtual Bool_t | NeedsExternalClock () |
virtual std::string | GetExternalClockName () |
virtual void | SetExternalClockPtr (const VQwHardwareChannel *clock) |
virtual void | SetExternalClockName (const std::string name) |
virtual Double_t | GetNormClockValue () |
TString | GetSubsystemName () const |
Return the name of the inheriting subsystem name. More... | |
void | SetSubsystemName (TString sysname) |
Set the name of the inheriting subsystem name. More... | |
TString | GetModuleType () const |
Return the type of the beam instrument. More... | |
void | SetModuleType (TString ModuleType) |
set the type of the beam instrument More... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
Static Public Member Functions | |
static UInt_t | GetSubElementIndex (TString subname) |
![]() | |
static VQwBPM * | CreateStripline (TString subsystemname, TString type, TString name) |
A fast way of creating a BPM stripline of specified type. More... | |
static VQwBPM * | CreateStripline (const VQwBPM &source) |
static VQwBPM * | CreateCombo (TString subsystemname, TString type, TString name) |
A fast way of creating a BPM stripline of specified type. More... | |
static VQwBPM * | CreateCombo (const VQwBPM &source) |
Protected Member Functions | |
VQwHardwareChannel * | GetSubelementByName (TString ch_name) |
![]() | |
VQwHardwareChannel * | GetSubelementByIndex (size_t index) |
![]() | |
void | SetNumberOfDataWords (const UInt_t &numwords) |
Set the number of data words in this data element. More... | |
virtual VQwDataElement & | operator= (const VQwDataElement &value) |
Arithmetic assignment operator: Should only copy event-based data. More... | |
virtual void | UpdateErrorFlag (const UInt_t &error) |
![]() | |
MQwHistograms () | |
Default constructor. More... | |
MQwHistograms (const MQwHistograms &source) | |
Copy constructor. More... | |
virtual | ~MQwHistograms () |
Virtual destructor. More... | |
virtual MQwHistograms & | operator= (const MQwHistograms &value) |
void | Fill_Pointer (TH1_ptr hist_ptr, Double_t value) |
void | AddHistogram (TH1 *h) |
Register a histogram. More... | |
Protected Attributes | |
T | fWire [4] |
T | fRelPos [2] |
T | fAbsPos [2] |
T | fEffectiveCharge |
![]() | |
std::vector< TString > | fSubelementNames |
Double_t | fPositionCenter [3] |
Double_t | fQwStriplineCalibration |
Double_t | fRelativeGains [2] |
Double_t | fGains [2] |
Bool_t | bRotated |
Double_t | fRotationAngle |
Double_t | fCosRotation |
Double_t | fSinRotation |
Bool_t | fGoodEvent |
Bool_t | bFullSave |
![]() | |
TString | fElementName |
Name of this data element. More... | |
UInt_t | fNumberOfDataWords |
Number of raw data words in this data element. More... | |
Int_t | fGoodEventCount |
Number of good events accumulated in this element. More... | |
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) More... | |
UInt_t | fErrorConfigFlag |
contains the global/local/stability flags More... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
Private Member Functions | |
void | SetEventData (Double_t *block, UInt_t sequencenumber) |
void | MakeBPMList () |
Private Attributes | |
std::vector< T > | fBPMElementList |
Static Private Attributes | |
static const Double_t | kRotationCorrection |
static const TString | subelement [4] ={"XP","XM","YP","YM"} |
Friends | |
template<typename TT > | |
class | QwCombinedBPM |
class | QwEnergyCalculator |
Additional Inherited Members | |
![]() | |
enum | EBeamPositionMonitorAxis { kXAxis =0, kYAxis, kNumAxes } |
![]() | |
enum | EDataToSave { kRaw = 0, kDerived } |
![]() | |
static const TString | kAxisLabel [2] ={"X","Y"} |
static const TString | axis [3] |
static const Bool_t | bDEBUG =kFALSE |
Definition at line 33 of file QwBPMStripline.h.
|
inline |
Definition at line 41 of file QwBPMStripline.h.
|
inline |
Definition at line 42 of file QwBPMStripline.h.
References VQwBPM::bRotated, VQwBPM::fRotationAngle, QwBPMStripline< T >::InitializeChannel(), and VQwBPM::SetRotation().
|
inline |
Definition at line 48 of file QwBPMStripline.h.
References VQwBPM::bRotated, VQwBPM::fRotationAngle, QwBPMStripline< T >::InitializeChannel(), VQwBPM::SetRotation(), and VQwDataElement::SetSubsystemName().
|
inline |
Definition at line 55 of file QwBPMStripline.h.
References VQwBPM::bRotated, VQwBPM::fRotationAngle, QwBPMStripline< T >::InitializeChannel(), VQwBPM::SetRotation(), and VQwDataElement::SetSubsystemName().
|
inline |
Definition at line 62 of file QwBPMStripline.h.
|
inlinevirtual |
Definition at line 67 of file QwBPMStripline.h.
void QwBPMStripline< T >::AccumulateRunningSum | ( | const QwBPMStripline< T > & | value | ) |
Definition at line 683 of file QwBPMStripline.cc.
References QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, and QwBPMStripline< T >::fWire.
|
virtual |
Reimplemented from VQwBPM.
Definition at line 677 of file QwBPMStripline.cc.
References QwEnergyCalculator::AccumulateRunningSum().
Bool_t QwBPMStripline< T >::ApplyHWChecks | ( | ) |
Definition at line 104 of file QwBPMStripline.cc.
|
virtual |
Implements VQwBPM.
Definition at line 213 of file QwBPMStripline.cc.
References QwEnergyCalculator::ApplySingleEventCuts().
|
virtual |
|
virtual |
Clear the event data in this element.
Reimplemented from VQwDataElement.
Definition at line 87 of file QwBPMStripline.cc.
References QwEnergyCalculator::ClearEventData().
|
virtual |
Implements VQwBPM.
Definition at line 789 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::ConstructBranch(), VQwDataElement::GetElementName(), and QwEnergyCalculator::SetRootSaveStatus().
|
virtual |
Implements VQwBPM.
Definition at line 816 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::ConstructBranch(), QwLog::endl(), VQwDataElement::GetElementName(), QwParameterFile::HasValue(), QwMessage, and QwEnergyCalculator::SetRootSaveStatus().
|
virtual |
Implements VQwBPM.
Definition at line 762 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::ConstructBranchAndVector(), VQwDataElement::GetElementName(), and QwEnergyCalculator::SetRootSaveStatus().
|
virtual |
Construct the histograms for this data element.
Implements VQwBPM.
Definition at line 716 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::ConstructHistograms(), VQwDataElement::GetElementName(), and QwEnergyCalculator::SetRootSaveStatus().
|
virtual |
Implements VQwBPM.
Definition at line 697 of file QwBPMStripline.cc.
References QwEnergyCalculator::DeaccumulateRunningSum().
void QwBPMStripline< T >::DeaccumulateRunningSum | ( | QwBPMStripline< T > & | value | ) |
Definition at line 702 of file QwBPMStripline.cc.
References QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, and QwBPMStripline< T >::fWire.
|
virtual |
Reimplemented from VQwBPM.
Definition at line 1008 of file QwBPMStripline.cc.
|
virtual |
Fill the histograms for this data element.
Implements VQwBPM.
Definition at line 741 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::FillHistograms(), and VQwDataElement::GetElementName().
|
virtual |
Implements VQwBPM.
Definition at line 865 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::FillTreeVector(), and VQwDataElement::GetElementName().
|
virtual |
Reimplemented from VQwBPM.
Definition at line 539 of file QwBPMStripline.cc.
|
virtual |
|
inlinevirtual |
Implements VQwBPM.
Definition at line 96 of file QwBPMStripline.h.
References QwBPMStripline< T >::fEffectiveCharge.
|
virtual |
|
virtual |
return the error flag on this channel/device
Reimplemented from VQwDataElement.
Definition at line 149 of file QwBPMStripline.cc.
References QwEnergyCalculator::GetEventcutErrorFlag().
|
inlinevirtual |
Implements VQwBPM.
Definition at line 88 of file QwBPMStripline.h.
References VQwBPM::axis, QwBPMStripline< T >::fAbsPos, and VQwDataElement::GetElementName().
|
protectedvirtual |
Implements VQwBPM.
Definition at line 277 of file QwBPMStripline.cc.
References VQwDataElement::GetElementName().
|
static |
Definition at line 526 of file QwBPMStripline.cc.
References kInvalidSubelementIndex.
Referenced by QwBeamDetectorID::QwBeamDetectorID().
|
virtual |
Reimplemented from VQwBPM.
Definition at line 513 of file QwBPMStripline.cc.
References VQwDataElement::GetElementName().
|
virtual |
Implements VQwBPM.
Definition at line 123 of file QwBPMStripline.cc.
References QwEnergyCalculator::IncrementErrorCounters().
void QwBPMStripline< T >::InitializeChannel | ( | TString | name | ) |
Definition at line 26 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::InitializeChannel(), and VQwBPM::InitializeChannel().
Referenced by QwBPMStripline< T >::QwBPMStripline().
void QwBPMStripline< T >::InitializeChannel | ( | TString | subsystem, |
TString | name | ||
) |
Definition at line 61 of file QwBPMStripline.cc.
References QwEnergyCalculator::bFullSave, QwEnergyCalculator::InitializeChannel(), and VQwBPM::InitializeChannel().
void QwBPMStripline< T >::InitializeChannel | ( | TString | subsystem, |
TString | name, | ||
TString | type | ||
) |
Definition at line 53 of file QwBPMStripline.cc.
References QwEnergyCalculator::InitializeChannel(), and VQwDataElement::SetModuleType().
|
inlinevirtual |
Implements VQwBPM.
Definition at line 75 of file QwBPMStripline.h.
References QwBPMStripline< T >::fWire.
|
private |
Definition at line 899 of file QwBPMStripline.cc.
References Qw::T.
|
virtual |
Implements VQwBPM.
Definition at line 578 of file QwBPMStripline.cc.
|
virtual |
Definition at line 586 of file QwBPMStripline.cc.
References QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, QwBPMStripline< T >::fWire, and VQwDataElement::GetElementName().
|
virtual |
Implements VQwBPM.
Definition at line 602 of file QwBPMStripline.cc.
|
virtual |
Definition at line 609 of file QwBPMStripline.cc.
References QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, QwBPMStripline< T >::fWire, and VQwDataElement::GetElementName().
|
virtual |
Implements VQwBPM.
Definition at line 552 of file QwBPMStripline.cc.
|
virtual |
Definition at line 560 of file QwBPMStripline.cc.
References VQwBPM::bRotated, QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, QwBPMStripline< T >::fWire, VQwDataElement::GetElementName(), and VQwBPM::operator=().
|
virtual |
report number of events failed due to HW and event cut failure
Reimplemented from VQwBPM.
Definition at line 136 of file QwBPMStripline.cc.
References QwEnergyCalculator::PrintErrorCounters().
|
virtual |
Print multiple lines of information about this data element.
Reimplemented from VQwBPM.
Definition at line 500 of file QwBPMStripline.cc.
References PrintInfo().
|
virtual |
Print single line of value and error of this data element.
Reimplemented from VQwDataElement.
Definition at line 476 of file QwBPMStripline.cc.
|
virtual |
Process the CODA event buffer for this element.
Implements VQwDataElement.
Definition at line 459 of file QwBPMStripline.cc.
|
virtual |
First apply HW checks and update HW error flags. Calling this routine here and not in ApplySingleEventCuts makes a difference for a BPMs because they have derrived devices.
To obtain the beam position in X and Y in the CEBAF coordinates, we use the following equations
(XP - AlphaX XM)
RelX (bpm coordinates) = fQwStriplineCalibration x GainX x -------------— (XP + AlphaX XM)
(YP - AplhaY YM) RelY (bpm coordinates) = fQwStriplineCalibration x GainY x -------------— (YP + AlphaY YM)
To get back to accelerator coordinates, rotate anti-clockwise around +Z by phi degrees (angle w.r.t X axis).
RelX (accelarator coordinates) = cos(phi) RelX - sin(phi)RelY
RelY (accelarator coordinates) = sin(phi) RelX + cos(Phi)RelY
Implements VQwBPM.
Definition at line 365 of file QwBPMStripline.cc.
References QwEnergyCalculator::ApplyHWChecks(), VQwDataElement::fElementName, and Qw::T.
|
virtual |
Reimplemented from VQwBPM.
Definition at line 987 of file QwBPMStripline.cc.
|
virtual |
Reimplemented from VQwBPM.
Definition at line 625 of file QwBPMStripline.cc.
References QwEnergyCalculator::Ratio().
Referenced by QwBPMStripline< T >::Ratio().
void QwBPMStripline< T >::Ratio | ( | QwBPMStripline< T > & | numer, |
QwBPMStripline< T > & | denom | ||
) |
Definition at line 632 of file QwBPMStripline.cc.
References QwBPMStripline< T >::fEffectiveCharge, and QwBPMStripline< T >::Ratio().
|
virtual |
Reimplemented from VQwBPM.
Definition at line 645 of file QwBPMStripline.cc.
References QwEnergyCalculator::Scale().
|
virtual |
Reimplemented from VQwBPM.
Definition at line 1015 of file QwBPMStripline.cc.
|
virtual |
Implements VQwBPM.
Definition at line 885 of file QwBPMStripline.cc.
References QwEnergyCalculator::SetEventCutMode().
|
private |
Definition at line 996 of file QwBPMStripline.cc.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Update the error flag based on the error flags of internally contained objects Return paramter is the "Eventcut Error Flag".
Implements VQwBPM.
Definition at line 162 of file QwBPMStripline.cc.
Referenced by QwBPMStripline< T >::UpdateErrorFlag().
|
virtual |
Implements VQwBPM.
Definition at line 184 of file QwBPMStripline.cc.
References Qw::e, QwBPMStripline< T >::fAbsPos, QwBPMStripline< T >::fEffectiveCharge, QwBPMStripline< T >::fRelPos, QwBPMStripline< T >::fWire, VQwDataElement::GetElementName(), and QwBPMStripline< T >::UpdateErrorFlag().
void QwBPMStripline< T >::WritePromptSummary | ( | QwPromptSummary * | ps, |
TString | type | ||
) |
Definition at line 487 of file QwBPMStripline.cc.
References QwLog::endl(), and QwMessage.
Definition at line 34 of file QwBPMStripline.h.
|
friend |
Definition at line 35 of file QwBPMStripline.h.
|
protected |
Definition at line 175 of file QwBPMStripline.h.
Referenced by QwBPMStripline< T >::AccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwBPMStripline< T >::GetPosition(), QwBPMStripline< T >::operator+=(), QwBPMStripline< T >::operator-=(), QwBPMStripline< T >::operator=(), and QwBPMStripline< T >::UpdateErrorFlag().
|
private |
Definition at line 181 of file QwBPMStripline.h.
|
protected |
Definition at line 176 of file QwBPMStripline.h.
Referenced by QwBPMStripline< T >::AccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwBPMStripline< T >::GetEffectiveCharge(), QwBPMStripline< T >::operator+=(), QwBPMStripline< T >::operator-=(), QwBPMStripline< T >::operator=(), QwBPMStripline< T >::Ratio(), and QwBPMStripline< T >::UpdateErrorFlag().
|
protected |
Definition at line 171 of file QwBPMStripline.h.
Referenced by QwBPMStripline< T >::AccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwBPMStripline< T >::operator+=(), QwBPMStripline< T >::operator-=(), QwBPMStripline< T >::operator=(), and QwBPMStripline< T >::UpdateErrorFlag().
|
protected |
Definition at line 170 of file QwBPMStripline.h.
Referenced by QwBPMStripline< T >::AccumulateRunningSum(), QwBPMStripline< T >::DeaccumulateRunningSum(), QwBPMStripline< T >::LoadChannelParameters(), QwBPMStripline< T >::operator+=(), QwBPMStripline< T >::operator-=(), QwBPMStripline< T >::operator=(), and QwBPMStripline< T >::UpdateErrorFlag().
|
staticprivate |
Definition at line 164 of file QwBPMStripline.h.
|
staticprivate |
Definition at line 165 of file QwBPMStripline.h.