CbmRoot
Loading...
Searching...
No Matches
CbmMcbm2020TrdTshiftPar Class Reference

#include <CbmMcbm2020TrdTshiftPar.h>

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

Public Member Functions

 CbmMcbm2020TrdTshiftPar (const char *name="CbmMcbm2020TrdTshiftPar", const char *title="TRD timeshift unpacker parameters mCbm 2020", const char *context="Default")
 
virtual ~CbmMcbm2020TrdTshiftPar ()
 
virtual void printparams ()
 
virtual void clear ()
 
void putParams (FairParamList *)
 
Bool_t getParams (FairParamList *)
 
bool GetTimeshifts (std::shared_ptr< TH2 > timeshiftHisto)
 Extract the timeshift values from a histo containing the information and write them to fTimeshifts.
 
double GetNEvents (std::shared_ptr< TFile > mcbmanafile)
 Extract the number of events from a mcbmana task output file, which has to contain the required histogram.
 
std::vector< Int_t > GetTimeshiftsVec (size_t tsidx)
 Return the timeshift vector for a given Timeslice Index. Works only if getParams() was run before.
 
std::map< size_t, std::vector< Int_t > > * GetTimeshiftsMap ()
 Return the timeshift map.
 
std::shared_ptr< TH3 > GetCalibHisto (std::shared_ptr< TFile > mcbmanafile)
 Extract the required base histogram from a mcbmana task output file.
 
std::shared_ptr< TH2 > GetCalibHisto (std::shared_ptr< TH3 > calibbasehisto)
 Extract the timeshiftHisto from the calibbase histogram. The calibbase histogram is a TH3* with the tsIdx, the module channels and the timeshifts on the axes.
 
Int_t GetDominantShift (std::shared_ptr< TH3 > calibbasehisto, size_t itsidx, size_t ichannel)
 Extract the dominant shift value from the calibbase histogram. For a give tsIdx and channel.
 
bool FillTimeshiftArray (std::shared_ptr< TFile > mcbmanafile)
 Extract the timeshift values from a TAF output file that contains the required histograms and write them to fTimeshifts.
 
 ClassDef (CbmMcbm2020TrdTshiftPar, 2)
 < Vector containing the "current" timeshift values for all Trd channles of the mCbm2020 module
 

Private Attributes

const std::vector< std::string > pararraynames = {"nTimeslices", "TrdTimeshifts"}
 Names of the parameter arrays.
 
const size_t fgNchannels = 768
 Number of channels on the single Trd module used during mCbm2020.
 
const UInt_t fgMicroSliceLength = 1.280e6
 Length of a single microslice during mCbm 2020 data taking.
 
TArrayI fTimeshifts = {}
 Array contains the timeshifts. Everytime a timeshift appears the tsIdx from the TS MetaData is followed by the correct shift value for each single channel.
 
TArrayI fNtimeslices
 Number of timeslices in the given run. This is required to fill a complete fmapTimeshifts, when reading the compressed information from the ascii parameter file.
 
std::map< size_t, std::vector< Int_t > > fmapTimeshifts = {}
 
std::vector< Int_t > fvecCurrentTimeshifts = {}
 < Keys of the map are the tsIdx when a shift value for any channel changes, the vector contains the shift values for the given period for all channels. It is represented by fvecCurrentTimeshifts
 

Detailed Description

Definition at line 20 of file CbmMcbm2020TrdTshiftPar.h.

Constructor & Destructor Documentation

◆ CbmMcbm2020TrdTshiftPar()

CbmMcbm2020TrdTshiftPar::CbmMcbm2020TrdTshiftPar ( const char * name = "CbmMcbm2020TrdTshiftPar",
const char * title = "TRD timeshift unpacker parameters mCbm 2020",
const char * context = "Default" )

Definition at line 21 of file CbmMcbm2020TrdTshiftPar.cxx.

◆ ~CbmMcbm2020TrdTshiftPar()

CbmMcbm2020TrdTshiftPar::~CbmMcbm2020TrdTshiftPar ( )
virtual

Definition at line 28 of file CbmMcbm2020TrdTshiftPar.cxx.

References clear().

Member Function Documentation

◆ ClassDef()

CbmMcbm2020TrdTshiftPar::ClassDef ( CbmMcbm2020TrdTshiftPar ,
2  )

< Vector containing the "current" timeshift values for all Trd channles of the mCbm2020 module

◆ clear()

void CbmMcbm2020TrdTshiftPar::clear ( )
virtual

Reset all parameters

Definition at line 31 of file CbmMcbm2020TrdTshiftPar.cxx.

Referenced by ~CbmMcbm2020TrdTshiftPar().

◆ FillTimeshiftArray()

bool CbmMcbm2020TrdTshiftPar::FillTimeshiftArray ( std::shared_ptr< TFile > mcbmanafile)

Extract the timeshift values from a TAF output file that contains the required histograms and write them to fTimeshifts.

< Extract the timeshift values from a TAF output file that contains the required histograms and write them to fTimeshifts.

Definition at line 291 of file CbmMcbm2020TrdTshiftPar.cxx.

References GetCalibHisto(), and GetTimeshifts().

◆ GetCalibHisto() [1/2]

std::shared_ptr< TH3 > CbmMcbm2020TrdTshiftPar::GetCalibHisto ( std::shared_ptr< TFile > mcbmanafile)

Extract the required base histogram from a mcbmana task output file.

< Extract the required base histogram from a mcbmana task output file.

Definition at line 201 of file CbmMcbm2020TrdTshiftPar.cxx.

References GetNEvents().

Referenced by FillTimeshiftArray().

◆ GetCalibHisto() [2/2]

std::shared_ptr< TH2 > CbmMcbm2020TrdTshiftPar::GetCalibHisto ( std::shared_ptr< TH3 > calibbasehisto)

Extract the timeshiftHisto from the calibbase histogram. The calibbase histogram is a TH3* with the tsIdx, the module channels and the timeshifts on the axes.

< Extract the timeshiftHisto from the calibbase histogram. The calibbase histogram is a TH3* with the tsIdx, the module channels and the timeshifts on the axes.

Definition at line 238 of file CbmMcbm2020TrdTshiftPar.cxx.

References GetDominantShift().

◆ GetDominantShift()

Int_t CbmMcbm2020TrdTshiftPar::GetDominantShift ( std::shared_ptr< TH3 > calibbasehisto,
size_t itsidx,
size_t ichannel )

Extract the dominant shift value from the calibbase histogram. For a give tsIdx and channel.

Definition at line 269 of file CbmMcbm2020TrdTshiftPar.cxx.

Referenced by GetCalibHisto().

◆ GetNEvents()

double CbmMcbm2020TrdTshiftPar::GetNEvents ( std::shared_ptr< TFile > mcbmanafile)

Extract the number of events from a mcbmana task output file, which has to contain the required histogram.

< Extract the number of events from a mcbmana task output file, which has to contain the required histogram.

Definition at line 177 of file CbmMcbm2020TrdTshiftPar.cxx.

Referenced by GetCalibHisto().

◆ getParams()

Bool_t CbmMcbm2020TrdTshiftPar::getParams ( FairParamList * l)

◆ GetTimeshifts()

bool CbmMcbm2020TrdTshiftPar::GetTimeshifts ( std::shared_ptr< TH2 > timeshiftHisto)

Extract the timeshift values from a histo containing the information and write them to fTimeshifts.

< Extract the timeshift values from a histo containing the information and write them to fTimeshifts.

Definition at line 114 of file CbmMcbm2020TrdTshiftPar.cxx.

References fgMicroSliceLength, fgNchannels, fNtimeslices, fTimeshifts, and fvecCurrentTimeshifts.

Referenced by FillTimeshiftArray().

◆ GetTimeshiftsMap()

std::map< size_t, std::vector< Int_t > > * CbmMcbm2020TrdTshiftPar::GetTimeshiftsMap ( )
inline

Return the timeshift map.

Definition at line 46 of file CbmMcbm2020TrdTshiftPar.h.

References fmapTimeshifts.

Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers(), and CbmTrdUnpackAlgoBaseR::initParSet().

◆ GetTimeshiftsVec()

std::vector< Int_t > CbmMcbm2020TrdTshiftPar::GetTimeshiftsVec ( size_t tsidx)

Return the timeshift vector for a given Timeslice Index. Works only if getParams() was run before.

Definition at line 170 of file CbmMcbm2020TrdTshiftPar.cxx.

References fmapTimeshifts.

◆ printparams()

void CbmMcbm2020TrdTshiftPar::printparams ( )
virtual

Definition at line 39 of file CbmMcbm2020TrdTshiftPar.cxx.

References fgNchannels, and fTimeshifts.

◆ putParams()

void CbmMcbm2020TrdTshiftPar::putParams ( FairParamList * l)

Definition at line 56 of file CbmMcbm2020TrdTshiftPar.cxx.

References fNtimeslices, fTimeshifts, and pararraynames.

Member Data Documentation

◆ fgMicroSliceLength

const UInt_t CbmMcbm2020TrdTshiftPar::fgMicroSliceLength = 1.280e6
private

Length of a single microslice during mCbm 2020 data taking.

Definition at line 70 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by GetTimeshifts().

◆ fgNchannels

const size_t CbmMcbm2020TrdTshiftPar::fgNchannels = 768
private

Number of channels on the single Trd module used during mCbm2020.

Definition at line 66 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), GetTimeshifts(), and printparams().

◆ fmapTimeshifts

std::map<size_t, std::vector<Int_t> > CbmMcbm2020TrdTshiftPar::fmapTimeshifts = {}
private

Definition at line 79 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), GetTimeshiftsMap(), and GetTimeshiftsVec().

◆ fNtimeslices

TArrayI CbmMcbm2020TrdTshiftPar::fNtimeslices
private

Number of timeslices in the given run. This is required to fill a complete fmapTimeshifts, when reading the compressed information from the ascii parameter file.

Definition at line 76 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), GetTimeshifts(), and putParams().

◆ fTimeshifts

TArrayI CbmMcbm2020TrdTshiftPar::fTimeshifts = {}
private

Array contains the timeshifts. Everytime a timeshift appears the tsIdx from the TS MetaData is followed by the correct shift value for each single channel.

Definition at line 73 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), GetTimeshifts(), printparams(), and putParams().

◆ fvecCurrentTimeshifts

std::vector<Int_t> CbmMcbm2020TrdTshiftPar::fvecCurrentTimeshifts = {}
private

< Keys of the map are the tsIdx when a shift value for any channel changes, the vector contains the shift values for the given period for all channels. It is represented by fvecCurrentTimeshifts

Definition at line 82 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), and GetTimeshifts().

◆ pararraynames

const std::vector<std::string> CbmMcbm2020TrdTshiftPar::pararraynames = {"nTimeslices", "TrdTimeshifts"}
private

Names of the parameter arrays.

Definition at line 63 of file CbmMcbm2020TrdTshiftPar.h.

Referenced by getParams(), and putParams().


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