BmnRoot
Loading...
Searching...
No Matches
CbmStsAcceptance Class Reference

Singleton task class for easy access to the acceptance in the STS. More...

#include <CbmStsAcceptance.h>

Inheritance diagram for CbmStsAcceptance:
[legend]
Collaboration diagram for CbmStsAcceptance:
[legend]

Public Member Functions

 CbmStsAcceptance ()
 
virtual ~CbmStsAcceptance ()
 
virtual void Exec (Option_t *opt)
 
virtual void Finish ()
 
virtual InitStatus Init ()
 
std::string ToString () const
 

Static Public Member Functions

static Int_t GetNofPoints (Int_t trackId)
 
static Int_t GetNofPoints (Int_t trackId, Int_t stationNr)
 
static Int_t GetNofStations (Int_t trackId)
 
static Bool_t IsAccepted (Int_t trackId, Int_t nMinStations=3)
 
static Bool_t IsInStation (Int_t trackId, Int_t stationNr)
 

Detailed Description

Singleton task class for easy access to the acceptance in the STS.

Author
Volker Friese v.fri.nosp@m.ese@.nosp@m.gsi.d.nosp@m.e
Since
04.05.2016
Version
1.0

This tool provides access to the number of StsPoints for a given MCTrack, specified by its index in the MCTrack array, in each station of the STS. It thus allows to check the acceptance of a track in the STS according to user-specified acceptance criteria. The standard acceptance definition (to have points in at least three STS station) is also implemented in the method IsAccepted().

Access to the number of STS points is provided by the static method. Int_t CbmStsAcceptance::GetNofPoints(Int_t, Int_t). There are several other static methods for convenience of analysis, like GetNofStations or IsInStation.

The task has to be registered in the run macro before any task using its functionality. It is not a singleton, but there is a protection against its being instantiated more than once.

Definition at line 38 of file CbmStsAcceptance.h.

Constructor & Destructor Documentation

◆ CbmStsAcceptance()

CbmStsAcceptance::CbmStsAcceptance ( )

Constructor

Definition at line 33 of file CbmStsAcceptance.cxx.

◆ ~CbmStsAcceptance()

CbmStsAcceptance::~CbmStsAcceptance ( )
virtual

Destructor

Definition at line 50 of file CbmStsAcceptance.cxx.

Member Function Documentation

◆ Exec()

void CbmStsAcceptance::Exec ( Option_t *  opt)
virtual

Task execution

Loops through the StsPoint array and fills the count map.

Definition at line 67 of file CbmStsAcceptance.cxx.

References CbmStsAddress::GetElementId(), and ToString().

◆ Finish()

void CbmStsAcceptance::Finish ( )
virtual

End-of-run action

Definition at line 114 of file CbmStsAcceptance.cxx.

◆ GetNofPoints() [1/2]

Int_t CbmStsAcceptance::GetNofPoints ( Int_t  trackId)
static

Total number of StsPoints for this MCTrack

Parameters
trackIdIndex of MCTrack in array @value Number of StsPoints for this track

Definition at line 132 of file CbmStsAcceptance.cxx.

Referenced by IsInStation().

◆ GetNofPoints() [2/2]

Int_t CbmStsAcceptance::GetNofPoints ( Int_t  trackId,
Int_t  stationNr 
)
static

Number of StsPoints of a MCTrack in a given STS station

Parameters
trackIdIndex of MCTrack in array
stationNrSTS Station number @value Number of StsPoints in the specified station

Definition at line 149 of file CbmStsAcceptance.cxx.

◆ GetNofStations()

Int_t CbmStsAcceptance::GetNofStations ( Int_t  trackId)
static

Number of stations in which a track is registered

Parameters
trackIdIndex of MCTrack in array @value Number of stations in which the track has StsPoints

Definition at line 167 of file CbmStsAcceptance.cxx.

Referenced by IsAccepted().

◆ Init()

InitStatus CbmStsAcceptance::Init ( )
virtual

Task initialisation

Definition at line 176 of file CbmStsAcceptance.cxx.

◆ IsAccepted()

static Bool_t CbmStsAcceptance::IsAccepted ( Int_t  trackId,
Int_t  nMinStations = 3 
)
inlinestatic

Check for STS acceptance

Parameters
trackIdIndex of MCTrack in array
nMinStationsMinimum number of station required to be accepted @value Acceptance decision

Definition at line 93 of file CbmStsAcceptance.h.

References GetNofStations().

◆ IsInStation()

static Bool_t CbmStsAcceptance::IsInStation ( Int_t  trackId,
Int_t  stationNr 
)
inlinestatic

Check whether a track is registered in a STS station

Parameters
trackIdIndex of MCTrack in array
stationNrSTS Station number @value kTRUE if and only if at least one StsPoint in this station

Definition at line 103 of file CbmStsAcceptance.h.

References GetNofPoints().

◆ ToString()

string CbmStsAcceptance::ToString ( ) const

Status info

Definition at line 241 of file CbmStsAcceptance.cxx.

Referenced by Exec().


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