MCoincidenceTester Class Reference

Inheritance diagram for MCoincidenceTester:

QModule QBaseModule

List of all members.


Detailed Description

simple tool to test coincidences framework

Author:
Sergio Di Domizio

Carlos Martinez

  • Config example:
        module CoincidenceTester
        enable = true
        verbosity = info
        TimeWindow = 100
        CoincidenceType = Static
        TowerFile = detectorMap.txt
        OutList = list.txt
        CoincidenceList = coincList.txt
        MultiplicityHisto = false
        DistanceHisto = false
        PositionHisto = false
        MultiplicityPositionGraph = false
        MultiplicityTimeGraph = false
        MultiplicityDurationGraph = false
        DistanceTimeGraph = false
        SummaryFile = Q_STRING_DEFAULT
        CutFile = cuts.txt
        endmod
        
  • Parameters
    • TimeWindow [int = 100]: time window to be used for building coincidences
    • CoincidenceType [string = Static] Select the definition to be used to build coincidences. there are currently two allowed possibilities:
      • Static: will produce coincidences with a fixed length time window
      • Variable: will produce coincidences with a variable length time window
    • CoincidenceList [ string = Q_STRING_DEFAULT ] file name where the list of selected coincidences will be dumped. See documentation of DumpCoincidenceList() for the output format. If this variable is left to its default value the coincidence list won't be created.
    • OutList [ string = Q_STRING_DEFAULT ] file name where the list of selected events will be dumped. If the name contains a dot, then it is treated as a standard file name. If instead it doesn't contain a dot, then the event list is saved in SeqAuxData, into a QVector named with that name. If this variable is left to its default value the event list won't be created.
    • TowerFile [ string = Q_STRING_DEFAULT ] Name of the file containing detector map. If the name is "DB", then the map will be loaded from the database. In any other case it will be read from a file with that name. See documentation of QTower for a description of the detector map file format.
    • MultiplicityHisto [ bool = false ] If true, an histogram with the multiplicity distribution of the coincidences that passed the filters will be created.
    • DistanceHisto [ bool = false ] If true, an histogram with the distribution of time distance between subsequent coincidences that passed the filters will be created.
    • PositionHisto [ bool = false ] If true, an histogram with the relative position distribution of the coincidences with multiplicity > 1 that passed the filters will be created. The plotted quantity is the minimum value of the average distance between one event in a coincidence and other events surrounding it.
    • MultiplicityPositionGraph [ bool = false ] If true, the multiplicity vs minimum distance for the events with multiplicity > 1 that passed the filter is created. The distance is the minimum value of the sum distance between one event in a coincidence and the other events surrounding it.
    • MultiplicityTimeGraph [ bool = false ] If true the multiplicity vs time scatter plot for the coincidences that passed the filters will be created.
    • MultiplicityDurationGraph [ bool = false ] If true the multiplicity vs duration scatter plot for the coincidences that passed the filters will be created.
    • DistanceTimeGraph [ bool = false ] If true the relative time distance vs time scatter plot for the coincidences that passed the filters will be created.
    • SummaryFile [ string = Q_STRING_DEFAULT ] Name of the root file containing summary plots
    • CutFile [ string = Q_STRING_DEFAULT ] Name of the file containing the list of cuts to be applied by this module. Coincidence filters will be applied with the same order of appearance of the corresponding tags in the cuts file. For filters that allow multiple tags the first occurrence will matter. See documentation for ReadCutsFile member function for details on the CutFile syntax.


Public Member Functions

 MCoincidenceTester (QSequence *s)
 constructor
 ~MCoincidenceTester ()
 destructor
void Init ()
 Init method.
QEventDo (QEvent *ev)
 Do method.
void Done ()
 Done method.

Private Member Functions

void ProduceSummaryPlots (const std::list< QCoincidence > &coincList) const
 produce summary plots from coincidences in coincList
void DumpEventList (const std::list< QCoincidence > &coincList)
 dump event list from coincidences in coincList
void DumpCoincidenceList (const std::list< QCoincidence > &coincList, const std::string &fileName) const
 dump coincidence list in the same format as the ouptput of geant
void ReadCutsFile ()
 read file containing coincidence filtering parameters
double GetMinimumSumOfDistances (const QCoincidence &coinc, const QTower &tower) const
 return the minimum sum of distances between the events in a coincidence

Private Attributes

QCoincidenceFillerfFiller
std::string fOutList
std::string fCoincList
std::string fCutFile
std::string fTowerFile
bool fSkipExecution
std::list< QCoincidenceFilter * > fFilters
QVector * fEventList
bool fMultHisto
bool fDistanceHisto
bool fPositionHisto
bool fMultTimeGraph
bool fMultPositionGraph
bool fMultDurationGraph
bool fDistanceTimeGraph
bool fSummaryPlots
std::string fSummaryFile

Member Function Documentation

void MCoincidenceTester::DumpCoincidenceList ( const std::list< QCoincidence > &  coincList,
const std::string &  fileName 
) const [private]

dump coincidence list in the same format as the ouptput of geant

The first line in the output is a comment line All others lines represent an event. Each line has the following fields:

  • CoincidenceId [int] : counter
  • EventTime [unsigned long long] : time in ns since 1970-1-1
  • ChannelId [int] : event channel
  • Energy [double] : energy of the event in MeV

References QBaseModule::Error(), and QBaseModule::Info().

Referenced by Done().

void MCoincidenceTester::ReadCutsFile (  )  [private]

read file containing coincidence filtering parameters

Each line represents a cut. Lines beginning with # are treated as comments and are ignored. Each cut line must start with a valid tag, followed by a set of values. The format for the values depends on the particular tag. Some tags can occur only once in the file, while others can occur more than once.

The filters will be applied with the same order of appearance of the corresponding in the cuts file. For filters that allow multiple tags the first occurrence will matter.

Available tags are:

  • Multiplicity: apply multiplicity filter to coincidences. This tag accepts one or 2 integer values. If one integer value is supplied, only coincidences with that exact multiplicity are allowed. If two values are supplied all coincidences with multiplicity in that range are allowed. The first value is assumed to be the lower bound and the second one is assumed to be the upper bound. See documentation of QMultiplicityFilter for further details.

  • Distance: apply position filter to coincidences. This tag requires 3 values:
    • Minimum distance of two events in a coincidence to pass the filter (float)
    • Maximum distance of two events in a coincidence to pass the filter (float)
    • The number of events in the coincidence that must satisfy the position constraint in order for the coincidence to pass the filter (int). See documentation of QPositionFilter for further details.

  • Energy: apply energy filter to coincidences. This tag requires 2 values and can occur more than once in the cuts file. For each occurrence the 2 values represent the bounds of the energy range that an event must satisfy in order for the coincidence to pass the filter. In case of multiple occurrences, each of them must be satisfied by a different event. See documentation of QEnergyFilter for further details.

  • TotalEnergy: apply total energy filter to coincidences. This tag requires 2 values: the total energy of the coincidence must fall within that range. See documentation QTotalEnergy for more details.

References QBaseModule::Debug(), QBaseModule::Error(), fCutFile, fFilters, fSkipExecution, fTowerFile, QBaseModule::Info(), QPositionFilter::LoadDetectorMap(), QPositionFilter::SetCut(), QEnergyFilter::SetCuts(), QCoPositionSplitter::SetRange(), and QBaseModule::Warn().

Referenced by Init().

double MCoincidenceTester::GetMinimumSumOfDistances ( const QCoincidence coinc,
const QTower tower 
) const [private]

return the minimum sum of distances between the events in a coincidence

Parameters:
coinc the coincidence on which the minimum sum of distances is to be evaluated
tower an already configured QTower that will be used to evaluate distances
Returns:
minimum sum of distances or -1 in case of error (mismatch between the events in the coincidence and the detectors registered in the tower map.
For each event in a coincidence this function evaluates the sum of its distance with respect to all other events in the coincidence. The minimum value found is then returned.

References QBaseModule::Error(), QTower::GetCrystal(), QGeomVector::GetDistance(), QCoincidence::GetEvents(), and QCuboid::GetPosition().

Referenced by ProduceSummaryPlots().


Member Data Documentation

pointer to the class used to build coincidences

Referenced by Do(), Done(), and Init().

std::string MCoincidenceTester::fOutList [private]

name of the output file containing the list of selected events

Referenced by Done(), DumpEventList(), and Init().

std::string MCoincidenceTester::fCoincList [private]

name of the output file containing the list of coincidences that passed the filters

Referenced by Done(), and Init().

std::string MCoincidenceTester::fCutFile [private]

name of the input file specifying the filters to be applied

Referenced by Init(), and ReadCutsFile().

std::string MCoincidenceTester::fTowerFile [private]

name of the file containing detector map description

Referenced by Init(), ProduceSummaryPlots(), and ReadCutsFile().

if true, execution of this module will be skipped

Referenced by ReadCutsFile().

list of filters to be applied to coincidences

Referenced by Done(), and ReadCutsFile().

QVector* MCoincidenceTester::fEventList [private]

Vector containing the list of events that passed the filters. Used only if OutList is to be dumped into a SeqAuxData variable

Referenced by DumpEventList(), and ~MCoincidenceTester().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().

variables controlling summary plots

Referenced by Done(), and Init().

std::string MCoincidenceTester::fSummaryFile [private]

variables controlling summary plots

Referenced by Init(), and ProduceSummaryPlots().


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

Generated on Tue Nov 16 10:50:01 2010 for CUORE Software by  doxygen 1.5.6