5#ifndef CbmMcbm2020TrdTshiftPar_H
6#define CbmMcbm2020TrdTshiftPar_H
8#include "FairParGenericSet.h"
23 const char* title =
"TRD timeshift unpacker parameters mCbm 2020",
24 const char* context =
"Default");
39 double GetNEvents(std::shared_ptr<TFile> mcbmanafile);
50 std::shared_ptr<TH3>
GetCalibHisto(std::shared_ptr<TFile> mcbmanafile);
53 std::shared_ptr<TH2>
GetCalibHisto(std::shared_ptr<TH3> calibbasehisto);
56 Int_t
GetDominantShift(std::shared_ptr<TH3> calibbasehisto,
size_t itsidx,
size_t ichannel);
63 const std::vector<std::string>
pararraynames = {
"nTimeslices",
"TrdTimeshifts"};
void putParams(FairParamList *)
std::map< size_t, std::vector< Int_t > > fmapTimeshifts
std::vector< Int_t > GetTimeshiftsVec(size_t tsidx)
Return the timeshift vector for a given Timeslice Index. Works only if getParams() was run before.
bool FillTimeshiftArray(std::shared_ptr< TFile > mcbmanafile)
Extract the timeshift values from a TAF output file that contains the required histograms and write t...
const std::vector< std::string > pararraynames
Names of the parameter arrays.
std::vector< Int_t > fvecCurrentTimeshifts
< Keys of the map are the tsIdx when a shift value for any channel changes, the vector contains the s...
std::shared_ptr< TH3 > GetCalibHisto(std::shared_ptr< TFile > mcbmanafile)
Extract the required base histogram from a mcbmana task output file.
TArrayI fTimeshifts
Array contains the timeshifts. Everytime a timeshift appears the tsIdx from the TS MetaData is follow...
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.
virtual void printparams()
double GetNEvents(std::shared_ptr< TFile > mcbmanafile)
Extract the number of events from a mcbmana task output file, which has to contain the required histo...
Bool_t getParams(FairParamList *)
const size_t fgNchannels
Number of channels on the single Trd module used during mCbm2020.
bool GetTimeshifts(std::shared_ptr< TH2 > timeshiftHisto)
Extract the timeshift values from a histo containing the information and write them to fTimeshifts.
virtual ~CbmMcbm2020TrdTshiftPar()
TArrayI fNtimeslices
Number of timeslices in the given run. This is required to fill a complete fmapTimeshifts,...
const UInt_t fgMicroSliceLength
Length of a single microslice during mCbm 2020 data taking.
std::map< size_t, std::vector< Int_t > > * GetTimeshiftsMap()
Return the timeshift map.
ClassDef(CbmMcbm2020TrdTshiftPar, 2)
< Vector containing the "current" timeshift values for all Trd channles of the mCbm2020 module
CbmMcbm2020TrdTshiftPar(const char *name="CbmMcbm2020TrdTshiftPar", const char *title="TRD timeshift unpacker parameters mCbm 2020", const char *context="Default")