Skip to content

Commit ff944c9

Browse files
matthias-kleinersawenzel
authored andcommitted
fix default gain map, allow for local gain map file
1 parent 5f146d9 commit ff944c9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Detectors/TPC/base/src/CDBInterface.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ void CDBInterface::createDefaultGainMap()
257257
if (random < minGain) {
258258
random = minGain;
259259
}
260-
if (random > minGain) {
261-
random = minGain;
260+
if (random > maxGain) {
261+
random = maxGain;
262262
}
263263
val = random;
264264
}

Steer/DigitizerWorkflow/src/TPCDigitizerSpec.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "TStopwatch.h"
1818
#include "Steer/HitProcessingManager.h" // for RunContext
1919
#include "TChain.h"
20+
#include "TSystem.h"
2021
#include <SimulationDataFormat/MCCompLabel.h>
2122
#include <SimulationDataFormat/MCTruthContainer.h>
2223
#include "Framework/Task.h"
@@ -159,6 +160,10 @@ class TPCDPLDigitizerTask
159160
/// For the time being use the defaults for the CDB
160161
auto& cdb = o2::tpc::CDBInterface::instance();
161162
cdb.setUseDefaults();
163+
if (!gSystem->AccessPathName("GainMap.root")) {
164+
LOG(INFO) << "TPC: Using gain map from 'GainMap.root'" << FairLogger::endl;
165+
cdb.setGainMapFromFile("GainMap.root");
166+
}
162167

163168
// read collision context from input
164169
auto context = pc.inputs().get<o2::steer::RunContext*>("collisioncontext");

0 commit comments

Comments
 (0)