QwAnalysis
QwQPD Class Reference

#include <QwQPD.h>

+ Inheritance diagram for QwQPD:
+ Collaboration diagram for QwQPD:

Public Member Functions

 QwQPD ()
 
 QwQPD (TString name)
 
 QwQPD (TString subsystemname, TString name)
 
 QwQPD (const QwQPD &source)
 
virtual ~QwQPD ()
 
void InitializeChannel (TString name)
 
void InitializeChannel (TString subsystem, TString name)
 
void LoadChannelParameters (QwParameterFile &paramfile)
 
void GetCalibrationFactors (Double_t AlphaX, Double_t AlphaY)
 
void ClearEventData ()
 Clear the event data in this element. More...
 
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 ()
 
const VQwHardwareChannelGetPosition (EBeamPositionMonitorAxis axis) const
 
const VQwHardwareChannelGetEffectiveCharge () const
 
TString GetSubElementName (Int_t subindex)
 
void GetAbsolutePosition ()
 
Bool_t ApplyHWChecks ()
 
Bool_t ApplySingleEventCuts ()
 
void SetEventCutMode (Int_t bcuts)
 Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel. More...
 
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 SetEventData (Double_t *block, UInt_t sequencenumber)
 
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 (QwQPD &numer, QwQPD &denom)
 
void Scale (Double_t factor)
 
VQwBPMoperator= (const VQwBPM &value)
 
VQwBPMoperator+= (const VQwBPM &value)
 
VQwBPMoperator-= (const VQwBPM &value)
 
virtual QwQPDoperator= (const QwQPD &value)
 
virtual QwQPDoperator+= (const QwQPD &value)
 
virtual QwQPDoperator-= (const QwQPD &value)
 
void AccumulateRunningSum (const QwQPD &value)
 
void AccumulateRunningSum (const VQwBPM &value)
 
void DeaccumulateRunningSum (VQwBPM &value)
 
void DeaccumulateRunningSum (QwQPD &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< QwDBInterfaceGetDBEntry ()
 
std::vector< QwErrDBInterfaceGetErrDBEntry ()
 
void MakeQPDList ()
 
- Public Member Functions inherited from VQwBPM
 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 void Ratio (VQwBPM &numer, VQwBPM &denom)
 
virtual const VQwHardwareChannelGetAngleX () const
 
virtual const VQwHardwareChannelGetAngleY () const
 
virtual void SetBPMForCombo (const VQwBPM *bpm, Double_t charge_weight, Double_t x_weight, Double_t y_weight, Double_t sumqw)
 
virtual void PrintInfo () const
 Print multiple lines of information about this data element. More...
 
- Public Member Functions inherited from VQwDataElement
 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 VQwDataElementoperator+= (const VQwDataElement &value)
 Addition-assignment operator. More...
 
virtual VQwDataElementoperator-= (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 PrintValue () const
 Print single line of value and error of this data element. 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...
 
- Public Member Functions inherited from MQwHistograms
void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects. More...
 

Static Public Member Functions

static UInt_t GetSubElementIndex (TString subname)
 
- Static Public Member Functions inherited from VQwBPM
static VQwBPMCreateStripline (TString subsystemname, TString type, TString name)
 A fast way of creating a BPM stripline of specified type. More...
 
static VQwBPMCreateStripline (const VQwBPM &source)
 
static VQwBPMCreateCombo (TString subsystemname, TString type, TString name)
 A fast way of creating a BPM stripline of specified type. More...
 
static VQwBPMCreateCombo (const VQwBPM &source)
 

Protected Member Functions

VQwHardwareChannelGetSubelementByName (TString ch_name)
 
- Protected Member Functions inherited from VQwBPM
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. More...
 
virtual VQwDataElementoperator= (const VQwDataElement &value)
 Arithmetic assignment operator: Should only copy event-based data. More...
 
virtual void UpdateErrorFlag (const UInt_t &error)
 
- Protected Member Functions inherited from MQwHistograms
 MQwHistograms ()
 Default constructor. More...
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor. More...
 
virtual ~MQwHistograms ()
 Virtual destructor. More...
 
virtual MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram. More...
 

Protected Attributes

QwVQWK_Channel fPhotodiode [4]
 
QwVQWK_Channel fRelPos [2]
 
QwVQWK_Channel fAbsPos [2]
 
QwVQWK_Channel fEffectiveCharge
 
std::vector< QwVQWK_ChannelfQPDElementList
 
- Protected Attributes inherited from VQwBPM
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
 
- Protected Attributes inherited from VQwDataElement
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...
 
- Protected Attributes inherited from MQwHistograms
std::vector< TH1_ptrfHistograms
 Histograms associated with this data element. More...
 

Private Attributes

Double_t fQwQPDCalibration [2]
 

Static Private Attributes

static const TString subelement [4] ={"BR","TR","BL","TL"}
 

Additional Inherited Members

- Public Types inherited from VQwBPM
enum  EBeamPositionMonitorAxis { kXAxis =0, kYAxis, kNumAxes }
 
- Public Types inherited from VQwDataElement
enum  EDataToSave { kRaw = 0, kDerived }
 
- Static Protected Attributes inherited from VQwBPM
static const TString kAxisLabel [2] ={"X","Y"}
 
static const TString axis [3]
 
static const Bool_t bDEBUG =kFALSE
 

Detailed Description

Definition at line 32 of file QwQPD.h.

Constructor & Destructor Documentation

QwQPD::QwQPD ( )
inline

Definition at line 37 of file QwQPD.h.

37  {
38  };
QwQPD::QwQPD ( TString  name)
inline

Definition at line 39 of file QwQPD.h.

References InitializeChannel().

39  :VQwBPM(name){
40  InitializeChannel(name);
41  };
void InitializeChannel(TString name)
Definition: QwQPD.cc:20
VQwBPM()
Definition: VQwBPM.h:58

+ Here is the call graph for this function:

QwQPD::QwQPD ( TString  subsystemname,
TString  name 
)
inline

Definition at line 42 of file QwQPD.h.

References fQwQPDCalibration, InitializeChannel(), and VQwDataElement::SetSubsystemName().

42  :VQwBPM(name){
43  SetSubsystemName(subsystemname);
44  InitializeChannel(subsystemname, name);
45  fQwQPDCalibration[0] = 1.0;
46  fQwQPDCalibration[1] = 1.0;
47  };
void InitializeChannel(TString name)
Definition: QwQPD.cc:20
Double_t fQwQPDCalibration[2]
Definition: QwQPD.h:148
void SetSubsystemName(TString sysname)
Set the name of the inheriting subsystem name.
VQwBPM()
Definition: VQwBPM.h:58

+ Here is the call graph for this function:

QwQPD::QwQPD ( const QwQPD source)
inline

Definition at line 48 of file QwQPD.h.

49  : VQwBPM(source),
50  fPhotodiode(source.fPhotodiode),
51  fRelPos(source.fRelPos),
52  fAbsPos(source.fAbsPos),
54  { }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
VQwBPM()
Definition: VQwBPM.h:58
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
virtual QwQPD::~QwQPD ( )
inlinevirtual

Definition at line 55 of file QwQPD.h.

55 { };

Member Function Documentation

void QwQPD::AccumulateRunningSum ( const QwQPD value)

Definition at line 595 of file QwQPD.cc.

References QwVQWK_Channel::AccumulateRunningSum(), fAbsPos, fEffectiveCharge, fPhotodiode, and fRelPos.

Referenced by AccumulateRunningSum().

596 {
597  Short_t i = 0;
598  for(i=0;i<4;i++) fPhotodiode[i].AccumulateRunningSum(value.fPhotodiode[i]);
599  for (i = 0; i < 2; i++){
600  fRelPos[i].AccumulateRunningSum(value.fRelPos[i]);
601  fAbsPos[i].AccumulateRunningSum(value.fAbsPos[i]);
602  }
604  return;
605 
606 
607 }
void AccumulateRunningSum(const QwQPD &value)
Definition: QwQPD.cc:595
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
void AccumulateRunningSum(const QwVQWK_Channel &value)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwQPD::AccumulateRunningSum ( const VQwBPM value)
virtual

Reimplemented from VQwBPM.

Definition at line 590 of file QwQPD.cc.

References AccumulateRunningSum().

591 {
592  AccumulateRunningSum(*dynamic_cast<const QwQPD* >(&value));
593 }
void AccumulateRunningSum(const QwQPD &value)
Definition: QwQPD.cc:595

+ Here is the call graph for this function:

Bool_t QwQPD::ApplyHWChecks ( )

Definition at line 106 of file QwQPD.cc.

References QwVQWK_Channel::ApplyHWChecks(), VQwBPM::bDEBUG, fPhotodiode, QwVQWK_Channel::GetNumberOfSamples(), and QwVQWK_Channel::GetSequenceNumber().

Referenced by ProcessEvent().

107 {
108  Bool_t eventokay=kTRUE;
109 
110  UInt_t deviceerror=0;
111  for(Short_t i=0;i<4;i++)
112  {
113  deviceerror|= fPhotodiode[i].ApplyHWChecks(); //OR the error code from each wire
114  eventokay &= (deviceerror & 0x0);//AND with 0 since zero means HW is good.
115 
116  if (bDEBUG) std::cout<<" Inconsistent within QPD terminals photodiode[ "<<i<<" ] "<<std::endl;
117  if (bDEBUG) std::cout<<" photodiode[ "<<i<<" ] sequence num "<<fPhotodiode[i].GetSequenceNumber()<<" sample size "<<fPhotodiode[i].GetNumberOfSamples()<<std::endl;
118  }
119 
120  return eventokay;
121 }
size_t GetNumberOfSamples() const
Int_t ApplyHWChecks()
static const Bool_t bDEBUG
Definition: VQwBPM.h:275
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
size_t GetSequenceNumber() const

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t QwQPD::ApplySingleEventCuts ( )
virtual

Implements VQwBPM.

Definition at line 183 of file QwQPD.cc.

References QwVQWK_Channel::ApplySingleEventCuts(), VQwBPM::bDEBUG, fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwHardwareChannel::GetErrorCode(), and VQwHardwareChannel::UpdateErrorFlag().

184 {
185  Bool_t status=kTRUE;
186  Int_t i=0;
187  UInt_t error_code = 0;
188  //Event cuts for four pads
189  for(i=0;i<4;i++){
190  if (fPhotodiode[i].ApplySingleEventCuts()){ //for RelX
191  status&=kTRUE;
192  }
193  else{
194  status&=kFALSE;
195  if (bDEBUG) std::cout<<" single pad "<<fPhotodiode[i].GetElementName()<<" event cut failed ";
196  }
197  //Get the Event cut error flag for the pads
198  error_code|=fPhotodiode[i].GetErrorCode();
199  }
200 
201  for(i=0;i<2;i++){
202  fRelPos[i].UpdateErrorFlag(error_code);//To update the rel/abs error code from the channels/wires event cut error codes
203  status &= fRelPos[i].ApplySingleEventCuts();
204 
205  fAbsPos[i].UpdateErrorFlag(error_code);//To update the rel/abs error code from the channels/wires event cut error codes
206  status &= fAbsPos[i].ApplySingleEventCuts();
207  }
208  fEffectiveCharge.UpdateErrorFlag(error_code);// To update the eff-charge error code from the channels/wires event cut error codes
210 
211  return status;
212 }
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
Bool_t ApplySingleEventCuts()
Definition: QwQPD.cc:183
static const Bool_t bDEBUG
Definition: VQwBPM.h:275
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
virtual UInt_t GetErrorCode() const
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
Bool_t ApplySingleEventCuts(Double_t LL, Double_t UL)
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::CalculateRunningAverage ( )
virtual

Implements VQwBPM.

Definition at line 578 of file QwQPD.cc.

References QwVQWK_Channel::CalculateRunningAverage(), fAbsPos, fEffectiveCharge, fPhotodiode, and fRelPos.

579 {
580  Short_t i = 0;
581  for(i=0;i<4;i++) fPhotodiode[i].CalculateRunningAverage();
582  for (i = 0; i < 2; i++){
585  }
587  return;
588 }
void CalculateRunningAverage()
Definition: QwQPD.cc:578
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
void CalculateRunningAverage()

+ Here is the call graph for this function:

void QwQPD::ClearEventData ( )
virtual

Clear the event data in this element.

Reimplemented from VQwDataElement.

Definition at line 89 of file QwQPD.cc.

References QwVQWK_Channel::ClearEventData(), fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwBPM::kNumAxes, and VQwBPM::kXAxis.

90 {
91  Short_t i=0;
92 
93  for(i=0;i<4;i++) fPhotodiode[i].ClearEventData();
94 
95  for(i=kXAxis;i<kNumAxes;i++) {
98  }
99 
101 
102  return;
103 }
void ClearEventData()
Clear the event data in this element.
Definition: QwQPD.cc:89
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void ClearEventData()
Clear the event data in this element.
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

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

Implements VQwBPM.

Definition at line 700 of file QwQPD.cc.

References VQwBPM::bFullSave, QwVQWK_Channel::ConstructBranch(), fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().

Referenced by ConstructBranch().

701 {
702  if (GetElementName()==""){
703  // This channel is not used, so skip constructing trees.
704  }
705  else {
706  TString thisprefix=prefix;
707  if(prefix=="asym_")
708  thisprefix="diff_";
709 
710  SetRootSaveStatus(prefix);
711 
712  fEffectiveCharge.ConstructBranch(tree,prefix);
713  Short_t i = 0;
714  if(bFullSave) {
715  for(i=0;i<4;i++) fPhotodiode[i].ConstructBranch(tree,thisprefix);
716  }
717  for(i=kXAxis;i<kNumAxes;i++) {
718  fAbsPos[i].ConstructBranch(tree,thisprefix);
719  fRelPos[i].ConstructBranch(tree,thisprefix);
720  }
721 
722  }
723  return;
724 }
void SetRootSaveStatus(TString &prefix)
Definition: VQwBPM.cc:178
void ConstructBranch(TTree *tree, TString &prefix)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
void ConstructBranch(TTree *tree, TString &prefix)
Definition: QwQPD.cc:700
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VQwBPM.

Definition at line 726 of file QwQPD.cc.

References VQwBPM::bFullSave, ConstructBranch(), QwVQWK_Channel::ConstructBranch(), QwLog::endl(), fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), QwParameterFile::HasValue(), VQwBPM::kNumAxes, VQwBPM::kXAxis, QwMessage, and VQwBPM::SetRootSaveStatus().

727 {
728  TString devicename;
729 
730  devicename=GetElementName();
731  devicename.ToLower();
732  if (GetElementName()==""){
733  // This channel is not used, so skip filling the histograms.
734  } else
735  {
736  if (modulelist.HasValue(devicename)){
737  TString thisprefix=prefix;
738  if(prefix=="asym_")
739  thisprefix="diff_";
740 
741  SetRootSaveStatus(prefix);
742 
743  fEffectiveCharge.ConstructBranch(tree,prefix);
744  Short_t i = 0;
745  if(bFullSave) {
746  for(i=0;i<4;i++) fPhotodiode[i].ConstructBranch(tree,thisprefix);
747  }
748  for(i=kXAxis;i<kNumAxes;i++) {
749  fAbsPos[i].ConstructBranch(tree,thisprefix);
750  fRelPos[i].ConstructBranch(tree,thisprefix);
751  }
752 
753  QwMessage <<" Tree leaves added to "<<devicename<<" Corresponding channels"<<QwLog::endl;
754  }
755  // this functions doesn't do anything yet
756  }
757 
758 
759 
760 
761 
762  return;
763 }
#define QwMessage
Predefined log drain for regular messages.
Definition: QwLog.h:50
void SetRootSaveStatus(TString &prefix)
Definition: VQwBPM.cc:178
void ConstructBranch(TTree *tree, TString &prefix)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
Bool_t HasValue(TString &vname)
void ConstructBranch(TTree *tree, TString &prefix)
Definition: QwQPD.cc:700
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
static std::ostream & endl(std::ostream &)
End of the line.
Definition: QwLog.cc:299
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::ConstructBranchAndVector ( TTree *  tree,
TString &  prefix,
std::vector< Double_t > &  values 
)
virtual

Implements VQwBPM.

Definition at line 674 of file QwQPD.cc.

References VQwBPM::bFullSave, QwVQWK_Channel::ConstructBranchAndVector(), fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().

675 {
676  if (GetElementName()==""){
677  // This channel is not used, so skip constructing trees.
678  }
679  else {
680  TString thisprefix=prefix;
681  if(prefix=="asym_")
682  thisprefix="diff_";
683 
684  SetRootSaveStatus(prefix);
685 
686  fEffectiveCharge.ConstructBranchAndVector(tree,prefix,values);
687  Short_t i = 0;
688  if(bFullSave) {
689  for(i=0;i<4;i++) fPhotodiode[i].ConstructBranchAndVector(tree,thisprefix,values);
690  }
691  for(i=kXAxis;i<kNumAxes;i++) {
692  fAbsPos[i].ConstructBranchAndVector(tree,thisprefix,values);
693  fRelPos[i].ConstructBranchAndVector(tree,thisprefix,values);
694  }
695 
696  }
697  return;
698 }
void SetRootSaveStatus(TString &prefix)
Definition: VQwBPM.cc:178
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void ConstructBranchAndVector(TTree *tree, TString &prefix, std::vector< Double_t > &values)
Definition: QwQPD.cc:674
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

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

Construct the histograms for this data element.

Implements VQwBPM.

Definition at line 631 of file QwQPD.cc.

References VQwBPM::bFullSave, QwVQWK_Channel::ConstructHistograms(), fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwBPM::SetRootSaveStatus().

632 {
633 
634  if (GetElementName()=="") {
635  // This channel is not used, so skip filling the histograms.
636  } else {
637  fEffectiveCharge.ConstructHistograms(folder, prefix);
638  TString thisprefix=prefix;
639 
640  if(prefix=="asym_")
641  thisprefix="diff_";
642  SetRootSaveStatus(prefix);
643  Short_t i = 0;
644  if(bFullSave) {
645  for(i=0;i<4;i++) fPhotodiode[i].ConstructHistograms(folder, thisprefix);
646  }
647  for(i=kXAxis;i<kNumAxes;i++) {
648  fAbsPos[i].ConstructHistograms(folder, thisprefix);
649  fRelPos[i].ConstructHistograms(folder, thisprefix);
650  }
651  }
652  return;
653 }
void SetRootSaveStatus(TString &prefix)
Definition: VQwBPM.cc:178
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
void ConstructHistograms(TDirectory *folder, TString &prefix)
Construct the histograms for this data element.
Definition: QwQPD.cc:631
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::DeaccumulateRunningSum ( VQwBPM value)
virtual

Implements VQwBPM.

Definition at line 609 of file QwQPD.cc.

Referenced by DeaccumulateRunningSum().

610 {
611  DeaccumulateRunningSum(*dynamic_cast<QwQPD* >(&value));
612 }
void DeaccumulateRunningSum(VQwBPM &value)
Definition: QwQPD.cc:609

+ Here is the caller graph for this function:

void QwQPD::DeaccumulateRunningSum ( QwQPD value)

Definition at line 614 of file QwQPD.cc.

References DeaccumulateRunningSum(), QwVQWK_Channel::DeaccumulateRunningSum(), fAbsPos, fEffectiveCharge, fPhotodiode, and fRelPos.

615 {
616 
617  Short_t i = 0;
618  for(i=0;i<4;i++) fPhotodiode[i].DeaccumulateRunningSum(value.fPhotodiode[i]);
619  for (i = 0; i < 2; i++){
622  }
624  return;
625 
626 
627 }
void DeaccumulateRunningSum(const QwVQWK_Channel &value)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void DeaccumulateRunningSum(VQwBPM &value)
Definition: QwQPD.cc:609
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::EncodeEventData ( std::vector< UInt_t > &  buffer)
virtual

Reimplemented from VQwBPM.

Definition at line 893 of file QwQPD.cc.

References fPhotodiode.

894 {
895  for (Short_t i=0; i<4; i++) fPhotodiode[i].EncodeEventData(buffer);
896 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void EncodeEventData(std::vector< UInt_t > &buffer)
Definition: QwQPD.cc:893
void QwQPD::FillHistograms ( )
virtual

Fill the histograms for this data element.

Implements VQwBPM.

Definition at line 655 of file QwQPD.cc.

References VQwBPM::bFullSave, fAbsPos, fEffectiveCharge, QwVQWK_Channel::FillHistograms(), fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

656 {
657  if (GetElementName()=="") {
658  // This channel is not used, so skip filling the histograms.
659  }
660  else {
662  Short_t i = 0;
663  if(bFullSave) {
664  for(i=0;i<4;i++) fPhotodiode[i].FillHistograms();
665  }
666  for(i=kXAxis;i<kNumAxes;i++){
667  fAbsPos[i].FillHistograms();
668  fRelPos[i].FillHistograms();
669  }
670  }
671  return;
672 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void FillHistograms()
Fill the histograms for this data element.
Definition: QwQPD.cc:655
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void FillHistograms()
Fill the histograms for this data element.
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::FillTreeVector ( std::vector< Double_t > &  values) const
virtual

Implements VQwBPM.

Definition at line 765 of file QwQPD.cc.

References VQwBPM::bFullSave, fAbsPos, fEffectiveCharge, QwVQWK_Channel::FillTreeVector(), fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

766 {
767  if (GetElementName()=="") {
768  // This channel is not used, so skip filling the tree.
769  }
770  else {
772  Short_t i = 0;
773  if(bFullSave) {
774  for(i=0;i<4;i++) fPhotodiode[i].FillTreeVector(values);
775  }
776 
777  for(i=kXAxis;i<kNumAxes;i++){
778  fAbsPos[i].FillTreeVector(values);
779  fRelPos[i].FillTreeVector(values);
780  }
781  }
782  return;
783 }
void FillTreeVector(std::vector< Double_t > &values) const
Definition: QwQPD.cc:765
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
void FillTreeVector(std::vector< Double_t > &values) const
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::GetAbsolutePosition ( )
inlinevirtual

Reimplemented from VQwBPM.

Definition at line 84 of file QwQPD.h.

84 {};
void QwQPD::GetCalibrationFactors ( Double_t  AlphaX,
Double_t  AlphaY 
)

Definition at line 68 of file QwQPD.cc.

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

69 {
70  // Read in the calibration factors from the injector_beamline_geometry.map
71  // for the QPD, AlphaX and AlphaY gives the conversion from adc counts to mm.
72 
73  Bool_t ldebug = kFALSE;
74 
75  fQwQPDCalibration[0]=1.0/AlphaX;
76  fQwQPDCalibration[1]=1.0/AlphaY;
77 
78  if(ldebug){
79  std::cout<<"\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
80  std::cout<<this->GetElementName();
81  std::cout<<"\nfQwQPDCalibration[0] = "<<fQwQPDCalibration[0]<<std::endl;
82  std::cout<<"\nfQwQPDCalibration[1] = "<<fQwQPDCalibration[1]<<std::endl;
83  std::cout<<"AlphaX = "<<fRelativeGains[0]<<std::endl;
84  std::cout<<"AlphaY = "<<fRelativeGains[1]<<std::endl;
85  }
86  return;
87 }
Double_t fRelativeGains[2]
Definition: VQwBPM.h:258
Double_t fQwQPDCalibration[2]
Definition: QwQPD.h:148
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

std::vector< QwDBInterface > QwQPD::GetDBEntry ( )
virtual

Implements VQwBPM.

Definition at line 813 of file QwQPD.cc.

References VQwHardwareChannel::AddEntriesToList(), fAbsPos, fEffectiveCharge, VQwBPM::kNumAxes, and VQwBPM::kXAxis.

814 {
815  std::vector <QwDBInterface> row_list;
816  row_list.clear();
817  for(size_t i=kXAxis;i<kNumAxes;i++) {
818  fAbsPos[i].AddEntriesToList(row_list);
819  }
821  return row_list;
822 
823 
824 }
void AddEntriesToList(std::vector< QwDBInterface > &row_list)
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

const VQwHardwareChannel* QwQPD::GetEffectiveCharge ( ) const
inlinevirtual

Implements VQwBPM.

Definition at line 81 of file QwQPD.h.

References fEffectiveCharge.

81 {return &fEffectiveCharge;}
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
std::vector< QwErrDBInterface > QwQPD::GetErrDBEntry ( )
virtual

Implements VQwBPM.

Definition at line 827 of file QwQPD.cc.

References QwVQWK_Channel::AddErrEntriesToList(), fAbsPos, fEffectiveCharge, VQwBPM::kNumAxes, and VQwBPM::kXAxis.

828 {
829  std::vector <QwErrDBInterface> row_list;
830  row_list.clear();
831  for(size_t i=kXAxis;i<kNumAxes;i++) {
832  fAbsPos[i].AddErrEntriesToList(row_list);
833  }
835  return row_list;
836 
837 
838 }
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
void AddErrEntriesToList(std::vector< QwErrDBInterface > &row_list)
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

UInt_t QwQPD::GetEventcutErrorFlag ( )
virtual

return the error flag on this channel/device

Reimplemented from VQwDataElement.

Definition at line 147 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetEventcutErrorFlag(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

148 {
149  Short_t i=0;
150  UInt_t error=0;
151  for(i=0;i<4;i++)
152  error|=fPhotodiode[i].GetEventcutErrorFlag();
153 
154  for(i=kXAxis;i<kNumAxes;i++) {
155  error|=fRelPos[i].GetEventcutErrorFlag();
156  error|=fAbsPos[i].GetEventcutErrorFlag();
157  }
158 
160  return error;
161 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
Definition: QwQPD.cc:147

+ Here is the call graph for this function:

const VQwHardwareChannel* QwQPD::GetPosition ( EBeamPositionMonitorAxis  axis) const
inlinevirtual

Implements VQwBPM.

Definition at line 73 of file QwQPD.h.

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

73  {
74  if (axis<0 || axis>2){
75  TString loc="QwQPD::GetPosition for "
76  +this->GetElementName()+" failed for axis value "+Form("%d",axis);
77  throw std::out_of_range(loc.Data());
78  }
79  return &fAbsPos[axis];
80  }
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
static const TString axis[3]
Definition: VQwBPM.h:260
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

VQwHardwareChannel * QwQPD::GetSubelementByName ( TString  ch_name)
protectedvirtual

Implements VQwBPM.

Definition at line 214 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, and VQwDataElement::GetElementName().

215 {
216  VQwHardwareChannel* tmpptr = NULL;
217  ch_name.ToLower();
218  if (ch_name=="tl"){
219  tmpptr = &fPhotodiode[0];
220  }else if (ch_name=="tr"){
221  tmpptr = &fPhotodiode[1];
222  }else if (ch_name=="br"){
223  tmpptr = &fPhotodiode[2];
224  }else if (ch_name=="bl"){
225  tmpptr = &fPhotodiode[3];
226  }else if (ch_name=="relx"){
227  tmpptr = &fRelPos[0];
228  }else if (ch_name=="rely"){
229  tmpptr = &fRelPos[1];
230  }else if (ch_name=="absx" || ch_name=="x" ){
231  tmpptr = &fAbsPos[0];
232  }else if (ch_name=="absy" || ch_name=="y"){
233  tmpptr = &fAbsPos[1];
234  }else if (ch_name=="effectivecharge" || ch_name=="charge"){
235  tmpptr = &fEffectiveCharge;
236  } else {
237  TString loc="QwQPD::GetSubelementByName for"
238  + this->GetElementName() + " was passed "
239  + ch_name + ", which is an unrecognized subelement name.";
240  throw std::invalid_argument(loc.Data());
241  }
242  return tmpptr;
243 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

UInt_t QwQPD::GetSubElementIndex ( TString  subname)
static

Definition at line 477 of file QwQPD.cc.

References kInvalidSubelementIndex, and subelement.

Referenced by QwBeamDetectorID::QwBeamDetectorID().

478 {
479  subname.ToUpper();
480  UInt_t localindex=kInvalidSubelementIndex;
481  for(Short_t i=0;i<4;i++) if(subname==subelement[i])localindex=i;
482 
483  if(localindex>3)
484  std::cerr << "QwQPD::GetSubElementIndex is unable to associate the string -"
485  <<subname<<"- to any index"<<std::endl;
486 
487  return localindex;
488 }
static const UInt_t kInvalidSubelementIndex
Definition: QwTypes.h:191
static const TString subelement[4]
Definition: QwQPD.h:146

+ Here is the caller graph for this function:

TString QwQPD::GetSubElementName ( Int_t  subindex)
virtual

Reimplemented from VQwBPM.

Definition at line 465 of file QwQPD.cc.

References fPhotodiode, and VQwDataElement::GetElementName().

466 {
467  TString thisname;
468  if(subindex<4&&subindex>-1)
469  thisname=fPhotodiode[subindex].GetElementName();
470  else
471  std::cerr<<"QwQPD::GetSubElementName for "<<
472  GetElementName()<<" this subindex doesn't exists \n";
473 
474  return thisname;
475 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
virtual const TString & GetElementName() const
Get the name of this element.

+ Here is the call graph for this function:

void QwQPD::IncrementErrorCounters ( )
virtual

Implements VQwBPM.

Definition at line 123 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, QwVQWK_Channel::IncrementErrorCounters(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

124 {
125  Short_t i=0;
126  for(i=0;i<4;i++)
128  for(i=kXAxis;i<kNumAxes;i++) {
131  }
133 }
void IncrementErrorCounters()
Definition: QwQPD.cc:123
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void IncrementErrorCounters()
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::InitializeChannel ( TString  name)

Definition at line 20 of file QwQPD.cc.

References VQwBPM::bFullSave, fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), VQwBPM::kAxisLabel, VQwBPM::kNumAxes, VQwBPM::kXAxis, and subelement.

Referenced by InitializeChannel(), and QwQPD().

21 {
22  Short_t i=0;
23  Bool_t localdebug = kFALSE;
24 
26 
27  fEffectiveCharge.InitializeChannel(name+"_EffectiveCharge","derived");
28 
29  for(i=0;i<4;i++) {
30  fPhotodiode[i].InitializeChannel(name+subelement[i],"raw");
31 
32  if(localdebug)
33  std::cout<<" photodiode ["<<i<<"]="<<fPhotodiode[i].GetElementName()<<"\n";
34  }
35 
36  for(i=kXAxis;i<kNumAxes;i++) {
37  fRelPos[i].InitializeChannel(name+"Rel"+kAxisLabel[i],"derived");
38  fAbsPos[i].InitializeChannel(name+kAxisLabel[i],"derived");
39  }
40 
41  bFullSave=kTRUE;
42 
43  return;
44 }
static const TString kAxisLabel[2]
Definition: VQwBPM.h:239
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void InitializeChannel(TString name)
Definition: VQwBPM.cc:25
virtual const TString & GetElementName() const
Get the name of this element.
static const TString subelement[4]
Definition: QwQPD.h:146
void InitializeChannel(TString name, TString datatosave)
Initialize the fields in this object.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QwQPD::InitializeChannel ( TString  subsystem,
TString  name 
)

Definition at line 46 of file QwQPD.cc.

References VQwBPM::bFullSave, fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), InitializeChannel(), VQwBPM::InitializeChannel(), QwVQWK_Channel::InitializeChannel(), VQwBPM::kAxisLabel, VQwBPM::kNumAxes, VQwBPM::kXAxis, and subelement.

47 {
48  Short_t i=0;
49  Bool_t localdebug = kFALSE;
50 
52 
53  fEffectiveCharge.InitializeChannel(subsystem, "QwQPD", name+"_EffectiveCharge","derived");
54 
55  for(i=0;i<4;i++) {
56  fPhotodiode[i].InitializeChannel(subsystem, "QwQPD", name+subelement[i],"raw");
57  if(localdebug)
58  std::cout<<" photodiode ["<<i<<"]="<<fPhotodiode[i].GetElementName()<<"\n";
59  }
60  for(i=kXAxis;i<kNumAxes;i++) fRelPos[i].InitializeChannel(subsystem, "QwQPD", name+"Rel"+kAxisLabel[i],"derived");
61  for(i=kXAxis;i<kNumAxes;i++) fAbsPos[i].InitializeChannel(subsystem, "QwQPD", name+kAxisLabel[i],"derived");
62 
63  bFullSave=kTRUE;
64 
65  return;
66 }
void InitializeChannel(TString name)
Definition: QwQPD.cc:20
static const TString kAxisLabel[2]
Definition: VQwBPM.h:239
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t bFullSave
Definition: VQwBPM.h:273
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void InitializeChannel(TString name)
Definition: VQwBPM.cc:25
virtual const TString & GetElementName() const
Get the name of this element.
static const TString subelement[4]
Definition: QwQPD.h:146
void InitializeChannel(TString name, TString datatosave)
Initialize the fields in this object.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::LoadChannelParameters ( QwParameterFile paramfile)
inlinevirtual

Implements VQwBPM.

Definition at line 61 of file QwQPD.h.

References fPhotodiode.

61  {
62  for(Short_t i=0;i<4;i++)
63  fPhotodiode[i].LoadChannelParameters(paramfile);
64  }
void LoadChannelParameters(QwParameterFile &paramfile)
Definition: QwQPD.h:61
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void QwQPD::MakeQPDList ( )

Definition at line 800 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fQPDElementList, VQwBPM::kNumAxes, and VQwBPM::kXAxis.

801 {
802  for (size_t i = kXAxis; i < kNumAxes; i++) {
803  QwVQWK_Channel abspos(fAbsPos[i]);
804  abspos = fAbsPos[i];
805  fQPDElementList.push_back(abspos);
806  }
807  QwVQWK_Channel effectivecharge(fEffectiveCharge);
808  effectivecharge = fEffectiveCharge;
809  fQPDElementList.push_back(effectivecharge);
810 }
std::vector< QwVQWK_Channel > fQPDElementList
Definition: QwQPD.h:160
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
VQwBPM & QwQPD::operator+= ( const VQwBPM value)
virtual

Implements VQwBPM.

Definition at line 510 of file QwQPD.cc.

511 {
512  *(dynamic_cast<QwQPD*>(this)) += *(dynamic_cast<const QwQPD*>(&value));
513  return *this;
514 }
Definition: QwQPD.h:32
QwQPD & QwQPD::operator+= ( const QwQPD value)
virtual

Definition at line 516 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

517 {
518  if (GetElementName()!=""){
519  Short_t i = 0;
520  this->fEffectiveCharge+=value.fEffectiveCharge;
521  for(i=0;i<4;i++) this->fPhotodiode[i]+=value.fPhotodiode[i];
522 
523  for(i=kXAxis;i<kNumAxes;i++){
524  this->fRelPos[i]+=value.fRelPos[i];
525  this->fAbsPos[i]+=value.fAbsPos[i];
526  }
527  }
528  return *this;
529 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

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

Implements VQwBPM.

Definition at line 531 of file QwQPD.cc.

532 {
533  *(dynamic_cast<QwQPD*>(this)) -= *(dynamic_cast<const QwQPD*>(&value));
534  return *this;
535 }
Definition: QwQPD.h:32
QwQPD & QwQPD::operator-= ( const QwQPD value)
virtual

Definition at line 537 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

538 {
539  if (GetElementName()!=""){
540  Short_t i = 0;
541  this->fEffectiveCharge-=value.fEffectiveCharge;
542  for(i=0;i<4;i++) this->fPhotodiode[i]-=value.fPhotodiode[i];
543 
544  for(i=kXAxis;i<kNumAxes;i++){
545  this->fRelPos[i]-=value.fRelPos[i];
546  this->fAbsPos[i]-=value.fAbsPos[i];
547  }
548  }
549  return *this;
550 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

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

Implements VQwBPM.

Definition at line 490 of file QwQPD.cc.

491 {
492  *(dynamic_cast<QwQPD*>(this)) = *(dynamic_cast<const QwQPD*>(&value));
493  return *this;
494 }
Definition: QwQPD.h:32
QwQPD & QwQPD::operator= ( const QwQPD value)
virtual

Definition at line 496 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, and VQwBPM::kXAxis.

497 {
498  if (GetElementName()!=""){
499  Short_t i = 0;
501  for(i=0;i<4;i++) this->fPhotodiode[i]=value.fPhotodiode[i];
502  for(i=kXAxis;i<kNumAxes;i++){
503  this->fRelPos[i]=value.fRelPos[i];
504  this->fAbsPos[i]=value.fAbsPos[i];
505  }
506  }
507  return *this;
508 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::PrintErrorCounters ( ) const
virtual

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

Reimplemented from VQwBPM.

Definition at line 135 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwBPM::kNumAxes, VQwBPM::kXAxis, and QwVQWK_Channel::PrintErrorCounters().

136 {
137  Short_t i=0;
138  for(i=0;i<4;i++)
140  for(i=kXAxis;i<kNumAxes;i++) {
143  }
145 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void PrintErrorCounters() const
report number of events failed due to HW and event cut failure
void PrintErrorCounters() const
report number of events failed due to HW and event cut failure
Definition: QwQPD.cc:135
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

Int_t QwQPD::ProcessEvBuffer ( UInt_t *  buffer,
UInt_t  num_words_left,
UInt_t  subelement 
)
virtual

Process the CODA event buffer for this element.

Implements VQwDataElement.

Definition at line 450 of file QwQPD.cc.

References fPhotodiode, and QwVQWK_Channel::ProcessEvBuffer().

451 {
452  if(index<4)
453  {
454  fPhotodiode[index].ProcessEvBuffer(buffer,word_position_in_buffer);
455  }
456  else
457  {
458  std::cerr <<
459  "QwQPD::ProcessEvBuffer(): attemp to fill in raw date for a wire that doesn't exist \n";
460  }
461  return word_position_in_buffer;
462 }
Int_t ProcessEvBuffer(UInt_t *buffer, UInt_t num_words_left, UInt_t index=0)
Decode the event data from a CODA buffer.
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152

+ Here is the call graph for this function:

void QwQPD::ProcessEvent ( )
virtual
 The positions X and Y from a QPD are calculated using following equations,

TL ------— TR

| 4 | 2 |

BL | 3 | 1 | BR

     (4-2) + (3-1)                (4-3) + (2-1)
 X =  ------------           Y =  -------------
        1+2+3+4                      1+2+3+4

Implements VQwBPM.

Definition at line 354 of file QwQPD.cc.

References ApplyHWChecks(), QwVQWK_Channel::ClearEventData(), QwVQWK_Channel::Difference(), fAbsPos, fEffectiveCharge, VQwDataElement::fElementName, fPhotodiode, fQwQPDCalibration, fRelPos, QwVQWK_Channel::GetSequenceNumber(), QwVQWK_Channel::GetValue(), QwVQWK_Channel::InitializeChannel(), VQwBPM::kAxisLabel, VQwBPM::kNumAxes, VQwBPM::kXAxis, QwVQWK_Channel::PrintInfo(), QwVQWK_Channel::ProcessEvent(), QwVQWK_Channel::Ratio(), QwVQWK_Channel::Scale(), and QwVQWK_Channel::Sum().

355 {
356  Bool_t localdebug = kFALSE;
357  static QwVQWK_Channel numer[2];
358  static QwVQWK_Channel tmp("tmp");
359  static QwVQWK_Channel tmp1("tmp1");
360  static QwVQWK_Channel tmp2("tmp2");
361 
362  numer[0].InitializeChannel("Xnumerator","raw");
363  numer[1].InitializeChannel("Ynumerator","raw");
364 
365  Short_t i = 0;
366 
367  ApplyHWChecks();
368  /* Frst apply HW checks and update HW error flags.
369  Calling this routine here and not in ApplySingleEventCuts
370  makes a difference for a QPDs because they are derrived devices.
371  */
372 
374 
375  for(i=0;i<4;i++){
378  }
379 
380  if (localdebug) fEffectiveCharge.PrintInfo();
381 
382 
383  /** The positions X and Y from a QPD are calculated using following equations,
384 
385  TL --------- TR
386  | 4 | 2 |
387  ---------
388  BL | 3 | 1 | BR
389  ---------
390 
391 
392  (4-2) + (3-1) (4-3) + (2-1)
393  X = ------------ Y = -------------
394  1+2+3+4 1+2+3+4
395  **/
396 
397  if(localdebug){
398  std::cout<<"#############################\n";
399  std::cout<<" QPD name = "<<fElementName<<std::endl;
400  std::cout<<" event number = "<<fPhotodiode[0].GetSequenceNumber()<<"\n";
401  std::cout<<" hw BR ="<<fPhotodiode[0].GetValue()<<"\n";
402  std::cout<<" hw TR ="<<fPhotodiode[1].GetValue()<<"\n";
403  std::cout<<" hw BL ="<<fPhotodiode[2].GetValue()<<"\n";
404  std::cout<<" hw TL ="<<fPhotodiode[3].GetValue()<<"\n\n";
405  }
406 
407  // X numerator
408  tmp1.ClearEventData();
409  tmp1.Difference(fPhotodiode[3],fPhotodiode[1]); // 4-2
410  tmp2.ClearEventData();
411  tmp2.Difference(fPhotodiode[2],fPhotodiode[0]); // 3-1
412  tmp.ClearEventData();
413  numer[0].Sum(tmp1,tmp2);
414 
415  // Y numerator
416  tmp1.ClearEventData();
417  tmp1.Difference(fPhotodiode[3],fPhotodiode[2]); // 4-3
418  tmp2.ClearEventData();
419  tmp2.Difference(fPhotodiode[1],fPhotodiode[0]); // 2-1
420  tmp.ClearEventData();
421  numer[1].Sum(tmp1,tmp2);
422 
423  for(i=kXAxis;i<kNumAxes;i++){
424  tmp.ClearEventData();
425  tmp.Sum(fPhotodiode[0],fPhotodiode[1]);
426  tmp1.ClearEventData();
427  tmp1.Sum(fPhotodiode[2],fPhotodiode[3]);
428  fEffectiveCharge.Sum(tmp,tmp1);
429 
430  // X/Y reading in ADC counts
431  fRelPos[i].Ratio(numer[i],fEffectiveCharge);
432 
433  // X/Y reading in mm.
434  fAbsPos[i]=fRelPos[i];
436 
437  if(localdebug){
438  std::cout<<" hw numerator= "<<numer[i].GetValue()<<" ";
439  std::cout<<" hw denominator (== Effective_Charge)= "<<fEffectiveCharge.GetValue()<<"\n";
440  std::cout<<" hw clibration factors= "<<fQwQPDCalibration[i]<<"\n";
441  std::cout<<" hw fRelPos["<<kAxisLabel[i]<<"]="<<fRelPos[i].GetValue()<<"\n \n";
442  std::cout<<" hw fAbsPos["<<kAxisLabel[i]<<"]="<<fAbsPos[i].GetValue()<<"\n \n";
443  }
444  }
445 
446  return;
447 }
void ProcessEvent()
Process the event data according to pedestal and calibration factor.
void Ratio(const QwVQWK_Channel &numer, const QwVQWK_Channel &denom)
void PrintInfo() const
Print multiple lines of information about this data element.
Double_t GetValue(size_t element) const
Double_t fQwQPDCalibration[2]
Definition: QwQPD.h:148
void Scale(Double_t Offset)
static const TString kAxisLabel[2]
Definition: VQwBPM.h:239
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
Bool_t ApplyHWChecks()
Definition: QwQPD.cc:106
void ClearEventData()
Clear the event data in this element.
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
void Sum(const QwVQWK_Channel &value1, const QwVQWK_Channel &value2)
TString fElementName
Name of this data element.
size_t GetSequenceNumber() const
void InitializeChannel(TString name, TString datatosave)
Initialize the fields in this object.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::RandomizeEventData ( int  helicity = 0,
double  time = 0.0 
)
virtual

Reimplemented from VQwBPM.

Definition at line 874 of file QwQPD.cc.

References fPhotodiode.

875 {
876  for (Short_t i=0; i<4; i++) fPhotodiode[i].RandomizeEventData(helicity, time);
877 
878  return;
879 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void RandomizeEventData(int helicity=0, double time=0.0)
Definition: QwQPD.cc:874
void QwQPD::Ratio ( QwQPD numer,
QwQPD denom 
)

Definition at line 553 of file QwQPD.cc.

References fEffectiveCharge, and QwVQWK_Channel::Ratio().

554 {
555  // this function is called when forming asymmetries. In this case what we actually want for the
556  // QPD is the difference only not the asymmetries
557 
558  *this=numer;
560  return;
561 }
void Ratio(const QwVQWK_Channel &numer, const QwVQWK_Channel &denom)
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::Scale ( Double_t  factor)
virtual

Reimplemented from VQwBPM.

Definition at line 565 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwBPM::kNumAxes, VQwBPM::kXAxis, and QwVQWK_Channel::Scale().

566 {
567  Short_t i = 0;
568 
569  for(i=0;i<4;i++) fPhotodiode[i].Scale(factor);
570  for(i=kXAxis;i<kNumAxes;i++){
571  fRelPos[i].Scale(factor);
572  fAbsPos[i].Scale(factor);
573  }
574  fEffectiveCharge.Scale(factor);
575  return;
576 }
void Scale(Double_t Offset)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void Scale(Double_t factor)
Definition: QwQPD.cc:565
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::SetDefaultSampleSize ( Int_t  sample_size)
virtual

Reimplemented from VQwBPM.

Definition at line 899 of file QwQPD.cc.

References fPhotodiode.

900 {
901  for(Short_t i=0;i<4;i++) fPhotodiode[i].SetDefaultSampleSize((size_t)sample_size);
902  return;
903 }
void SetDefaultSampleSize(Int_t sample_size)
Definition: QwQPD.cc:899
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void QwQPD::SetEventCutMode ( Int_t  bcuts)
virtual

Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.

Implements VQwBPM.

Definition at line 787 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwHardwareChannel::SetEventCutMode().

788 {
789  Short_t i = 0;
790  // bEVENTCUTMODE=bcuts;
791  for (i=0;i<4;i++) fPhotodiode[i].SetEventCutMode(bcuts);
792  for (i=kXAxis;i<kNumAxes;i++) {
793  fAbsPos[i].SetEventCutMode(bcuts);
794  fRelPos[i].SetEventCutMode(bcuts);
795  }
797 }
void SetEventCutMode(Int_t bcuts)
Inherited from VQwDataElement to set the upper and lower limits (fULimit and fLLimit), stability % and the error flag on this channel.
Definition: QwQPD.cc:787
void SetEventCutMode(Int_t bcuts)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::SetEventData ( Double_t *  block,
UInt_t  sequencenumber 
)

Definition at line 882 of file QwQPD.cc.

References fAbsPos, and QwVQWK_Channel::SetHardwareSum().

883 {
884  for (Short_t i=0; i<2; i++)
885  {
886  fAbsPos[i].SetHardwareSum(relpos[i], sequencenumber);
887  }
888 
889  return;
890 }
void SetHardwareSum(Double_t hwsum, UInt_t sequencenumber=0)
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157

+ Here is the call graph for this function:

void QwQPD::SetRandomEventParameters ( Double_t  meanX,
Double_t  sigmaX,
Double_t  meanY,
Double_t  sigmaY 
)
virtual

Reimplemented from VQwBPM.

Definition at line 846 of file QwQPD.cc.

References fPhotodiode, fQwQPDCalibration, and MQwMockable::SetRandomEventParameters().

847 {
848  // Average values of the signals in the stripline ADCs
849  Double_t sumX = 1.1e8; // These are just guesses, but I made X and Y different
850  Double_t sumY = 0.9e8; // to make it more interesting for the analyzer...
851 
852 
853  // Determine the asymmetry from the position
854  Double_t meanXP = (1.0 + meanX / fQwQPDCalibration[0]) * sumX / 2.0;
855  Double_t meanXM = (1.0 - meanX / fQwQPDCalibration[0]) * sumX / 2.0; // = sumX - meanXP;
856  Double_t meanYP = (1.0 + meanY / fQwQPDCalibration[1]) * sumY / 2.0;
857  Double_t meanYM = (1.0 - meanY / fQwQPDCalibration[1]) * sumY / 2.0; // = sumY - meanYP;
858 
859  // Determine the spread of the asymmetry (this is not tested yet)
860  // (negative sigma should work in the QwVQWK_Channel, but still using fabs)
861  Double_t sigmaXP = fabs(sumX * sigmaX / meanX);
862  Double_t sigmaXM = sigmaXP;
863  Double_t sigmaYP = fabs(sumY * sigmaY / meanY);
864  Double_t sigmaYM = sigmaYP;
865 
866  // Propagate these parameters to the ADCs
867  fPhotodiode[0].SetRandomEventParameters(meanXP, sigmaXP);
868  fPhotodiode[1].SetRandomEventParameters(meanXM, sigmaXM);
869  fPhotodiode[2].SetRandomEventParameters(meanYP, sigmaYP);
870  fPhotodiode[3].SetRandomEventParameters(meanYM, sigmaYM);
871 }
void SetRandomEventParameters(Double_t mean, Double_t sigma)
Set the normal random event parameters.
Definition: MQwMockable.cc:41
Double_t fQwQPDCalibration[2]
Definition: QwQPD.h:148
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152

+ Here is the call graph for this function:

void QwQPD::SetSubElementCalibrationFactor ( Int_t  j,
Double_t  value 
)
virtual

Reimplemented from VQwBPM.

Definition at line 912 of file QwQPD.cc.

References fPhotodiode, and VQwHardwareChannel::SetCalibrationFactor().

913 {
915  return;
916 }
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
void SetCalibrationFactor(Double_t factor)

+ Here is the call graph for this function:

void QwQPD::SetSubElementPedestal ( Int_t  j,
Double_t  value 
)
virtual

Reimplemented from VQwBPM.

Definition at line 906 of file QwQPD.cc.

References fPhotodiode, and VQwHardwareChannel::SetPedestal().

907 {
908  fPhotodiode[j].SetPedestal(value);
909  return;
910 }
void SetPedestal(Double_t ped)
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152

+ Here is the call graph for this function:

UInt_t QwQPD::UpdateErrorFlag ( )
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 163 of file QwQPD.cc.

References fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwHardwareChannel::GetErrorCode(), VQwDataElement::GetEventcutErrorFlag(), VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwHardwareChannel::UpdateErrorFlag().

164 {
165  Short_t i=0;
166  UInt_t error1=0;
167  UInt_t error2=0;
168  for(i=0;i<4;i++){
169  error1|=fPhotodiode[i].GetErrorCode();
170  error2|=fPhotodiode[i].GetEventcutErrorFlag();
171  }
172  for(i=kXAxis;i<kNumAxes;i++) {
173  fRelPos[i].UpdateErrorFlag(error1);
174  fAbsPos[i].UpdateErrorFlag(error1);
175  error2|=fRelPos[i].GetEventcutErrorFlag();
176  error2|=fAbsPos[i].GetEventcutErrorFlag();
177  }
180  return error2;
181 }
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
virtual UInt_t GetErrorCode() const
virtual UInt_t GetEventcutErrorFlag()
return the error flag on this channel/device
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158

+ Here is the call graph for this function:

void QwQPD::UpdateErrorFlag ( const VQwBPM ev_error)
virtual

Implements VQwBPM.

Definition at line 324 of file QwQPD.cc.

References Qw::e, fAbsPos, fEffectiveCharge, fPhotodiode, fRelPos, VQwDataElement::GetElementName(), VQwBPM::kNumAxes, VQwBPM::kXAxis, and VQwHardwareChannel::UpdateErrorFlag().

324  {
325  Short_t i=0;
326  try {
327  if(typeid(*ev_error)==typeid(*this)) {
328  // std::cout<<" Here in QwQPD::UpdateErrorFlag \n";
329  if (this->GetElementName()!="") {
330  const QwQPD* value_bpm = dynamic_cast<const QwQPD* >(ev_error);
331  for(i=0;i<4;i++){
332  fPhotodiode[i].UpdateErrorFlag(value_bpm->fPhotodiode[i]);
333  }
334  for(i=kXAxis;i<kNumAxes;i++) {
335  fRelPos[i].UpdateErrorFlag(value_bpm->fRelPos[i]);
336  fAbsPos[i].UpdateErrorFlag(value_bpm->fAbsPos[i]);
337  }
339  }
340  } else {
341  TString loc="Standard exception from QwQPD::UpdateErrorFlag :"+
342  ev_error->GetElementName()+" "+this->GetElementName()+" are not of the "
343  +"same type";
344  throw std::invalid_argument(loc.Data());
345  }
346  } catch (std::exception& e) {
347  std::cerr<< e.what()<<std::endl;
348  }
349 
350 };
UInt_t UpdateErrorFlag()
Update the error flag based on the error flags of internally contained objects Return paramter is the...
static const double e
Definition: QwUnits.h:91
QwVQWK_Channel fPhotodiode[4]
Definition: QwQPD.h:152
QwVQWK_Channel fAbsPos[2]
Definition: QwQPD.h:157
QwVQWK_Channel fRelPos[2]
Definition: QwQPD.h:153
virtual const TString & GetElementName() const
Get the name of this element.
QwVQWK_Channel fEffectiveCharge
Definition: QwQPD.h:158
Definition: QwQPD.h:32

+ Here is the call graph for this function:

Field Documentation

std::vector<QwVQWK_Channel> QwQPD::fQPDElementList
protected

Definition at line 160 of file QwQPD.h.

Referenced by MakeQPDList().

Double_t QwQPD::fQwQPDCalibration[2]
private

Definition at line 148 of file QwQPD.h.

Referenced by GetCalibrationFactors(), ProcessEvent(), QwQPD(), and SetRandomEventParameters().

const TString QwQPD::subelement ={"BR","TR","BL","TL"}
staticprivate

Definition at line 146 of file QwQPD.h.

Referenced by GetSubElementIndex(), and InitializeChannel().


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