Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
PositionProcessor Class Reference

Processor to calculate the position in SSDs. More...

#include <PositionProcessor.hpp>

Inheritance diagram for PositionProcessor:
Collaboration diagram for PositionProcessor:

Public Member Functions

virtual bool Init (RawEvent &rawev)
 Reads in QDC parameters from an input file. More...
 
virtual bool Process (RawEvent &event)
 Process the QDC data involved in top/bottom side for a strip. More...
 
virtual void DeclarePlots (void)
 
- Public Member Functions inherited from EventProcessor
 EventProcessor ()
 
 EventProcessor (int offset, int range, std::string name)
 
virtual ~EventProcessor ()
 
virtual const std::set< std::string > & GetTypes (void) const
 
virtual bool DidProcess (void) const
 
virtual bool HasEvent (void) const
 
virtual bool PreProcess (RawEvent &event)
 
void EndProcess (void)
 
std::string GetName (void) const
 

Private Member Functions

ChanEventFindMatchingEdge (ChanEvent *match, std::vector< ChanEvent * >::const_iterator begin, std::vector< ChanEvent * >::const_iterator end) const
 
ChanEventFindMatchingEdge (ChanEvent *match, std::vector< ChanEvent * >::const_reverse_iterator begin, std::vector< ChanEvent * >::const_reverse_iterator end) const
 

Private Attributes

float qdcLen [numQdcs]
 the length of each qdc in pixie samples
 
float qdcPos [numQdcs]
 the ending sample number for each QDC position
 
float totLen
 calculated length of all qdcs excluding baseline qdc
 
int whichQdc
 which qdc we are using for position determinatio
 
int numLocations
 number of locations in the processor
 
float posScale
 an arbitrary scale for the position parameter to physical units
 
std::vector< float > minNormQdc
 the minimum normalized qdc observed for a location
 
std::vector< float > maxNormQdc
 the maximum normalized qdc observed for a location
 

Static Private Attributes

static const int numQdcs = 8
 number of QDCs to compute
 
static const int matchingTimeCut = 5
 maximum difference between edge and sum timestamps
 
static const int maxNumLocations = 12
 maximum number of locations
 

Additional Inherited Members

- Protected Member Functions inherited from EventProcessor
virtual void plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h")
 Implementation of the plot command to interface with the DAMM routines. More...
 
virtual void DeclareHistogram1D (int dammId, int xSize, const char *title)
 Declares a 1D histogram calls the C++ wrapper for DAMM. More...
 
virtual void DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title)
 Declares a 2D histogram calls the C++ wrapper for DAMM. More...
 
- Protected Attributes inherited from EventProcessor
std::string name
 Name of the Processor.
 
std::set< std::string > associatedTypes
 Set of associated types for Processor.
 
bool initDone
 True if the initialization has finished.
 
bool didProcess
 True if the process finished.
 
std::map< std::string, const DetectorSummary * > sumMap
 Map of associated detector summary.
 
Plots histo
 

Detailed Description

Processor to calculate the position in SSDs.

Member Function Documentation

virtual void PositionProcessor::DeclarePlots ( void  )
virtual

Declares the plots for the processor

Reimplemented from EventProcessor.

ChanEvent* PositionProcessor::FindMatchingEdge ( ChanEvent match,
std::vector< ChanEvent * >::const_iterator  begin,
std::vector< ChanEvent * >::const_iterator  end 
) const
private

Find the matching edge of the SSD

Parameters
[in]match: the matching edge
[in]begin: an iterator to the beginning of the event
[in]end: an iterator to the end of the event
Returns
a pointer to the matching ChanEvent
ChanEvent* PositionProcessor::FindMatchingEdge ( ChanEvent match,
std::vector< ChanEvent * >::const_reverse_iterator  begin,
std::vector< ChanEvent * >::const_reverse_iterator  end 
) const
private

Find the matching edge of the SSD

Parameters
[in]match: the matching edge
[in]begin: an iterator to the beginning of the event
[in]end: an iterator to the end of the event
Returns
a pointer to the matching ChanEvent
virtual bool PositionProcessor::Init ( RawEvent rawev)
virtual

Reads in QDC parameters from an input file.

The file format allows comment lines at the beginning Followed by QDC lengths Which QDC to use for position calculation followed by the amount to scale the [0,1] result by to physical units And min and max values of the normalized QDC for each location in form: (location) (min) (max) Note that QDC 0 is considered to be a baseline section of the trace for baseline removal for the other QDCs

Parameters
[in]rawev: the raw event to get the data from
Returns
true if everything was successful

Reimplemented from EventProcessor.

virtual bool PositionProcessor::Process ( RawEvent event)
virtual

Process the QDC data involved in top/bottom side for a strip.

Note: QDC lengths are HARD-CODED at the moment for the plots and to determine the position

Parameters
[in]event: the event to process
Returns
true if the processing was successful

Reimplemented from EventProcessor.


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