CbmRoot
Loading...
Searching...
No Matches
CbmTaskTofClusterizerParWrite.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Dominik Smith [committer], Pierre-Alain Loizeau, Norbert Herrmann */
4
5#ifndef CBMTASKTOFCLUSTERIZERPARWRITE_H
6#define CBMTASKTOFCLUSTERIZERPARWRITE_H 1
7
8// TOF Classes and includes
9// Geometry
11class CbmTofDigiPar;
13class CbmTofCell;
14
15#include "tof/Clusterizer.h"
16
17// ROOT Classes and includes
18#include "Math/Rotation3D.h"
19#include "Math/Vector3Dfwd.h"
20
21// FAIR classes and includes
22#include "FairTask.h"
23
24// ROOT Classes and includes
25class TClonesArray;
26
27// C++ Classes and includes
28#include <vector>
29
30class CbmTaskTofClusterizerParWrite : public FairTask {
31
32 public:
37
41 CbmTaskTofClusterizerParWrite(const char* name, int32_t verbose = 1, bool writeDataInOut = true);
46
50 virtual InitStatus Init();
51
55 virtual void SetParContainers();
56
60 virtual void Exec(Option_t* /*option*/){};
61
65 virtual void Finish(){};
66
67 inline void SetCalMode(int32_t iMode) { fCalMode = iMode; }
68 inline void PosYMaxScal(double val) { fPosYMaxScal = val; }
69 inline void SetTotMax(double val) { fTotMax = val; }
70 inline void SetTotMin(double val) { fTotMin = val; }
71 inline void SetTotMean(double val) { fTotMean = val; }
72 inline void SetMaxTimeDist(double val) { fMaxTimeDist = val; }
73 inline void SetChannelDeadtime(double val) { fdChannelDeadtime = val; }
74 inline void SetCalParFileName(TString CalParFileName) { fCalParFileName = CalParFileName; }
75
76 inline double GetTotMean() { return fTotMean; }
77
78 void SwapChannelSides(bool bSwap) { fbSwapChannelSides = bSwap; }
79 void SetDeadStrips(int32_t iDet, uint32_t ival);
80
81 protected:
82 private:
84 const int32_t nbClWalkBinX = 50; // was 100 (11.10.2018)
85 const int32_t nbClWalkBinY = 41; // choose odd number to have central bin symmetric around 0
86
95
96 // Functions common for all clusters approximations
100 bool InitParameters();
104 bool InitCalibParameter();
105
109 bool InitAlgos();
110
111 // ToF geometry variables
115
116 //Calibration parameters
117 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTOff; //[nSMT][nRpc][nCh][nbSide]
118 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTotGain; //[nSMT][nRpc][nCh][nbSide]
119 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTotOff; //[nSMT][nRpc][nCh][nbSide]
120 std::vector<std::vector<std::vector<std::vector<std::vector<double>>>>>
121 fvCPWalk; //[nSMT][nRpc][nCh][nbSide][nbWalkBins]
122 std::vector<std::vector<std::vector<double>>> fvCPTOffY; //[nSMT][nRpc][nBin]
123 std::vector<std::vector<double>> fvCPTOffYBinWidth; //[nSMT][nRpc]
124 std::vector<std::vector<double>> fvCPTOffYRange; //[nSMT][nRpc]
125
126 std::vector<uint32_t> fvDeadStrips; //[nbDet]
127
128 // Calib
129 int32_t fCalMode;
130
132 double fTotMax;
133 double fTotMin;
134 double fTotOff;
135 double fTotMean;
138
139 TString fCalParFileName; // name of the file name with Calibration Parameters
140
141 double fdTOTMax;
142 double fdTOTMin;
144
145 double fdMaxTimeDist; // Isn't this just a local variable? Why make it global and preset?!?
146 double fdMaxSpaceDist; // Isn't this just a local variable? Why make it global and preset?!?
148
150
152};
153
154#endif // CBMTASKTOFCLUSTERIZER_H
void SetDeadStrips(int32_t iDet, uint32_t ival)
void SetCalParFileName(TString CalParFileName)
CbmTaskTofClusterizerParWrite & operator=(const CbmTaskTofClusterizerParWrite &)
Copy operator.
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTOff
std::vector< std::vector< std::vector< std::vector< std::vector< double > > > > > fvCPWalk
virtual void Finish()
Inherited from FairTask.
virtual void Exec(Option_t *)
Inherited from FairTask.
virtual InitStatus Init()
Inherited from FairTask.
std::vector< std::vector< double > > fvCPTOffYRange
std::vector< std::vector< std::vector< double > > > fvCPTOffY
bool InitCalibParameter()
Initialize other parameters not included in parameter classes.
bool InitParameters()
Initialize other parameters not included in parameter classes.
bool InitAlgos()
Create one algo object for each RPC.
std::vector< std::vector< double > > fvCPTOffYBinWidth
ClassDef(CbmTaskTofClusterizerParWrite, 1)
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTotGain
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTotOff
CbmTaskTofClusterizerParWrite(const CbmTaskTofClusterizerParWrite &)
Copy constructor.
virtual void SetParContainers()
Inherited from FairTask.
Parameters class for the CBM ToF digitizer using beam data distributions.