16#ifndef AliceO2_TPC_CommonModeCorrection_H_
17#define AliceO2_TPC_CommonModeCorrection_H_
125 void loadCalPad(std::string_view fileName, std::string_view nameInFile, std::string_view namePadMap =
"");
148 int getCommonMode(std::vector<Digit>&
digits, std::vector<std::vector<CMInfo>>& cmValues,
bool negativeOnly =
false,
bool hasInjectedCMValue =
false, std::vector<std::vector<CMDebug>>* cmDebug =
nullptr,
int minTimeBin = -1,
int maxTimeBin = -1)
const;
154 int correctDigits(std::vector<Digit>&
digits, std::vector<std::vector<CMInfo>>& cmValues,
bool negativeOnly =
false,
bool hasInjectedCMValue =
false, std::vector<std::vector<CMDebug>>* cmDebug =
nullptr,
int minTimeBin = -1,
int maxTimeBin = -1)
const;
156 void correctDigits(std::string_view digiFileIn, Long64_t maxEntries = -1, std::string_view digitFileOut =
"tpcdigit_cmcorr.root", std::string_view cmFileOut =
"CommonModeValues.root",
bool negativeOnly =
false,
int nThreads = 1,
bool writeOnlyCM =
false,
bool writeDebug =
false,
bool hasInjectedCMValue =
false,
int minTimeBin = -1,
int maxTimeBin = -1);
163 static void setNThreads(
const int nThreads) { sNThreads = nThreads; }
181 inline static int sNThreads{1};
182 int mNPadsCompRamdom{10};
183 int mNPadsCompMin{7};
187 float mQCompScaleThreshold{0};
188 float mQCompScale{0};
189 float mSumPosThreshold{2};
190 float mOccupancyThreshold{3};
191 bool mLimitKFactor{
false};
192 bool mLimitPedestal{
false};
193 int mSubthreshold{0};
194 float mArtificialCM{};
195 bool mCorrectOutputForPedestal{
false};
205 const std::array<pos, 10> mCMInjectIDLower{
220 const std::array<pos, 10> mCMInjectIDUpper{
238 float getCalPadValue(
const std::string calibName,
int icru,
int pad)
const;
240 bool padMapExists(
const std::string& calibName);
242 ClassDefNV(CommonModeCorrection, 2);
Frontend electronics configuration values.
unsigned short int uint16_t
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in cm(in case phi of track=lorentz angle)") AddOptionRTC(trkltResVsTanPhiMisalign
float getPedestalValue(int sector, int row, int pad)
pedestal value
void setPadMaps(CalPadMapType &padMaps)
Pad maps loaded from FEEConfig.
CMdata collectCMdata(const std::vector< Digit > &digits, int cru, int timeBin)
int getNPadsCompMin() const
void loadPedestals(std::string_view fileName)
load Pedestals from file, assuming it is stored under the name "Pedestals
void setCalPad(const CalPad &calPad, std::string_view name)
Custom setting of CalPad, overwriting what was set in mPadMaps.
CMInfo getCommonMode(gsl::span< const float > values, gsl::span< const float > cmKValues, gsl::span< const float > pedestals, CMDebug *cmDebug=nullptr) const
bool getCorrectOutputForPedestal() const
float getQCompScaleThreshold() const
void addCommonMode(float cm)
add artificial common mode, only works when using the 'correctDigits' function
int correctDigits(std::vector< Digit > &digits, std::vector< std::vector< CMInfo > > &cmValues, bool negativeOnly=false, bool hasInjectedCMValue=false, std::vector< std::vector< CMDebug > > *cmDebug=nullptr, int minTimeBin=-1, int maxTimeBin=-1) const
void loadCalPad(std::string_view fileName, std::string_view nameInFile, std::string_view namePadMap="")
float getCMkValue(int sector, int row, int pad)
cmk value
void setNPadsMinCM(int n)
Minimum number of pads required in the CM calculation to be used for digit correction.
bool getAddSubthreshold() const
float getSumPosThreshold() const
void setOccupancyThreshold(float threshold)
Threshold above which a signal is considered for the occupancy.
void setAddSubthreshold(bool addSubthreshold)
Add zeros for pads without signal.
static void setNThreads(const int nThreads)
void setNPadsCompRandom(int n)
CMInfo getCommonMode(const std::vector< float > &values, const std::vector< float > &cmKValues, const std::vector< float > &pedestals) const
static float decodeInjectedCMValue(float lower, float upper)
int getNPadsCompRandom() const
void setNPadsCompMin(int n)
CMInfo getCommonMode(const CMdata &cmData) const
void loadCMkValues(std::string_view fileName)
load CMkValues from file, assuming it is stored under the name "CMkValues
std::unordered_map< std::string, CalPad > CalPadMapType
float getOccupancyThreshold() const
int getNPadsMinCM() const
void setCorrectOutputForPedestal(bool corret=true)
void setQCompScale(float q)
The mQComp will be set to (cm - mQCompScaleThreshold) * mQCompScale, if cm > mQCompScaleThreshold.
float getQCompScale() const
void limitKFactorPrecision(bool limit=true)
void loadDefaultPadMaps(FEEConfig::Tags feeTag=FEEConfig::Tags::Physics30sigma)
load the Pad maps from CCDB
void setSumPosThreshold(float threshold)
Threshold above which a signal is considered for sumPos, if debug information is used.
void limitPedestalPrecision(bool limit=true)
void setQCompScaleThreshold(float q)
The mQComp will be set to (cm - mQCompScaleThreshold) * mQCompScale, if cm > mQCompScaleThreshold.
GLuint const GLchar * name
GLenum GLsizei GLsizei GLint * values
Global TPC definitions and constants.
std::vector< uint8_t > nPadsOk
std::vector< uint16_t > adcDist
float cmValueCRU
common mode value from firmware, if available
uint16_t nSaturation
number of pads in saturation
float cmValueStd
std dev of common mode values from pseudo code
uint16_t nPadsUsed
number of pads used for CM calculation
float sumNeg
sum of negative signals <= mSumPosThreshold, corrected for k-factor
uint16_t nOccupancy
number of CM corrected pads larger than mOccupancyThreshold
float sumPos
sum of positive signals > mSumPosThreshold
float cmValue
common mode value from pseudo code
uint16_t nNeg
number of pads used for sumNeg
std::vector< float > adcValues
std::vector< float > pedestals
std::vector< float > cmKValues
void resize(size_t newSize)
Tags
Tag definitions for TPC/Config/FEE.
@ Physics30sigma
Physics configuration with 3.0 sigma thresholds.
std::vector< Digit > digits