Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ class CDBInterface
/// \return gain map object
const CalPad& getGainMap();

/// Return the gain map object applied in the simulation
///
/// As getGainMap, but from the CCDB the gain map for MC (TPC/Calib/PadGainFullMC) is used, so that the simulation
/// can apply a different gain map than the one the reconstruction corrects with.
/// \return gain map object
const CalPad& getGainMapMC();

/// Return the ion tail coupling fraction
///
/// \return ion tail fraction
Expand Down
3 changes: 3 additions & 0 deletions Detectors/TPC/baserecsim/include/TPCBaseRecSim/CDBTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ enum class CDBType {
///
DistortionMapMC, ///< full distortions (static + IR dependant) for MC used in the digitizer
DistortionMapDerivMC, ///< derivative distortions for MC used in the digitizer for scaling
CalPadGainFullMC, ///< Full pad gain map for MC used in the digitizer

AltroSyncSignal ///< timing of Altro chip sync. signal
};
Expand Down Expand Up @@ -163,6 +164,8 @@ const std::unordered_map<CDBType, const std::string> CDBTypeMap{
// distortion maps
{CDBType::DistortionMapMC, "TPC/Calib/DistortionMapMC"},
{CDBType::DistortionMapDerivMC, "TPC/Calib/DistortionMapDerivativeMC"},
// gain map for MC
{CDBType::CalPadGainFullMC, "TPC/Calib/PadGainFullMC"},
// AltroSyncSignal
{CDBType::AltroSyncSignal, "TPC/Config/AltroSyncSignal"},
};
Expand Down
11 changes: 11 additions & 0 deletions Detectors/TPC/baserecsim/src/CDBInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ const CalPad& CDBInterface::getGainMap()
return *mGainMap;
}

//______________________________________________________________________________
const CalPad& CDBInterface::getGainMapMC()
{
// a gain map from file or the default one is the same for the simulation and the reconstruction
if (mGainMapFileName.size() || mUseDefaults) {
return getGainMap();
}

return getObjectFromCDB<CalPad>(CDBTypeMap.at(CDBType::CalPadGainFullMC));
}

//______________________________________________________________________________
const CalPad& CDBInterface::getITFraction()
{
Expand Down
2 changes: 1 addition & 1 deletion Detectors/TPC/simulation/src/GEMAmplification.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void GEMAmplification::updateParameters()
auto& cdb = CDBInterface::instance();
mGEMParam = &(ParameterGEM::Instance());
mGasParam = &(ParameterGas::Instance());
mGainMap = &(cdb.getGainMap());
mGainMap = &(cdb.getGainMapMC());
}

int GEMAmplification::getStackAmplification(int nElectrons)
Expand Down