Skip to content

Commit 505138f

Browse files
committed
Use extra ITS error on the ioutils::convertCompactClusters level
1 parent 7948cd1 commit 505138f

8 files changed

Lines changed: 57 additions & 3 deletions

File tree

Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include "CommonDataFormat/FlatHisto2D.h"
5353
#include "DataFormatsITSMFT/TopologyDictionary.h"
5454
#include "DataFormatsITSMFT/TrkClusRef.h"
55+
#include "ITSMFTReconstruction/ChipMappingITS.h"
5556

5657
class TTree;
5758

@@ -561,6 +562,8 @@ class MatchTPCITS
561562
std::array<int16_t, o2::constants::lhc::LHCMaxBunches> mClosestBunchAbove; // closest filled bunch from above
562563
std::array<int16_t, o2::constants::lhc::LHCMaxBunches> mClosestBunchBelow; // closest filled bunch from below
563564

565+
const o2::itsmft::ChipMappingITS ITSChMap{};
566+
564567
const o2::globaltracking::RecoContainer* mRecoCont = nullptr;
565568
///>>>------ these are input arrays which should not be modified by the matching code
566569
// since this info is provided by external device

Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITSParams.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ struct MatchTPCITSParams : public o2::conf::ConfigurableParamHelper<MatchTPCITSP
6262
int nBinsTglVDriftCalib = 50; ///< number of bins in reference ITS tgl for VDrift calibration
6363
int nBinsDTglVDriftCalib = 100; ///< number of bins in delta tgl for VDrift calibration
6464

65+
float itsIBErrY2 = 0.; ///< systematic error^2 in Y for ITS for IB
66+
float itsIBErrZ2 = 0.; ///< systematic error^2 in Z for ITS for IB
67+
68+
float itsOBErrY2 = 0.; ///< systematic error^2 in Y for ITS for OB
69+
float itsOBErrZ2 = 0.; ///< systematic error^2 in Z for ITS for OB
70+
6571
//___________________ AfterBurner params
6672
int requireToReachLayerAB = 5; ///< AB tracks should reach at least this layer from above
6773
int lowestLayerAB = 0; ///< lowest layer to reach in AfterBurner

Detectors/ITSMFT/ITS/tracking/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ o2_add_library(ITStracking
3333
O2::DataFormatsITSMFT
3434
O2::SimulationDataFormat
3535
O2::ITSBase
36+
O2::ITSMFTReconstruction
3637
O2::DataFormatsITS)
3738

3839
o2_target_root_dictionary(ITStracking

Detectors/ITSMFT/ITS/tracking/include/ITStracking/IOUtils.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
#include "ITStracking/ROframe.h"
2727
#include "ITStracking/Label.h"
2828
#include "ITStracking/Road.h"
29+
#include "ITStracking/TrackingConfigParam.h"
2930
#include "ITSMFTBase/SegmentationAlpide.h"
3031
#include "ReconstructionDataFormats/BaseCluster.h"
32+
#include "ITSMFTReconstruction/ChipMappingITS.h"
3133

3234
namespace o2
3335
{
@@ -68,6 +70,12 @@ void convertCompactClusters(gsl::span<const itsmft::CompClusterExt> clusters,
6870
std::vector<o2::BaseCluster<float>>& output,
6971
const itsmft::TopologyDictionary& dict);
7072

73+
inline static const o2::itsmft::ChipMappingITS& getChipMappingITS()
74+
{
75+
static const o2::itsmft::ChipMappingITS MP;
76+
return MP;
77+
}
78+
7179
std::vector<std::unordered_map<int, Label>> loadLabels(const int, const std::string&);
7280
void writeRoadsReport(std::ofstream&, std::ofstream&, std::ofstream&, const std::vector<std::vector<Road>>&,
7381
const std::unordered_map<int, Label>&);

Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackingConfigParam.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
4040

4141
// Use TGeo for mat. budget
4242
bool useMatCorrTGeo = false;
43-
float misalignment[7] = {-1.f, -1.f, -1.f, -1.f, -1.f, -1.f, -1.f};
43+
float sysErrY2[7] = {0}; // systematic error^2 in Y per layer
44+
float sysErrZ2[7] = {0}; // systematic error^2 in Z per layer
4445
float nSigmaCut = -1.f;
4546
float deltaTanLres = -1.f;
4647
float phiCut = -1.f;
@@ -55,4 +56,4 @@ struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerPara
5556

5657
} // namespace its
5758
} // namespace o2
58-
#endif
59+
#endif

Detectors/ITSMFT/ITS/tracking/src/IOUtils.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ void ioutils::convertCompactClusters(gsl::span<const itsmft::CompClusterExt> clu
5656
const itsmft::TopologyDictionary& dict)
5757
{
5858
GeometryTGeo* geom = GeometryTGeo::Instance();
59+
bool applyMisalignment = false;
60+
const auto& conf = TrackerParamConfig::Instance();
61+
const auto& chmap = getChipMappingITS();
62+
for (int il = 0; il < chmap.NLayers; il++) {
63+
if (conf.sysErrY2[il] > 0.f || conf.sysErrZ2[il] > 0.f) {
64+
applyMisalignment = true;
65+
break;
66+
}
67+
}
68+
5969
for (auto& c : clusters) {
6070
auto pattID = c.getPatternID();
6171
o2::math_utils::Point3D<float> locXYZ;
@@ -74,6 +84,11 @@ void ioutils::convertCompactClusters(gsl::span<const itsmft::CompClusterExt> clu
7484
locXYZ = dict.getClusterCoordinates(c, patt, false);
7585
}
7686
auto& cl3d = output.emplace_back(c.getSensorID(), geom->getMatrixT2L(c.getSensorID()) ^ locXYZ); // local --> tracking
87+
if (applyMisalignment) {
88+
auto lrID = chmap.getLayer(c.getSensorID());
89+
sigmaY2 += conf.sysErrY2[lrID];
90+
sigmaZ2 += conf.sysErrZ2[lrID];
91+
}
7792
cl3d.setErrors(sigmaY2, sigmaZ2, sigmaYZ);
7893
}
7994
}

Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ void Tracker::getGlobalConfiguration()
650650
for (auto& params : mTrkParams) {
651651
if (params.NLayers == 7) {
652652
for (int i{0}; i < 7; ++i) {
653-
params.LayerMisalignment[i] = tc.misalignment[i] > 0 ? tc.misalignment[i] : params.LayerMisalignment[i];
653+
params.LayerMisalignment[i] = tc.sysErrZ2[i] > 0 ? std::sqrt(tc.sysErrZ2[i]) : params.LayerMisalignment[i];
654654
}
655655
}
656656
params.PhiBins = tc.LUTbinsPhi > 0 ? tc.LUTbinsPhi : params.PhiBins;

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/ChipMappingITS.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,20 @@ class ChipMappingITS
229229
return sid + ruOnLr;
230230
}
231231

232+
static constexpr int getLayer(int chipSW)
233+
{
234+
int i = 0;
235+
do {
236+
if (chipSW < FirstChipsOnLr[i]) {
237+
break;
238+
}
239+
} while (++i < NLayers);
240+
return i;
241+
}
242+
243+
static constexpr int getNChipsOnLayer(int lr) { return NChipsOnLr[lr]; }
244+
static constexpr int getFirstChipsOnLayer(int lr) { return FirstChipsOnLr[lr]; }
245+
232246
// sub-barrel types, their number, N layers, Max N GBT Links per RU
233247
static constexpr int IB = 0, MB = 1, OB = 2, NSubB = 3, NLayers = 7, NLinks = 3;
234248

@@ -256,6 +270,12 @@ class ChipMappingITS
256270
///< number of staves per layer
257271
static constexpr std::array<int, NLayers> FirstStaveOnLr = {0, 12, 28, 48, 72, 102, 144};
258272

273+
///< number of chips per layer
274+
static constexpr std::array<int, NLayers> NChipsOnLr = {108, 144, 180, 2688, 3360, 8232, 144};
275+
276+
///< 1st chipID on layer
277+
static constexpr std::array<int, NLayers> FirstChipsOnLr = {0, 108, 252, 432, 3120, 6480, 9408};
278+
259279
///< RU types for each layer
260280
static constexpr std::array<uint8_t, NLayers> RUTypeLr = {IB, IB, IB, MB, MB, OB, OB};
261281

0 commit comments

Comments
 (0)