12 #include "FairLogger.h" 14 using ERChannel = ushort;
16 const unsigned short undefined_channel = std::numeric_limits<ERChannel>::max();
20 const int approx_beamdet_point_number = 100;
21 const int approx_beamdet_tof_digi_number = 10;
22 const int approx_beamdet_mwpc_digi_number = 100;
23 const int approx_beamdet_track_number = 10;
24 const int approx_beamdet_particle_number = 10;
25 const int approx_telescope_point_number = 100;
26 const int approx_telescope_digi_number = 10;
27 const int approx_telescope_track_number = 10;
28 const int approx_telescope_particle_number = 10;
30 enum ERDataObjectType {Point, Digi, Track, Particle};
31 inline TString ERDataObjectTypeStr(ERDataObjectType
object) {
33 case Point :
return "Point";
34 case Digi :
return "Digi";
35 case Track :
return "Track";
36 case Particle :
return "Particle";
37 default : LOG(FATAL) <<
"Unknown ERDataObject type\n";
41 enum ChannelSide {First, Second, None};
42 enum SensetiveType {Si, CsI, LaBr};
43 enum OrientationAroundZ {X, Y, Default};
44 inline TString SensetiveTypeStr(SensetiveType type) {
46 case Si :
return "Si";
47 case CsI :
return "CsI";
48 case LaBr :
return "LaBr";
49 default : LOG(FATAL) <<
"Unknown telescope sensetive type\n";
53 inline TString ChannelSideStr(ChannelSide side) {
55 case First :
return "1";
56 case Second :
return "2";
57 case None : LOG(FATAL)
58 <<
"String representation for None channel side is not available\n";
59 default : LOG(FATAL) <<
"Unknown telescope channel side\n";
63 inline TString OrientationAroundZStr(OrientationAroundZ type) {
67 case Default : LOG(FATAL)
68 <<
"String representation for Default orientation around Z is not available\n";
69 default : LOG(FATAL) <<
"Unknown telescope orientation around z\n";
74 class G4ParticleDefinition;
77 #define TempNorm 293.16 78 #define AMU 931.494028 80 TMatrixD* ReadCalFile(TString fileName);
81 double EiEo(
double tableER[][105],
double Tp,
double Rp);
82 int ReadRint(
char* Fname,
double Ranges[][105]);
83 int intrp4(
double* x,
double* y,
double* c);
85 Double_t CalcElossIntegralVolStep(Double_t T,
const G4ParticleDefinition& ion,
86 const G4Material& mat,
const Double_t range,
87 const Double_t intStep=1e-4);
89 Double_t ComputeElossIntegralVolStep(Double_t kineticEnergy,
const G4ParticleDefinition& particle,
90 const G4Material& material,
const TString& process_name,
91 const Double_t range);
94 static double CalcDeDx_long(
const TString& material,
int pdg,
double kineticEnergy,
const Double_t range);
95 static double CalcDeDx(
const TString& material,
int pdg,
double kineticEnergy);