Project
Loading...
Searching...
No Matches
TRsim.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
12/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
13 * See cxx source for full Copyright notice */
14
15/* $Id$ */
16
18// //
19// TRD simulation - multimodule (regular rad.) //
20// //
22#ifndef ALICEO2_TRD_TRSIM_H_
23#define ALICEO2_TRD_TRSIM_H_
24
25#include <TMath.h>
26#include <array>
27#include <vector>
28
29class TH1D;
30
31namespace o2
32{
33namespace trd
34{
35class TRsim
36{
37 public:
38 TRsim();
40 void init();
41 int createPhotons(int pdg, float p, std::vector<float>& ePhoton);
42 int calculatePhotons(float p, float mass, std::vector<float>& ePhoton);
43 double getSigma(double energykeV);
44 double interpolate(double energyMeV, double* en, const double* const mu, int n);
45 int locate(double* xv, int n, double xval, int& kl, double& dx);
46 double getOmega(float rho, float z, float a) { return (28.8 * TMath::Sqrt(rho * z / a)); };
47 int selectNFoils(float p) const;
48
49 void setFoilThick(float t)
50 {
51 mFoilThick = t;
52 setSigma();
53 };
54 void setGapThick(float t)
55 {
56 mGapThick = t;
57 setSigma();
58 };
59 void setFoilDens(float d)
60 {
61 mFoilDens = d;
63 setSigma();
64 };
65 void setFoilZ(float z)
66 {
67 mFoilZ = z;
69 };
70 void setFoilA(float a)
71 {
72 mFoilA = a;
74 };
75 void setGapDens(float d)
76 {
77 mGapDens = d;
79 setSigma();
80 };
81 void setGapZ(float z)
82 {
83 mGapZ = z;
85 };
86 void setGapA(float a)
87 {
88 mGapA = a;
90 };
91 void setTemp(float t)
92 {
93 mTemp = t;
94 setSigma();
95 };
96 void setSigma();
97
98 double getMuPo(double energyMeV);
99 double getMuCO(double energyMeV);
100 double getMuXe(double energyMeV);
101 double getMuAr(double energyMeV);
102 double getMuMy(double energyMeV);
103 double getMuN2(double energyMeV);
104 double getMuO2(double energyMeV);
105 double getMuHe(double energyMeV);
106 double getMuAi(double energyMeV);
107
108 float getFoilThick() const { return mFoilThick; };
109 float getGapThick() const { return mGapThick; };
110 float getFoilDens() const { return mFoilDens; };
111 float getGapDens() const { return mGapDens; };
112 double getFoilgetOmega() const { return mFoilOmega; };
113 double getGapgetOmega() const { return mGapOmega; };
114 float getTemp() const { return mTemp / 273.16; };
115 TH1D* getSpectrum() const { return mSpectrum; };
116
117 protected:
118 static constexpr int mNFoilsDim = 7; // Dimension of the NFoils array
119 std::array<int, mNFoilsDim> mNFoils; // [mNFoilsDim] Number of foils in the radiator stack
120 std::array<double, mNFoilsDim> mNFoilsUp; // [mNFoilsDim] Upper momenta for a given number of foils
121 float mFoilThick; // Thickness of the foils (cm)
122 float mGapThick; // Thickness of the gaps between the foils (cm)
123 float mFoilDens; // Density of the radiator foils (g/cm^3)
124 float mGapDens; // Density of the gas in the radiator gaps (g/cm^3)
125 double mFoilOmega; // Plasma frequency of the radiator foils
126 double mGapOmega; // Plasma frequency of the gas in the radiator gaps
127 float mFoilZ; // Z of the foil material
128 float mGapZ; // Z of the gas in the gaps
129 float mFoilA; // A of the foil material
130 float mGapA; // A of the gas in the gaps
131 float mTemp; // Temperature of the radiator gas (Kelvin)
132 static constexpr int mSpNBins = 200; // Number of bins of the TR spectrum
133 static constexpr float mSpRange = 100; // Range of the TR spectrum
134 float mSpBinWidth; // Bin width of the TR spectrum
135 float mSpLower; // Lower border of the TR spectrum
136 float mSpUpper; // Upper border of the TR spectrum
137 std::array<double, mSpNBins> mSigma; // [mSpNBins] Array of sigma values
138 TH1D* mSpectrum = nullptr; // TR photon energy spectrum
139};
140} // namespace trd
141} // namespace o2
142#endif
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events d
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
double mGapOmega
Definition TRsim.h:126
void setSigma()
Definition TRsim.cxx:276
double mFoilOmega
Definition TRsim.h:125
int createPhotons(int pdg, float p, std::vector< float > &ePhoton)
Definition TRsim.cxx:123
double getMuAr(double energyMeV)
Definition TRsim.cxx:419
double interpolate(double energyMeV, double *en, const double *const mu, int n)
Definition TRsim.cxx:634
double getSigma(double energykeV)
Definition TRsim.cxx:289
std::array< double, mSpNBins > mSigma
Definition TRsim.h:137
void setGapA(float a)
Definition TRsim.h:86
static constexpr int mNFoilsDim
Definition TRsim.h:118
void setFoilZ(float z)
Definition TRsim.h:65
float mFoilZ
Definition TRsim.h:127
float mSpLower
Definition TRsim.h:135
float getFoilThick() const
Definition TRsim.h:108
float mGapThick
Definition TRsim.h:122
float mGapDens
Definition TRsim.h:124
double getMuXe(double energyMeV)
Definition TRsim.cxx:376
float mFoilDens
Definition TRsim.h:123
float mSpBinWidth
Definition TRsim.h:134
double getGapgetOmega() const
Definition TRsim.h:113
void setGapZ(float z)
Definition TRsim.h:81
float mGapA
Definition TRsim.h:130
void setGapThick(float t)
Definition TRsim.h:54
float getFoilDens() const
Definition TRsim.h:110
void setFoilThick(float t)
Definition TRsim.h:49
std::array< int, mNFoilsDim > mNFoils
Definition TRsim.h:119
void init()
Definition TRsim.cxx:70
int locate(double *xv, int n, double xval, int &kl, double &dx)
Definition TRsim.cxx:652
float getGapDens() const
Definition TRsim.h:111
double getMuPo(double energyMeV)
Definition TRsim.cxx:306
void setGapDens(float d)
Definition TRsim.h:75
double getFoilgetOmega() const
Definition TRsim.h:112
int calculatePhotons(float p, float mass, std::vector< float > &ePhoton)
Definition TRsim.cxx:161
double getMuO2(double energyMeV)
Definition TRsim.cxx:526
float getGapThick() const
Definition TRsim.h:109
TH1D * getSpectrum() const
Definition TRsim.h:115
std::array< double, mNFoilsDim > mNFoilsUp
Definition TRsim.h:120
double getMuAi(double energyMeV)
Definition TRsim.cxx:596
float getTemp() const
Definition TRsim.h:114
void setFoilA(float a)
Definition TRsim.h:70
void setFoilDens(float d)
Definition TRsim.h:59
float mFoilThick
Definition TRsim.h:121
float mTemp
Definition TRsim.h:131
double getMuN2(double energyMeV)
Definition TRsim.cxx:491
double getOmega(float rho, float z, float a)
Definition TRsim.h:46
double getMuCO(double energyMeV)
Definition TRsim.cxx:341
float mGapZ
Definition TRsim.h:128
int selectNFoils(float p) const
Definition TRsim.cxx:685
float mSpUpper
Definition TRsim.h:136
void setTemp(float t)
Definition TRsim.h:91
double getMuMy(double energyMeV)
Definition TRsim.cxx:456
static constexpr int mSpNBins
Definition TRsim.h:132
double getMuHe(double energyMeV)
Definition TRsim.cxx:561
float mFoilA
Definition TRsim.h:129
static constexpr float mSpRange
Definition TRsim.h:133
TH1D * mSpectrum
Definition TRsim.h:138
GLdouble n
Definition glcorearb.h:1982
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...