BmnRoot
Loading...
Searching...
No Matches
BmnSsdDigitizeParameters.cxx
Go to the documentation of this file.
1
7
8#include "FairParamList.h"
9#include "FairDetParIo.h"
10#include "FairParIo.h"
11
12#include <sstream>
13#include <iomanip>
14
15using std::fixed;
16using std::setprecision;
17using std::setw;
18using std::right;
19
20
21// ----- Constructor ----------------------------------------------------
23 const char* title,
24 const char* context)
25 : FairParGenericSet(name, title, context),
26 fELossModel(-1),
27 fUseLorentzShift(kTRUE),
28 fUseDiffusion(kTRUE),
29 fUseCrossTalk(kTRUE),
30 fGenerateNoise(kFALSE),
31 fVdep(-1.),
32 fVbias(-1.),
33 fTemperature(0.),
34 fCcoup(-1.),
35 fCis(-1.),
36 fDynRange(0.),
37 fThreshold(0.),
38 fNofAdc(0),
39 fTimeResolution(0.),
40 fDeadTime(0.),
41 fNoise(0.),
42 fZeroNoiseRate(0.),
43 fDeadChannelFrac(0.),
44 fStripPitch(-1.),
45 fDiscardSecondaries(kFALSE)
46{
47}
48// --------------------------------------------------------------------------
49
50
51
52// ----- String output ----------------------------------------------------
54 std::stringstream ss;
55
56 ss << GetTitle() << ":";
57 ss << "\n\t Energy loss model ";
58 switch (fELossModel) {
59 case 0: ss << "IDEAL"; break;
60 case 1: ss << "UNIFORM"; break;
61 case 2: ss << "NON_UNIFORM"; break;
62 default: ss << "!!! UNKNOWN !!!"; break;
63 }
64 ss << "\n\t Lorentz shift " << (fUseLorentzShift ? "ON" : "OFF");
65 ss << "\n\t Diffusion " << (fUseDiffusion ? "ON" : "OFF");
66 ss << "\n\t Cross-talk " << (fUseCrossTalk ? "ON" : "OFF");
67 ss << "\n\t Noise " << (fGenerateNoise ? "ON" : "OFF");
68
69 ss << "\n\t Sensor operation conditions :\n";
70 ss << "\t\t Depletion voltage "
71 << fVdep << " V\n";
72 ss << "\t\t Bias voltage "
73 << fVbias << " V\n";
74 ss << "\t\t Temperature "
75 << fTemperature << " K\n";
76 ss << "\t\t Coupling capacitance "
77 << fCcoup << " pF\n";
78 ss << "\t\t Inter-strip capacitance "
79 << fCis << " pF\n";
80
81 ss << "\t ASIC parameters :\n";
82 ss << "\t\t Dynamic range "
83 << fDynRange << " e\n";
84 ss << "\t\t Threshold "
85 << fThreshold << " e\n";
86 ss << "\t\t ADC channels "
87 << fNofAdc << " \n";
88 ss << "\t\t Time resolution "
89 << fTimeResolution << " ns\n";
90 ss << "\t\t Dead time "
91 << fDeadTime << " ns\n";
92 ss << "\t\t Noise (RMS) "
93 << fNoise << " e\n";
94 ss << "\t\t Zero noise rate "
95 << fZeroNoiseRate << " / ns\n";
96 ss << "\t\t Fraction of dead channels "
97 << fDeadChannelFrac;
98
99 if ( fDiscardSecondaries ) ss << "\n\t!!! Secondaries will be discarded!!!";
100 if ( fStripPitch > 0. ) ss << "\n\t!!! Overriding strip pitch with "
101 << fStripPitch << " cm !!!";
102
103 return ss.str();
104}
105// --------------------------------------------------------------------------
106
107
108// ----- Public method clear -------------------------------------------
110{
111 status = kFALSE;
112 resetInputVersions();
113}
114// -------------------------------------------------------------------------
115
116// -------------------------------------------------------------------------
117
119{
120
121 if (!l) return;
122
123 l->add("ELossModel", fELossModel);
124 l->add("UseLorentzShift", static_cast<Int_t>(fUseLorentzShift));
125 l->add("UseDiffusion", static_cast<Int_t>(fUseDiffusion));
126 l->add("UseCrossTalk", static_cast<Int_t>(fUseCrossTalk));
127 l->add("GenerateNoise", static_cast<Int_t>(fGenerateNoise));
128 l->add("Vdep", fVdep);
129 l->add("Vbias", fVbias);
130 l->add("Temperature", fTemperature);
131 l->add("Ccoup", fCcoup);
132 l->add("Cis", fCis);
133 l->add("DynRange", fDynRange);
134 l->add("Threshold", fThreshold);
135 l->add("NofAdc", fNofAdc);
136 l->add("TimeResolution", fTimeResolution);
137 l->add("DeadTime", fDeadTime);
138 l->add("Noise", fNoise);
139 l->add("ZeroNoiseRate", fZeroNoiseRate);
140 l->add("StripPitch", fStripPitch);
141 l->add("DiscardSecondaries", static_cast<Int_t>(fDiscardSecondaries));
142
143}
144
146{
147
148 if (!l) return kFALSE;
149
150 Int_t iTemp;
151 if ( ! l->fill("ELossModel", &fELossModel) ) return kFALSE;
152
153 if ( ! l->fill("UseLorentzShift", &iTemp) ) return kFALSE;
154 fUseLorentzShift = ( 1 == iTemp? kTRUE : kFALSE);
155
156 if ( ! l->fill("UseDiffusion", &iTemp) ) return kFALSE;
157 fUseDiffusion = ( 1 == iTemp? kTRUE : kFALSE);
158
159 if ( ! l->fill("UseCrossTalk", &iTemp) ) return kFALSE;
160 fUseCrossTalk = ( 1 == iTemp? kTRUE : kFALSE);
161
162 if ( ! l->fill("GenerateNoise", &iTemp) ) return kFALSE;
163 fGenerateNoise = ( 1 == iTemp? kTRUE : kFALSE);
164
165 if ( ! l->fill("Vdep", &fVdep) ) return kFALSE;
166 if ( ! l->fill("Vbias", &fVbias) ) return kFALSE;
167 if ( ! l->fill("Temperature", &fTemperature) ) return kFALSE;
168 if ( ! l->fill("Ccoup", &fCcoup) ) return kFALSE;
169 if ( ! l->fill("Cis", &fCis) ) return kFALSE;
170 if ( ! l->fill("DynRange", &fDynRange) ) return kFALSE;
171 if ( ! l->fill("Threshold", &fThreshold) ) return kFALSE;
172 if ( ! l->fill("NofAdc", &fNofAdc) ) return kFALSE;
173 if ( ! l->fill("TimeResolution", &fTimeResolution) ) return kFALSE;
174 if ( ! l->fill("DeadTime", &fDeadTime) ) return kFALSE;
175 if ( ! l->fill("Noise", &fNoise) ) return kFALSE;
176 if ( ! l->fill("ZeroNoiseRate", &fZeroNoiseRate) ) return kFALSE;
177 if ( ! l->fill("StripPitch", &fStripPitch) ) return kFALSE;
178
179 if ( ! l->fill("DiscardSecondaries", &iTemp) ) return kFALSE;
180 fDiscardSecondaries = ( 1 == iTemp? kTRUE : kFALSE);
181
182 return kTRUE;
183}
Bool_t fUseCrossTalk
Bool_t fGenerateNoise
Bool_t fUseDiffusion
Bool_t fUseLorentzShift
BmnSsdDigitizeParameters(const char *name="BmnSsdDigitizeParameters", const char *title="Ssd digitization parameters", const char *context="Default")
virtual std::string ToString() const