77#ifdef ZDC_FASTSIM_ONNX
80#ifndef ZDC_FASTSIM_ONNX
85 bool isMTSafe()
const override {
return true; }
114 math_utils::Vector3D<float>
pos, math_utils::Vector3D<float> mom,
float tof, math_utils::Vector3D<float> xImpact,
double energyloss,
121 void createAsideBeamLine();
122 void createCsideBeamLine();
123 void createMagnets();
124 void createDetectors();
130 static Bool_t withZEM();
133 void getDetIDandSecID(TString
const& volname, math_utils::Vector3D<float>
const&
x,
134 math_utils::Vector3D<float>& xDet,
int& detector,
int&
sector)
const;
137 void defineSensitiveVolumes();
140 Bool_t calculateTableIndexes(
int& ibeta,
int& iangle,
int& iradius);
142 void resetHitIndices();
148 bool createOrAddHit(
int detector,
157 math_utils::Vector3D<float>
const& xImp,
158 float eDep,
float x,
float y,
float z,
float px,
float py,
float pz)
161 if (mCurrentHitsIndices[detector - 1][
sector] == -1) {
162 mTotLightPMC = mTotLightPMQ = 0;
163 if (currentMediumid == mMediumPMCid) {
165 }
else if (currentMediumid == mMediumPMQid) {
169 math_utils::Vector3D<float>
pos(
x,
y,
z);
170 math_utils::Vector3D<float> mom(px, py, pz);
171 addHit(trackn, parent, issecondary, trackenergy, detector,
sector,
172 pos, mom, tof, xImp, eDep, mTotLightPMC, mTotLightPMQ);
174 mCurrentHitsIndices[detector - 1][
sector] = mHits->size() - 1;
179 auto& curHit = (*mHits)[mCurrentHitsIndices[detector - 1][
sector]];
181 curHit.setNoNumContributingSteps(curHit.getNumContributingSteps() + 1);
182 int nPMC{0}, nPMQ{0};
183 if (currentMediumid == mMediumPMCid) {
184 mTotLightPMC += nphe;
186 }
else if (currentMediumid == mMediumPMQid) {
187 mTotLightPMQ += nphe;
191 curHit.SetEnergyLoss(curHit.GetEnergyLoss() + eDep);
192 curHit.setPMCLightYield(curHit.getPMCLightYield() + nPMC);
193 curHit.setPMQLightYield(curHit.getPMQLightYield() + nPMQ);
200 void flushSpatialResponse();
203 float mPrimaryEnergy;
204 math_utils::Vector3D<float> mXImpact;
212 std::vector<o2::zdc::Hit>* mHits;
214 float mLumiLength = 0;
215 float mTCLIAAPERTURE = 3.5;
216 float mTCLIAAPERTURENEG = 3.5;
217 float mVCollSideCCentreY = 0.;
219 int mZNENVVolID = -1;
220 int mZPENVVolID = -1;
225 int mLastPrincipalTrackEntered = -1;
227 static constexpr int NUMDETS = 5;
228 static constexpr int NUMSECS = 5;
233 int mCurrentHitsIndices[NUMDETS][NUMSECS] = {-1};
235 static constexpr int ZNRADIUSBINS = 18;
236 static constexpr int ZPRADIUSBINS = 28;
237 static constexpr int ANGLEBINS = 90;
239 float mLightTableZN[4][ANGLEBINS][ZNRADIUSBINS] = {1.};
240 float mLightTableZP[4][ANGLEBINS][ZPRADIUSBINS] = {1.};
242 SpatialPhotonResponse mNeutronResponseImage;
244 SpatialPhotonResponse mProtonResponseImage;
246 TParticle mCurrentPrincipalParticle{};
249 using ParticlePhotonResponse = std::vector<std::pair<TParticle,
250 std::pair<SpatialPhotonResponse, SpatialPhotonResponse>>>;
252 ParticlePhotonResponse mResponses;
253 ParticlePhotonResponse* mResponsesPtr = &mResponses;
256#ifdef ZDC_FASTSIM_ONNX
257 fastsim::NeuralFastSimulation* mFastSimClassifier =
nullptr;
258 fastsim::NeuralFastSimulation* mFastSimModelNeutron =
nullptr;
259 fastsim::NeuralFastSimulation* mFastSimModelProton =
nullptr;
262 fastsim::processors::StandardScaler* mClassifierScaler =
nullptr;
263 fastsim::processors::StandardScaler* mModelScalerNeutron =
nullptr;
264 fastsim::processors::StandardScaler* mModelScalerProton =
nullptr;
267 using FastSimResults = std::vector<std::array<long, 5>>;
268 FastSimResults mFastSimResults;
271 bool FastSimToHits(
const Ort::Value& response,
const TParticle& particle,
int detector);
274 constexpr std::pair<const int, const int> determineDetectorSize(
int detector)
276 if (detector ==
ZNA || detector ==
ZNC) {
278 }
else if (detector ==
ZPA || detector ==
ZPC) {
286 template <
typename Det>
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 maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t
o2::zdc::Hit * addHit(int32_t trackID, int32_t parentID, int32_t sFlag, float primaryEnergy, int32_t detID, int32_t secID, math_utils::Vector3D< float > pos, math_utils::Vector3D< float > mom, float tof, math_utils::Vector3D< float > xImpact, double energyloss, int32_t nphePMC, int32_t nphePMQ)