Skip to content

Commit 58a2013

Browse files
committed
remove TPCITS dependence of other matchers
1 parent 4f7afcc commit 58a2013

File tree

8 files changed

+70
-44
lines changed

8 files changed

+70
-44
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright CERN and copyright holders of ALICE O2. This software is
2+
// distributed under the terms of the GNU General Public License v3 (GPL
3+
// Version 3), copied verbatim in the file "COPYING".
4+
//
5+
// See http://alice-o2.web.cern.ch/license for full licensing information.
6+
//
7+
// In applying this license CERN does not waive the privileges and immunities
8+
// granted to it by virtue of its status as an Intergovernmental Organization
9+
// or submit itself to any jurisdiction.
10+
11+
/// @file GeomConstants.h
12+
/// @brief Some ALICE geometry constants of common interest
13+
14+
/// @author ruben.shahoyan@cern.ch
15+
16+
#ifndef ALICEO2_GEOMCONSTANTS_H_
17+
#define ALICEO2_GEOMCONSTANTS_H_
18+
19+
namespace o2
20+
{
21+
namespace constants
22+
{
23+
namespace geom
24+
{
25+
constexpr float XTPCInnerRef = 83.0; ///< reference radius at which TPC provides the tracks
26+
constexpr float XTPCOuterRef = 255.0; ///< reference radius to propagate outer TPC track
27+
} // namespace geom
28+
} // namespace constants
29+
} // namespace o2
30+
31+
#endif

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackCosmics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// granted to it by virtue of its status as an Intergovernmental Organization
99
// or submit itself to any jurisdiction.
1010

11-
/// \file TrackTPCITS.h
11+
/// \file TrackCosmics.h
1212
/// \brief Result of top-bottom cosmic tracks leg matching
1313
/// \author ruben.shahoyan@cern.ch
1414

Detectors/GlobalTracking/include/GlobalTracking/MatchTPCITS.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,6 @@ class MatchTPCITS
286286
MatchTPCITS(); // std::unique_ptr to forward declared type needs constructor / destructor in .cxx
287287
~MatchTPCITS();
288288

289-
static constexpr float XTPCInnerRef = 83.0; ///< reference radius at which TPC provides the tracks
290-
static constexpr float XTPCOuterRef = 255.0; ///< reference radius to propagate outer TPC track
291289
static constexpr float XMatchingRef = 70.0; ///< reference radius to propage tracks for matching
292290
static constexpr float YMaxAtXMatchingRef = XMatchingRef * 0.17632698; ///< max Y in the sector at reference X
293291

Detectors/GlobalTracking/src/MatchCosmics.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "DetectorsBase/Propagator.h"
2828
#include "TPCReconstruction/TPCFastTransformHelperO2.h"
2929
#include "GlobalTracking/MatchTPCITS.h"
30+
#include "CommonConstants/GeomConstants.h"
3031
#include <algorithm>
3132
#include <numeric>
3233

@@ -207,7 +208,7 @@ void MatchCosmics::refitWinners(const o2::globaltracking::RecoContainer& data)
207208
//
208209
if (gidxListTop[GTrackID::TPC].isIndexSet()) { // outward refit in TPC
209210
float xtogo = 0;
210-
if (!trCosm.getXatLabR(o2::globaltracking::MatchTPCITS::XTPCInnerRef, xtogo, mBz, o2::track::DirOutward) ||
211+
if (!trCosm.getXatLabR(o2::constants::geom::XTPCInnerRef, xtogo, mBz, o2::track::DirOutward) ||
211212
!o2::base::Propagator::Instance()->PropagateToXBxByBz(trCosm, xtogo, mMatchParams->maxSnp, mMatchParams->maxStep, mMatchParams->matCorr)) {
212213
LOG(DEBUG) << "Propagation to inner TPC boundary X=" << xtogo << " failed";
213214
continue;

Detectors/GlobalTracking/src/MatchTOF.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "MathUtils/Utils.h"
2424
#include "CommonConstants/MathConstants.h"
2525
#include "CommonConstants/PhysicsConstants.h"
26+
#include "CommonConstants/GeomConstants.h"
2627
#include "DetectorsBase/GeometryManager.h"
2728

2829
#include <Math/SMatrix.h>
@@ -34,7 +35,6 @@
3435
#include "ReconstructionDataFormats/TrackLTIntegral.h"
3536

3637
#include "GlobalTracking/MatchTOF.h"
37-
#include "GlobalTracking/MatchTPCITS.h"
3838

3939
#include "TPCBase/ParameterGas.h"
4040
#include "TPCBase/ParameterElectronics.h"
@@ -451,7 +451,7 @@ bool MatchTOF::prepareTracks()
451451
auto& trc = mTracksWork.back().first; // with this we take the TPCITS track propagated to the vertex
452452
auto& intLT = mLTinfos.back(); // we get the integrated length from TPC-ITC outward propagation
453453

454-
if (trc.getX() < o2::globaltracking::MatchTPCITS::XTPCOuterRef - 1.) { // tpc-its track outward propagation did not reach outer ref.radius, skip this track
454+
if (trc.getX() < o2::constants::geom::XTPCOuterRef - 1.) { // tpc-its track outward propagation did not reach outer ref.radius, skip this track
455455
nNotPropagatedToTOF++;
456456
continue;
457457
}
@@ -604,8 +604,8 @@ bool MatchTOF::prepareTPCTracks()
604604
continue;
605605
}
606606

607-
if (trc.getX() < o2::globaltracking::MatchTPCITS::XTPCOuterRef - 1.) {
608-
if (!propagateToRefX(trc, o2::globaltracking::MatchTPCITS::XTPCOuterRef, 10, intLT) || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happen that it does not if the propagation without the errors succeeded?
607+
if (trc.getX() < o2::constants::geom::XTPCOuterRef - 1.) {
608+
if (!propagateToRefX(trc, o2::constants::geom::XTPCOuterRef, 10, intLT) || TMath::Abs(trc.getZ()) > Geo::MAXHZTOF) { // we check that the propagation with the cov matrix worked; CHECK: can it happen that it does not if the propagation without the errors succeeded?
609609
nNotPropagatedToTOF++;
610610
continue;
611611
}
@@ -1722,14 +1722,14 @@ bool MatchTOF::makeConstrainedTPCTrack(int matchedID, o2::dataformats::TrackTPCT
17221722
trConstr.setRefMatch(matchedID);
17231723
if (mTPCClusterIdxStruct) { // refit was requested
17241724
float chi2 = 0;
1725-
mTPCRefitter->setTrackReferenceX(o2::globaltracking::MatchTPCITS::XTPCInnerRef);
1725+
mTPCRefitter->setTrackReferenceX(o2::constants::geom::XTPCInnerRef);
17261726
if (mTPCRefitter->RefitTrackAsTrackParCov(trConstr, tpcTrOrig.getClusterRef(), timeTOFTB, &chi2, false, true) < 0) { // outward refit after resetting cov.mat.
17271727
LOG(DEBUG) << "Inward Refit failed";
17281728
return false;
17291729
}
17301730
trConstr.setChi2Refit(chi2);
17311731
//
1732-
mTPCRefitter->setTrackReferenceX(o2::globaltracking::MatchTPCITS::XTPCOuterRef);
1732+
mTPCRefitter->setTrackReferenceX(o2::constants::geom::XTPCOuterRef);
17331733
if (mTPCRefitter->RefitTrackAsTrackParCov(trConstrOut, tpcTrOrig.getClusterRef(), timeTOFTB, &chi2, true, true) < 0) { // outward refit after resetting cov.mat.
17341734
LOG(DEBUG) << "Outward refit failed";
17351735
return false;

Detectors/GlobalTracking/src/MatchTPCITS.cxx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "Field/MagneticField.h"
1818
#include "Field/MagFieldFast.h"
1919
#include "ITSBase/GeometryTGeo.h"
20-
2120
#include "CommonUtils/TreeStream.h"
2221

2322
#include "DataFormatsTPC/Defs.h"
@@ -28,6 +27,7 @@
2827
#include "MathUtils/Utils.h"
2928
#include "CommonConstants/MathConstants.h"
3029
#include "CommonConstants/PhysicsConstants.h"
30+
#include "CommonConstants/GeomConstants.h"
3131
#include "DetectorsBase/GeometryManager.h"
3232

3333
#include <Math/SMatrix.h>
@@ -36,10 +36,10 @@
3636
#include <TGeoGlobalMagField.h>
3737
#include "DataFormatsParameters/GRPObject.h"
3838
#include "SimulationDataFormat/MCTruthContainer.h"
39-
#include "GlobalTracking/MatchTPCITS.h"
4039
#include "TPCReconstruction/TPCFastTransformHelperO2.h"
4140
#include "DetectorsCommonDataFormats/NameConf.h"
4241
#include "ReconstructionDataFormats/Vertex.h"
42+
#include "GlobalTracking/MatchTPCITS.h"
4343

4444
#include "GPUO2Interface.h" // Needed for propper settings in GPUParam.h
4545
#include "GPUParam.inc" // Consider more universal access
@@ -50,8 +50,6 @@ using MatrixDSym4 = ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<doub
5050
using MatrixD4 = ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepStd<double, 4>>;
5151
using NAMES = o2::base::NameConf;
5252

53-
constexpr float MatchTPCITS::XTPCInnerRef;
54-
constexpr float MatchTPCITS::XTPCOuterRef;
5553
constexpr float MatchTPCITS::XMatchingRef;
5654
constexpr float MatchTPCITS::YMaxAtXMatchingRef;
5755
constexpr float MatchTPCITS::Tan70, MatchTPCITS::Cos70I2, MatchTPCITS::MaxSnp, MatchTPCITS::MaxTgp;
@@ -540,7 +538,7 @@ bool MatchTPCITS::prepareTPCTracks()
540538
const auto& trcOrig = mTPCTracksArray[it];
541539

542540
// make sure the track was propagated to inner TPC radius at the ref. radius
543-
if (trcOrig.getX() > XTPCInnerRef + 0.1 || std::abs(trcOrig.getQ2Pt()) > mMinTPCTrackPtInv) {
541+
if (trcOrig.getX() > o2::constants::geom::XTPCInnerRef + 0.1 || std::abs(trcOrig.getQ2Pt()) > mMinTPCTrackPtInv) {
544542
continue;
545543
}
546544
// discard tracks with too few clusters
@@ -1437,7 +1435,7 @@ bool MatchTPCITS::refitTrackTPCITS(int iTPC, int& iITS)
14371435

14381436
{
14391437
float xtogo = 0;
1440-
if (!tracOut.getXatLabR(XTPCInnerRef, xtogo, mBz, o2::track::DirOutward) ||
1438+
if (!tracOut.getXatLabR(o2::constants::geom::XTPCInnerRef, xtogo, mBz, o2::track::DirOutward) ||
14411439
!propagator->PropagateToXBxByBz(tracOut, xtogo, MaxSnp, 10., mUseMatCorrFlag, &tofL)) {
14421440
LOG(DEBUG) << "Propagation to inner TPC boundary X=" << xtogo << " failed, Xtr=" << tracOut.getX() << " snp=" << tracOut.getSnp();
14431441
mMatchedTracks.pop_back(); // destroy failed track
@@ -1467,7 +1465,7 @@ bool MatchTPCITS::refitTrackTPCITS(int iTPC, int& iITS)
14671465
auto lInt = std::sqrt(d2XY + dZ * dZ);
14681466
tofL.addStep(lInt, tracOut.getP2Inv());
14691467
tofL.addX2X0(lInt * mTPCmeanX0Inv);
1470-
propagator->PropagateToXBxByBz(tracOut, XTPCOuterRef, MaxSnp, 10., mUseMatCorrFlag, &tofL);
1468+
propagator->PropagateToXBxByBz(tracOut, o2::constants::geom::XTPCOuterRef, MaxSnp, 10., mUseMatCorrFlag, &tofL);
14711469
/*
14721470
LOG(INFO) << "TPC " << iTPC << " ITS " << iITS << " Refitted with chi2 = " << chi2Out;
14731471
tracOut.print();

Detectors/GlobalTrackingWorkflow/include/GlobalTrackingWorkflow/TPCITSMatchingSpec.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,13 @@
1313
#ifndef O2_MATCHING_TPCITS_SPEC
1414
#define O2_MATCHING_TPCITS_SPEC
1515

16-
#include "GlobalTracking/MatchTPCITS.h"
17-
#include "DataFormatsITSMFT/TopologyDictionary.h"
18-
#include "DataFormatsTPC/Constants.h"
19-
#include "Framework/DataProcessorSpec.h"
20-
#include "Framework/Task.h"
21-
#include <string>
22-
#include <vector>
23-
#include "TStopwatch.h"
2416

2517
using namespace o2::framework;
2618

2719
namespace o2
2820
{
2921
namespace globaltracking
3022
{
31-
32-
class TPCITSMatchingDPL : public Task
33-
{
34-
public:
35-
TPCITSMatchingDPL(bool useFT0, bool calib, bool useMC) : mUseFT0(useFT0), mCalibMode(calib), mUseMC(useMC) {}
36-
~TPCITSMatchingDPL() override = default;
37-
void init(InitContext& ic) final;
38-
void run(ProcessingContext& pc) final;
39-
void endOfStream(framework::EndOfStreamContext& ec) final;
40-
41-
private:
42-
o2::globaltracking::MatchTPCITS mMatching; // matching engine
43-
o2::itsmft::TopologyDictionary mITSDict; // cluster patterns dictionary
44-
bool mUseFT0 = false;
45-
bool mCalibMode = false;
46-
bool mUseMC = true;
47-
TStopwatch mTimer;
48-
};
49-
5023
/// create a processor spec
5124
framework::DataProcessorSpec getTPCITSMatchingSpec(bool useFT0, bool calib, bool useMC);
5225

Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
#include <vector>
1414

15+
#include "GlobalTracking/MatchTPCITS.h"
16+
#include "DataFormatsITSMFT/TopologyDictionary.h"
17+
#include "DataFormatsTPC/Constants.h"
18+
#include "Framework/DataProcessorSpec.h"
19+
#include "Framework/Task.h"
20+
#include <string>
21+
#include "TStopwatch.h"
1522
#include "Framework/ConfigParamRegistry.h"
1623
#include "GlobalTrackingWorkflow/TPCITSMatchingSpec.h"
1724
#include "ReconstructionDataFormats/TrackTPCITS.h"
@@ -48,6 +55,24 @@ namespace o2
4855
namespace globaltracking
4956
{
5057

58+
class TPCITSMatchingDPL : public Task
59+
{
60+
public:
61+
TPCITSMatchingDPL(bool useFT0, bool calib, bool useMC) : mUseFT0(useFT0), mCalibMode(calib), mUseMC(useMC) {}
62+
~TPCITSMatchingDPL() override = default;
63+
void init(InitContext& ic) final;
64+
void run(ProcessingContext& pc) final;
65+
void endOfStream(framework::EndOfStreamContext& ec) final;
66+
67+
private:
68+
o2::globaltracking::MatchTPCITS mMatching; // matching engine
69+
o2::itsmft::TopologyDictionary mITSDict; // cluster patterns dictionary
70+
bool mUseFT0 = false;
71+
bool mCalibMode = false;
72+
bool mUseMC = true;
73+
TStopwatch mTimer;
74+
};
75+
5176
void TPCITSMatchingDPL::init(InitContext& ic)
5277
{
5378
mTimer.Stop();

0 commit comments

Comments
 (0)