21 template <
typename Arithmetic, Gaudi::Accumulators::atomicity Atomicity>
31 auto randSvc = service<IRndmGenSvc>(
"RndmGenSvc",
true );
33 error() <<
"Unable to create Random generator" <<
endmsg;
38 for (
unsigned int iH = 0; iH <
m_nHistos; ++iH ) {
40 title <<
"Histogram Number " << iH;
48 for (
unsigned int iT = 0; iT <
m_nTracks; ++iT ) {
83 const double gauss( Gauss() );
84 const double gauss2( Gauss() );
85 const double flat( Flat() );
86 const double gauss3( Gauss3() );
91 ++m_gaussVflat[{ flat,
gauss }];
92 m_gaussVflat += { flat,
gauss };
93 ++m_gaussVflatVgauss[{ flat,
gauss, gauss2 }];
94 m_gaussVflatVgauss += { flat,
gauss, gauss2 };
95 ++m_gauss_noato[
gauss];
96 ++m_gaussVflat_noato[{ flat,
gauss }];
97 ++m_gaussVflatVgauss_noato[{ flat,
gauss, gauss2 }];
98 ++m_gauss_int[(int)
gauss];
99 ++m_gaussVflat_int[{ (int)flat, (
int)
gauss }];
100 ++m_gaussVflatVgauss_int[{ (int)flat, (
int)
gauss, (int)gauss2 }];
103 m_gauss_w[
gauss] += .5;
104 m_gauss_w += {
gauss, .5 };
105 m_gaussVflat_w[{ flat,
gauss }] += .5;
106 m_gaussVflat_w += { { flat,
gauss }, .5 };
107 m_gaussVflatVgauss_w[{ flat,
gauss, gauss2 }] += .5;
108 m_gaussVflatVgauss_w += { { flat,
gauss, gauss2 }, .5 };
111 auto gauss_buf = m_gauss_buf.buffer();
112 auto gaussVflat_buf = m_gaussVflat_buf.buffer();
113 auto gaussVflatVgauss_buf = m_gaussVflatVgauss_buf.buffer();
114 for (
unsigned int i = 0; i < 10; i++ ) {
116 ++gaussVflat_buf[{ flat,
gauss }];
117 ++gaussVflatVgauss_buf[{ flat,
gauss, gauss2 }];
121 m_prof_gauss[
gauss] += gauss3;
122 m_prof_gauss += {
gauss, gauss3 };
123 m_prof_gaussVflat[{ flat,
gauss }] += gauss3;
124 m_prof_gaussVflat += { flat,
gauss, gauss3 };
125 m_prof_gaussVflatVgauss[{ flat,
gauss, gauss2 }] += gauss3;
126 m_prof_gaussVflatVgauss += { flat,
gauss, gauss2, gauss3 };
127 m_prof_gauss_noato[
gauss] += gauss3;
128 m_prof_gaussVflat_noato[{ flat,
gauss }] += gauss3;
129 m_prof_gaussVflatVgauss_noato[{ flat,
gauss, gauss2 }] += gauss3;
130 m_prof_gauss_int[(int)
gauss] += (
int)gauss3;
131 m_prof_gaussVflat_int[{ (int)flat, (
int)
gauss }] += (int)gauss3;
132 m_prof_gaussVflatVgauss_int[{ (int)flat, (
int)
gauss, (int)gauss2 }] += (int)gauss3;
135 m_prof_gauss_w[
gauss] += { gauss3, .5 };
136 m_prof_gauss_w += { {
gauss, gauss3 }, .5 };
137 m_prof_gaussVflat_w[{ flat,
gauss }] += { gauss3, .5 };
138 m_prof_gaussVflat_w += { { flat,
gauss, gauss3 }, .5 };
139 m_prof_gaussVflatVgauss_w[{ flat,
gauss, gauss2 }] += { gauss3, .5 };
140 m_prof_gaussVflatVgauss_w += { { flat,
gauss, gauss2, gauss3 }, .5 };
143 auto prof_gauss_buf = m_prof_gauss_buf.buffer();
144 auto prof_gaussVflat_buf = m_prof_gaussVflat_buf.buffer();
145 auto prof_gaussVflatVgauss_buf = m_prof_gaussVflatVgauss_buf.buffer();
146 for (
unsigned int i = 0; i < 10; i++ ) {
147 prof_gauss_buf[
gauss] += gauss3;
148 prof_gaussVflat_buf[{ flat,
gauss }] += gauss3;
149 prof_gaussVflatVgauss_buf[{ flat,
gauss, gauss2 }] += gauss3;
152 if ( m_nCalls.nEntries() == 0 ) always() <<
"Filling Histograms...... Please be patient !" <<
endmsg;
164 this,
"Gauss",
"Gaussian mean=0, sigma=1, atomic", { 100, -5, 5,
"X" } };
166 this,
"GaussFlat",
"Gaussian V Flat, atomic", { { 50, -5, 5,
"X" }, { 50, -5, 5,
"Y" } } };
170 "Gaussian V Flat V Gaussian, atomic",
171 { { 10, -5, 5,
"X" }, { 10, -5, 5,
"Y" }, { 10, -5, 5,
"Z" } } };
175 this,
"GaussNA",
"Gaussian mean=0, sigma=1, non atomic", { 100, -5, 5 } };
177 this,
"GaussFlatNA",
"Gaussian V Flat, non atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
181 "Gaussian V Flat V Gaussian, non atomic",
182 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
186 this,
"GaussInt",
"Gaussian mean=0, sigma=1, integer values", { 10, -5, 5 } };
188 this,
"GaussFlatInt",
"Gaussian V Flat, integer values", { { 10, -5, 5 }, { 10, -5, 5 } } };
192 "Gaussian V Flat V Gaussian, interger values",
193 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
197 this,
"GaussW",
"Gaussian mean=0, sigma=1, weighted", { 100, -5, 5 } };
199 this,
"GaussFlatW",
"Gaussian V Flat, weighted", { { 50, -5, 5 }, { 50, -5, 5 } } };
203 "Gaussian V Flat V Gaussian, weighted",
204 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
208 this,
"GaussBuf",
"Gaussian mean=0, sigma=1, buffered", { 100, -5, 5 } };
210 this,
"GaussFlatBuf",
"Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
214 "Gaussian V Flat V Gaussian, buffered",
215 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
221 this,
"ProfGauss",
"Profile, Gaussian mean=0, sigma=1, atomic", { 100, -5, 5 } };
223 this,
"ProfGaussFlat",
"Profile, Gaussian V Flat, atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
226 "ProfGaussFlatGauss",
227 "Profile, Gaussian V Flat V Gaussian, atomic",
228 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
232 this,
"ProfGaussNA",
"Profile, Gaussian mean=0, sigma=1, non atomic", { 100, -5, 5 } };
234 this,
"ProfGaussFlatNA",
"Profile, Gaussian V Flat, non atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
236 m_prof_gaussVflatVgauss_noato{
this,
237 "ProfGaussFlatGaussNA",
238 "Profile, Gaussian V Flat V Gaussian, non atomic",
239 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
243 this,
"ProfGaussInt",
"Profile, Gaussian mean=0, sigma=1, integer values", { 10, -5, 5 } };
245 m_prof_gaussVflat_int{
this,
247 "Profile, Gaussian V Flat, integer values",
248 { { 10, -5, 5 }, { 10, -5, 5 } } };
250 m_prof_gaussVflatVgauss_int{
this,
251 "ProfGaussFlatGaussInt",
252 "Profile, Gaussian V Flat V Gaussian, interger values",
253 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
257 this,
"ProfGaussW",
"Profile, Gaussian mean=0, sigma=1, weighted", { 100, -5, 5 } };
259 this,
"ProfGaussFlatW",
"Profile, Gaussian V Flat, weighted", { { 50, -5, 5 }, { 50, -5, 5 } } };
262 "ProfGaussFlatGaussW",
263 "Profile, Gaussian V Flat V Gaussian, weighted",
264 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
268 this,
"ProfGaussBuf",
"Profile, Gaussian mean=0, sigma=1, buffered", { 100, -5, 5 } };
270 this,
"ProfGaussFlatBuf",
"Profile, Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
273 "ProfGaussFlatGaussBuf",
274 "Profile, Gaussian V Flat V Gaussian, buffered",
275 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };