CbmRoot
|
#include <CbmMcbm2020TrdTshiftPar.h>
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 | |
Definition at line 20 of file CbmMcbm2020TrdTshiftPar.h.
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.
|
virtual |
Definition at line 28 of file CbmMcbm2020TrdTshiftPar.cxx.
References clear().
CbmMcbm2020TrdTshiftPar::ClassDef | ( | CbmMcbm2020TrdTshiftPar | , |
2 | ) |
< Vector containing the "current" timeshift values for all Trd channles of the mCbm2020 module
|
virtual |
Reset all parameters
Definition at line 31 of file CbmMcbm2020TrdTshiftPar.cxx.
Referenced by ~CbmMcbm2020TrdTshiftPar().
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().
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().
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().
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().
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().
Bool_t CbmMcbm2020TrdTshiftPar::getParams | ( | FairParamList * | l | ) |
Definition at line 64 of file CbmMcbm2020TrdTshiftPar.cxx.
References fgNchannels, fmapTimeshifts, fNtimeslices, fTimeshifts, fvecCurrentTimeshifts, and pararraynames.
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().
|
inline |
Return the timeshift map.
Definition at line 46 of file CbmMcbm2020TrdTshiftPar.h.
References fmapTimeshifts.
Referenced by CbmMcbm2018UnpackerTaskTrdR::InitContainers(), and CbmTrdUnpackAlgoBaseR::initParSet().
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.
|
virtual |
Definition at line 39 of file CbmMcbm2020TrdTshiftPar.cxx.
References fgNchannels, and fTimeshifts.
void CbmMcbm2020TrdTshiftPar::putParams | ( | FairParamList * | l | ) |
Definition at line 56 of file CbmMcbm2020TrdTshiftPar.cxx.
References fNtimeslices, fTimeshifts, and pararraynames.
|
private |
Length of a single microslice during mCbm 2020 data taking.
Definition at line 70 of file CbmMcbm2020TrdTshiftPar.h.
Referenced by GetTimeshifts().
|
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().
|
private |
Definition at line 79 of file CbmMcbm2020TrdTshiftPar.h.
Referenced by getParams(), GetTimeshiftsMap(), and GetTimeshiftsVec().
|
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().
|
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().
|
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().
|
private |
Names of the parameter arrays.
Definition at line 63 of file CbmMcbm2020TrdTshiftPar.h.
Referenced by getParams(), and putParams().