CbmRoot
Loading...
Searching...
No Matches
CbmTrdParModGas.h
Go to the documentation of this file.
1/* Copyright (C) 2018-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer], Alexandru Bercuci */
4
5#ifndef CBMTRDPARMODGAS_H
6#define CBMTRDPARMODGAS_H
7
8#include "CbmTrdParMod.h" // for CbmTrdParMod
9
10#include <Rtypes.h> // for CLRBIT, SETBIT, TESTBIT, THashConsistencyH...
11#include <RtypesCore.h> // for Double_t, Int_t, Float_t, Char_t, UShort_t
12#include <TString.h> // for TString
13
14class TDirectory;
15class TH2F;
16
17#define NSHELLS 3 // no of atomic shells to be considered in the PE effect
18
21public:
23 {
24 kDetType = 0
25 ,
27 ,
28 kPID
29 };
30 CbmTrdParModGas(const char* title = "TRD gas properties definition");
31 virtual ~CbmTrdParModGas();
33 Double_t GetCO2() const { return fPercentCO2; }
34 const Char_t* GetDetName() const { return (GetDetType() ? "MB" : "GSI"); }
35 Int_t GetDetType() const { return TESTBIT(fConfig, kDetType); }
36 Double_t GetDriftTime(Double_t y0, Double_t z0) const;
37 void GetElectricPotential(Int_t& ua, Int_t& ud) const
38 {
39 ua = fUa;
40 ud = fUd;
41 }
46 Float_t GetBindingEnergy(const Char_t shell = 'K', Bool_t main = kTRUE) const;
51 Float_t EkevFC(Float_t ekev) const;
56 Float_t EfCkeV(Float_t efc) const;
57 TString GetFileName() const { return fFileNamePID; }
58 Double_t GetNobleGas() const { return 1. - fPercentCO2; }
59 const Char_t* GetNobleGasName() const { return (GetNobleGasType() - 1 ? "Ar" : "Xe"); }
60 Int_t GetNobleGasType() const { return TESTBIT(fConfig, kNobleGasType) ? 2 : 1; }
64 Float_t GetNonIonizingBR(const Char_t shell = 'K') const;
69 Char_t GetPEshell(Float_t Ex) const;
70 Int_t GetPidType() const { return TESTBIT(fConfig, kPID); }
74 Int_t GetShellId(const Char_t shell) const;
75 UShort_t GetUanode() const { return fUa; }
76 UShort_t GetUdrift() const { return fUd; }
77 virtual void Print(Option_t* opt = "") const;
87 Double_t ScanDriftTime(Double_t y0, Double_t z0, Double_t dzdy, Double_t dy) const;
88
95 void SetDriftMap(TH2F* hm, TDirectory* d);
96 void SetDw(Double_t dw) { fDw = dw; }
97 void SetGasThick(Double_t sz) { fGasThick = sz; }
98 void SetDetType(Int_t gsi = 0) { gsi ? SETBIT(fConfig, kDetType) : CLRBIT(fConfig, kDetType); }
99 void SetCO2(Double_t p) { fPercentCO2 = p; }
100 void SetFileName(const Char_t* fn) { fFileNamePID = fn; }
101 void SetNobleGas(Double_t p) { fPercentCO2 = 1 - p; }
103 void SetPidType(Int_t like = 1) { like ? SETBIT(fConfig, kPID) : CLRBIT(fConfig, kPID); }
104 void SetElectricPotential(Int_t ua, Int_t ud)
105 {
106 fUa = ua;
107 fUd = ud;
108 }
109
110private:
113
114 Int_t fConfig;
115 UShort_t fUa;
116 UShort_t fUd;
117 Double_t fDw;
118 Double_t fGasThick;
119 Double_t fPercentCO2;
120 TH2F* fDriftMap;
121 TString fFileNamePID;
122
123 static Float_t fgkBindingEnergy[2][NSHELLS];
124 static Float_t fgkBR[2][NSHELLS - 1];
125 static Float_t fgkWi[3];
126 static Float_t fgkGGainUaPar[2];
127 static Float_t fgkE0;
128 ClassDef(CbmTrdParModGas,
129 1) // Definition of gas parameters for one TRD module
130};
131
132#endif
#define NSHELLS
#define SETBIT(n, i)
Definition RTypes.h:15
#define TESTBIT(n, i)
Definition RTypes.h:17
#define CLRBIT(n, i)
Definition RTypes.h:16
int main(int argc, char *argv[])
Definition of gas parameters for one TRD module.
Int_t GetNobleGasType() const
void SetFileName(const Char_t *fn)
void SetElectricPotential(Int_t ua, Int_t ud)
UShort_t fUd
drift voltage
UShort_t GetUanode() const
Double_t fGasThick
gas thickness
Double_t GetCO2() const
void SetNobleGas(Double_t p)
Int_t GetDetType() const
Double_t fDw
anode wire pitch
const Char_t * GetDetName() const
void SetDetType(Int_t gsi=0)
Char_t GetPEshell(Float_t Ex) const
Get first atomic shell which can be excited by PE effect.
static Float_t fgkE0
min energy [ADC ch] which can be measured
Double_t ScanDriftTime(Double_t y0, Double_t z0, Double_t dzdy, Double_t dy) const
Get prompt signal for track segment in the y-z plane.
const Char_t * GetNobleGasName() const
void SetCO2(Double_t p)
static Float_t fgkGGainUaPar[2]
gas gaian parametrization on Ua for Ar on Buch detector
virtual ~CbmTrdParModGas()
Double_t fPercentCO2
Percentage of CO2.
Float_t GetNonIonizingBR(const Char_t shell='K') const
Get branching ration for radiative process on the.
CbmTrdParModGas(const char *title="TRD gas properties definition")
static Float_t fgkBR[2][NSHELLS - 1]
branching ratio for non-ionizing decay of Ar and Xe
UShort_t fUa
anode voltage
static Float_t fgkWi[3]
average energy to produce one electron-ion pair for ar, xe and co2
Float_t GetBindingEnergy(const Char_t shell='K', Bool_t main=kTRUE) const
Get binding energy for the working gas.
Int_t GetPidType() const
TH2F * fDriftMap
drift time map for one amplification cell
void GetElectricPotential(Int_t &ua, Int_t &ud) const
void SetDriftMap(TH2F *hm, TDirectory *d)
Load drift map for current settings from repository.
void SetNobleGasType(Int_t ar=1)
void SetDw(Double_t dw)
void SetGasThick(Double_t sz)
Int_t fConfig
config TRD gas see CbmTrdParModGasDef
Int_t GetShellId(const Char_t shell) const
Get atomic shell index.
Float_t EfCkeV(Float_t efc) const
Convert pad-plane charge in fC to energy deposit [keV] taking into account the gas gain.
static Float_t fgkBindingEnergy[2][NSHELLS]
binding energy in keV for first atomic shells of Ar and Xe
void SetPidType(Int_t like=1)
TString fFileNamePID
filename for PID database
UShort_t GetUdrift() const
virtual void Print(Option_t *opt="") const
Float_t EkevFC(Float_t ekev) const
Convert Energy debposit in keV to pad-plane charge taking into account the gas gain.
Double_t GetDriftTime(Double_t y0, Double_t z0) const
const CbmTrdParModGas & operator=(const CbmTrdParModGas &ref)
TString GetFileName() const
Double_t GetNobleGas() const
CbmTrdParModGas(const CbmTrdParModGas &ref)
Definition of generic parameters for one TRD module.