PAASS
Software suite to Acquire and Analyze Data from Pixie16
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

 PositionProcessor ()
 
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 More...
 
float qdcPos [numQdcs]
 the ending sample number for each QDC position More...
 
float totLen
 calculated length of all qdcs excluding baseline qdc More...
 
int whichQdc
 which qdc we are using for position determinatio More...
 
int numLocations
 number of locations in the processor More...
 
float posScale
 an arbitrary scale for the position parameter to physical units More...
 
std::vector< float > minNormQdc
 the minimum normalized qdc observed for a location More...
 
std::vector< float > maxNormQdc
 the maximum normalized qdc observed for a location More...
 

Static Private Attributes

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

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. More...
 
std::set< std::string > associatedTypes
 Set of associated types for Processor. More...
 
bool initDone
 True if the initialization has finished. More...
 
bool didProcess
 True if the process finished. More...
 
std::map< std::string, const DetectorSummary * > sumMap
 Map of associated detector summary. More...
 
Plots histo
 

Detailed Description

Processor to calculate the position in SSDs.

Definition at line 17 of file PositionProcessor.hpp.

Constructor & Destructor Documentation

§ PositionProcessor()

PositionProcessor::PositionProcessor ( )

Definition at line 55 of file PositionProcessor.cpp.

Member Function Documentation

§ DeclarePlots()

void PositionProcessor::DeclarePlots ( void  )
virtual

Declares the plots for the processor

Reimplemented from EventProcessor.

Definition at line 146 of file PositionProcessor.cpp.

Here is the call graph for this function:

§ FindMatchingEdge() [1/2]

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

Definition at line 427 of file PositionProcessor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ FindMatchingEdge() [2/2]

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

Definition at line 439 of file PositionProcessor.cpp.

Here is the call graph for this function:

§ Init()

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.

Definition at line 60 of file PositionProcessor.cpp.

Here is the call graph for this function:

§ Process()

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.

Definition at line 232 of file PositionProcessor.cpp.

Here is the call graph for this function:

Field Documentation

§ matchingTimeCut

const int PositionProcessor::matchingTimeCut = 5
staticprivate

maximum difference between edge and sum timestamps

Definition at line 20 of file PositionProcessor.hpp.

§ maxNormQdc

std::vector<float> PositionProcessor::maxNormQdc
private

the maximum normalized qdc observed for a location

Definition at line 30 of file PositionProcessor.hpp.

§ maxNumLocations

const int PositionProcessor::maxNumLocations = 12
staticprivate

maximum number of locations

Definition at line 26 of file PositionProcessor.hpp.

§ minNormQdc

std::vector<float> PositionProcessor::minNormQdc
private

the minimum normalized qdc observed for a location

Definition at line 29 of file PositionProcessor.hpp.

§ numLocations

int PositionProcessor::numLocations
private

number of locations in the processor

Definition at line 27 of file PositionProcessor.hpp.

§ numQdcs

const int PositionProcessor::numQdcs = 8
staticprivate

number of QDCs to compute

Definition at line 19 of file PositionProcessor.hpp.

§ posScale

float PositionProcessor::posScale
private

an arbitrary scale for the position parameter to physical units

Definition at line 28 of file PositionProcessor.hpp.

§ qdcLen

float PositionProcessor::qdcLen[numQdcs]
private

the length of each qdc in pixie samples

Definition at line 22 of file PositionProcessor.hpp.

§ qdcPos

float PositionProcessor::qdcPos[numQdcs]
private

the ending sample number for each QDC position

Definition at line 23 of file PositionProcessor.hpp.

§ totLen

float PositionProcessor::totLen
private

calculated length of all qdcs excluding baseline qdc

Definition at line 24 of file PositionProcessor.hpp.

§ whichQdc

int PositionProcessor::whichQdc
private

which qdc we are using for position determinatio

Definition at line 25 of file PositionProcessor.hpp.


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