10#include <TGenericClassInfo.h>
15#include <TObjString.h>
51 , fFileNamePID(
"parameters/trd/Likelihood_Xenon_85_v20b_tdr18_apr21.root")
56 TObjArray* so = s.Tokenize(
"/");
57 for (Int_t ie(0); ie < so->GetEntriesFast(); ie += 2) {
58 name = ((TObjString*) (*so)[ie])->String();
59 if (name.EqualTo(
"Module"))
fModuleId = ((TObjString*) (*so)[ie + 1])->String().Atoi();
60 else if (name.EqualTo(
"Ua"))
61 fUa = ((TObjString*) (*so)[ie + 1])->String().Atoi();
62 else if (name.EqualTo(
"Ud"))
63 fUd = ((TObjString*) (*so)[ie + 1])->String().Atoi();
64 else if (name.EqualTo(
"Gas")) {
65 TString gas = ((TObjString*) (*so)[ie + 1])->String();
67 else if (gas.EqualTo(
"Xe"))
70 LOG(warn) << GetName() <<
":: gas type \"" << gas <<
"\" not defined. Default to Xe.";
104 if (gasId == 0) gain *= 0.6;
106 Float_t efC = gain * ekev * 0.16 / wi;
108 printf(
" ua[V]=%d gain[%5.2e] wi[eV]=%5.2f :: E[keV]=%6.3f E[fC]=%6.2f\n",
fUa, gain, wi, ekev, efC);
140 if (gasId == 0) gain *= 0.6;
142 Float_t ekev = efC * wi / gain / 0.16;
144 printf(
" ua[V]=%d gain[%5.2e] wi[eV]=%5.2f :: E[keV]=%6.3f E[fC]=%6.2f\n",
fUa, gain, wi, ekev, efC);
159 LOG(warn) << GetName() <<
"::GetShellId: Atomic shell : " << shell <<
" not defined for gas "
170 if (shellId < 0)
return 0;
176 LOG(warn) << GetName() <<
"::GetBindingEnergy: Request atomic shell : " << shellId + 1 <<
" not defined for gas "
177 << (gasId ?
"Ar" :
"Xe");
189 if (shellId < 0)
return 0;
191 return fgkBR[gasId][shellId];
197 const Char_t shellName[
NSHELLS] = {
'K',
'L',
'M'};
199 for (Int_t ishell(0); ishell <
NSHELLS; ishell++) {
201 return shellName[ishell];
203 LOG(debug) << GetName() <<
"::GetPEshell: Ex[keV] " << Ex
205 <<
" for gas " << (gasId ?
"Ar" :
"Xe");
213 Int_t by(ay->FindBin(y0)), bz(az->FindBin(z0));
214 Double_t tmin(
fDriftMap->GetBinContent(by, bz));
215 if (
VERBOSE) printf(
"GetDriftTime :: Start @ dt=%3d [ns]\n", Int_t(tmin));
222 printf(
"%s @ %4d ", GetName(),
fModuleId);
231 Double_t y1 = y0 + dy, z1 = z0 + dzdy * dy, dw(
fDw), dwh(0.5 * dw);
235 printf(
"ScanDriftTime :: Try : [%7.4f %7.4f] => [%7.4f %7.4f] dzdy[%5.2f] "
237 y0, z0, y1, z1, dzdy, dy);
238 while (y1 < -dwh - 1e-3) {
242 while (y1 > dwh + 1.e-3) {
250 Int_t by(ay->FindBin(y1)), bz(az->FindBin(z1)), nby(ay->GetNbins()), nbz(az->GetNbins());
251 Float_t dyStep = ay->GetBinWidth(1), tmin(500), tmax(0), tc(0);
252 while (by > 0 && by <= nby && bz <= nbz) {
253 bz = az->FindBin(z1);
254 tc =
h->GetBinContent(by, bz);
258 if (tc < tmin) tmin = tc;
259 if (tc > tmax) tmax = tc;
261 z1 += TMath::Abs(dzdy) * dyStep;
271 if (
VERBOSE) printf(
"ScanDriftTime :: Start @ dt=%3d [ns]\n", Int_t(tmin));
ClassImp(CbmConverterManager)
int main(int argc, char *argv[])
Data class with information on a STS local track.
Definition of gas parameters for one TRD module.
Int_t GetNobleGasType() const
UShort_t fUd
drift voltage
Double_t fDw
anode wire pitch
const Char_t * GetDetName() const
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
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.
TH2F * fDriftMap
drift time map for one amplification cell
void SetDriftMap(TH2F *hm, TDirectory *d)
Load drift map for current settings from repository.
void SetNobleGasType(Int_t ar=1)
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
TString fFileNamePID
filename for PID database
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
Double_t GetNobleGas() const
Definition of generic parameters for one TRD module.