QwAnalysis
|
Implementation of the analysis of Moller data (copied from QwComptonElectronDetector.h) More...
#include <QwMollerDetector.h>
Public Member Functions | |
QwMollerDetector (const TString &name) | |
Constructor with name. More... | |
QwMollerDetector (const QwMollerDetector &source) | |
Copy constructor. More... | |
virtual | ~QwMollerDetector () |
Virtual destructor. More... | |
void | ProcessOptions (QwOptions &options) |
Process the command line options. More... | |
Int_t | LoadChannelMap (TString mapfile) |
Int_t | LoadInputParameters (TString pedestalfile) |
Mandatory parameter file definition. More... | |
Int_t | LoadEventCuts (TString &filename) |
Bool_t | SingleEventCuts () |
Int_t | ProcessConfigurationBuffer (const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
Int_t | ProcessConfigurationBuffer (UInt_t ev_type, const UInt_t roc_id, const UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
Int_t | ProcessEvBuffer (UInt_t roc_id, UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version. More... | |
Int_t | ProcessEvBuffer (UInt_t ev_type, UInt_t roc_id, UInt_t bank_id, UInt_t *buffer, UInt_t num_words) |
void | ClearEventData () |
void | ProcessEvent () |
void | ConstructHistograms (TDirectory *folder, TString &prefix) |
Construct the histograms for this subsystem in a folder with a prefix. More... | |
void | FillHistograms () |
Fill the histograms for this subsystem. More... | |
VQwSubsystem & | operator= (VQwSubsystem *value) |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value) More... | |
VQwSubsystem & | operator+= (VQwSubsystem *value) |
VQwSubsystem & | operator-= (VQwSubsystem *value) |
void | Sum (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Difference (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Ratio (VQwSubsystem *value1, VQwSubsystem *value2) |
void | Scale (Double_t) |
void | AccumulateRunningSum (VQwSubsystem *value) |
Update the running sums for devices. More... | |
void | DeaccumulateRunningSum (VQwSubsystem *value) |
remove one entry from the running sums for devices More... | |
void | CalculateRunningAverage () |
Calculate the average for all good events. More... | |
Int_t | LoadEventCuts (TString filename) |
Load the event cuts file. More... | |
Bool_t | ApplySingleEventCuts () |
Apply the single event cuts. More... | |
void | IncrementErrorCounters () |
Increment the error counters. More... | |
void | PrintErrorCounters () const |
Report the number of events failed due to HW and event cut failures. More... | |
UInt_t | GetEventcutErrorFlag () |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates. More... | |
void | UpdateErrorFlag (const VQwSubsystem *ev_error) |
update the error flag in the subsystem level from the top level routines related to stability checks. This will uniquely update the errorflag at each channel based on the error flag in the corresponding channel in the ev_error subsystem More... | |
void | ConstructBranchAndVector (TTree *, TString &, std::vector< double, std::allocator< double > > &) |
void | ConstructBranch (TTree *tree, TString &prefix) |
Construct the branch and tree vector. More... | |
void | ConstructBranch (TTree *tree, TString &prefix, QwParameterFile &trim_file) |
Construct the branch and tree vector based on the trim file. More... | |
void | FillTreeVector (std::vector< Double_t > &values) const |
Fill the tree vector. More... | |
Bool_t | Compare (VQwSubsystem *source) |
void | print () |
void | PrintValue () const |
Print values of all channels. More... | |
float * | GetRawChannelArray () |
Int_t | GetChannelIndex (TString channelName, UInt_t module_number) |
float | GetDataForChannelInModule (Int_t module_number, Int_t channel_index) |
float | GetDataForChannelInModule (Int_t module_number, TString channel_name) |
![]() | |
VQwSubsystemParity (const TString &name) | |
Constructor with name. More... | |
VQwSubsystemParity (const VQwSubsystemParity &source) | |
Copy constructor. More... | |
virtual | ~VQwSubsystemParity () |
Default destructor. More... | |
virtual void | FillDB_MPS (QwParityDB *db, TString type) |
Fill the database with MPS-based variables Note that most subsystems don't need to do this. More... | |
virtual void | FillDB (QwParityDB *db, TString type) |
Fill the database. More... | |
virtual void | FillErrDB (QwParityDB *db, TString type) |
virtual UInt_t | UpdateErrorFlag () |
Uses the error flags of contained data elements to update Returns the error flag to the top level routines related to stability checks and ErrorFlag updates. More... | |
virtual void | Blind (const QwBlinder *blinder) |
Blind the asymmetry of this subsystem. More... | |
virtual void | Blind (const QwBlinder *blinder, const VQwSubsystemParity *subsys) |
Blind the difference of this subsystem. More... | |
virtual void | WritePromptSummary (QwPromptSummary *ps, TString type) |
virtual Bool_t | CheckForEndOfBurst () const |
![]() | |
VQwSubsystem (const TString &name) | |
Constructor with name. More... | |
VQwSubsystem (const VQwSubsystem &orig) | |
Copy constructor by object. More... | |
virtual | ~VQwSubsystem () |
Default destructor. More... | |
TString | GetSubsystemName () const |
Bool_t | HasDataLoaded () const |
void | SetParent (QwSubsystemArray *parent) |
Set the parent of this subsystem to the specified array. More... | |
QwSubsystemArray * | GetParent (const unsigned int parent=0) const |
Get the parent of this subsystem. More... | |
VQwSubsystem * | GetSibling (const std::string &name) const |
Get the sibling with specified name. More... | |
Bool_t | PublishInternalValue (const TString &name, const TString &desc, const VQwHardwareChannel *value) const |
Publish a variable name to the parent subsystem array. More... | |
virtual Bool_t | PublishInternalValues () const |
Publish all variables of the subsystem. More... | |
virtual Bool_t | PublishByRequest (TString device_name) |
Try to publish an internal variable matching the submitted name. More... | |
Bool_t | RequestExternalValue (const TString &name, VQwHardwareChannel *value) const |
Request a named value which is owned by an external subsystem; the request will be handled by the parent subsystem array. More... | |
virtual const VQwHardwareChannel * | ReturnInternalValue (const TString &name) const |
Return a pointer to a varialbe to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual Bool_t | ReturnInternalValue (const TString &name, VQwHardwareChannel *value) const |
Return a named value to the parent subsystem array to be delivered to a different subsystem. More... | |
virtual std::vector< TString > | GetParamFileNameList () |
virtual std::map< TString, TString > | GetDetectorMaps () |
virtual Int_t | LoadDetectorMaps (QwParameterFile &file) |
Parse parameter file to find the map files. More... | |
virtual Int_t | LoadGeometryDefinition (TString mapfile) |
Optional geometry definition. More... | |
virtual Int_t | LoadCrosstalkDefinition (TString mapfile) |
Optional crosstalk definition. More... | |
void | SetEventTypeMask (const UInt_t mask) |
Set event type mask. More... | |
UInt_t | GetEventTypeMask () const |
Get event type mask. More... | |
virtual void | ExchangeProcessedData () |
Request processed data from other subsystems for internal use in the second event processing stage. Not all derived classes will require data from other subsystems. More... | |
virtual void | ProcessEvent_2 () |
Process the event data again, including data from other subsystems. Not all derived classes will require a second stage of event data processing. More... | |
virtual void | AtEndOfEventLoop () |
Perform actions at the end of the event loop. More... | |
virtual void | RandomizeEventData (int helicity=0, double time=0.0) |
virtual void | EncodeEventData (std::vector< UInt_t > &buffer) |
virtual void | PrintInfo () const |
Print some information about the subsystem. More... | |
virtual void | PrintDetectorMaps (Bool_t status) const |
virtual void | ConstructHistograms () |
Construct the histograms for this subsystem. More... | |
virtual void | ConstructHistograms (TDirectory *folder) |
Construct the histograms for this subsystem in a folder. More... | |
virtual void | ConstructHistograms (TString &prefix) |
Construct the histograms for this subsystem with a prefix. More... | |
virtual void | ConstructBranchAndVector (TTree *tree, TString &prefix, std::vector< Double_t > &values)=0 |
Construct the branch and tree vector. More... | |
virtual void | ConstructBranchAndVector (TTree *tree, std::vector< Double_t > &values) |
Construct the branch and tree vector. More... | |
virtual void | ConstructTree () |
Construct the tree for this subsystem. More... | |
virtual void | ConstructTree (TDirectory *folder) |
Construct the tree for this subsystem in a folder. More... | |
virtual void | ConstructTree (TString &prefix) |
Construct the tree for this subsystem with a prefix. More... | |
virtual void | ConstructTree (TDirectory *folder, TString &prefix) |
Construct the tree for this subsystem in a folder with a prefix. More... | |
virtual void | FillTree () |
Fill the tree for this subsystem. More... | |
virtual void | DeleteTree () |
Delete the tree for this subsystem. More... | |
![]() | |
void | ShareHistograms (const MQwHistograms *source) |
Share histogram pointers between objects. More... | |
![]() | |
virtual | ~MQwCloneable () |
Virtual destructor. More... | |
virtual VQwSubsystem * | Clone () const |
Concrete clone method. More... | |
const VQwFactory< VQwSubsystem > * | Factory () const |
Factory getter. More... | |
![]() | |
virtual | ~VQwCloneable () |
Virtual destructor. More... | |
std::string | GetClassName () const |
Get demangled name of this class. More... | |
Protected Attributes | |
std::vector< QwMollerChannelID > | fMollerChannelID |
std::vector< std::vector < QwSTR7200_Channel > > | fSTR7200_Channel |
std::vector< std::vector < QwSTR7200_Channel > > | fPrevious_STR7200_Channel |
![]() | |
std::map< TString, VQwHardwareChannel * > | fPublishedInternalValues |
Map of published internal values. More... | |
std::vector< std::vector < TString > > | fPublishList |
List of parameters to be published (loaded at the channel map) More... | |
TString | fSystemName |
Name of this subsystem. More... | |
UInt_t | fEventTypeMask |
Mask of event types. More... | |
Bool_t | fIsDataLoaded |
Has this subsystem gotten data to be processed? More... | |
std::vector< TString > | fDetectorMapsNames |
std::map< TString, TString > | fDetectorMaps |
Int_t | fCurrentROC_ID |
ROC ID that is currently being processed. More... | |
Int_t | fCurrentBank_ID |
Bank ID that is currently being processed. More... | |
std::vector< UInt_t > | fROC_IDs |
Vector of ROC IDs associated with this subsystem. More... | |
std::vector< std::vector < UInt_t > > | fBank_IDs |
Vector of Bank IDs per ROC ID associated with this subsystem. More... | |
std::vector< QwSubsystemArray * > | fArrays |
Vector of pointers to subsystem arrays that contain this subsystem. More... | |
![]() | |
std::vector< TH1_ptr > | fHistograms |
Histograms associated with this data element. More... | |
Private Member Functions | |
QwMollerDetector () | |
Private default constructor (not implemented, will throw linker error on use) More... | |
Private Attributes | |
Int_t | fQwMollerErrorCount |
UInt_t | fNumberOfEvents |
Static Private Attributes | |
static const Bool_t | bDEBUG = kFALSE |
Additional Inherited Members | |
![]() | |
static void | DefineOptions () |
Define options function (note: no virtual static functions in C++) More... | |
![]() | |
static VQwSubsystem * | Create (const std::string &name) |
Object creation. More... | |
static QwMollerDetector * | Cast (QwMollerDetector *type) |
Object dynamic cast. More... | |
![]() | |
void | UpdatePublishedValue (const TString &name, VQwHardwareChannel *data_channel) |
void | ClearAllBankRegistrations () |
Clear all registration of ROC and Bank IDs for this subsystem. More... | |
virtual Int_t | RegisterROCNumber (const UInt_t roc_id, const UInt_t bank_id=0) |
Tell the object that it will decode data from this ROC and sub-bank. More... | |
Int_t | RegisterSubbank (const UInt_t bank_id) |
Tell the object that it will decode data from this sub-bank in the ROC currently open for registration. More... | |
Int_t | GetSubbankIndex () const |
Int_t | GetSubbankIndex (const UInt_t roc_id, const UInt_t bank_id) const |
void | SetDataLoaded (Bool_t flag) |
Int_t | FindIndex (const std::vector< UInt_t > &myvec, const UInt_t value) const |
Bool_t | Compare (VQwSubsystem *source) |
![]() | |
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... | |
Implementation of the analysis of Moller data (copied from QwComptonElectronDetector.h)
Definition at line 62 of file QwMollerDetector.h.
|
private |
Private default constructor (not implemented, will throw linker error on use)
|
inline |
Constructor with name.
Definition at line 73 of file QwMollerDetector.h.
|
inline |
Copy constructor.
Definition at line 77 of file QwMollerDetector.h.
|
inlinevirtual |
|
virtual |
Update the running sums for devices.
Implements VQwSubsystemParity.
Definition at line 317 of file QwMollerDetector.cc.
References Compare(), and fSTR7200_Channel.
|
virtual |
Apply the single event cuts.
Implements VQwSubsystemParity.
Definition at line 340 of file QwMollerDetector.cc.
References bDEBUG, and fSTR7200_Channel.
|
virtual |
Calculate the average for all good events.
Implements VQwSubsystemParity.
Definition at line 330 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
virtual |
Bool_t QwMollerDetector::Compare | ( | VQwSubsystem * | source | ) |
Definition at line 418 of file QwMollerDetector.cc.
References fSTR7200_Channel.
Referenced by AccumulateRunningSum(), Difference(), operator+=(), operator-=(), operator=(), Ratio(), and Sum().
|
inlinevirtual |
Construct the branch and tree vector.
Implements VQwSubsystem.
Definition at line 125 of file QwMollerDetector.h.
|
inlinevirtual |
Construct the branch and tree vector based on the trim file.
Implements VQwSubsystem.
Definition at line 126 of file QwMollerDetector.h.
void QwMollerDetector::ConstructBranchAndVector | ( | TTree * | , |
TString & | , | ||
std::vector< double, std::allocator< double > > & | |||
) |
Definition at line 224 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
virtual |
Construct the histograms for this subsystem in a folder with a prefix.
Implements VQwSubsystem.
Definition at line 208 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
inlinevirtual |
remove one entry from the running sums for devices
Implements VQwSubsystemParity.
Definition at line 110 of file QwMollerDetector.h.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 288 of file QwMollerDetector.cc.
References Compare().
|
virtual |
Fill the histograms for this subsystem.
Implements VQwSubsystem.
Definition at line 216 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
virtual |
Fill the tree vector.
Implements VQwSubsystem.
Definition at line 232 of file QwMollerDetector.cc.
References fSTR7200_Channel.
Int_t QwMollerDetector::GetChannelIndex | ( | TString | channelName, |
UInt_t | module_number | ||
) |
Definition at line 393 of file QwMollerDetector.cc.
References QwMollerChannelID::fChannelName, QwMollerChannelID::fIndex, QwMollerChannelID::fModuleNumber, and fMollerChannelID.
Referenced by GetDataForChannelInModule().
|
inline |
Definition at line 135 of file QwMollerDetector.h.
References fSTR7200_Channel.
Referenced by GetDataForChannelInModule().
|
inline |
Definition at line 139 of file QwMollerDetector.h.
References GetChannelIndex(), and GetDataForChannelInModule().
|
virtual |
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Implements VQwSubsystemParity.
Definition at line 367 of file QwMollerDetector.cc.
float * QwMollerDetector::GetRawChannelArray | ( | ) |
Definition at line 371 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
inlinevirtual |
Increment the error counters.
Implements VQwSubsystemParity.
Definition at line 115 of file QwMollerDetector.h.
|
virtual |
Load the channel map
mapfile | Map file |
Implements VQwSubsystem.
Definition at line 33 of file QwMollerDetector.cc.
References QwMollerChannelID::fChannelName, QwMollerChannelID::fChannelNumber, VQwSubsystem::fDetectorMapsNames, QwMollerChannelID::fDetectorType, QwMollerChannelID::fIndex, QwMollerChannelID::fModuleNumber, QwMollerChannelID::fModuleType, fMollerChannelID, fPrevious_STR7200_Channel, fSTR7200_Channel, QwMollerChannelID::fWordInSubbank, VQwSubsystem::GetSubbankIndex(), QwParameterFile::GetUInt(), VQwSubsystem::RegisterROCNumber(), and VQwSubsystem::RegisterSubbank().
Int_t QwMollerDetector::LoadEventCuts | ( | TString & | filename | ) |
|
virtual |
Load the event cuts file.
Implements VQwSubsystemParity.
Definition at line 338 of file QwMollerDetector.cc.
|
virtual |
Mandatory parameter file definition.
Implements VQwSubsystem.
Definition at line 136 of file QwMollerDetector.cc.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 254 of file QwMollerDetector.cc.
References Compare(), and fSTR7200_Channel.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 268 of file QwMollerDetector.cc.
References Compare(), and fSTR7200_Channel.
|
virtual |
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsystem *value) by VQwSubsystem::operator=(value)
Implements VQwSubsystemParity.
Definition at line 240 of file QwMollerDetector.cc.
References Compare(), and fSTR7200_Channel.
void QwMollerDetector::print | ( | ) |
Definition at line 444 of file QwMollerDetector.cc.
References fMollerChannelID, and fSTR7200_Channel.
|
virtual |
Report the number of events failed due to HW and event cut failures.
Implements VQwSubsystemParity.
Definition at line 356 of file QwMollerDetector.cc.
References fQwMollerErrorCount, and fSTR7200_Channel.
|
virtual |
Print values of all channels.
Reimplemented from VQwSubsystemParity.
Definition at line 470 of file QwMollerDetector.cc.
References fSTR7200_Channel.
|
virtual |
Implements VQwSubsystem.
Definition at line 140 of file QwMollerDetector.cc.
Int_t QwMollerDetector::ProcessConfigurationBuffer | ( | UInt_t | ev_type, |
const UInt_t | roc_id, | ||
const UInt_t | bank_id, | ||
UInt_t * | buffer, | ||
UInt_t | num_words | ||
) |
Definition at line 144 of file QwMollerDetector.cc.
|
virtual |
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware version.
Implements VQwSubsystem.
Definition at line 154 of file QwMollerDetector.cc.
References fMollerChannelID, and fSTR7200_Channel.
Referenced by ProcessEvBuffer().
|
virtual |
Reimplemented from VQwSubsystem.
Definition at line 149 of file QwMollerDetector.cc.
References ProcessEvBuffer().
|
virtual |
Implements VQwSubsystem.
Definition at line 191 of file QwMollerDetector.cc.
References fPrevious_STR7200_Channel, and fSTR7200_Channel.
|
virtual |
Process the command line options.
Reimplemented from VQwSubsystem.
Definition at line 135 of file QwMollerDetector.cc.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 295 of file QwMollerDetector.cc.
References Compare(), and fSTR7200_Channel.
|
virtual |
Implements VQwSubsystemParity.
Definition at line 309 of file QwMollerDetector.cc.
References fSTR7200_Channel.
Bool_t QwMollerDetector::SingleEventCuts | ( | ) |
|
virtual |
Implements VQwSubsystemParity.
Definition at line 281 of file QwMollerDetector.cc.
References Compare().
|
inlinevirtual |
update the error flag in the subsystem level from the top level routines related to stability checks. This will uniquely update the errorflag at each channel based on the error flag in the corresponding channel in the ev_error subsystem
Implements VQwSubsystemParity.
Definition at line 120 of file QwMollerDetector.h.
|
staticprivate |
Definition at line 153 of file QwMollerDetector.h.
Referenced by ApplySingleEventCuts().
|
protected |
Definition at line 145 of file QwMollerDetector.h.
Referenced by GetChannelIndex(), LoadChannelMap(), print(), and ProcessEvBuffer().
|
private |
Definition at line 154 of file QwMollerDetector.h.
|
protected |
Definition at line 149 of file QwMollerDetector.h.
Referenced by LoadChannelMap(), and ProcessEvent().
|
private |
Definition at line 152 of file QwMollerDetector.h.
Referenced by PrintErrorCounters().
|
protected |
Definition at line 148 of file QwMollerDetector.h.
Referenced by AccumulateRunningSum(), ApplySingleEventCuts(), CalculateRunningAverage(), Compare(), ConstructBranchAndVector(), ConstructHistograms(), FillHistograms(), FillTreeVector(), GetDataForChannelInModule(), GetRawChannelArray(), LoadChannelMap(), operator+=(), operator-=(), operator=(), print(), PrintErrorCounters(), PrintValue(), ProcessEvBuffer(), ProcessEvent(), Ratio(), and Scale().