Pan: The Parity Analyzer -- Class Index

Pan classes only
All classes


+
class VaAnalysis
-
#include "VaAnalysis.hh"
Display options:
Show inherited
Show non-public

class VaAnalysis


HALL A C++/ROOT Parity Analyzer  Pan

       VaAnalysis.cc  (implementation)

 Author:  R. Holmes <http://mep1.phy.syr.edu/~rsholmes>, A. Vacheret <http://www.jlab.org/~vacheret>, R. Michaels <http://www.jlab.org/~rom>, K.Paschke
 @(#)pan/src:$Name:  $:$Id: VaAnalysis.cc,v 1.63 2006/04/16 11:11:31 moffit Exp $



 Abstract base class of analysis. Derived classes include TaADCCalib
 (for computation of pedestals and DAC noise slopes), TaBeamAna (for
 analysis of beam characteristics), and TaPromptAna (for prompt
 physics analysis).  Each of these is responsible for some treatment
 of VaEvents from a TaRun.  The type of analysis to be done is
 specified in the database, and the TaAnalysisManager instantiates
 the appropriate analysis class accordingly.

 VaAnalysis has initialization and termination routines for both the
 overall analysis and the analysis of a particular run.  At present
 Pan is designed to analyze only a single run, but these routines
 provide for a possible future version that will handle multiple
 runs.

 The main event loop is inside the ProcessRun method.  The three
 main methods called from here are PreProcessEvt, ProcessEvt, and
 ProcessPair.  The first of these places the most recently read
 event into a delay queue until the true helicity information for
 that event becomes available.  Cut conditions are checked for here.
 Once the helicity information is added the event is pushed onto a
 second delay queue, while the events are used to construct pairs
 which are pushed onto a third delay queue.  These two delay queues
 are used to hold events and pairs until we can tell whether they
 fall within a cut interval caused by a cut condition arising later.
 Events and pairs which emerge from the ends of these queues are
 analyzed in ProcessEvt and ProcessPair, respectively.  Analysis
 results are added to the events and pairs themselves.


Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~VaAnalysis()
static TClass*Class()
virtual voidFinish()
virtual voidInit(const Bool_t&)
virtual ErrCode_tInitLastPass()
virtual TClass*IsA() const
size_tPairsLeft() const
virtual ErrCode_tProcessRun()
virtual voidRunFini()
virtual ErrCode_tRunIni(TaRun&)
virtual ErrCode_tRunReIni(TaRun&)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
virtual voidAutoPairAna()
vector<AnaList>ChanList(const string& devtype, const string& channel, const string& other, const UInt_t flags = 0)
virtual vector<AnaList>ChanListFromName(const string& chanbase, const string& other, const UInt_t flags = 0)
virtual voidComputeData(EFeedbackType fdbk, UInt_t timescale, Int_t devicekey)
virtual voidComputeLastData(EFeedbackType fdbk, UInt_t timescale, Int_t devicekey)
virtual voidEventAnalysis()
virtual voidGetLastSetPt()
virtual voidInitChanLists()
virtual voidInitFeedback()
virtual voidInitTree(const TaCutList&)
ErrCode_tNewPrePair()
VaAnalysis&operator=(const VaAnalysis& assign)
virtual voidPairAnalysis()
virtual ErrCode_tPreProcessEvt()
virtual voidProceedFeedback()
virtual voidProceedLastFeedback()
virtual ErrCode_tProcessEvt()
virtual ErrCode_tProcessPair()
virtual voidPZTSendEPICS(Int_t fdbkoption)
virtual voidSendEPICS(EFeedbackType fdbk, Int_t fdbkoption)
virtual voidSendVoltagePZT()
Bool_tWtsOK(vector<Double_t> wts)

Data Members

public:
static const UInt_tfgASYStore asymmetry as result
static const UInt_tfgASYNStore normalized asymmetry as result
static const UInt_tfgAVEUse average asymmetry, not sum
static const UInt_tfgAVGStore average as result
static const UInt_tfgAVGNStore normalized average as result
static const UInt_tfgBLINDBlind this result
static const UInt_tfgBLINDSIGNBlind sign only of this result
static const UInt_tfgCOPYStore right and left values as results
static const UInt_tfgDIFFStore R-L difference as result
static const UInt_tfgNO_BEAM_C_NO_ASYDo not compute asym if lobeamc cut fails
static const UInt_tfgNO_BEAM_NO_ASYDo not compute asym if lobeam cut fails
static const UInt_tfgNumBpmFdbk
static const UInt_tfgORDEREDAlso do order dependent stats
static const EventNumber_tfgSLICELENGTHevents in a statistics slice
static const UInt_tfgSTATSPrint statistics
static const ErrCode_tfgVAANA_ERRORreturned on error
static const ErrCode_tfgVAANA_OKreturned on success
protected:
TaBlind*fBlindFor blinding
UInt_tfCurMonIndex for current monitor for normalization
Int_t*fCutArrayArray of cut condition values for tree
Int_t*fCutIntArrayArray of cut interval values for tree
Bool_tfDoRootTo control whether ROOT file is made
Bool_tfDoRunTo control if run stats are kept
Bool_tfDoSliceTo control if slice stats are kept
deque<VaEvent>fEDequeCut delay event deque
size_tfEDequeMaxMax size of cut delay event deque
deque<VaEvent>fEHelDequeHelicity delay event deque
size_tfEHelDequeMaxMax size of helicity delay event deque
VaEvent*fEvtEvent being analyzed
UInt_tfEvtProcNumber of events processed
stringfFdbkName[5]Feedback name
Int_tfFeedNum[5]feedback number
Bool_tfFirstPassPass 1 or not?
Double_tfIAHallCslopeIA feedback calibration slope for Hall-C
Double_tfIAslopeIA feedback calibration slope
Double_tfLast[5]Last value of the voltage for feeback i
Bool_tfLastPassLast pass or not?
UInt_tfMaxNumEvMax number of events to analyze
Double_tfMean1[5]Feedback Mean value 1st pass
Double_tfMean2[5]Feedback Mean value 2st pass
stringfMonitor[5]Current/postion Monitor name used for feedback
UInt_tfMonitorKey[5]Current/position Monitor key
UInt_tfNCutsSize of cut array
UInt_tfNPair[5]Number of pair for type i feedback
Bool_tfOnlFlagFlag whether data are online or not.
deque<VaPair*>fPDequeCut delay pair deque
size_tfPDequeMaxMax size of cut delay pair deque
Double_tfPITAslopePITA feedback calibration slope
Double_t*fPZTMatrixPZT matrix
Bool_tfPZTQcouplingEnable correction for PZT Q coupling
Double_tfPZTQslopes[2]PZT Q coupling slopes
VaPair*fPairPair being analyzed
UInt_tfPairProcNumber of pairs processed
TTree*fPairTreePair tree for Root file
EPairTypefPairTypeType of beam helicity structure
VaEvent*fPreEvtEvent being preprocessed
VaPair*fPrePairPair being built
Double_tfRMS[5]Feedback RMS
Double_tfResult[5](asy or diff) result for feedback i
Double_tfResultError[5](asy or diff) result error for feedback i
TaRun*fRunRun being analyzed
Int_tfRunNumcurrent run number
Bool_tfSend[5]Enable send voltage value for feedback
EventNumber_tfSliceLimitEvent number at end of next slice
Int_tfStartPair[5]Feedback pair start
Int_tfStopPair[5]IA feedback pair stop
vector<Double_t>fSum[5]Sum of value for feedback i
Bool_tfSwitch[5]Enable compute vlaue for feedback
UInt_tfTimeScale[5]Timescale of feedback
Int_tfTreeLEvNumLeft ev number for tree
vector<AnaList>fTreeListQuantities to put in the pair results and pair tree
Double_tfTreeMEvNumMean ev number for tree
Int_tfTreeOKCCutPair not in cut interval (hallC)
Int_tfTreeOKCondPair passes cut conditions
Int_tfTreeOKCutPair not in cut interval
Int_tfTreePrevHelTrue helicity of prev event
Int_tfTreePrevROHelReadout helicity of prev event
Int_tfTreeREvNumRight ev number for tree
Double_t*fTreeSpaceOther data for tree

Class Charts

Inheritance Chart:
VaAnalysis
TaADCCalib
TaFeedbackAna
TaStandardAna
TaDebugAna

Function documentation

~VaAnalysis()
Init(const Bool_t& onl)
 To be called at the start of each analysis.
RunIni(TaRun& run)
 To be called at the start of each run.  (Present structure of Pan
 is that each analysis handles only one run, so this is somewhat
 redundant with Init.)  "Prime the pump" by getting a new empty
 pair and making sure fPair is null; set maximum fEDeque and
 fPDeque length, which depends on trigger rate, and maximum
 fEHelDeque length, which depends on delay value and oversampling
 factor.  Find out pair type and set fPairType accordingly.
RunReIni(TaRun& run)
 To be called at the start second pass of each run.  (Present
 structure of Pan is that each analysis handles only one run, so
 this is somewhat redundant with Init.)  "Prime the pump" by
 getting a new empty pair and making sure fPair is null.
ProcessRun()
 Main analysis routine -- this is the event loop.  Get an event,
 preprocess it; if the event deque is full, pop off an event,
 analyze it, and pass it to the run to be accumulated; likewise
 for the pair deque.
RunFini()
 To be called at the end of each run.  (Present structure of Pan
 is that each analysis handles only one run, so this is somewhat
 redundant with Finish.)  Clear out the queues, get rid of all
 pairs, and get rid of the pair tree.  But write it out first...
Finish()
 To be called at the end of each analysis.
VaAnalysis& operator=(const VaAnalysis& assign)
PreProcessEvt()
 Preprocess event, checking for cut conditions, and putting event
 in helicity delay queue.  If that fills up, take an event off the
 end, insert true helicity, and put it on the event delay
 queue.  Package these events into pairs.  If a pair is completed,
 push it onto pair delay queue.
ProcessEvt()
 Handle analysis of an event that has been through the event delay
 queue, putting results into the event.
ProcessPair()
 Handle analysis of a pair that has been through the pair delay
 queue, putting results into the pair.
NewPrePair()
 Look at the pairing type to create a new pair object of the
 correct type
AutoPairAna()
 Routine a derived class can call to do some of the analysis
 automatically.

 Place into the tree space copies, difference, and/or asymmetries
 for channels listed in fTreeList, depending on flags.  Also put
 these into the pair as labelled quantities.

 These lists are created in InitChanLists; different analyses can
 produce different lists, then just call AutoPairAna to handle
 some if not all of the pair analysis.

 At the end, call feedback routines if enabled.
InitFeedback()
ComputeData(EFeedbackType fdbk, UInt_t timescale, Int_t devicekey)
ComputeLastData(EFeedbackType fdbk, UInt_t timescale, Int_t devicekey)
 Last feedback at the end of the run. To have a chance to send
 a feedback, this function needs enough pairs.
 It checks the data vector size and computes an error.
SendEPICS(EFeedbackType fdbk, Int_t EpicsOption)
void GetLastSetPt()
void PZTSendEPICS(Int_t EpicsOption)
 keep this one aside to the other because the X and Y feedback
 are correlated.
 Send position feedback value to EPICS
void SendVoltagePZT()
 Send position feedback value
 will write the function when hardware defined ....
void ProceedFeedback()
void ProceedLastFeedback()
size_t PairsLeft()
 Data access functions
 Monitoring related methods
{ return fPDeque.size(); }

Author: R. Holmes , A. Vacheret , R. Michaels , K.Paschke
Last update: pan/src:$Name: $:$Id: VaAnalysis.cc,v 1.63 2006/04/16 11:11:31 moffit Exp $

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.