Project
Loading...
Searching...
No Matches
SimParam.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13
14#ifndef O2_TRD_SIMPARAM_H
15#define O2_TRD_SIMPARAM_H
16
17#include <array>
18#include "Rtypes.h" // for ClassDef
19
20namespace o2
21{
22namespace trd
23{
24
28{
29 public:
30 enum class GasMixture { Xenon,
31 Argon };
32
33 SimParam();
34 SimParam(const SimParam&) = delete;
35 SimParam& operator=(const SimParam&) = delete;
36
38 void init();
39
40 // Cached magnetic field, to be called by the user before using DiffusionAndTimeStructEstimator::GetDiffCoeff
41 void cacheMagField();
42
43 // Setters
44 void setGasGain(float gasgain) { mGasGain = gasgain; }
45 void setNoise(float noise) { mNoise = noise; }
46 void setChipGain(float chipgain) { mChipGain = chipgain; }
47 void setADCoutRange(float range) { mADCoutRange = range; }
48 void setADCinRange(float range) { mADCinRange = range; }
49 void setADCbaseline(int basel) { mADCbaseline = basel; }
50 void setDiffusion(bool flag = true) { mDiffusionOn = flag; }
51 void setElAttach(bool flag = true) { mElAttachOn = flag; }
52 void setElAttachProp(float prop) { mElAttachProp = prop; }
53 void setTimeResponse(bool flag = true) { mTRFOn = flag; }
54 void setCrossTalk(bool flag = true) { mCTOn = flag; }
55 void setPadCoupling(float v) { mPadCoupling = v; }
56 void setTimeCoupling(float v) { mTimeCoupling = v; }
57 void setTimeStruct(bool flag = true) { mTimeStructOn = flag; }
58 void setPadResponse(bool flag = true) { mPRFOn = flag; }
59 void setExB(bool flag = true) { mExBOn = flag; }
60 void setSamplingFrequency(float freq) { mSamplingFrequency = freq; }
61 void setTRF(int trf, float mu = 0., float sigma = 0.3)
62 {
63 mTRF = trf;
64 mMu = mu;
65 mSigma = sigma;
66 }
67
68 // Getters
69 float getT0() const { return mT0; }
70 float getEffVdriftDefault() const { return mEffVdriftDefault; }
71 float getGasGain() const { return mGasGain; }
72 float getNoise() const { return mNoise; }
73 float getChipGain() const { return mChipGain; }
74 float getADCoutRange() const { return mADCoutRange; }
75 float getADCinRange() const { return mADCinRange; }
76 int getADCbaseline() const { return mADCbaseline; }
77 float getTRFlo() const { return mTRFlo; }
78 float getTRFhi() const { return mTRFhi; }
79 float getPadCoupling() const { return mPadCoupling; }
80 float getTimeCoupling() const { return mTimeCoupling; }
81 bool diffusionOn() const { return mDiffusionOn; }
82 bool elAttachOn() const { return mElAttachOn; }
83 float getElAttachProp() const { return mElAttachProp; }
84 bool trfOn() const { return mTRFOn; }
85 bool ctOn() const { return mCTOn; }
86 bool timeStructOn() const { return mTimeStructOn; }
87 bool prfOn() const { return mPRFOn; }
88 int getNumberOfPadsInPadResponse() const { return mNPadsInPadResponse; }
89 double timeResponse(double) const;
90 double crossTalk(double) const;
91 bool isExBOn() const { return mExBOn; }
92 bool isXenon() const { return (mGasMixture == GasMixture::Xenon); }
93 bool isArgon() const { return (mGasMixture == GasMixture::Argon); }
94 GasMixture getGasMixture() const { return mGasMixture; }
95 float getSamplingFrequency() const { return mSamplingFrequency; }
96 float getCachedField() const;
97
98 private:
100 void sampleTRF();
101
102 float mNoise{1250.f};
103 float mChipGain{12.4f};
104 float mADCoutRange{1023.f};
105 float mADCinRange{2000.f};
106 int mADCbaseline{10};
107 bool mDiffusionOn{true};
108 bool mElAttachOn{false};
109 float mElAttachProp{0.f};
110 bool mTRFOn{true};
111 bool mCTOn{true};
112 bool mPRFOn{true};
113 int mNPadsInPadResponse{3};
114 static constexpr int mNBinsMax = 200;
115
116 // From CommonParam
117 GasMixture mGasMixture{GasMixture::Xenon};
118 bool mExBOn{true};
119 bool mFieldCached{false};
120 float mField{0.};
121 float mSamplingFrequency{10.f};
122
123 // Use 0.46, instead of the theroetical value 0.3, since it reproduces better
124 // the test beam data, even tough it is not understood why.
125 float mPadCoupling{.46f};
126 float mTimeCoupling{.4f};
127 bool mTimeStructOn{true};
128
130 std::array<float, mNBinsMax> mTRFsmp{};
131 std::array<float, mNBinsMax> mCTsmp{};
132 int mTRF{0};
133 float mMu{0.};
134 float mSigma{0.03};
135 int mTRFbin{200};
136 float mTRFlo{-.4f};
137 float mTRFhi{3.58f};
138 float mInvTRFwid{static_cast<float>(mTRFbin) / (mTRFhi - mTRFlo)};
139 float mGasGain{4000.f};
140 float mT0{-0.130f};
141
142 float mEffVdriftDefault{1.22f};
143
144 ClassDefNV(SimParam, 2); // The TRD simulation parameters
145};
146
147} // namespace trd
148} // namespace o2
149#endif
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 trd
Constant parameters for the TRD simulation.
Definition SimParam.h:28
void setTimeCoupling(float v)
Definition SimParam.h:56
float getADCoutRange() const
Definition SimParam.h:74
bool timeStructOn() const
Definition SimParam.h:86
SimParam & operator=(const SimParam &)=delete
bool isArgon() const
Definition SimParam.h:93
float getCachedField() const
Definition SimParam.cxx:48
void setTRF(int trf, float mu=0., float sigma=0.3)
Definition SimParam.h:61
void setChipGain(float chipgain)
Definition SimParam.h:46
float getGasGain() const
Definition SimParam.h:71
void setGasGain(float gasgain)
Definition SimParam.h:44
float getEffVdriftDefault() const
Definition SimParam.h:70
double timeResponse(double) const
Definition SimParam.cxx:58
void setADCbaseline(int basel)
Definition SimParam.h:49
float getNoise() const
Definition SimParam.h:72
float getT0() const
Definition SimParam.h:69
double crossTalk(double) const
Definition SimParam.cxx:75
void setADCinRange(float range)
Definition SimParam.h:48
bool isExBOn() const
Definition SimParam.h:91
void setADCoutRange(float range)
Definition SimParam.h:47
bool trfOn() const
Definition SimParam.h:84
void setPadCoupling(float v)
Definition SimParam.h:55
void setExB(bool flag=true)
Definition SimParam.h:59
void setSamplingFrequency(float freq)
Definition SimParam.h:60
void setNoise(float noise)
Definition SimParam.h:45
GasMixture getGasMixture() const
Definition SimParam.h:94
void setElAttachProp(float prop)
Definition SimParam.h:52
float getTRFhi() const
Definition SimParam.h:78
bool ctOn() const
Definition SimParam.h:85
SimParam(const SimParam &)=delete
bool diffusionOn() const
Definition SimParam.h:81
void setDiffusion(bool flag=true)
Definition SimParam.h:50
bool prfOn() const
Definition SimParam.h:87
void setElAttach(bool flag=true)
Definition SimParam.h:51
void setTimeStruct(bool flag=true)
Definition SimParam.h:57
float getADCinRange() const
Definition SimParam.h:75
bool isXenon() const
Definition SimParam.h:92
float getPadCoupling() const
Definition SimParam.h:79
int getADCbaseline() const
Definition SimParam.h:76
bool elAttachOn() const
Definition SimParam.h:82
void setPadResponse(bool flag=true)
Definition SimParam.h:58
float getTimeCoupling() const
Definition SimParam.h:80
float getTRFlo() const
Definition SimParam.h:77
float getElAttachProp() const
Definition SimParam.h:83
float getSamplingFrequency() const
Definition SimParam.h:95
int getNumberOfPadsInPadResponse() const
Definition SimParam.h:88
void setCrossTalk(bool flag=true)
Definition SimParam.h:54
float getChipGain() const
Definition SimParam.h:73
void setTimeResponse(bool flag=true)
Definition SimParam.h:53
void init()
initialization based on configured gas mixture in TRDSimParams
Definition SimParam.cxx:91
const GLdouble * v
Definition glcorearb.h:832
GLenum GLint * range
Definition glcorearb.h:1899
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...