84 {
85 MsgStream log(
msgSvc(), name());
86
87 log << MSG::INFO << "in initialize()" << endmsg;
88
89 StatusCode status;
90
91 if(m_rootput)
92 {
93
94
95 NTuplePtr trk0(
ntupleSvc(),
"FILE1/toftrk");
96 if ( trk0 ) trk_tuple = trk0;
97 else { trk_tuple =
ntupleSvc()->book (
"FILE1/toftrk", CLID_ColumnWiseTuple,
"ks N-Tuple example");
98 if ( trk_tuple ) {
99 status = trk_tuple->addItem ("trk_trackid", m_trk_trackid );
100 status = trk_tuple->addItem ("trk_tofid", m_trk_tofid );
101 status = trk_tuple->addItem ("trk_raw", m_trk_raw);
102 status = trk_tuple->addItem ("trk_readout", m_trk_readout);
103 status = trk_tuple->addItem ("trk_counter", m_trk_counter);
104 status = trk_tuple->addItem ("trk_cluster", m_trk_cluster );
105 status = trk_tuple->addItem ("trk_barrel", m_trk_barrel );
106 status = trk_tuple->addItem ("trk_east", m_trk_east );
107 status = trk_tuple->addItem ("trk_layer", m_trk_layer );
108 status = trk_tuple->addItem ("trk_path", m_trk_path );
109 status = trk_tuple->addItem ("trk_zrhit", m_trk_zrhit );
110 status = trk_tuple->addItem ("trk_ph", m_trk_ph );
111 status = trk_tuple->addItem ("trk_tof", m_trk_tof );
112 status = trk_tuple->addItem ("trk_beta", m_trk_beta );
113
114 status = trk_tuple->addItem ("trk_texpe", m_trk_texpe );
115 status = trk_tuple->addItem ("trk_texpmu", m_trk_texpmu );
116 status = trk_tuple->addItem ("trk_texppi", m_trk_texppi );
117 status = trk_tuple->addItem ("trk_texpk", m_trk_texpk );
118 status = trk_tuple->addItem ("trk_texpp", m_trk_texpp );
119 status = trk_tuple->addItem ("trk_offe", m_trk_offe );
120 status = trk_tuple->addItem ("trk_offmu", m_trk_offmu );
121 status = trk_tuple->addItem ("trk_offpi", m_trk_offpi );
122 status = trk_tuple->addItem ("trk_offk", m_trk_offk );
123 status = trk_tuple->addItem ("trk_offp", m_trk_offp );
124 status = trk_tuple->addItem ("trk_quality", m_trk_quality );
125 status = trk_tuple->addItem ("trk_type", m_trk_type );
126 status = trk_tuple->addItem ("trk_pidtype", m_trk_pidtype );
127 status = trk_tuple->addItem ("trk_ppmdc", m_trk_ppmdc );
128 status = trk_tuple->addItem ("trk_ppmdc", m_trk_ppmdc );
129 status = trk_tuple->addItem ("trk_ptmdc", m_trk_ptmdc );
130 status = trk_tuple->addItem ("trk_ppkal", m_trk_ppkal );
131 status = trk_tuple->addItem ("trk_ptkal", m_trk_ptkal );
132 status = trk_tuple->addItem ("trk_cosmdc", m_trk_cosmdc );
133 status = trk_tuple->addItem ("trk_phimdc", m_trk_phimdc );
134 status = trk_tuple->addItem ("trk_coskal", m_trk_coskal );
135 status = trk_tuple->addItem ("trk_phikal", m_trk_phikal );
136
137 status = trk_tuple->addItem ("trk_charge", m_trk_charge );
138
139 }
140 else {
141 log << MSG::ERROR << " Cannot book N-tuple:" << long(trk_tuple) << endmsg;
142 return StatusCode::FAILURE;
143 }
144 }
145
146
147
148
149 NTuplePtr nt1(
ntupleSvc(),
"FILE1/total4c");
150 if ( nt1 ) m_tuple1 = nt1;
151 else {
152 m_tuple1 =
ntupleSvc()->book (
"FILE1/total4c", CLID_ColumnWiseTuple,
"ks N-Tuple example");
153 if ( m_tuple1 ) {
154
155 status = m_tuple1->addItem ("run", m_run );
156 status = m_tuple1->addItem ("rec", m_rec );
157 status = m_tuple1->addItem ("mpprecall", m_mpprecall );
158 status = m_tuple1->addItem ("meeall", m_meeall );
159 status = m_tuple1->addItem ("ncgjs", m_ncgjs );
160 status = m_tuple1->addItem ("cla2kpi", m_cla2kpi );
161 status = m_tuple1->addItem("indexmc", m_idxmc, 0, 100);
162 status = m_tuple1->addIndexedItem("pdgid", m_idxmc, m_pdgid);
163
164 status = m_tuple1->addIndexedItem("motheridx", m_idxmc, m_motheridx);
165 status = m_tuple1->addItem("indexmdc", m_idxmdc, 0, 5000);
166 status = m_tuple1->addIndexedItem ("x0js", m_idxmdc, m_x0js);
167 status = m_tuple1->addIndexedItem ("y0js", m_idxmdc, m_y0js);
168 status = m_tuple1->addIndexedItem ("z0js",m_idxmdc, m_z0js);
169 status = m_tuple1->addIndexedItem ("r0js",m_idxmdc, m_r0js);
170 status = m_tuple1->addIndexedItem ("Rxyjs",m_idxmdc, m_Rxyjs);
171 status = m_tuple1->addIndexedItem ("Rzjs",m_idxmdc, m_Rzjs);
172 status = m_tuple1->addIndexedItem ("Rnxyjs",m_idxmdc, m_Rnxyjs);
173 status = m_tuple1->addIndexedItem ("phinjs",m_idxmdc, m_phinjs);
174 status = m_tuple1->addIndexedItem ("Rnzjs",m_idxmdc, m_Rnzjs);
175 status = m_tuple1->addItem ("ncy20", m_ncy20);
176 status = m_tuple1->addItem ("ncy30", m_ncy30);
177 status = m_tuple1->addIndexedItem("angjs5", m_idxmdc, m_angjs5);
178 status = m_tuple1->addIndexedItem("nearjs5", m_idxmdc, m_nearjs5);
179 status = m_tuple1->addIndexedItem("angjs6", m_idxmdc, m_angjs6);
180 status = m_tuple1->addIndexedItem("nearjs6", m_idxmdc, m_nearjs6);
181 status = m_tuple1->addIndexedItem("ang4pi5", m_idxmdc, m_ang4pi5);
182 status = m_tuple1->addIndexedItem("near4pi5", m_idxmdc, m_near4pi5);
183 status = m_tuple1->addIndexedItem("ang4pi6", m_idxmdc, m_ang4pi6);
184 status = m_tuple1->addIndexedItem("near4pi6", m_idxmdc, m_near4pi6);
185 status = m_tuple1->addIndexedItem("ppmdcjs", m_idxmdc, m_ppmdcjs);
186 status = m_tuple1->addIndexedItem("pxmdcjs", m_idxmdc, m_pxmdcjs);
187 status = m_tuple1->addIndexedItem("pymdcjs", m_idxmdc, m_pymdcjs);
188 status = m_tuple1->addIndexedItem("pzmdcjs", m_idxmdc, m_pzmdcjs);
189 status = m_tuple1->addIndexedItem("ppkaljs", m_idxmdc, m_ppkaljs);
190 status = m_tuple1->addIndexedItem("ptmdcjs", m_idxmdc, m_ptmdcjs);
191 status = m_tuple1->addIndexedItem("ptkaljs", m_idxmdc, m_ptkaljs);
192 status = m_tuple1->addIndexedItem("ppmdc2kpi", m_idxmdc, m_ppmdc2kpi);
193 status = m_tuple1->addIndexedItem("pxmdc2kpi", m_idxmdc, m_pxmdc2kpi);
194 status = m_tuple1->addIndexedItem("pymdc2kpi", m_idxmdc, m_pymdc2kpi);
195 status = m_tuple1->addIndexedItem("pzmdc2kpi", m_idxmdc, m_pzmdc2kpi);
196 status = m_tuple1->addIndexedItem("ppkal2kpi", m_idxmdc, m_ppkal2kpi);
197 status = m_tuple1->addIndexedItem("ptmdc2kpi", m_idxmdc, m_ptmdc2kpi);
198 status = m_tuple1->addIndexedItem("charge2kpi", m_idxmdc, m_charge2kpi);
199 status = m_tuple1->addIndexedItem("ptkal2kpi", m_idxmdc, m_ptkal2kpi);
200 status = m_tuple1->addItem ("cy2pi", m_cy2kpi, 0, 100 );
201 status = m_tuple1->addIndexedItem("comcs2kpi", m_cy2kpi, m_comcs2kpi);
202 status = m_tuple1->addItem ("chiejs", m_idxmdc, m_chiejs);
203 status = m_tuple1->addItem ("chimujs", m_idxmdc, m_chimujs);
204 status = m_tuple1->addItem ("chipijs", m_idxmdc, m_chipijs);
205 status = m_tuple1->addItem ("chikjs", m_idxmdc, m_chikjs);
206 status = m_tuple1->addItem ("chipjs", m_idxmdc, m_chipjs);
207 status = m_tuple1->addItem ("ghitjs", m_idxmdc, m_ghitjs);
208 status = m_tuple1->addItem ("thitjs", m_idxmdc, m_thitjs);
209 status = m_tuple1->addIndexedItem("probphjs", m_idxmdc, m_probphjs);
210 status = m_tuple1->addIndexedItem("normphjs", m_idxmdc, m_normphjs);
211 status = m_tuple1->addItem ("pdg", m_idxmdc, m_pdg);
212 status = m_tuple1->addItem ("cbmc", m_idxmdc, m_cbmc);
213 status = m_tuple1->addIndexedItem("sigmaetof2kpi", m_idxmdc, m_sigmaetof2kpi);
214 status = m_tuple1->addIndexedItem("sigmamutof2kpi", m_idxmdc, m_sigmamutof2kpi);
215 status = m_tuple1->addIndexedItem("sigmapitof2kpi", m_idxmdc, m_sigmapitof2kpi);
216 status = m_tuple1->addIndexedItem("sigmaktof2kpi", m_idxmdc, m_sigmaktof2kpi);
217 status = m_tuple1->addIndexedItem("sigmaprtof2kpi", m_idxmdc, m_sigmaprtof2kpi);
218 status = m_tuple1->addIndexedItem("t0tof2kpi", m_idxmdc, m_t0tof2kpi);
219 status = m_tuple1->addIndexedItem("errt0tof2kpi", m_idxmdc, m_errt0tof2kpi);
220
221 status = m_tuple1->addItem ("chie2kpi", m_idxmdc, m_chie2kpi);
222 status = m_tuple1->addItem ("chimu2kpi", m_idxmdc, m_chimu2kpi);
223 status = m_tuple1->addItem ("chipi2kpi", m_idxmdc, m_chipi2kpi);
224 status = m_tuple1->addItem ("chik2kpi", m_idxmdc, m_chik2kpi);
225 status = m_tuple1->addItem ("chip2kpi", m_idxmdc, m_chip2kpi);
226 status = m_tuple1->addItem ("ghit2kpi", m_idxmdc, m_ghit2kpi);
227 status = m_tuple1->addItem ("thit2kpi", m_idxmdc, m_thit2kpi);
228 status = m_tuple1->addIndexedItem("probph2kpi", m_idxmdc, m_probph2kpi);
229 status = m_tuple1->addIndexedItem("normph2kpi", m_idxmdc, m_normph2kpi);
230 status = m_tuple1->addIndexedItem("pidnum2kpi", m_idxmdc, m_pidnum2kpi);
231 status = m_tuple1->addIndexedItem("bjmucjs", m_idxmdc, m_bjmucjs);
232 status = m_tuple1->addIndexedItem("bjmuc2kpi", m_idxmdc, m_bjmuc2kpi);
233 status = m_tuple1->addIndexedItem("bjemcjs", m_idxmdc, m_bjemcjs);
234 status = m_tuple1->addIndexedItem("bjemc2kpi", m_idxmdc, m_bjemc2kpi);
235 status = m_tuple1->addIndexedItem("bjtofjs", m_idxmdc, m_bjtofjs);
236 status = m_tuple1->addIndexedItem("bjtof2kpi", m_idxmdc, m_bjtof2kpi);
237 status = m_tuple1->addIndexedItem("bjtofvaljs", m_idxmdc, m_bjtofvaljs);
238 status = m_tuple1->addIndexedItem("bjtofval2kpi", m_idxmdc, m_bjtofval2kpi);
239
240 status = m_tuple1->addIndexedItem("emcjs", m_idxmdc, m_emcjs);
241 status = m_tuple1->addIndexedItem("evpjs", m_idxmdc, m_evpjs);
242 status = m_tuple1->addIndexedItem("timecgjs", m_idxmdc, m_timecgjs);
243 status = m_tuple1->addIndexedItem("depthjs", m_idxmdc, m_depthmucjs);
244 status = m_tuple1->addIndexedItem("layermucjs", m_idxmdc, m_layermucjs);
245
246 status = m_tuple1->addIndexedItem("emc2kpi", m_idxmdc, m_emc2kpi);
247 status = m_tuple1->addIndexedItem("evp2kpi", m_idxmdc, m_evp2kpi);
248 status = m_tuple1->addIndexedItem("timecg2kpi", m_idxmdc, m_timecg2kpi);
249 status = m_tuple1->addIndexedItem("depth2kpi", m_idxmdc, m_depthmuc2kpi);
250 status = m_tuple1->addIndexedItem("layermuc2kpi", m_idxmdc, m_layermuc2kpi);
251
252 status = m_tuple1->addIndexedItem("cotof1js", m_idxmdc, m_cotof1js);
253 status = m_tuple1->addIndexedItem("cotof2js", m_idxmdc, m_cotof2js);
254 status = m_tuple1->addIndexedItem("counterjs", m_idxmdc, m_counterjs);
255 status = m_tuple1->addIndexedItem("barreljs", m_idxmdc, m_barreljs);
256 status = m_tuple1->addIndexedItem("layertofjs", m_idxmdc, m_layertofjs);
257 status = m_tuple1->addIndexedItem("readoutjs", m_idxmdc, m_readoutjs);
258 status = m_tuple1->addIndexedItem("clusterjs", m_idxmdc, m_clusterjs);
259 status = m_tuple1->addIndexedItem("betajs", m_idxmdc, m_betajs);
260 status = m_tuple1->addIndexedItem("tofjs", m_idxmdc, m_tofjs);
261 status = m_tuple1->addIndexedItem("tofpathjs", m_idxmdc, m_tofpathjs);
262 status = m_tuple1->addIndexedItem("zhitjs", m_idxmdc, m_zhitjs);
263 status = m_tuple1->addIndexedItem("tofIDjs", m_idxmdc, m_tofIDjs);
264 status = m_tuple1->addIndexedItem("clusterIDjs", m_idxmdc, m_clusterIDjs);
265 status = m_tuple1->addIndexedItem("texejs", m_idxmdc, m_texejs);
266 status = m_tuple1->addIndexedItem("texmujs", m_idxmdc, m_texmujs);
267 status = m_tuple1->addIndexedItem("texpijs", m_idxmdc, m_texpijs);
268 status = m_tuple1->addIndexedItem("texkjs", m_idxmdc, m_texkjs);
269 status = m_tuple1->addIndexedItem("texprjs", m_idxmdc, m_texprjs);
270 status = m_tuple1->addIndexedItem("dtejs", m_idxmdc, m_dtejs);
271 status = m_tuple1->addIndexedItem("dtmujs", m_idxmdc, m_dtmujs);
272 status = m_tuple1->addIndexedItem("dtpijs", m_idxmdc, m_dtpijs);
273 status = m_tuple1->addIndexedItem("dtkjs", m_idxmdc, m_dtkjs);
274 status = m_tuple1->addIndexedItem("dtprjs", m_idxmdc, m_dtprjs);
275 status = m_tuple1->addIndexedItem("sigmaetofjs", m_idxmdc, m_sigmaetofjs);
276 status = m_tuple1->addIndexedItem("sigmamutofjs", m_idxmdc, m_sigmamutofjs);
277 status = m_tuple1->addIndexedItem("sigmapitofjs", m_idxmdc, m_sigmapitofjs);
278 status = m_tuple1->addIndexedItem("sigmaktofjs", m_idxmdc, m_sigmaktofjs);
279 status = m_tuple1->addIndexedItem("sigmaprtofjs", m_idxmdc, m_sigmaprtofjs);
280 status = m_tuple1->addIndexedItem("t0tofjs", m_idxmdc,m_t0tofjs);
281 status = m_tuple1->addIndexedItem("errt0tofjs", m_idxmdc,m_errt0tofjs);
282 status = m_tuple1->addIndexedItem("cotof12kpi", m_idxmdc, m_cotof12kpi);
283 status = m_tuple1->addIndexedItem("cotof22kpi", m_idxmdc, m_cotof22kpi);
284 status = m_tuple1->addIndexedItem("counter2kpi", m_idxmdc, m_counter2kpi);
285 status = m_tuple1->addIndexedItem("barrel2kpi", m_idxmdc, m_barrel2kpi);
286 status = m_tuple1->addIndexedItem("layertof2kpi", m_idxmdc, m_layertof2kpi);
287 status = m_tuple1->addIndexedItem("readout2kpi", m_idxmdc, m_readout2kpi);
288 status = m_tuple1->addIndexedItem("cluster2kpi", m_idxmdc, m_cluster2kpi);
289 status = m_tuple1->addIndexedItem("beta2kpi", m_idxmdc, m_beta2kpi);
290 status = m_tuple1->addIndexedItem("tof2kpi", m_idxmdc, m_tof2kpi);
291 status = m_tuple1->addIndexedItem("tofpath2kpi", m_idxmdc, m_tofpath2kpi);
292 status = m_tuple1->addIndexedItem("zhit2kpi", m_idxmdc, m_zhit2kpi);
293 status = m_tuple1->addIndexedItem("tofID2kpi", m_idxmdc, m_tofID2kpi);
294 status = m_tuple1->addIndexedItem("clusterID2kpi", m_idxmdc, m_clusterID2kpi);
295 status = m_tuple1->addIndexedItem("texe2kpi", m_idxmdc, m_texe2kpi);
296 status = m_tuple1->addIndexedItem("texmu2kpi", m_idxmdc, m_texmu2kpi);
297 status = m_tuple1->addIndexedItem("texpi2kpi", m_idxmdc, m_texpi2kpi);
298 status = m_tuple1->addIndexedItem("texk2kpi", m_idxmdc, m_texk2kpi);
299 status = m_tuple1->addIndexedItem("texpr2kpi", m_idxmdc, m_texpr2kpi);
300 status = m_tuple1->addIndexedItem("dte2kpi", m_idxmdc, m_dte2kpi);
301 status = m_tuple1->addIndexedItem("dtmu2kpi", m_idxmdc, m_dtmu2kpi);
302 status = m_tuple1->addIndexedItem("dtpi2kpi", m_idxmdc, m_dtpi2kpi);
303 status = m_tuple1->addIndexedItem("dtk2kpi", m_idxmdc, m_dtk2kpi);
304 status = m_tuple1->addIndexedItem("dtpr2kpi", m_idxmdc, m_dtpr2kpi);
305 status = m_tuple1->addIndexedItem("costpid2kpi", m_idxmdc, m_costpid2kpi);
306 status = m_tuple1->addIndexedItem("dedxpid2kpi", m_idxmdc, m_dedxpid2kpi);
307 status = m_tuple1->addIndexedItem("tof1pid2kpi", m_idxmdc, m_tof1pid2kpi);
308 status = m_tuple1->addIndexedItem("tof2pid2kpi", m_idxmdc, m_tof2pid2kpi);
309 status = m_tuple1->addIndexedItem("probe2kpi", m_idxmdc, m_probe2kpi);
310 status = m_tuple1->addIndexedItem("probmu2kpi", m_idxmdc, m_probmu2kpi);
311 status = m_tuple1->addIndexedItem("probpi2kpi", m_idxmdc, m_probpi2kpi);
312 status = m_tuple1->addIndexedItem("probk2kpi", m_idxmdc, m_probk2kpi);
313 status = m_tuple1->addIndexedItem("probpr2kpi", m_idxmdc, m_probpr2kpi);
314
315 status = m_tuple1->addIndexedItem("chipidxpid2kpi", m_idxmdc, m_chipidxpid2kpi);
316 status = m_tuple1->addIndexedItem("chipitof1pid2kpi", m_idxmdc, m_chipitof1pid2kpi);
317 status = m_tuple1->addIndexedItem("chipitof2pid2kpi", m_idxmdc, m_chipitof2pid2kpi);
318 status = m_tuple1->addIndexedItem("chipitofpid2kpi", m_idxmdc, m_chipitofpid2kpi);
319 status = m_tuple1->addIndexedItem("chipitofepid2kpi", m_idxmdc, m_chipitofepid2kpi);
320 status = m_tuple1->addIndexedItem("chipitofqpid2kpi", m_idxmdc, m_chipitofqpid2kpi);
321 status = m_tuple1->addIndexedItem("probpidxpid2kpi", m_idxmdc, m_probpidxpid2kpi);
322 status = m_tuple1->addIndexedItem("probpitofpid2kpi", m_idxmdc, m_probpitofpid2kpi);
323 status = m_tuple1->addIndexedItem("chikdxpid2kpi", m_idxmdc, m_chikdxpid2kpi);
324 status = m_tuple1->addIndexedItem("chiktof1pid2kpi", m_idxmdc, m_chiktof1pid2kpi);
325 status = m_tuple1->addIndexedItem("chiktof2pid2kpi", m_idxmdc, m_chiktof2pid2kpi);
326 status = m_tuple1->addIndexedItem("chiktofpid2kpi", m_idxmdc, m_chiktofpid2kpi);
327 status = m_tuple1->addIndexedItem("chiktofepid2kpi", m_idxmdc, m_chiktofepid2kpi);
328 status = m_tuple1->addIndexedItem("chiktofqpid2kpi", m_idxmdc, m_chiktofqpid2kpi);
329 status = m_tuple1->addIndexedItem("probkdxpid2kpi", m_idxmdc, m_probkdxpid2kpi);
330 status = m_tuple1->addIndexedItem("probktofpid2kpi", m_idxmdc, m_probktofpid2kpi);
331
332 status = m_tuple1->addIndexedItem("chiprdxpid2kpi", m_idxmdc, m_chiprdxpid2kpi);
333 status = m_tuple1->addIndexedItem("chiprtof1pid2kpi", m_idxmdc, m_chiprtof1pid2kpi);
334 status = m_tuple1->addIndexedItem("chiprtof2pid2kpi", m_idxmdc, m_chiprtof2pid2kpi);
335 status = m_tuple1->addIndexedItem("chiprtofpid2kpi", m_idxmdc, m_chiprtofpid2kpi);
336 status = m_tuple1->addIndexedItem("chiprtofepid2kpi", m_idxmdc, m_chiprtofepid2kpi);
337 status = m_tuple1->addIndexedItem("chiprtofqpid2kpi", m_idxmdc, m_chiprtofqpid2kpi);
338 status = m_tuple1->addIndexedItem("probprdxpid2kpi", m_idxmdc, m_probprdxpid2kpi);
339 status = m_tuple1->addIndexedItem("probprtofpid2kpi", m_idxmdc, m_probprtofpid2kpi);
340
341 status = m_tuple1->addIndexedItem("cosmdcjs", m_idxmdc, m_cosmdcjs);
342 status = m_tuple1->addIndexedItem("phimdcjs", m_idxmdc, m_phimdcjs);
343 status = m_tuple1->addIndexedItem("cosmdc2kpi", m_idxmdc, m_cosmdc2kpi);
344 status = m_tuple1->addIndexedItem("phimdc2kpi", m_idxmdc, m_phimdc2kpi);
345
346 status = m_tuple1->addIndexedItem("dedxpidjs", m_idxmdc, m_dedxpidjs);
347 status = m_tuple1->addIndexedItem("tof1pidjs", m_idxmdc, m_tof1pidjs);
348 status = m_tuple1->addIndexedItem("tof2pidjs", m_idxmdc, m_tof2pidjs);
349 status = m_tuple1->addIndexedItem("probejs", m_idxmdc, m_probejs);
350 status = m_tuple1->addIndexedItem("probmujs", m_idxmdc, m_probmujs);
351 status = m_tuple1->addIndexedItem("probpijs", m_idxmdc, m_probpijs);
352 status = m_tuple1->addIndexedItem("probkjs", m_idxmdc, m_probkjs);
353 status = m_tuple1->addIndexedItem("probprjs", m_idxmdc, m_probprjs);
354 status = m_tuple1->addItem ("mchic2kpi", m_mchic2kpi);
355 status = m_tuple1->addItem ("mpsip2kpi", m_mpsip2kpi);
356 status = m_tuple1->addItem ("chis2kpi", m_chis2kpi);
357 status = m_tuple1->addItem ("mchic4c2kpi", m_mchic4c2kpi);
358 status = m_tuple1->addItem ("mpsip4c2kpi", m_mpsip4c2kpi);
359 status = m_tuple1->addItem ("chis4c2kpi", m_chis4c2kpi);
360
361 status = m_tuple1->addItem("indexemc", m_idxemc, 0, 5000);
362 status = m_tuple1->addIndexedItem("numHits", m_idxemc, m_numHits);
363 status = m_tuple1->addIndexedItem("secmom", m_idxemc, m_secondmoment);
364 status = m_tuple1->addIndexedItem("latmom", m_idxemc, m_latmoment);
365 status = m_tuple1->addIndexedItem("timegm", m_idxemc, m_timegm);
366 status = m_tuple1->addIndexedItem("cellId", m_idxemc, m_cellId);
367 status = m_tuple1->addIndexedItem("module", m_idxemc, m_module);
368 status = m_tuple1->addIndexedItem("a20Moment", m_idxemc, m_a20Moment);
369 status = m_tuple1->addIndexedItem("a42Moment", m_idxemc, m_a42Moment);
370 status = m_tuple1->addIndexedItem("getEAll", m_idxemc, m_getEAll);
371 status = m_tuple1->addIndexedItem("getShowerId", m_idxemc, m_getShowerId);
372 status = m_tuple1->addIndexedItem("getClusterId", m_idxemc, m_getClusterId);
373 status = m_tuple1->addIndexedItem("x", m_idxemc, m_x);
374 status = m_tuple1->addIndexedItem("y", m_idxemc, m_y);
375 status = m_tuple1->addIndexedItem("z", m_idxemc, m_z);
376 status = m_tuple1->addIndexedItem("cosemc", m_idxemc, m_cosemc);
377 status = m_tuple1->addIndexedItem("phiemc", m_idxemc, m_phiemc);
378 status = m_tuple1->addIndexedItem("energy", m_idxemc, m_energy);
379 status = m_tuple1->addIndexedItem("e1", m_idxemc, m_eSeed);
380 status = m_tuple1->addIndexedItem("e9", m_idxemc, m_e3x3);
381 status = m_tuple1->addIndexedItem("e25", m_idxemc, m_e5x5);
382 status = m_tuple1->addIndexedItem("dang4c", m_idxemc, m_dang4c);
383 status = m_tuple1->addIndexedItem("dthe4c", m_idxemc, m_dthe4c);
384 status = m_tuple1->addIndexedItem("dphi4c", m_idxemc, m_dphi4c);
385 status = m_tuple1->addIndexedItem("dang4crt", m_idxemc, m_dang4crt);
386 status = m_tuple1->addIndexedItem("dthe4crt", m_idxemc, m_dthe4crt);
387 status = m_tuple1->addIndexedItem("dphi4crt", m_idxemc, m_dphi4crt);
388 status = m_tuple1->addIndexedItem("phtof", m_idxemc, 3, m_phgmtof,0.0,10000.0);
389 status = m_tuple1->addIndexedItem("phgmtof0", m_idxemc, m_phgmtof0);
390 status = m_tuple1->addIndexedItem("phgmtof1", m_idxemc, m_phgmtof1);
391 status = m_tuple1->addIndexedItem("phgmtof2", m_idxemc, m_phgmtof2);
392
393 }
394 else {
395 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
396 return StatusCode::FAILURE;
397 }
398 }
399}
400
401StatusCode sc;
402
403 if(m_skim4pi)
404 {
405 sc = createSubAlgorithm( "EventWriter", "Selectgam4pi", m_subalg1);
406 if( sc.isFailure() ) {
407 log << MSG::ERROR << "Error creating Sub-Algorithm Selectgam4pi" <<endreq;
408 return sc;
409 } else {
410 log << MSG::INFO << "Success creating Sub-Algorithm Selectgam4pi" <<endreq;
411 }
412 }
413
414
415 if(m_skim4k)
416 {
417 sc = createSubAlgorithm( "EventWriter", "Selectgam4k", m_subalg2);
418 if( sc.isFailure() ) {
419 log << MSG::ERROR << "Error creating Sub-Algorithm Selectgam4k" <<endreq;
420 return sc;
421 } else {
422 log << MSG::INFO << "Success creating Sub-Algorithm Selectgam4k" <<endreq;
423 }
424 }
425
426 if(m_skim2pi2pr)
427 {
428 sc = createSubAlgorithm( "EventWriter", "Selectgam2pi2pr", m_subalg3);
429 if( sc.isFailure() ) {
430 log << MSG::ERROR << "Error creating Sub-Algorithm Selectgam2pi2pr" <<endreq;
431 return sc;
432 } else {
433 log << MSG::INFO << "Success creating Sub-Algorithm Selectgam2pi2pr" <<endreq;
434 }
435 }
436
437
438
439
440
441
442
443
444 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
445 return StatusCode::SUCCESS;
446
447}