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