Skip to content

Commit ec93049

Browse files
authored
Use lightweight its::GeometryTGeo instead of full geometry (#2164)
* Use lightweight its::GeometryTGeo instead of full geometry * Use lightweight mft::GeometryTGeo instead of full geometry --------- Co-authored-by: shahoian <[email protected]>
1 parent 55da459 commit ec93049

11 files changed

+20
-60
lines changed

Modules/ITS/itsCluster.json

-10
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@
4343
"geomPath": "./",
4444
"publishSummary1D": "0",
4545
"publishDetailedSummary": "1"
46-
},
47-
"grpGeomRequest" : {
48-
"geomRequest": "Aligned",
49-
"askGRPECS": "false",
50-
"askGRPLHCIF": "false",
51-
"askGRPMagField": "false",
52-
"askMatLUT": "false",
53-
"askTime": "false",
54-
"askOnceAllButField": "false",
55-
"needPropagatorD": "false"
5646
}
5747
}
5848
},

Modules/ITS/itsFhr.json

-10
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,6 @@
5252
"PhysicalOccupancyIB": "1.7e-3",
5353
"PhysicalOccupancyOB": "4.3e-5",
5454
"IgnoreRampUpData": "true"
55-
},
56-
"grpGeomRequest" : {
57-
"geomRequest": "Aligned",
58-
"askGRPECS": "false",
59-
"askGRPLHCIF": "false",
60-
"askGRPMagField": "false",
61-
"askMatLUT": "false",
62-
"askTime": "false",
63-
"askOnceAllButField": "false",
64-
"needPropagatorD": "false"
6555
}
6656
}
6757
},

Modules/ITS/itsQCQualitySummary.json

-20
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,6 @@
6868
"DoHitmapFilter": "1",
6969
"PhysicalOccupancyIB": "1.7e-3",
7070
"PhysicalOccupancyOB": "4.3e-5"
71-
},
72-
"grpGeomRequest" : {
73-
"geomRequest": "Aligned",
74-
"askGRPECS": "false",
75-
"askGRPLHCIF": "false",
76-
"askGRPMagField": "false",
77-
"askMatLUT": "false",
78-
"askTime": "false",
79-
"askOnceAllButField": "true",
80-
"needPropagatorD": "false"
8171
}
8272
},
8373
"ITSClusterTask": {
@@ -100,16 +90,6 @@
10090
"geomPath": "./",
10191
"publishSummary1D": "0",
10292
"publishDetailedSummary": "0"
103-
},
104-
"grpGeomRequest" : {
105-
"geomRequest": "Aligned",
106-
"askGRPECS": "false",
107-
"askGRPLHCIF": "false",
108-
"askGRPMagField": "false",
109-
"askMatLUT": "false",
110-
"askTime": "false",
111-
"askOnceAllButField": "true",
112-
"needPropagatorD": "false"
11393
}
11494
},
11595
"ITSTrackTask" : {

Modules/ITS/src/ITSClusterTask.cxx

+3-6
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,16 @@ void ITSClusterTask::startOfCycle()
115115
void ITSClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
116116
{
117117

118-
if (mGeom == nullptr) {
119-
ILOG(Warning, Devel) << "Created new instance of mGeom" << ENDM;
120-
mGeom = o2::its::GeometryTGeo::Instance();
121-
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
122-
}
123-
124118
if (mTimestamp == -1) { // get dict from ccdb
125119
mTimestamp = std::stol(o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters, "dicttimestamp", "0"));
126120
long int ts = mTimestamp ? mTimestamp : ctx.services().get<o2::framework::TimingInfo>().creation;
127121
ILOG(Debug, Devel) << "Getting dictionary from ccdb - timestamp: " << ts << ENDM;
128122
std::map<std::string, std::string> metadata;
129123
mDict = TaskInterface::retrieveConditionAny<o2::itsmft::TopologyDictionary>("ITS/Calib/ClusterDictionary", metadata, ts);
130124
ILOG(Debug, Devel) << "Dictionary size: " << mDict->getSize() << ENDM;
125+
o2::its::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::its::GeometryTGeo>("ITS/Config/Geometry", metadata, ts));
126+
mGeom = o2::its::GeometryTGeo::Instance();
127+
ILOG(Debug, Devel) << "Loaded new instance of mGeom" << ENDM;
131128
}
132129

133130
std::chrono::time_point<std::chrono::high_resolution_clock> start;

Modules/ITS/src/ITSFhrTask.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ void ITSFhrTask::startOfCycle() { ILOG(Debug, Devel) << "startOfCycle" << ENDM;
389389
void ITSFhrTask::monitorData(o2::framework::ProcessingContext& ctx)
390390
{
391391
if (mGeom == nullptr) {
392-
ILOG(Warning, Devel) << "Created new instance of mGeom" << ENDM;
392+
o2::its::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::its::GeometryTGeo>("ITS/Config/Geometry"));
393393
mGeom = o2::its::GeometryTGeo::Instance();
394-
mGeom->fillMatrixCache(o2::math_utils::bit2Mask(o2::math_utils::TransformType::L2G));
394+
ILOG(Debug, Devel) << "Loaded new instance of mGeom" << ENDM;
395395
}
396396
// set timer
397397
std::chrono::time_point<std::chrono::high_resolution_clock> start;

Modules/MFT/include/MFT/QcMFTClusterTask.h

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class QcMFTClusterTask /*final*/ : public TaskInterface // todo add back the "fi
101101
// dictionary
102102
const o2::itsmft::TopologyDictionary* mDict = nullptr;
103103

104+
o2::mft::GeometryTGeo* mGeom = nullptr;
104105
// where the geometry file is stored
105106
std::string mGeomPath;
106107

Modules/MFT/include/MFT/QcMFTTrackTask.h

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "Common/TH2Ratio.h"
3030
// O2
3131
#include "CommonConstants/LHCConstants.h"
32+
#include "MFTBase/GeometryTGeo.h"
3233

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

5960
private:
61+
o2::mft::GeometryTGeo* mGeom = nullptr;
62+
6063
std::unique_ptr<TH1FRatio> mNumberOfTracksPerTF = nullptr;
6164
std::unique_ptr<TH1FRatio> mTrackNumberOfClusters = nullptr;
6265
std::unique_ptr<TH1FRatio> mCATrackNumberOfClusters = nullptr;

Modules/MFT/mft-clusters.json

-10
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@
4141
"timeBinSize" : "0.1",
4242
"ROFLengthInBC" : "198"
4343
},
44-
"grpGeomRequest" : {
45-
"geomRequest": "Aligned",
46-
"askGRPECS": "false",
47-
"askGRPLHCIF": "false",
48-
"askGRPMagField": "false",
49-
"askMatLUT": "false",
50-
"askTime": "false",
51-
"askOnceAllButField": "true",
52-
"needPropagatorD": "false"
53-
},
5444
"location" : "remote"
5545
}
5646
},

Modules/MFT/mft-tracks.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"TimeBinSize" : "0.1"
4242
},
4343
"grpGeomRequest" : {
44-
"geomRequest": "Aligned",
44+
"geomRequest": "None",
4545
"askGRPECS": "true",
4646
"askGRPLHCIF": "false",
4747
"askGRPMagField": "false",

Modules/MFT/src/QcMFTClusterTask.cxx

+5-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ void QcMFTClusterTask::monitorData(o2::framework::ProcessingContext& ctx)
248248
mDict = mDictPtr.get();
249249
ILOG(Info, Support) << "Dictionary loaded with size: " << mDict->getSize() << ENDM;
250250
}
251-
251+
if (!mGeom) {
252+
o2::mft::GeometryTGeo::adopt(TaskInterface::retrieveConditionAny<o2::mft::GeometryTGeo>("MFT/Config/Geometry"));
253+
mGeom = o2::mft::GeometryTGeo::Instance();
254+
ILOG(Info, Support) << "GeometryTGeo loaded" << ENDM;
255+
}
252256
// normalisation for the summary histogram to TF
253257
mClusterOccupancySummary->Fill(-1, -1);
254258
mClusterOccupancy->Fill(-1);

Modules/MFT/src/QcMFTTrackTask.cxx

+5
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ void QcMFTTrackTask::startOfCycle()
208208

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

213218
// get the tracks

0 commit comments

Comments
 (0)