Skip to content

Commit 92d8127

Browse files
committed
Revert "[IOTOF] Update in the TOF digitization (AliceO2Group#15493)"
This reverts commit 323df58.
1 parent 27d833f commit 92d8127

28 files changed

Lines changed: 47 additions & 1331 deletions

Detectors/Upgrades/ALICE3/IOTOF/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
add_subdirectory(base)
1313
add_subdirectory(simulation)
1414
add_subdirectory(DataFormatsIOTOF)
15-
add_subdirectory(workflow)
1615
add_subdirectory(macros)

Detectors/Upgrades/ALICE3/IOTOF/DataFormatsIOTOF/include/DataFormatsIOTOF/Digit.h

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
#ifndef ALICEO2_IOTOF_DIGIT_H
2020
#define ALICEO2_IOTOF_DIGIT_H
2121

22-
#include "SimulationDataFormat/MCCompLabel.h"
2322
#include "DataFormatsITSMFT/Digit.h"
2423

2524
namespace o2::iotof
2625
{
2726
class Digit : public o2::itsmft::Digit
2827
{
2928
public:
29+
Digit() = default;
3030
~Digit() = default;
3131
Digit(UShort_t chipindex = 0, UShort_t row = 0, UShort_t col = 0, Int_t charge = 0, double time = 0.)
3232
: o2::itsmft::Digit(chipindex, row, col, charge), mTime(time) {};
@@ -37,39 +37,10 @@ class Digit : public o2::itsmft::Digit
3737
// Getters
3838
double getTime() const { return mTime; }
3939

40-
static UInt_t getOrderingKey(UShort_t chipindex, UShort_t row, UShort_t col)
41-
{
42-
return (static_cast<UInt_t>(chipindex) << 16) | (static_cast<UInt_t>(row) << 8) | static_cast<UInt_t>(col);
43-
}
44-
4540
private:
4641
double mTime = 0.; ///< Measured time (ns)
4742
ClassDefNV(Digit, 1);
4843
};
4944

50-
// McLabelRef is used to store the MC label of the hit contributing to a digit, and eventually link to extra contributions to the same pixel
51-
struct McLabelRef {
52-
o2::MCCompLabel mLabel; ///< hit label
53-
int mNext = -1; ///< eventual next contribution to the same pixel
54-
McLabelRef(o2::MCCompLabel label = 0, int next = -1) : mLabel(label), mNext(next) {}
55-
56-
ClassDefNV(McLabelRef, 1);
57-
};
58-
59-
class LabeledDigit : public Digit
60-
{
61-
public:
62-
LabeledDigit(UShort_t chipindex = 0, UShort_t row = 0, UShort_t col = 0, Int_t charge = 0, double time = 0.,
63-
o2::MCCompLabel label = 0)
64-
: Digit(chipindex, row, col, charge, time), mLabel(label) {}
65-
66-
void setLabel(McLabelRef label) { mLabel = label; }
67-
McLabelRef getLabel() const { return mLabel; }
68-
69-
private:
70-
McLabelRef mLabel; ///< label of the hit contributing to the digit, and eventually reference to extra contributions to the same pixel
71-
ClassDefNV(LabeledDigit, 1);
72-
};
73-
7445
} // namespace o2::iotof
7546
#endif // ALICEO2_IOTOF_DIGIT_H

Detectors/Upgrades/ALICE3/IOTOF/DataFormatsIOTOF/src/DataFormatsIOTOFLinkDef.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,5 @@
1616
#pragma link off all functions;
1717

1818
#pragma link C++ class o2::iotof::Digit + ;
19-
#pragma link C++ class std::vector < o2::iotof::Digit> + ;
20-
21-
#pragma link C++ class o2::iotof::McLabelRef + ;
22-
#pragma link C++ class std::vector < o2::iotof::McLabelRef> + ;
23-
24-
#pragma link C++ class o2::iotof::LabeledDigit + ;
25-
#pragma link C++ class std::vector < o2::iotof::LabeledDigit> + ;
26-
19+
// #pragma link C++ class std::vector < o2::iotof::Digit> + ;
2720
#endif

Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/GeometryTGeo.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
2323
{
2424
public:
2525
using DetMatrixCache::getMatrixL2G;
26-
using DetMatrixCache::getMatrixT2L;
2726

2827
GeometryTGeo(bool build = false, int loadTrans = 0);
2928
void Build(int loadTrans);
@@ -34,29 +33,25 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
3433
static const char* getIOTOFVolPattern() { return sIOTOFVolumeName.c_str(); }
3534

3635
// Inner TOF
37-
const int getITOFNumberOfChips() { return mNumberOfChipsIOTOF[0]; }
3836
static const char* getITOFLayerPattern() { return sITOFLayerName.c_str(); }
3937
static const char* getITOFStavePattern() { return sITOFStaveName.c_str(); }
4038
static const char* getITOFModulePattern() { return sITOFModuleName.c_str(); }
4139
static const char* getITOFChipPattern() { return sITOFChipName.c_str(); }
4240
static const char* getITOFSensorPattern() { return sITOFSensorName.c_str(); }
4341

4442
// Outer TOF
45-
const int getOTOFNumberOfChips() { return mNumberOfChipsIOTOF[1]; }
4643
static const char* getOTOFLayerPattern() { return sOTOFLayerName.c_str(); }
4744
static const char* getOTOFStavePattern() { return sOTOFStaveName.c_str(); }
4845
static const char* getOTOFModulePattern() { return sOTOFModuleName.c_str(); }
4946
static const char* getOTOFChipPattern() { return sOTOFChipName.c_str(); }
5047
static const char* getOTOFSensorPattern() { return sOTOFSensorName.c_str(); }
5148

5249
// Forward TOF
53-
const int getFTOFNumberOfChips() { return mNumberOfChipsFTOF; }
5450
static const char* getFTOFLayerPattern() { return sFTOFLayerName.c_str(); }
5551
static const char* getFTOFChipPattern() { return sFTOFChipName.c_str(); }
5652
static const char* getFTOFSensorPattern() { return sFTOFSensorName.c_str(); }
5753

5854
// Backward TOF
59-
const int getBTOFNumberOfChips() { return mNumberOfChipsBTOF; }
6055
static const char* getBTOFLayerPattern() { return sBTOFLayerName.c_str(); }
6156
static const char* getBTOFChipPattern() { return sBTOFChipName.c_str(); }
6257
static const char* getBTOFSensorPattern() { return sBTOFSensorName.c_str(); }
@@ -95,31 +90,8 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
9590
/// for a given chip 'index' by querying the TGeoManager
9691
TGeoHMatrix* extractMatrixSensor(int index) const;
9792

98-
// sensor ref X and alpha
99-
void extractSensorXAlpha(int, float&, float&);
100-
101-
// create matrix for tracking to local frame for IOTOF
102-
TGeoHMatrix& createT2LMatrix(int);
103-
10493
TString getMatrixPath(int index) const;
10594

106-
// cache for tracking frames
107-
void defineSensors();
108-
bool isTrackingFrameCached() const { return !mCacheRefX.empty(); }
109-
void fillTrackingFramesCache();
110-
111-
float getSensorRefAlpha(int chipId) const
112-
{
113-
const int local = chipId;
114-
return mCacheRefAlpha[local];
115-
}
116-
117-
float getSensorX(int chipId) const
118-
{
119-
const int local = chipId;
120-
return mCacheRefX[local];
121-
}
122-
12395
protected:
12496
// Determine the number of active parts in the geometry
12597
int extractNumberOfStavesIOTOF(int lay) const;
@@ -169,10 +141,6 @@ class GeometryTGeo : public o2::detectors::DetMatrixCache
169141
// Backward TOF
170142
int mNumberOfChipsBTOF;
171143

172-
std::vector<int> sensors;
173-
std::vector<float> mCacheRefX; /// cache for X of IOTOF
174-
std::vector<float> mCacheRefAlpha; /// cache for sensor ref alpha IOTOF
175-
176144
private:
177145
static std::unique_ptr<o2::iotof::GeometryTGeo> sInstance;
178146
};

Detectors/Upgrades/ALICE3/IOTOF/base/include/IOTOFBase/IOTOFBaseParam.h

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,6 @@ struct ChipSpecifics {
3838
float SensorSizeRows() const { return ActiveMatrixSizeRows() + PassiveEdgeTop + PassiveEdgeReadOut; }
3939
};
4040

41-
struct ITOFChipSpecifics : ChipSpecifics {
42-
ITOFChipSpecifics()
43-
{
44-
NCols = 258;
45-
NRows = 271;
46-
PitchCol = 250.00e-4;
47-
PitchRow = 100.00e-4;
48-
SensorLayerThicknessEff = 50.e-4;
49-
SensorLayerThickness = 50.e-4;
50-
}
51-
};
52-
53-
struct OTOFChipSpecifics : ChipSpecifics {
54-
OTOFChipSpecifics()
55-
{
56-
NCols = 517;
57-
NRows = 243;
58-
PitchCol = 250.00e-4;
59-
PitchRow = 100.00e-4;
60-
PassiveEdgeSide = 106.48e-4;
61-
SensorLayerThicknessEff = 50.e-4;
62-
SensorLayerThickness = 50.e-4;
63-
}
64-
};
65-
66-
struct ITOFChipSpecificParam : public o2::conf::ConfigurableParamPromoter<ITOFChipSpecificParam, ITOFChipSpecifics> {
67-
O2ParamDef(ITOFChipSpecificParam, "ITOFChipSpecific");
68-
};
69-
70-
struct OTOFChipSpecificParam : public o2::conf::ConfigurableParamPromoter<OTOFChipSpecificParam, OTOFChipSpecifics> {
71-
O2ParamDef(OTOFChipSpecificParam, "OTOFChipSpecific");
72-
};
73-
7441
struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam> {
7542
bool enableInnerTOF = true; // Enable Inner TOF layer
7643
bool enableOuterTOF = true; // Enable Outer TOF layer
@@ -82,6 +49,9 @@ struct IOTOFBaseParam : public o2::conf::ConfigurableParamHelper<IOTOFBaseParam>
8249
float x2x0 = 0.02f; // thickness expressed in radiation length, for all layers for the moment
8350
float sensorThickness = 0.0050f; // thickness of the sensor in cm, for all layers for the moment, the default is set to 50 microns
8451

52+
ChipSpecifics iTofChipSpecifics{258, 271, 250.00e-4, 100.00e-4, 0.00f, 0.00e-4, 0.00e-4, 50.e-4, 50.e-4};
53+
ChipSpecifics oTofChipSpecifics{251, 487, 250.00e-4, 100.00e-4, 0.00f, 0.00e-4, 106.48e-4, 50.e-4, 50.e-4};
54+
8555
O2ParamDef(IOTOFBaseParam, "IOTOFBase");
8656
};
8757

Detectors/Upgrades/ALICE3/IOTOF/base/src/GeometryTGeo.cxx

Lines changed: 7 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <IOTOFBase/GeometryTGeo.h>
1313
#include <IOTOFBase/IOTOFBaseParam.h>
1414
#include <TGeoManager.h>
15-
#include <TMath.h>
1615

1716
namespace o2
1817
{
@@ -178,26 +177,20 @@ TString GeometryTGeo::getMatrixPath(int index) const
178177

179178
if (lay == 0) {
180179
path += Form("%s_1/", GeometryTGeo::getITOFLayerPattern());
181-
if (mNumberOfStavesIOTOF[lay] > 0) {
180+
if (mNumberOfStavesIOTOF[lay] > 0)
182181
path += Form("%s_%d/", GeometryTGeo::getITOFStavePattern(), sta);
183-
}
184-
if (mNumberOfModulesIOTOF[lay] > 0) {
182+
if (mNumberOfModulesIOTOF[lay] > 0)
185183
path += Form("%s_%d/", GeometryTGeo::getITOFModulePattern(), mod);
186-
}
187-
if (mNumberOfChipsPerModuleIOTOF[lay] > 0) {
184+
if (mNumberOfChipsPerModuleIOTOF[lay] > 0)
188185
path += Form("%s_%d/%s_1", GeometryTGeo::getITOFChipPattern(), chip, GeometryTGeo::getITOFSensorPattern());
189-
}
190186
} else {
191187
path += Form("%s_1/", GeometryTGeo::getOTOFLayerPattern());
192-
if (mNumberOfStavesIOTOF[lay] > 0) {
188+
if (mNumberOfStavesIOTOF[lay] > 0)
193189
path += Form("%s_%d/", GeometryTGeo::getOTOFStavePattern(), sta);
194-
}
195-
if (mNumberOfModulesIOTOF[lay] > 0) {
190+
if (mNumberOfModulesIOTOF[lay] > 0)
196191
path += Form("%s_%d/", GeometryTGeo::getOTOFModulePattern(), mod);
197-
}
198-
if (mNumberOfChipsPerModuleIOTOF[lay] > 0) {
192+
if (mNumberOfChipsPerModuleIOTOF[lay] > 0)
199193
path += Form("%s_%d/%s_1", GeometryTGeo::getOTOFChipPattern(), chip, GeometryTGeo::getOTOFSensorPattern());
200-
}
201194
}
202195

203196
return path;
@@ -268,31 +261,8 @@ void GeometryTGeo::Build(int loadTrans)
268261
LOG(info) << "numberOfChipsITOF = " << mNumberOfChipsIOTOF[0] << ", numberOfChipsOTOF = " << mNumberOfChipsIOTOF[1] << ", numberOfChips = " << numberOfChips << ", mNumberOfChipesPerStaveITOF" << mNumberOfChipsPerStaveIOTOF[0];
269262

270263
setSize(numberOfChips);
271-
defineSensors();
272-
fillTrackingFramesCache();
273264
fillMatrixCache(loadTrans);
274-
// fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
275-
}
276-
277-
void GeometryTGeo::defineSensors()
278-
{
279-
for (int i = 0; i < mSize; i++) {
280-
sensors.push_back(i);
281-
}
282-
}
283-
284-
void GeometryTGeo::fillTrackingFramesCache()
285-
{
286-
// fill for every sensor of IOTOF its tracking frame parameters
287-
if (!isTrackingFrameCached() && !sensors.empty()) {
288-
size_t newSize = sensors.size();
289-
mCacheRefX.resize(newSize);
290-
mCacheRefAlpha.resize(newSize);
291-
for (int i = 0; i < newSize; i++) {
292-
int sensorId = sensors[i];
293-
extractSensorXAlpha(sensorId, mCacheRefX[i], mCacheRefAlpha[i]);
294-
}
295-
}
265+
// fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
296266
}
297267

298268
void GeometryTGeo::fillMatrixCache(int mask)
@@ -303,8 +273,6 @@ void GeometryTGeo::fillMatrixCache(int mask)
303273
return;
304274
}
305275

306-
LOG(debug) << "Filling matrix cache for " << getName() << " with mask " << mask;
307-
308276
if ((mask & o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G)) && !getCacheL2G().isFilled()) {
309277
// Matrices for Local (Sensor!!! rather than the full chip) to Global frame transformation
310278
LOG(info) << "Loading " << getName() << " L2G matrices from TGeo; there are " << mSize << " matrices";
@@ -316,51 +284,6 @@ void GeometryTGeo::fillMatrixCache(int mask)
316284
cacheL2G.setMatrix(o2::math_utils::Transform3D(*hm), i);
317285
}
318286
}
319-
320-
// build T2L matrices for IOTOF
321-
if ((mask & o2::math_utils::bit2Mask(o2::math_utils::TransformType::T2L)) && !getCacheT2L().isFilled()) {
322-
LOGP(info, "Loading {} T2L matrices from TGeo for IOTOF", getName());
323-
if (sensors.size()) {
324-
int m_Size = sensors.size();
325-
auto& cacheT2L = getCacheT2L();
326-
cacheT2L.setSize(m_Size);
327-
for (int i = 0; i < m_Size; i++) {
328-
int sensorID = sensors[i];
329-
TGeoHMatrix& hm = createT2LMatrix(sensorID);
330-
cacheT2L.setMatrix(Mat3D(hm), i);
331-
}
332-
}
333-
}
334-
}
335-
336-
void GeometryTGeo::extractSensorXAlpha(int chipID, float& x, float& alp)
337-
{
338-
double locA[3] = {-100., 0., 0.}, locB[3] = {100., 0., 0.}, gloA[3], gloB[3];
339-
double xp{0}, yp{0};
340-
341-
const TGeoHMatrix* matL2G = extractMatrixSensor(chipID);
342-
matL2G->LocalToMaster(locA, gloA);
343-
matL2G->LocalToMaster(locB, gloB);
344-
double dx = gloB[0] - gloA[0], dy = gloB[1] - gloA[1];
345-
double t = (gloB[0] * dx + gloB[1] * dy) / (dx * dx + dy * dy);
346-
xp = gloB[0] - dx * t;
347-
yp = gloB[1] - dy * t;
348-
349-
alp = std::atan2(yp, xp);
350-
x = std::hypot(xp, yp);
351-
o2::math_utils::bringTo02Pi(alp);
352-
}
353-
354-
TGeoHMatrix& GeometryTGeo::createT2LMatrix(int chipID)
355-
{
356-
static TGeoHMatrix t2l;
357-
t2l.Clear();
358-
float alpha = getSensorRefAlpha(chipID);
359-
t2l.RotateZ(alpha * TMath::RadToDeg());
360-
const TGeoHMatrix* matL2G = extractMatrixSensor(chipID);
361-
const TGeoHMatrix& matL2Gi = matL2G->Inverse();
362-
t2l.MultiplyLeft(&matL2Gi);
363-
return t2l;
364287
}
365288

366289
GeometryTGeo* GeometryTGeo::Instance()

Detectors/Upgrades/ALICE3/IOTOF/base/src/IOTOFBaseParam.cxx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,4 @@
1111

1212
#include "IOTOFBase/IOTOFBaseParam.h"
1313

14-
O2ParamImpl(o2::iotof::IOTOFBaseParam);
15-
O2ParamImpl(o2::iotof::ITOFChipSpecificParam);
16-
O2ParamImpl(o2::iotof::OTOFChipSpecificParam);
14+
O2ParamImpl(o2::iotof::IOTOFBaseParam);

Detectors/Upgrades/ALICE3/IOTOF/simulation/CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,18 @@
1111

1212
o2_add_library(IOTOFSimulation
1313
SOURCES src/Layer.cxx
14-
src/Chip.cxx
1514
src/Detector.cxx
1615
src/Digitizer.cxx
17-
src/DPLDigitizerParam.cxx
18-
#src/IOTOFServices.cxx
19-
src/Segmentation.cxx
16+
# src/IOTOFServices.cxx
17+
src/Segmentation.cxx
2018
PUBLIC_LINK_LIBRARIES O2::IOTOFBase
2119
O2::DataFormatsIOTOF
2220
O2::ITSMFTSimulation)
2321

2422
o2_target_root_dictionary(IOTOFSimulation
2523
HEADERS include/IOTOFSimulation/Detector.h
26-
include/IOTOFSimulation/Chip.h
2724
include/IOTOFSimulation/Layer.h
2825
include/IOTOFSimulation/Digitizer.h
29-
include/IOTOFSimulation/DPLDigitizerParam.h
30-
#include/IOTOFSimulation/IOTOFServices.h
31-
include/IOTOFSimulation/Segmentation.h)
26+
# include/IOTOFSimulation/IOTOFServices.h
27+
include/IOTOFSimulation/Segmentation.h
28+
)

0 commit comments

Comments
 (0)