Skip to content

Commit 30eb310

Browse files
Merge branch 'AliceO2Group:dev' into dev
2 parents 5734b33 + a657810 commit 30eb310

File tree

24 files changed

+404
-291
lines changed

24 files changed

+404
-291
lines changed

Common/Constants/include/CommonConstants/PhysicsConstants.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ namespace o2::constants::physics
3131
/// \note Follow kCamelCase naming convention
3232
/// \link https://root.cern/doc/master/TPDGCode_8h.html
3333
enum Pdg {
34+
kEta = 221,
35+
kOmega = 223,
36+
kEtaPrime = 331,
3437
kB0 = 511,
3538
kB0Bar = -511,
3639
kBPlus = 521,
@@ -93,6 +96,9 @@ enum Pdg {
9396
};
9497

9598
/// \brief Declarations of masses for additional particles
99+
constexpr double MassEta = 0.547862;
100+
constexpr double MassOmega = 0.78266;
101+
constexpr double MassEtaPrime = 0.95778;
96102
constexpr double MassB0 = 5.27966;
97103
constexpr double MassB0Bar = 5.27966;
98104
constexpr double MassBPlus = 5.27934;

Common/Constants/include/CommonConstants/make_pdg_header.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class PdgROOT(Enum):
8686

8787
# Enum of additional particles
8888
class Pdg(Enum):
89+
kEta = 221
90+
kOmega = 223
91+
kEtaPrime = 331
8992
kB0 = 511
9093
kB0Bar = -511
9194
kBPlus = 521

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackParametrization.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ constexpr float MaxPT = 100000.; // do not allow pTs exceeding
119119
constexpr float MinPTInv = 1. / MaxPT; // do not allow q/pTs less this value (to avoid NANs)
120120
constexpr float ELoss2EKinThreshInv = 1. / 0.025; // do not allow E.Loss correction step with dE/Ekin above the inverse of this value
121121
constexpr int MaxELossIter = 50; // max number of iteration for the ELoss to account for BB dependence on beta*gamma
122+
constexpr float DefaultDCA = 999.f; // default DCA value
123+
constexpr float DefaultDCACov = 999.f; // default DCA cov value
124+
122125
// uncomment this to enable correction for BB dependence on beta*gamma via BB derivative
123126
// #define _BB_NONCONST_CORR_
124127

DataFormats/Reconstruction/src/TrackParametrization.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ GPUd() bool TrackParametrization<value_T>::propagateParamToDCA(const math_utils:
378378
// Estimate the impact parameter neglecting the track curvature
379379
value_t d = gpu::CAMath::Abs(x * snp - y * csp);
380380
if (d > maxD) {
381+
if (dca) { // provide default DCA for failed propag
382+
(*dca)[0] = o2::track::DefaultDCA;
383+
(*dca)[1] = o2::track::DefaultDCA;
384+
}
381385
return false;
382386
}
383387
value_t crv = getCurvature(b);
@@ -399,6 +403,10 @@ GPUd() bool TrackParametrization<value_T>::propagateParamToDCA(const math_utils:
399403
#else
400404
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex " << vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z();
401405
#endif
406+
if (dca) { // provide default DCA for failed propag
407+
(*dca)[0] = o2::track::DefaultDCA;
408+
(*dca)[1] = o2::track::DefaultDCA;
409+
}
402410
return false;
403411
}
404412
*this = tmpT;

DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateToDCA(const o2::dat
227227
// Estimate the impact parameter neglecting the track curvature
228228
value_t d = gpu::CAMath::Abs(x * snp - y * csp);
229229
if (d > maxD) {
230+
if (dca) { // provide default DCA for failed propag
231+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
232+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
233+
}
230234
return false;
231235
}
232236
value_t crv = this->getCurvature(b);
@@ -245,6 +249,10 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateToDCA(const o2::dat
245249
#if !defined(GPUCA_ALIGPUCODE)
246250
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: " << tmpT.asString();
247251
#endif
252+
if (dca) { // provide default DCA for failed propag
253+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
254+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
255+
}
248256
return false;
249257
}
250258
*this = tmpT;

Detectors/Base/src/Propagator.cxx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const o2::dataformats::Verte
564564
// Estimate the impact parameter neglecting the track curvature
565565
value_type d = math_utils::detail::abs<value_type>(x * snp - y * csp);
566566
if (d > maxD) {
567+
if (dca) { // provide default DCA for failed propag
568+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
569+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
570+
}
567571
return false;
568572
}
569573
value_type crv = track.getCurvature(bZ);
@@ -584,6 +588,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const o2::dataformats::Verte
584588
#elif !defined(GPUCA_NO_FMT)
585589
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx;
586590
#endif
591+
if (dca) { // provide default DCA for failed propag
592+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
593+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
594+
}
587595
return false;
588596
}
589597
track = tmpT;
@@ -613,6 +621,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const o2::dataformats:
613621
// Estimate the impact parameter neglecting the track curvature
614622
value_type d = math_utils::detail::abs<value_type>(x * snp - y * csp);
615623
if (d > maxD) {
624+
if (dca) { // provide default DCA for failed propag
625+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
626+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
627+
}
616628
return false;
617629
}
618630
value_type crv = track.getCurvature(mNominalBz);
@@ -633,6 +645,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const o2::dataformats:
633645
#elif !defined(GPUCA_NO_FMT)
634646
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx;
635647
#endif
648+
if (dca) { // provide default DCA for failed propag
649+
dca->set(o2::track::DefaultDCA, o2::track::DefaultDCA,
650+
o2::track::DefaultDCACov, o2::track::DefaultDCACov, o2::track::DefaultDCACov);
651+
}
636652
return false;
637653
}
638654
track = tmpT;
@@ -662,6 +678,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const math_utils::Point3D<va
662678
// Estimate the impact parameter neglecting the track curvature
663679
value_type d = math_utils::detail::abs<value_type>(x * snp - y * csp);
664680
if (d > maxD) {
681+
if (dca) { // provide default DCA for failed propag
682+
(*dca)[0] = o2::track::DefaultDCA;
683+
(*dca)[1] = o2::track::DefaultDCA;
684+
}
665685
return false;
666686
}
667687
value_type crv = track.getCurvature(bZ);
@@ -683,6 +703,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const math_utils::Point3D<va
683703
#else
684704
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex " << vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z();
685705
#endif
706+
if (dca) { // provide default DCA for failed propag
707+
(*dca)[0] = o2::track::DefaultDCA;
708+
(*dca)[1] = o2::track::DefaultDCA;
709+
}
686710
return false;
687711
}
688712
track = tmpT;
@@ -710,6 +734,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const math_utils::Poin
710734
// Estimate the impact parameter neglecting the track curvature
711735
value_type d = math_utils::detail::abs<value_type>(x * snp - y * csp);
712736
if (d > maxD) {
737+
if (dca) { // provide default DCA for failed propag
738+
(*dca)[0] = o2::track::DefaultDCA;
739+
(*dca)[1] = o2::track::DefaultDCA;
740+
}
713741
return false;
714742
}
715743
value_type crv = track.getCurvature(mNominalBz);
@@ -731,6 +759,10 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const math_utils::Poin
731759
#else
732760
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex " << vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z();
733761
#endif
762+
if (dca) { // provide default DCA for failed propag
763+
(*dca)[0] = o2::track::DefaultDCA;
764+
(*dca)[1] = o2::track::DefaultDCA;
765+
}
734766
return false;
735767
}
736768
track = tmpT;

Detectors/ITSMFT/ITS/base/include/ITSBase/GeometryTGeo.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,6 @@ class GeometryTGeo : public o2::itsmft::GeometryTGeo
333333
/// Sym name of the chip in the given layer/halfbarrel/stave/substave/module
334334
static const char* composeSymNameChip(int lr, int hba, int sta, int ssta, int mod, int chip, bool isITS3 = false);
335335

336-
// create matrix for transformation from tracking frame to local one for ITS3
337-
const Mat3D getT2LMatrixITS3(int isn, float alpha);
338-
339336
TString getMatrixPath(int index) const;
340337

341338
/// Get the transformation matrix of the SENSOR (not necessary the same as the chip)

Detectors/ITSMFT/ITS/base/src/GeometryTGeo.cxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -899,19 +899,6 @@ TGeoHMatrix& GeometryTGeo::createT2LMatrix(int isn)
899899
return t2l;
900900
}
901901

902-
//__________________________________________________________________________
903-
const o2::math_utils::Transform3D GeometryTGeo::getT2LMatrixITS3(int isn, float alpha)
904-
{
905-
// create for sensor isn the TGeo matrix for Tracking to Local frame transformations with correction for effective thickness
906-
static TGeoHMatrix t2l;
907-
t2l.Clear();
908-
t2l.RotateZ(alpha * RadToDeg()); // rotate in direction of normal to the tangent to the cylinder
909-
const TGeoHMatrix& matL2G = getMatrixL2G(isn);
910-
const auto& matL2Gi = matL2G.Inverse();
911-
t2l.MultiplyLeft(&matL2Gi);
912-
return Mat3D(t2l);
913-
}
914-
915902
//__________________________________________________________________________
916903
int GeometryTGeo::extractVolumeCopy(const char* name, const char* prefix) const
917904
{

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/SegmentationChip.h

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ class SegmentationChip
3535
// The "detector coordinate system" refers to the hit position in row,col inside the sensor
3636
// This class provides the transformations from the local and detector coordinate systems
3737
// The conversion between global and local coordinate systems is operated by the transformation matrices
38-
// For the curved VD layers there exist three coordinate systems and one is transient.
38+
// For the curved VD layers there exist four coordinate systems.
3939
// 1. The global (curved) coordinate system. The chip's center of coordinate system is
4040
// defined at the the mid-point of the detector.
41-
// 2. The local (flat) coordinate system. This is the tube segment projected onto a flat
42-
// surface. In the projection we implicitly assume that the inner and outer
43-
// stretch does not depend on the radius.
44-
// 3. The detector coordinate system. Defined by the row and column segmentation
45-
// defined at the upper edge in the flat coord.
41+
// 2. The local (curved) coordinate system, centered in 0,0,0.
42+
// 3. The local (flat) coordinate system. This is the tube segment projected onto a flat
43+
// surface, centered in the middle of the chip, with the y axis pointing towards the interaction point.
44+
// In the projection we implicitly assume that the inner and outer stretch does not depend on the radius.
45+
// 4. The detector coordinate system. Defined by the row and column segmentation.
4646
// For the flat ML and OT layers, there exist two coordinate systems:
4747
// 1. The global (flat) coordinate system. The chip's center of coordinate system is
4848
// defined at the the mid-point of the detector.
49-
// 2. The detector coordinate system. Defined by the row and column segmentation
49+
// 2. The detector coordinate system. Defined by the row and column segmentation.
5050
// TODO: add segmentation for VD disks
5151

5252
public:
@@ -121,15 +121,20 @@ class SegmentationChip
121121
pitchCol = PitchColMLOT;
122122
maxWidth = constants::ML::width;
123123
maxLength = constants::ML::length;
124-
} else if (subDetID == 1 && layer >= 4) { // OT
124+
} else if (subDetID == 1 && layer == 4) { // ML/OT (mixed layer, length = ML but staggered as OT)
125125
pitchRow = PitchRowMLOT;
126126
pitchCol = PitchColMLOT;
127-
maxWidth = constants::OT::width;
128-
maxLength = constants::OT::length;
127+
maxWidth = constants::OT::halfstave::width;
128+
maxLength = constants::ML::length;
129+
} else if (subDetID == 1 && layer > 4) { // OT
130+
pitchRow = PitchRowMLOT;
131+
pitchCol = PitchColMLOT;
132+
maxWidth = constants::OT::halfstave::width;
133+
maxLength = constants::OT::halfstave::length;
129134
}
130135
// convert to row/col
131-
iRow = static_cast<int>(std::floor((maxWidth / 2 - xRow) / pitchRow));
132-
iCol = static_cast<int>(std::floor((zCol + maxLength / 2) / pitchCol));
136+
iRow = static_cast<int>(((maxWidth / 2 - xRow) / pitchRow));
137+
iCol = static_cast<int>(((zCol + maxLength / 2) / pitchCol));
133138
};
134139

135140
// Check local coordinates (cm) validity.
@@ -143,9 +148,12 @@ class SegmentationChip
143148
} else if (subDetID == 1 && layer <= 3) { // ML
144149
maxWidth = constants::ML::width;
145150
maxLength = constants::ML::length;
146-
} else if (subDetID == 1 && layer >= 4) { // OT
147-
maxWidth = constants::OT::width;
148-
maxLength = constants::OT::length;
151+
} else if (subDetID == 1 && layer == 4) { // ML/OT (mixed layer, length = ML but staggered as OT)
152+
maxWidth = constants::OT::halfstave::width;
153+
maxLength = constants::ML::length;
154+
} else if (subDetID == 1 && layer > 4) { // OT
155+
maxWidth = constants::OT::halfstave::width;
156+
maxLength = constants::OT::halfstave::length;
149157
}
150158
return (-maxWidth / 2 < x && x < maxWidth / 2 && -maxLength / 2 < z && z < maxLength / 2);
151159
}
@@ -162,9 +170,12 @@ class SegmentationChip
162170
} else if (subDetID == 1 && layer <= 3) { // ML
163171
nRows = constants::ML::nRows;
164172
nCols = constants::ML::nCols;
165-
} else if (subDetID == 1 && layer >= 4) { // OT
166-
nRows = constants::OT::nRows;
167-
nCols = constants::OT::nCols;
173+
} else if (subDetID == 1 && layer == 4) { // ML/OT (mixed layer, length = ML but staggered as OT)
174+
nRows = constants::OT::halfstave::nRows;
175+
nCols = constants::ML::nCols;
176+
} else if (subDetID == 1 && layer > 4) { // OT
177+
nRows = constants::OT::halfstave::nRows;
178+
nCols = constants::OT::halfstave::nCols;
168179
}
169180
return (row >= 0 && row < static_cast<float>(nRows) && col >= 0 && col < static_cast<float>(nCols));
170181
}
@@ -210,9 +221,12 @@ class SegmentationChip
210221
} else if (subDetID == 1 && layer <= 3) { // ML
211222
xRow = 0.5 * (constants::ML::width - PitchRowMLOT) - (row * PitchRowMLOT);
212223
zCol = col * PitchRowMLOT + 0.5 * (PitchRowMLOT - constants::ML::length);
213-
} else if (subDetID == 1 && layer >= 4) { // OT
214-
xRow = 0.5 * (constants::OT::width - PitchRowMLOT) - (row * PitchRowMLOT);
215-
zCol = col * PitchColMLOT + 0.5 * (PitchColMLOT - constants::OT::length);
224+
} else if (subDetID == 1 && layer == 4) { // ML/OT (mixed layer, length = ML but staggered as OT)
225+
xRow = 0.5 * (constants::OT::halfstave::width - PitchRowMLOT) - (row * PitchRowMLOT);
226+
zCol = col * PitchRowMLOT + 0.5 * (PitchRowMLOT - constants::ML::length);
227+
} else if (subDetID == 1 && layer > 4) { // OT
228+
xRow = 0.5 * (constants::OT::halfstave::width - PitchRowMLOT) - (row * PitchRowMLOT);
229+
zCol = col * PitchColMLOT + 0.5 * (PitchColMLOT - constants::OT::halfstave::length);
216230
}
217231
}
218232

@@ -263,17 +277,25 @@ class SegmentationChip
263277
}
264278

265279
/// Print segmentation info
266-
static const void Print() noexcept
280+
static void Print() noexcept
267281
{
268282
LOG(info) << "Number of rows:\nVD L0: " << constants::VD::petal::layer::nRows[0]
269283
<< "\nVD L1: " << constants::VD::petal::layer::nRows[1]
270284
<< "\nVD L2: " << constants::VD::petal::layer::nRows[2]
271285
<< "\nML stave: " << constants::ML::nRows
272-
<< "\nOT stave: " << constants::OT::nRows;
286+
<< "\nOT half stave: " << constants::OT::halfstave::nRows;
273287

274288
LOG(info) << "Number of cols:\nVD: " << constants::VD::petal::layer::nCols
275289
<< "\nML stave: " << constants::ML::nCols
276-
<< "\nOT stave: " << constants::OT::nCols;
290+
<< "\nOT half stave: " << constants::OT::halfstave::nCols;
291+
292+
LOG(info) << "Pitch rows [cm]:\nVD: " << PitchRowVD
293+
<< "\nML stave: " << PitchRowMLOT
294+
<< "\nOT stave: " << PitchRowMLOT;
295+
296+
LOG(info) << "Pitch cols [cm]:\nVD: " << PitchColVD
297+
<< "\nML stave: " << PitchColMLOT
298+
<< "\nOT stave: " << PitchColMLOT;
277299
}
278300
};
279301

Detectors/Upgrades/ALICE3/TRK/base/include/TRKBase/Specs.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,25 @@ constexpr int nCols{static_cast<int>(length / chip::pitchZ)};
102102

103103
namespace ML
104104
{
105-
constexpr double width{constants::moduleMLOT::width * 1}; // width of the stave
106-
constexpr double length{constants::moduleMLOT::length * 10}; // length of the stave
105+
constexpr double width{constants::moduleMLOT::width * 1}; // width of the stave
106+
// constexpr double length{constants::moduleMLOT::length * 10}; // length of the stave
107+
constexpr double length{124 * cm}; // length of the stave, hardcoded to fit the implemented geometry
107108
constexpr int nRows{static_cast<int>(width / constants::moduleMLOT::chip::pitchX)}; // number of rows in the stave
108109
constexpr int nCols{static_cast<int>(length / constants::moduleMLOT::chip::pitchZ)}; // number of columns in the stave
109110
} // namespace ML
110111

111112
namespace OT
112-
{ //// TODO: add shorter lenght of the stave of L4
113-
constexpr double width{moduleMLOT::width * 2}; // width of the stave
114-
constexpr double length{moduleMLOT::length * 20}; // length of the stave
113+
{
114+
namespace halfstave
115+
{
116+
constexpr double width{moduleMLOT::width * 1}; // width of the half stave
117+
// constexpr double length{moduleMLOT::length * 20}; // length of the halfstave
118+
constexpr double length{258 * cm}; // length of the halfstave, hardcoded to fit the implemented geometry
119+
constexpr int nRows{static_cast<int>(width / moduleMLOT::chip::pitchX)}; // number of rows in the halfstave
120+
constexpr int nCols{static_cast<int>(length / moduleMLOT::chip::pitchZ)}; // number of columns in the halfstave
121+
} // namespace halfstave
122+
constexpr double width{halfstave::width * 2}; // width of the stave
123+
constexpr double length{halfstave::length}; // length of the stave
115124
constexpr int nRows{static_cast<int>(width / moduleMLOT::chip::pitchX)}; // number of rows in the stave
116125
constexpr int nCols{static_cast<int>(length / moduleMLOT::chip::pitchZ)}; // number of columns in the stave
117126
} // namespace OT

0 commit comments

Comments
 (0)