/** * @file * @author Christian Simon * @since 2017-06-07 */ #ifndef CBMTOFDIGITBPAR_H #define CBMTOFDIGITBPAR_H 1 #include "FairParGenericSet.h" #include "FairLogger.h" #include "TString.h" #include #include /** * @brief ... * @author Christian Simon * @since 2017-06-07 * @version 1.0 * @details ... */ class CbmTofDigiTbPar : public FairParGenericSet { public: CbmTofDigiTbPar(const char* name = "CbmTofDigiTbPar", const char* title = "TOF time-based digitization parameters", const char* context = "TestDefaultContext"); virtual ~CbmTofDigiTbPar() {} virtual void putParams(FairParamList* tOutputParamList); virtual Bool_t getParams(FairParamList* tInputParamList); virtual void printParams(); const char* GetGeoTag() const {return ftGeoTag.Data();} const Int_t* GetNumberReadoutElectrodes(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetCellAcrossWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetCellAlongWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetGapAcrossWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetGapAlongWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Bool_t* GetCellsAlongX(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Bool_t* GetCellIndexingAlongAxis(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Int_t* GetNWalkBinsX(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetMinimumToT(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetMaximumToT(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSignalTimeOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetPropagationVelocity(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetDigitizationJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetMaximumRuntimeOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetToTTargetExpectationValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetToTTargetStandardDeviation(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSignalEdgeRuntimeOffsetsSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Int_t* GetMaximumClusterSize(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetDegradedEfficiencyReference(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetChargeModus(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetChargeScaling(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetChargeDistance(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetDiscriminationJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSignalTimeConstant(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSignalThreshold(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetStripToTOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetAvalancheJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceMeanClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceRMSClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceMeanToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceRMSToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceAlongPositionResidualSigmaRatio(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceEfficiency(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceSigmoidalEfficiencyDrop(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetReferenceDegradedTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualMeanClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualRMSClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualMeanToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualRMSToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualAlongPositionResidualSigmaRatio(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualEfficiency(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualSigmoidalEfficiencyDrop(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetActualDegradedTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector* GetToTDistributionScaling(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector* GetToTDistributionOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector* GetRuntimeCorrections(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector>* GetSlewingCorrections(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector* GetRuntimeOffsets(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const std::vector* GetSignalEdgeRuntimeOffsets(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetAcrossPositionResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetAlongPositionResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetTimeResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSigmoidalEfficiencyFlex(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetSigmoidalEfficiencyScale(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetKneeCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetCalibrationCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetHitDistanceScale(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetRelaxationTimeConstant(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetChannelDeadTime(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetCounterDarkRate(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Bool_t* GetTwoSidedReadout(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Double_t* GetWorkingCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; const Bool_t* GetParametersAvailable(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex) const; void SetGeoTag(const char* tGeoTag) {ftGeoTag = tGeoTag;}; void SetNumberReadoutElectrodes(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Int_t& iNumberReadoutElectrodes); void SetCellAcrossWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dCellAcrossWidth); void SetCellAlongWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dCellAlongWidth); void SetGapAcrossWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dGapAcrossWidth); void SetGapAlongWidth(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dGapAlongWidth); void SetCellsAlongX(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Bool_t& bCellsAlongX); void SetCellIndexingAlongAxis(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Bool_t& bCellIndexingAlongAxis); void SetNWalkBinsX(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Int_t& iNWalkBinsX); void SetMinimumToT(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dMinimumToT); void SetMaximumToT(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dMaximumToT); void SetSignalTimeOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSignalTimeOffset); void SetPropagationVelocity(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dPropagationVelocity); void SetDigitizationJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dDigitizationJitterSigma); void SetMaximumRuntimeOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dMaximumRuntimeOffset); void SetToTTargetExpectationValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dToTTargetExpectationValue); void SetToTTargetStandardDeviation(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dToTTargetStandardDeviation); void SetSignalEdgeRuntimeOffsetsSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSignalEdgeRuntimeOffsetsSigma); void SetMaximumClusterSize(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Int_t& iMaximumClusterSize); void SetDegradedEfficiencyReference(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dDegradedEfficiencyReference); void SetChargeModus(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dChargeModus); void SetChargeScaling(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dChargeScaling); void SetChargeDistance(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dChargeDistance); void SetDiscriminationJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dDiscriminationJitterSigma); void SetSignalTimeConstant(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSignalTimeConstant); void SetSignalThreshold(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSignalThreshold); void SetStripToTOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dStripToTOffset); void SetAvalancheJitterSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dAvalancheJitterSigma); void SetReferenceMeanClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceMeanClusterSizeCentralCell); void SetReferenceRMSClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceRMSClusterSizeCentralCell); void SetReferenceMeanToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceMeanToTCentralChannel); void SetReferenceRMSToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceRMSToTCentralChannel); void SetReferenceTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceTimeResolution); void SetReferenceAlongPositionResidualSigmaRatio(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceAlongPositionResidualSigmaRatio); void SetReferenceEfficiency(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceEfficiency); void SetReferenceSigmoidalEfficiencyDrop(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceSigmoidalEfficiencyDrop); void SetReferenceDegradedTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dReferenceDegradedTimeResolution); void SetActualMeanClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualMeanClusterSizeCentralCell); void SetActualRMSClusterSizeCentralCell(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualRMSClusterSizeCentralCell); void SetActualMeanToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualMeanToTCentralChannel); void SetActualRMSToTCentralChannel(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualRMSToTCentralChannel); void SetActualTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualTimeResolution); void SetActualAlongPositionResidualSigmaRatio(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualAlongPositionResidualSigmaRatio); void SetActualEfficiency(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualEfficiency); void SetActualSigmoidalEfficiencyDrop(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualSigmoidalEfficiencyDrop); void SetActualDegradedTimeResolution(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dActualDegradedTimeResolution); void SetToTDistributionScaling(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector& dToTDistributionScaling); void SetToTDistributionOffset(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector& dToTDistributionOffset); void SetRuntimeCorrections(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector& dRuntimeCorrections); void SetSlewingCorrections(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector>& dSlewingCorrections); void SetRuntimeOffsets(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector& dRuntimeOffsets); void SetSignalEdgeRuntimeOffsets(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::vector& dSignalEdgeRuntimeOffsets); void SetHitDistanceScale(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dHitDistanceScale); void SetAcrossPositionResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dAcrossPositionResidualSigma); void SetAlongPositionResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dAlongPositionResidualSigma); void SetTimeResidualSigma(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dTimeResidualSigma); void SetSigmoidalEfficiencyFlex(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSigmoidalEfficiencyFlex); void SetSigmoidalEfficiencyScale(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dSigmoidalEfficiencyScale); void SetKneeCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dKneeCoefficient); void SetCalibrationCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dCalibrationCoefficient); void SetRelaxationTimeConstant(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dRelaxationTimeConstant); void SetChannelDeadTime(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dChannelDeadTime); void SetCounterDarkRate(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dCounterDarkRate); void SetTwoSidedReadout(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Bool_t& bTwoSidedReadout); void SetWorkingCoefficient(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Double_t& dWorkingCoefficient); void SetParametersAvailable(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const Bool_t& bParametersAvailable = kFALSE); protected: private: template const T* GetMappedValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::map& tMap) const; template void SetMappedValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, std::map& tMap, const T& tValue); std::map fiNumberReadoutElectrodes; std::map fdCellAcrossWidth; std::map fdCellAlongWidth; std::map fdGapAcrossWidth; std::map fdGapAlongWidth; std::map fbCellsAlongX; std::map fbCellIndexingAlongAxis; std::map fiNWalkBinsX; std::map fdMinimumToT; std::map fdMaximumToT; std::map fdSignalTimeOffset; std::map fdPropagationVelocity; std::map fdDigitizationJitterSigma; std::map fdMaximumRuntimeOffset; std::map fdToTTargetExpectationValue; std::map fdToTTargetStandardDeviation; std::map fdSignalEdgeRuntimeOffsetsSigma; std::map fiMaximumClusterSize; std::map fdDegradedEfficiencyReference; std::map fdChargeModus; std::map fdChargeScaling; std::map fdChargeDistance; std::map fdDiscriminationJitterSigma; std::map fdSignalTimeConstant; std::map fdSignalThreshold; std::map fdStripToTOffset; std::map fdAvalancheJitterSigma; std::map fdReferenceMeanClusterSizeCentralCell; std::map fdReferenceRMSClusterSizeCentralCell; std::map fdReferenceMeanToTCentralChannel; std::map fdReferenceRMSToTCentralChannel; std::map fdReferenceEfficiency; std::map fdReferenceTimeResolution; std::map fdReferenceAlongPositionResidualSigmaRatio; std::map fdReferenceSigmoidalEfficiencyDrop; std::map fdReferenceDegradedTimeResolution; std::map fdActualMeanClusterSizeCentralCell; std::map fdActualRMSClusterSizeCentralCell; std::map fdActualMeanToTCentralChannel; std::map fdActualRMSToTCentralChannel; std::map fdActualEfficiency; std::map fdActualTimeResolution; std::map fdActualAlongPositionResidualSigmaRatio; std::map fdActualSigmoidalEfficiencyDrop; std::map fdActualDegradedTimeResolution; std::map> fdToTDistributionScaling; std::map> fdToTDistributionOffset; std::map> fdRuntimeCorrections; std::map>> fdSlewingCorrections; std::map> fdRuntimeOffsets; std::map> fdSignalEdgeRuntimeOffsets; std::map fdAcrossPositionResidualSigma; std::map fdAlongPositionResidualSigma; std::map fdTimeResidualSigma; std::map fdSigmoidalEfficiencyFlex; std::map fdSigmoidalEfficiencyScale; std::map fdKneeCoefficient; std::map fdCalibrationCoefficient; std::map fdHitDistanceScale; std::map fdRelaxationTimeConstant; std::map fdChannelDeadTime; std::map fdCounterDarkRate; std::map fbTwoSidedReadout; std::map fdWorkingCoefficient; TString ftGeoTag; std::map fbParametersAvailable; ClassDef(CbmTofDigiTbPar,4) }; template const T* CbmTofDigiTbPar::GetMappedValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, const std::map& tMap) const { Int_t iKey = 1000000*iMType + 1000*iMIndex + iCIndex; auto const tIterator = tMap.find(iKey); if(tIterator != tMap.end()) { return &tIterator->second; } else { return NULL; } } template void CbmTofDigiTbPar::SetMappedValue(const Int_t& iMType, const Int_t& iMIndex, const Int_t& iCIndex, std::map& tMap, const T& tValue) { Int_t iKey = 1000000*iMType + 1000*iMIndex + iCIndex; auto const tIterator = tMap.find(iKey); if(tIterator != tMap.end()) { tIterator->second = tValue; } else { tMap.emplace(iKey,tValue); } } #endif