CbmRoot
Loading...
Searching...
No Matches
CbmTaskTofClusterizerParWrite.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2025 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
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:
33 static constexpr int kBmonAssignedSmType = 5;
34 static constexpr int kBmonAssignedSide = 0;
35
40
44 CbmTaskTofClusterizerParWrite(const char* name, int32_t verbose = 1, bool writeDataInOut = true);
49
53 virtual InitStatus Init();
54
58 virtual void SetParContainers();
59
63 virtual void Exec(Option_t* /*option*/){};
64
68 virtual void Finish(){};
69
70 void SetCalMode(int32_t iMode) { fCalMode = iMode; }
71 void PosYMaxScal(double val) { fPosYMaxScal = val; }
72 void SetTotMax(double val) { fTotMax = val; }
73 void SetTotMin(double val) { fTotMin = val; }
74 void SetTotMean(double val) { fTotMean = val; }
75 void SetMaxTimeDist(double val) { fMaxTimeDist = val; }
76 void SetChannelDeadtime(double val) { fdChannelDeadtime = val; }
77 void SetCalParFileName(TString CalParFileName) { fCalParFileName = CalParFileName; }
78 void SetRunId(uint32_t runId) { fRunId = runId; }
79
80 double GetTotMean() { return fTotMean; }
81
82 void SwapChannelSides(bool bSwap) { fbSwapChannelSides = bSwap; }
83 void SetDeadStrips(int32_t iDet, uint32_t ival);
84
88 void SetRecoParOutputDir(const std::string& dirname) { fsRecoParOutputDir = dirname; }
89
90
91 protected:
92 private:
94 const int32_t nbClWalkBinX = 50; // was 100 (11.10.2018)
95 const int32_t nbClWalkBinY = 41; // choose odd number to have central bin symmetric around 0
96
105
106 // Functions common for all clusters approximations
110 bool InitParameters();
114 bool InitCalibParameter();
115
119 bool InitAlgosTof();
120
124 bool InitAlgosBmon();
125
126 // ToF geometry variables
130
131 //Calibration parameters
132 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTOff; //[nSMT][nRpc][nCh][nbSide]
133 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTotGain; //[nSMT][nRpc][nCh][nbSide]
134 std::vector<std::vector<std::vector<std::vector<double>>>> fvCPTotOff; //[nSMT][nRpc][nCh][nbSide]
135 std::vector<std::vector<std::vector<std::vector<std::vector<double>>>>>
136 fvCPWalk; //[nSMT][nRpc][nCh][nbSide][nbWalkBins]
137 std::vector<std::vector<std::vector<double>>> fvCPTOffY; //[nSMT][nRpc][nBin]
138 std::vector<std::vector<double>> fvCPTOffYBinWidth; //[nSMT][nRpc]
139 std::vector<std::vector<double>> fvCPTOffYRange; //[nSMT][nRpc]
140
141 std::vector<uint32_t> fvDeadStrips; //[nbDet]
142
143 // Calib
144 int32_t fCalMode;
145 uint32_t fRunId{0};
146
148 double fTotMax;
149 double fTotMin;
150 double fTotOff;
151 double fTotMean;
154
155 TString fCalParFileName; // name of the file name with Calibration Parameters
156 std::string fsRecoParOutputDir = "."; // name of the output parameter directory
157
158 double fdTOTMax;
159 double fdTOTMin;
161
162 double fdMaxTimeDist; // Isn't this just a local variable? Why make it global and preset?!?
163 double fdMaxSpaceDist; // Isn't this just a local variable? Why make it global and preset?!?
165
167
169};
170
171#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
static constexpr int kBmonAssignedSide
An RPC side, assigned to BMON diamonds.
uint32_t fRunId
Run identifier (for output names)
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 InitAlgosBmon()
Creates hit-finding and calibration parameters for BMON diamonds.
bool InitParameters()
Initialize other parameters not included in parameter classes.
bool InitAlgosTof()
Create one algo object for each TOF RPC.
static constexpr int kBmonAssignedSmType
A SmType, assigned to BMON diamonds.
std::vector< std::vector< double > > fvCPTOffYBinWidth
ClassDef(CbmTaskTofClusterizerParWrite, 1)
std::vector< std::vector< std::vector< std::vector< double > > > > fvCPTotGain
void SetRecoParOutputDir(const std::string &dirname)
Sets a path to the hitfinder configuration file.
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.