Skip to content

Commit 7341b0e

Browse files
authored
Merge 7044ca3 into sapling-pr-archive-ktf
2 parents d0c7ae0 + 7044ca3 commit 7341b0e

File tree

28 files changed

+520
-252
lines changed

28 files changed

+520
-252
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/ITS3/base/include/ITS3Base/SpecsV2.h

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
// color: for visulisation
2929
namespace o2::its3::constants
3030
{
31-
constexpr double cm{1e+2}; // This is the default unit of TGeo so we use this as scale
32-
constexpr double mu{1e-6 * cm};
33-
constexpr double mm{1e-3 * cm};
31+
constexpr double cm{1.0}; // This is the default unit of TGeo so we use this as scale
32+
constexpr double mu{1e-4 * cm};
33+
constexpr double mm{1e-1 * cm};
3434
namespace pixelarray
3535
{
3636
constexpr double width{9.197 * mm};
@@ -102,13 +102,14 @@ constexpr double lengthSensitive{nRSUs * rsu::length};
102102
namespace carbonfoam
103103
{
104104
// TODO: Waiting for the further information from WP5(Corrado)
105-
constexpr double longeronsWidth{2.0 * mm}; // what is the height of the longerons?
106-
constexpr double longeronsLength{263 * mm}; // from blueprint
107105
constexpr double HringLength{6.0 * mm}; // from blueprint
106+
constexpr double longeronsWidth{2.0 * mm}; // what is the height of the longerons?
107+
constexpr double longeronsLength{segment::length - 2 * HringLength}; // 263mm from blueprint; overrriden to be consitent
108108
constexpr double edgeBetwChipAndFoam{1.0 * mm}; // from blueprint but not used cause forms are already overlapping
109109
constexpr double gapBetwHringsLongerons{0.05 * mm}; // from blueprint
110110
constexpr std::array<int, 3> nHoles{11, 11, 11}; // how many holes for each layer?
111-
constexpr std::array<double, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // what is the radius of the holes for each layer?
111+
constexpr std::array<double, 3> radiusHoles{1.0 * mm, 1.0 * mm, 2.0 * mm}; // TODO what is the radius of the holes for each layer?
112+
constexpr double thicknessOuterFoam{7 * mm}; // TODO: lack of carbon foam radius for layer 2, use 0.7 cm as a temporary value
112113
constexpr EColor color{kGray};
113114
} // namespace carbonfoam
114115
namespace metalstack
@@ -212,6 +213,18 @@ inline bool isDetITS3(T detID)
212213
}
213214

214215
} // namespace detID
216+
217+
// services
218+
namespace services
219+
{
220+
// FIXME these value are hallucinated since this not yet defined
221+
constexpr double thickness{2.2 * mm}; // thickness of structure
222+
constexpr double radiusInner{radiiOuter[2] + carbonfoam::thicknessOuterFoam}; // inner radius of services
223+
constexpr double radiusOuter{radiusInner + thickness}; // outer radius of services
224+
constexpr double length{20 * cm}; // length
225+
constexpr EColor color{kBlue};
226+
} // namespace services
227+
215228
} // namespace o2::its3::constants
216229

217230
#endif

Detectors/Upgrades/ITS3/macros/align/CheckResidualsITS3.C

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,11 @@ std::optional<Cluster> propagateTo(Track& trk, const o2::itsmft::CompClusterExt&
6666
++cTotal;
6767
auto chipID = clus.getSensorID();
6868
float sigmaY2{0}, sigmaZ2{0}, sigmaYZ{0};
69+
auto isITS3 = o2::its3::constants::detID::isDetITS3(chipID);
6970
const float alpha = o2::its::GeometryTGeo::Instance()->getSensorRefAlpha(clus.getSensorID()); // alpha for the tracking frame
7071
const auto locC = o2::its3::ioutils::extractClusterData(clus, pattIt, mDict, sigmaY2, sigmaZ2); // get cluster in sensor local frame with errors
71-
Point3D trkC;
72-
auto isITS3 = o2::its3::constants::detID::isDetITS3(chipID);
73-
if (isITS3) {
74-
trkC = o2::its::GeometryTGeo::Instance()->getT2LMatrixITS3(chipID, alpha) ^ (locC); // cluster position in the tracking frame
75-
} else {
76-
trkC = o2::its::GeometryTGeo::Instance()->getMatrixT2L(chipID) ^ (locC); // cluster position in the tracking frame
77-
}
78-
const auto gloC = o2::its::GeometryTGeo::Instance()->getMatrixL2G(chipID)(locC); // global cluster position
72+
Point3D trkC = o2::its::GeometryTGeo::Instance()->getMatrixT2L(chipID) ^ (locC); // cluster position in the tracking frame
73+
const auto gloC = o2::its::GeometryTGeo::Instance()->getMatrixL2G(chipID)(locC); // global cluster position
7974
const auto bz = o2::base::Propagator::Instance()->getNominalBz();
8075

8176
// rotate the parameters to the tracking frame then propagate to the clusters'x

0 commit comments

Comments
 (0)