Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lightweight its::GeometryTGeo instead of full geometry #2164

Merged
merged 2 commits into from
Mar 6, 2024
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
10 changes: 0 additions & 10 deletions Modules/ITS/itsCluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@
"geomPath": "./",
"publishSummary1D": "0",
"publishDetailedSummary": "1"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"askGRPECS": "false",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "false",
"needPropagatorD": "false"
}
}
},
Expand Down
10 changes: 0 additions & 10 deletions Modules/ITS/itsFhr.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@
"PhysicalOccupancyIB": "1.7e-3",
"PhysicalOccupancyOB": "4.3e-5",
"IgnoreRampUpData": "true"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"askGRPECS": "false",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "false",
"needPropagatorD": "false"
}
}
},
Expand Down
20 changes: 0 additions & 20 deletions Modules/ITS/itsQCQualitySummary.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@
"DoHitmapFilter": "1",
"PhysicalOccupancyIB": "1.7e-3",
"PhysicalOccupancyOB": "4.3e-5"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"askGRPECS": "false",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "true",
"needPropagatorD": "false"
}
},
"ITSClusterTask": {
Expand All @@ -100,16 +90,6 @@
"geomPath": "./",
"publishSummary1D": "0",
"publishDetailedSummary": "0"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"askGRPECS": "false",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "true",
"needPropagatorD": "false"
}
},
"ITSTrackTask" : {
Expand Down
9 changes: 3 additions & 6 deletions Modules/ITS/src/ITSClusterTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,16 @@ void ITSClusterTask::startOfCycle()
void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
{

if (mGeom == nullptr) {
ILOG(Warning, Devel) << "Created new instance of mGeom" << ENDM;
mGeom = o2::its::GeometryTGeo::Instance();
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
}

if (mTimestamp == -1) { // get dict from ccdb
mTimestamp = std::stol(o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters, "dicttimestamp", "0"));
long int ts = mTimestamp ? mTimestamp : ctx.services().get<o2::framework::TimingInfo>().creation;
ILOG(Debug, Devel) << "Getting dictionary from ccdb - timestamp: " << ts << ENDM;
std::map<std::string, std::string> metadata;
mDict = TaskInterface::retrieveConditionAny<o2::itsmft::TopologyDictionary>("ITS/Calib/ClusterDictionary", metadata, ts);
ILOG(Debug, Devel) << "Dictionary size: " << mDict->getSize() << ENDM;
o2::its::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::its::GeometryTGeo>("ITS/Config/Geometry", metadata, ts));
mGeom = o2::its::GeometryTGeo::Instance();
ILOG(Debug, Devel) << "Loaded new instance of mGeom" << ENDM;
}

std::chrono::time_point<std::chrono::high_resolution_clock> start;
Expand Down
4 changes: 2 additions & 2 deletions Modules/ITS/src/ITSFhrTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ void ITSFhrTask::startOfCycle() { ILOG(Debug, Devel) << "startOfCycle" << ENDM;
void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
{
if (mGeom == nullptr) {
ILOG(Warning, Devel) << "Created new instance of mGeom" << ENDM;
o2::its::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::its::GeometryTGeo>("ITS/Config/Geometry"));
mGeom = o2::its::GeometryTGeo::Instance();
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
ILOG(Debug, Devel) << "Loaded new instance of mGeom" << ENDM;
}
// set timer
std::chrono::time_point<std::chrono::high_resolution_clock> start;
Expand Down
1 change: 1 addition & 0 deletions Modules/MFT/include/MFT/QcMFTClusterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class QcMFTClusterTask /*final*/ : public TaskInterface // todo add back the "fi
// dictionary
const o2::itsmft::TopologyDictionary* mDict = nullptr;

o2::mft::GeometryTGeo* mGeom = nullptr;
// where the geometry file is stored
std::string mGeomPath;

Expand Down
3 changes: 3 additions & 0 deletions Modules/MFT/include/MFT/QcMFTTrackTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "Common/TH2Ratio.h"
// O2
#include "CommonConstants/LHCConstants.h"
#include "MFTBase/GeometryTGeo.h"

using namespace o2::quality_control::core;
using namespace o2::quality_control_modules::common;
Expand Down Expand Up @@ -57,6 +58,8 @@ class QcMFTTrackTask /*final*/ : public TaskInterface // todo add back the "fina
void reset() override;

private:
o2::mft::GeometryTGeo* mGeom = nullptr;

std::unique_ptr<TH1FRatio> mNumberOfTracksPerTF = nullptr;
std::unique_ptr<TH1FRatio> mTrackNumberOfClusters = nullptr;
std::unique_ptr<TH1FRatio> mCATrackNumberOfClusters = nullptr;
Expand Down
10 changes: 0 additions & 10 deletions Modules/MFT/mft-clusters.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@
"timeBinSize" : "0.1",
"ROFLengthInBC" : "198"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"askGRPECS": "false",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
"askMatLUT": "false",
"askTime": "false",
"askOnceAllButField": "true",
"needPropagatorD": "false"
},
"location" : "remote"
}
},
Expand Down
2 changes: 1 addition & 1 deletion Modules/MFT/mft-tracks.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"TimeBinSize" : "0.1"
},
"grpGeomRequest" : {
"geomRequest": "Aligned",
"geomRequest": "None",
"askGRPECS": "true",
"askGRPLHCIF": "false",
"askGRPMagField": "false",
Expand Down
6 changes: 5 additions & 1 deletion Modules/MFT/src/QcMFTClusterTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ void QcMFTClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
mDict = mDictPtr.get();
ILOG(Info, Support) << "Dictionary loaded with size: " << mDict->getSize() << ENDM;
}

if (!mGeom) {
o2::mft::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::mft::GeometryTGeo>("MFT/Config/Geometry"));
mGeom = o2::mft::GeometryTGeo::Instance();
ILOG(Info, Support) << "GeometryTGeo loaded" << ENDM;
}
// normalisation for the summary histogram to TF
mClusterOccupancySummary->Fill(-1, -1);
mClusterOccupancy->Fill(-1);
Expand Down
5 changes: 5 additions & 0 deletions Modules/MFT/src/QcMFTTrackTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ void QcMFTTrackTask::startOfCycle()

void QcMFTTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
{
if (!mGeom) {
o2::mft::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::mft::GeometryTGeo>("MFT/Config/Geometry"));
mGeom = o2::mft::GeometryTGeo::Instance();
ILOG(Info, Support) << "GeometryTGeo loaded" << ENDM;
}
auto mNOrbitsPerTF = o2::base::GRPGeomHelper::instance().getNHBFPerTF();

// get the tracks
Expand Down
Loading