110 {
111 MsgStream log(
msgSvc(), name());
112
113 log << MSG::INFO << "in initialize()" << endmsg;
114 StatusCode status;
115 status = service("THistSvc", m_thistsvc);
116 if(status.isFailure() ){
117 log << MSG::INFO << "Unable to retrieve pointer to THistSvc" << endreq;
118 return status;
119 }
120
121
122 m_ha_costheta = new TH1F( "PHY_HAD_SUM_costheta", "PHY_HAD_SUM_costheta", 100, -1, 1 );
123 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_costheta", m_ha_costheta);
124 m_ha_phi = new TH1F( "PHY_HAD_SUM_phi", "PHY_HAD_SUM_phi", 128, -3.2, 3.2 );
125 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_phi", m_ha_phi);
126 m_ha_pmax = new TH1F( "PHY_HAD_SUM_pmax", "PHY_HAD_SUM_pmax", 100, 0, 2 );
127 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_pmax", m_ha_pmax);
128 m_ha_emax = new TH1F( "PHY_HAD_SUM_emax", "PHY_HAD_SUM_emax", 100, 0, 2 );
129 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_emax", m_ha_emax);
130 m_ha_etot = new TH1F( "PHY_HAD_SUM_etot", "PHY_HAD_SUM_etot", 100, 0, 4 );
131 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_etot", m_ha_etot);
132 m_ha_br = new TH1F( "PHY_HAD_SUM_br", "PHY_HAD_SUM_br", 100, 0, 2 );
133 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_br", m_ha_br);
134 m_ha_bz = new TH1F( "PHY_HAD_SUM_bz", "PHY_HAD_SUM_bz", 100, 0, 2 );
135 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_bz", m_ha_bz);
136 m_ha_nneu = new TH1I( "PHY_HAD_SUM_nneu", "PHY_HAD_SUM_nneu", 20, 0, 20 );
137 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_nneu", m_ha_nneu);
138 m_ha_nchg = new TH1I( "PHY_HAD_SUM_nchg", "PHY_HAD_SUM_nchg", 20, 0, 20 );
139 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_nchg", m_ha_nchg);
140
141 m_ha_vx = new TH1F( "PHY_HAD_FLS_vx", "PHY_HAD_FLS_vx", 100, -1., 1.);
142 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_vx", m_ha_vx);
143 m_ha_vy = new TH1F( "PHY_HAD_FLS_vy", "PHY_HAD_FLS_vy", 100, -1., 1.);
144 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_vy", m_ha_vy);
145 m_ha_vz = new TH1F( "PHY_HAD_FLS_vz", "PHY_HAD_FLS_vz", 100, -10.0, 10.);
146 status = m_thistsvc->regHist("/DQAHist/Hadron/ha_vz", m_ha_vz);
147
148
149
150
151
152
153NTuplePtr nt1(
ntupleSvc(),
"DQAFILE/Hadron");
154if ( nt1 ) m_tuple1 = nt1;
155else {
156 m_tuple1 =
ntupleSvc()->book (
"DQAFILE/Hadron", CLID_ColumnWiseTuple,
"N-Tuple");
157 if ( m_tuple1 ) {
158 status = m_tuple1->addItem ("run", m_run);
159 status = m_tuple1->addItem ("rec", m_rec);
160 status = m_tuple1->addItem ("Nchrg", m_ncharg);
161 status = m_tuple1->addItem ("Nneu", m_nneu,0,40);
162 status = m_tuple1->addItem ("NGch", m_ngch, 0, 40);
163 status = m_tuple1->addItem ("NGam", m_nGam);
164
165
166 status = m_tuple1->addItem ("hadrontag", m_hadrontag);
167
168 status = m_tuple1->addItem ("br", m_br);
169 status = m_tuple1->addItem ("bz", m_bz);
170 status = m_tuple1->addItem ("evis", m_evis);
171 status = m_tuple1->addItem ("thr", m_thr);
172
173 status = m_tuple1->addItem ("acoll", m_acoll);
174 status = m_tuple1->addItem ("acopl", m_acopl);
175 status = m_tuple1->addItem ("deltatof", m_deltatof);
176 status = m_tuple1->addItem ("eop1", m_eop1);
177 status = m_tuple1->addItem ("eop2", m_eop2);
178 status = m_tuple1->addItem ("eoeb1", m_eoeb1);
179 status = m_tuple1->addItem ("eoeb2", m_eoeb2);
180 status = m_tuple1->addItem ("poeb1", m_poeb1);
181 status = m_tuple1->addItem ("poeb2", m_poeb2);
182 status = m_tuple1->addItem ("etoeb1", m_etoeb1);
183 status = m_tuple1->addItem ("etoeb2", m_etoeb2);
184 status = m_tuple1->addItem ("mucinfo1", m_mucinfo1);
185 status = m_tuple1->addItem ("mucinfo2", m_mucinfo2);
186
187 status = m_tuple1->addIndexedItem ("delang",m_nneu, m_delang);
188 status = m_tuple1->addIndexedItem ("delphi",m_nneu, m_delphi);
189 status = m_tuple1->addIndexedItem ("delthe",m_nneu, m_delthe);
190 status = m_tuple1->addIndexedItem ("npart",m_nneu, m_npart);
191 status = m_tuple1->addIndexedItem ("nemchits",m_nneu, m_nemchits);
192 status = m_tuple1->addIndexedItem ("module",m_nneu, m_module);
193 status = m_tuple1->addIndexedItem ("x",m_nneu, m_x);
194 status = m_tuple1->addIndexedItem ("y",m_nneu, m_y);
195 status = m_tuple1->addIndexedItem ("z",m_nneu, m_z);
196
197
198
199 status = m_tuple1->addIndexedItem ("theta",m_nneu, m_theta);
200 status = m_tuple1->addIndexedItem ("phi",m_nneu, m_phi);
201 status = m_tuple1->addIndexedItem ("dx",m_nneu, m_dx);
202 status = m_tuple1->addIndexedItem ("dy",m_nneu, m_dy);
203 status = m_tuple1->addIndexedItem ("dz",m_nneu, m_dz);
204 status = m_tuple1->addIndexedItem ("dtheta",m_nneu, m_dtheta);
205 status = m_tuple1->addIndexedItem ("dphi",m_nneu, m_dphi);
206 status = m_tuple1->addIndexedItem ("energy",m_nneu, m_energy);
207 status = m_tuple1->addIndexedItem ("dE",m_nneu, m_dE);
208 status = m_tuple1->addIndexedItem ("eSeed",m_nneu, m_eSeed);
209 status = m_tuple1->addIndexedItem ("nSeed",m_nneu, m_nSeed);
210 status = m_tuple1->addIndexedItem ("e3x3",m_nneu, m_e3x3);
211 status = m_tuple1->addIndexedItem ("e5x5",m_nneu, m_e5x5);
212 status = m_tuple1->addIndexedItem ("secondMoment",m_nneu, m_secondMoment);
213 status = m_tuple1->addIndexedItem ("latMoment",m_nneu, m_latMoment);
214 status = m_tuple1->addIndexedItem ("a20Moment",m_nneu, m_a20Moment);
215 status = m_tuple1->addIndexedItem ("a42Moment",m_nneu, m_a42Moment);
216 status = m_tuple1->addIndexedItem ("getTime",m_nneu, m_getTime);
217 status = m_tuple1->addIndexedItem ("getEAll",m_nneu, m_getEAll);
218
219
220
221 status = m_tuple1->addIndexedItem("charge", m_ngch, m_charge);
222 status = m_tuple1->addIndexedItem ("vx", m_ngch, m_vx0);
223 status = m_tuple1->addIndexedItem ("vy", m_ngch, m_vy0);
224 status = m_tuple1->addIndexedItem ("vz", m_ngch, m_vz0);
225
226
227 status = m_tuple1->addIndexedItem ("px", m_ngch, m_px) ;
228 status = m_tuple1->addIndexedItem ("py", m_ngch, m_py) ;
229 status = m_tuple1->addIndexedItem ("pz", m_ngch, m_pz) ;
230 status = m_tuple1->addIndexedItem ("p", m_ngch, m_p) ;
231
232
233
234 status = m_tuple1->addIndexedItem ("kal_vx", m_ngch, m_kal_vx0);
235 status = m_tuple1->addIndexedItem ("kal_vy", m_ngch, m_kal_vy0);
236 status = m_tuple1->addIndexedItem ("kal_vz", m_ngch, m_kal_vz0);
237
238
239 status = m_tuple1->addIndexedItem ("kal_px", m_ngch, m_kal_px) ;
240 status = m_tuple1->addIndexedItem ("kal_py", m_ngch, m_kal_py) ;
241 status = m_tuple1->addIndexedItem ("kal_pz", m_ngch, m_kal_pz) ;
242 status = m_tuple1->addIndexedItem ("kal_p", m_ngch, m_kal_p) ;
243
244
245 status = m_tuple1->addIndexedItem ("probPH" , m_ngch, m_probPH) ;
246 status = m_tuple1->addIndexedItem ("normPH" , m_ngch, m_normPH) ;
247 status = m_tuple1->addIndexedItem ("chie" , m_ngch, m_chie) ;
248 status = m_tuple1->addIndexedItem ("chimu" , m_ngch, m_chimu) ;
249 status = m_tuple1->addIndexedItem ("chipi" , m_ngch, m_chipi) ;
250 status = m_tuple1->addIndexedItem ("chik" , m_ngch, m_chik) ;
251 status = m_tuple1->addIndexedItem ("chip" , m_ngch, m_chip) ;
252 status = m_tuple1->addIndexedItem ("ghit" , m_ngch, m_ghit) ;
253 status = m_tuple1->addIndexedItem ("thit" , m_ngch, m_thit) ;
254
255 status = m_tuple1->addIndexedItem ("e_emc" , m_ngch, m_e_emc) ;
256 status = m_tuple1->addIndexedItem ("phi_emc" , m_ngch, m_phi_emc) ;
257 status = m_tuple1->addIndexedItem ("theta_emc" , m_ngch, m_theta_emc) ;
258
259 status = m_tuple1->addIndexedItem ("nhit_muc" , m_ngch, m_nhit_muc) ;
260 status = m_tuple1->addIndexedItem ("nlay_muc" , m_ngch, m_nlay_muc) ;
261 status = m_tuple1->addIndexedItem ("t_btof" , m_ngch, m_t_btof );
262 status = m_tuple1->addIndexedItem ("t_etof" , m_ngch, m_t_etof );
263 status = m_tuple1->addIndexedItem ("qual_etof" , m_ngch, m_qual_etof );
264 status = m_tuple1->addIndexedItem ("tof_etof" , m_ngch, m_tof_etof );
265 status = m_tuple1->addIndexedItem ("te_etof" , m_ngch, m_te_etof );
266 status = m_tuple1->addIndexedItem ("tmu_etof" , m_ngch, m_tmu_etof );
267 status = m_tuple1->addIndexedItem ("tpi_etof" , m_ngch, m_tpi_etof );
268 status = m_tuple1->addIndexedItem ("tk_etof" , m_ngch, m_tk_etof );
269 status = m_tuple1->addIndexedItem ("tp_etof" , m_ngch, m_tp_etof );
270
271 status = m_tuple1->addIndexedItem ("qual_btof1", m_ngch, m_qual_btof1 );
272 status = m_tuple1->addIndexedItem ("tof_btof1" , m_ngch, m_tof_btof1 );
273 status = m_tuple1->addIndexedItem ("te_btof1" , m_ngch, m_te_btof1 );
274 status = m_tuple1->addIndexedItem ("tmu_btof1" , m_ngch, m_tmu_btof1 );
275 status = m_tuple1->addIndexedItem ("tpi_btof1" , m_ngch, m_tpi_btof1 );
276 status = m_tuple1->addIndexedItem ("tk_btof1" , m_ngch, m_tk_btof1 );
277 status = m_tuple1->addIndexedItem ("tp_btof1" , m_ngch, m_tp_btof1 );
278
279 status = m_tuple1->addIndexedItem ("qual_btof2", m_ngch, m_qual_btof2 );
280 status = m_tuple1->addIndexedItem ("tof_btof2" , m_ngch, m_tof_btof2 );
281 status = m_tuple1->addIndexedItem ("te_btof2" , m_ngch, m_te_btof2 );
282 status = m_tuple1->addIndexedItem ("tmu_btof2" , m_ngch, m_tmu_btof2 );
283 status = m_tuple1->addIndexedItem ("tpi_btof2" , m_ngch, m_tpi_btof2 );
284 status = m_tuple1->addIndexedItem ("tk_btof2" , m_ngch, m_tk_btof2 );
285 status = m_tuple1->addIndexedItem ("tp_btof2" , m_ngch, m_tp_btof2 );
286 status = m_tuple1->addIndexedItem ("pidcode" , m_ngch, m_pidcode);
287 status = m_tuple1->addIndexedItem ("pidprob" , m_ngch, m_pidprob);
288 status = m_tuple1->addIndexedItem ("pidchiDedx" , m_ngch, m_pidchiDedx);
289 status = m_tuple1->addIndexedItem ("pidchiTof1" , m_ngch, m_pidchiTof1);
290 status = m_tuple1->addIndexedItem ("pidchiTof2" , m_ngch, m_pidchiTof2);
291
292 status = m_tuple1->addItem ("px_cms_ep", m_px_cms_ep);
293 status = m_tuple1->addItem ("py_cms_ep", m_py_cms_ep);
294 status = m_tuple1->addItem ("pz_cms_ep", m_pz_cms_ep);
295 status = m_tuple1->addItem ("e_cms_ep", m_e_cms_ep);
296 status = m_tuple1->addItem ("cos_ep", m_cos_ep);
297 status = m_tuple1->addItem ("px_cms_em", m_px_cms_em);
298 status = m_tuple1->addItem ("py_cms_em", m_py_cms_em);
299 status = m_tuple1->addItem ("pz_cms_em", m_pz_cms_em);
300 status = m_tuple1->addItem ("e_cms_em", m_e_cms_em);
301 status = m_tuple1->addItem ("cos_em", m_cos_em);
302 status = m_tuple1->addItem ("mass_ee", m_mass_ee);
303 status = m_tuple1->addItem ("emax", m_emax);
304 status = m_tuple1->addItem ("esum", m_esum);
305 status = m_tuple1->addItem ( "npip", m_npip );
306 status = m_tuple1->addItem ( "npim", m_npim );
307 status = m_tuple1->addItem ( "nkp", m_nkp );
308 status = m_tuple1->addItem ( "nkm", m_nkm );
309 status = m_tuple1->addItem ( "np", m_np );
310 status = m_tuple1->addItem ( "npb", m_npb );
311
312 status = m_tuple1->addItem ( "nep", m_nep );
313 status = m_tuple1->addItem ( "nem", m_nem );
314 status = m_tuple1->addItem ( "nmup", m_nmup );
315 status = m_tuple1->addItem ( "nmum", m_nmum );
316
317 }
318 else {
319 log << MSG::ERROR << " Cannot book N-tuple:" << long(m_tuple1) << endmsg;
320 return StatusCode::FAILURE;
321 }
322}
323
324
325
326
327
328log << MSG::INFO << "successfully return from initialize()" <<endmsg;
329return StatusCode::SUCCESS;
330
331
332
333
334}