Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ class Tracker

std::vector<TrackITSExt>& getTracks();
auto& getTrackLabels() { return mTrackLabels; }
bool isMatLUT();

void clustersToTracks(const ROframe&, std::ostream& = std::cout);

void setROFrame(std::uint32_t f) { mROFrame = f; }
std::uint32_t getROFrame() const { return mROFrame; }
void setParameters(const std::vector<MemoryParameters>&, const std::vector<TrackingParameters>&);
void initMatBudLUTFromFile();
void getGlobalConfiguration();

private:
track::TrackParCov buildTrackSeed(const Cluster& cluster1, const Cluster& cluster2, const Cluster& cluster3,
Expand Down Expand Up @@ -111,9 +114,6 @@ inline void Tracker::setParameters(const std::vector<MemoryParameters>& memPars,
{
mMemParams = memPars;
mTrkParams = trkPars;
if (mTrkParams[0].UseMatBudLUT) {
mMatLayerCylSet = o2::base::MatLayerCylSet::loadFromFile();
}
}

inline float Tracker::getBz() const
Expand All @@ -126,6 +126,16 @@ inline void Tracker::setBz(float bz)
mBz = bz;
}

inline void Tracker::initMatBudLUTFromFile()
{
mMatLayerCylSet = o2::base::MatLayerCylSet::loadFromFile();
}

inline bool Tracker::isMatLUT()
{
return mMatLayerCylSet;
}

template <typename... T>
void Tracker::initialisePrimaryVertexContext(T&&... args)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace o2
namespace its
{

class VertexingParameters;
struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerParamConfig> {

// geometrical cuts
Expand All @@ -36,7 +35,14 @@ struct VertexerParamConfig : public o2::conf::ConfigurableParamHelper<VertexerPa
O2ParamDef(VertexerParamConfig, "ITSVertexerParam");
};

// VertexerParamConfig VertexerParamConfig::sInstance;
struct TrackerParamConfig : public o2::conf::ConfigurableParamHelper<TrackerParamConfig> {

// Use lookup table for mat. budget
bool useMatBudLUT = false;

O2ParamDef(TrackerParamConfig, "ITSCATrackerParam");
};

} // namespace its
} // namespace o2
#endif
10 changes: 10 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/src/Tracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "ITStracking/Tracklet.h"
#include "ITStracking/TrackerTraits.h"
#include "ITStracking/TrackerTraitsCPU.h"
#include "ITStracking/TrackingConfigParam.h"

#include "ReconstructionDataFormats/Track.h"
#include <cassert>
Expand Down Expand Up @@ -653,5 +654,14 @@ track::TrackParCov Tracker::buildTrackSeed(const Cluster& cluster1, const Cluste
s2 * fy * cy, 0.f, s2 * cy * cy});
}

void Tracker::getGlobalConfiguration()
{
auto& tc = o2::its::TrackerParamConfig::Instance();

if (tc.useMatBudLUT) {
initMatBudLUTFromFile();
}
}

} // namespace its
} // namespace o2
4 changes: 3 additions & 1 deletion Detectors/ITSMFT/ITS/tracking/src/TrackingConfigParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ namespace o2
namespace its
{
static auto& sVertexerParamITS = o2::its::VertexerParamConfig::Instance();
static auto& sCATrackerParamITS = o2::its::TrackerParamConfig::Instance();

O2ParamImpl(o2::its::VertexerParamConfig)
O2ParamImpl(o2::its::VertexerParamConfig);
O2ParamImpl(o2::its::TrackerParamConfig);
} // namespace its
} // namespace o2
3 changes: 3 additions & 0 deletions Detectors/ITSMFT/ITS/tracking/src/TrackingLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
#pragma link C++ class o2::its::VertexerParamConfig + ;
#pragma link C++ class o2::conf::ConfigurableParamHelper <o2::its::VertexerParamConfig> + ;

#pragma link C++ class o2::its::TrackerParamConfig + ;
#pragma link C++ class o2::conf::ConfigurableParamHelper <o2::its::TrackerParamConfig> + ;

#endif
4 changes: 3 additions & 1 deletion Detectors/ITSMFT/ITS/workflow/src/TrackerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ void TrackerDPL::init(InitContext& ic)
LOG(INFO) << "Initializing tracker in async. phase reconstruction with " << trackParams.size() << " passes";
}
mVertexer->getGlobalConfiguration();
// mVertexer->dumpTraits();
mTracker->getGlobalConfiguration();
LOG(INFO) << Form("%ssing lookup table for material budget approximation", (mTracker->isMatLUT() ? "U" : "Not u"));

double origD[3] = {0., 0., 0.};
mTracker->setBz(field->getBz(origD));
} else {
Expand Down